Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [newbie] device interface or device file path



I got some more information about the device i am trying to access.
It seems that the chip inside the usb cable is a EZUSB chip.
>From what i understood from the internet, this chip needs to be loaded
with a firmware and this seems to be the job of the driver.

It looks like this driver is included inside the kernel of linux.
I found this post in one of the Apple mailing lists :
http://lists.apple.com/archives/darwin-drivers/2003/Dec/msg00067.html

Anybody knows something about ezusb chips, and if so, is there already
a driver for mac os x for this chip ?

Julien

On Feb 6, 2005, at 3:29 PM, Julien Palmas wrote:

OK, when i plug the cable to the mac, no dialog box.
no "unreadable device", no /dev/disk created, nothing.

In the IORegistry, on the other hand, i see the new device.
I use a powerBook G4 with 2 usb ports. with the cable plugged, here is the
listing of the ioreg

| | | +-o IOUSBVendorSpecificDevice@18100000 <class IOUSBDevice, registered, matched, active, busy 0, $
| | | | {
| | | | "PortNum" = 1
| | | | "Device Speed" = 1
| | | | "iSerialNumber" = 0
| | | | "bNumConfigurations" = 1
| | | | "IOUserClientClass" = "IOUSBDeviceUserClient"
| | | | "bDeviceClass" = 255
| | | | "iManufacturer" = 0
| | | | "IOCFPlugInTypes" = {"9dc7b780-9ec0-11d4-a54f-000a27052861"="IOUSBFamily.kext/Contents/Plug$
| | | | "bcdDevice" = 4
| | | | "bDeviceSubClass" = 255
| | | | "iProduct" = 0
| | | | "sessionID" = 100562398486130
| | | | "bMaxPacketSize0" = 64
| | | | "locationID" = 403701760
| | | | "Bus Power Available" = 250
| | | | "idProduct" = 8497
| | | | "USB Address" = 2
| | | | "bDeviceProtocol" = 255
| | | | "idVendor" = 1351
| | | | }
| | | |
| | | +-o IOUSBUserClientInit <class IOUSBUserClientInit, !registered, !matched, active, busy 0, ret$

On Feb 6, 2005, at 3:15 PM, Dean Reece wrote:

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
 _______________________________________________
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>)
 >Re: [newbie] device interface or device file path (From: Julien Palmas <email@hidden>)



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.