Hi Johannes, > I'd rather start from scratch to avoid some of the mistakes that usbfs1 > made.
could you say more about these mistakes please. > > * How about usermode APIs? "libusb" and "usb(dev)fs" are > > essentially what C programmers use, and there's some > > notion of portability to non-Linux systems. I'm not > > sure it's realistic to try helping BSD implement usbfs2. > > Also, a C-only framework is undesirable. (Minimizing > > use of ioctl will be a big win for non-C programming.) > > I agree. While libusb works with C and C++, other programming languages > should be able to use usbfs2 as well. Reading and writing files should be OK for any language (including scripts). However reading or writing special structures (structs) could be a problem, since imitating C types (getting the size right) and C record layout (padding etc) could be a pain from another language. Can it be done at all from a shell script? (This is one of the bad things about reading device descriptors from the current usbfs files by the way). So sticking to simple things like: echo 1 > bAlternateSetting cat my_firmware_file > endpoint_file would be nice. > > * How should this relate to "udev"? One implementation > > strategy would make "usbfs2" endpoint files be regular > > character devices. There are other strategies too, > > including not coupling them at all. > > Perhaps a sockets interface would be more appropriate? > > Device nodes work well for a generic API like block or character > devices, but it gets into problems with USB. Why is that? > > * How should devices be presented? My initial guess is > > as a directory, with subdirectories for each interface > > and one file for ep0 access. (Unconfigured devices > > will have no interfaces, so no per-interface ep0 file.) > > Plus of course the sysfs info. > > Ideally I'd like to see a single directory with all of the endpoints and > symlinks from interface directories to the endpoint directories. Is this to avoid having to go down the directory tree to get to an endpoint? Ciao, Duncan. ------------------------------------------------------- This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel