| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
On Feb 5, 2005, at 10:05 PM, Julien Palmas wrote:
As i said before, i am really new to this kind of programing.
In my precedent mail, i made quite a lot of vocabulary mistakes.
Actually, what i am trying to use is :
- a cable, containing some electronic devices
- a ROM card.
the cable is obviously used to transfer data from the mac to the card.
The software i am trying to port already exists for Linux and Windows XP.
Under Windows XP, you have to install a driver. I am not sure, but i guess the driver
is for the cable, and not for the card ...
Did I clarify a bit ?
A bit. Unfortunately, there really isn't enough information in your post for folks on this list to help you much.
What happens when you attach the USB Cable/ROM card to a Mac?
Do you get any alert panels or dialogs?
Do you see any new device nodes being present in /dev/disk* ?
If you could run "/usr/sbin/ioreg -c IOUSBDevice" and post the output, perhaps some of the USB experts in this list can tell you what you're facing.
Cheers,
- Dean
On Feb 6, 2005, at 2:33 PM, Dean Reece wrote:
Julien,
If I understand you correctly, then the usb device is a USB mass storage class compliant device, so OS X should create /dev/disk... nodes when it is plugged in. If that is the case, then you can just 'cat "foo" > /dev/disk#' as you would on any *nix.
The biggest issue you will have is that the system will try very hard to do something with the media as soon as it appears: It will examine it for partition schemes, and will have all the various filesystems probe it to see if it is mountable. If all that fails, then it will present a dialogue to the user saying that the media is unreadable and asking if they want to format it or eject it.
What you'll want to do is write an app (not a driver) that signs up for DiskArbitration notifications. You will be notified any time new media appears. You can then examine it and decide if it is the device you want and if so, you can claim it for your own app. At that point, you'll have exclusive access to it.
If your device does not cause a /dev/disk node to be created, then it isn't mass storage class compliant, and it will need a custom driver.
If I've misunderstood your situation, then please provide more detail on the device and what it is you are trying to do with it.
Cheers,
- Dean
On Feb 5, 2005, at 7:40 PM, Julien Palmas wrote:
First hello list ;-)
This is my first post in this list, please to join the community !
I am trying to port an linux application that accesses a USB storage device thanx to a
cat "foo" > /proc/bar
In the linux code, there is no more than this line to put the binary data in the usb device !!
However, it seems that under mac os x, i have to go trough a device recognition procedure
before i can access this device.
I've been reading the IOKit documentation and it is pretty useful.
http://developer.apple.com/documentation/DeviceDrivers/Conceptual/AccessingHardware/index.html#//apple_ref/doc/uid/TP30000376
I have to say that it is the first time i am coding at such a low level. I am much more of a cocoa programer.
Anyway, the thing is that i manage to create the matching dictionary, examine the objects inside the dictionary and find the one i want.
then come this page in the documentation :
"Putting it all together ....."
There they speak about getting a device interface or a device file.
My questions are :
- when i plug my usb device, is there a /dev/foobar automatically created ?
- if no, how do i create it ? the code listing they give is just to create a string with some parameters from the object you found thanx to the dictionary.
- if i want to use the device interface, does <x-tad-bigger>IOCreatePlugInInterfaceForService still exist? i don't find anywhere!
Thanx
julien</x-tad-bigger>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Usb mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/usb/email@hidden
This email sent to email@hidden
_______________________________________________ Do not post admin requests to the list. They will be ignored. Usb mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/usb/email@hidden This email sent to email@hidden
| References: | |
| >[newbie] device interface or device file path (From: Julien Palmas <email@hidden>) | |
| >Re: [newbie] device interface or device file path (From: Dean Reece <email@hidden>) | |
| >Re: [newbie] device interface or device file path (From: Julien Palmas <email@hidden>) | |
| >Re: [newbie] device interface or device file path (From: Dean Reece <email@hidden>) |
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2007 Apple Inc. All rights reserved.