It was <2013-11-22 pią 15:36>, when Yang Chengwei wrote: > On Fri, Nov 22, 2013 at 01:15:31PM +0100, Krzysztof Opasiak wrote: [...] >> Let me summarize and please correct me if I'm wrong. We have a PC in >> host mode and multiple devices with tizen in USB device mode. We are >> using sdb on the host and we would like to be able to communicate witch >> each particular device directly. >> >> If above is true, it means that we would like to use sdb on a host with >> -s option: >> >> $sdb -h >> >> -s <serial number> - directs command to the USB device or >> emulator with the given serial number. > > Yes, that's it. > >> >> Serial number belongs to device descriptor (device strings exactly). So >> the issue is that usb-manager should generate unique serials while first > > I think no, usb-manager doesn't generate the serial number but read from > some place, just like the vendor, product, though they're currently > hard-coded in usb-manager. That's what we need fix. > > We do have to provide some API to get such HW infos.
idVendor and idProduct are two numbers that help a host tell what "protocol" it shoudl use to talk to a device. The "protocol" depends on the software running on the device, hence it does not seem unreasonable to make idVendor and idProduct configuration options of the software. iSerial on the other hand identifies particular piece of hardware and this seems very trickiy to me. To make it work reliably the serial the number should be generated and stored on a device in a factory. As far as I can tell (if there is anyone who knows how the manufacturing process looks like, please enlighten us) the M0 devices don't have any "engraved" and programatically accessible serial numbers. And we (?) do not know how this woul/could be done in any product in the future. Thus the best thing we can do now, as I see it, is to create a stub code in the usb-manager (or nearby it) that generates the serial number on demand. As far as addressing multple devicess with sdb I think addressing them with USB topology seems like a good idea. If you keep the topology unchanged on your desk you can label the cords you attach devices to and this is the quickest way to identify devices. -- Łukasz Stelmach Samsung R&D Institute Poland Samsung Electronics
pgp5evf2kuB4Z.pgp
Description: PGP signature
_______________________________________________ Dev mailing list [email protected] https://lists.tizen.org/listinfo/dev
