How to obtain the ugen that corresponds to an ums, uep or uhid?
Hi, folks. Is there a way to obtain the name of an ugen device that corresponds to a particular ums/uep/uhid device? The situation I'm working with is this: there's a (custom) DEVD rule that executes a script when any new ums or uhid device is created. This script has access to the device name (and any other info DEVD provides), and needs to figure out manufacturer name, product name and ID numbers of this device. To do that, it parses the output of this command: usbconfig -d ugenunit.address dump_device_desc The question is how should the script obtain these unit and address numbers? Now, when a new device is attached DEVD receives a message like this: +uhid0 at bus=1 hubaddr=1 port=3 devaddr=2 interface=0 vendor=0x0079 product=0x0011 devclass=0x00 devsubclass=0x00 sernum= release=0x0106 mode=host intclass=0x03 intsubclass=0x00 intprotocol=0x00 on uhub0 (The correct ugen for this device happens to be ugen3.2). ... or a message like this: +ums0 at bus=0 hubaddr=2 port=2 devaddr=3 interface=1 vendor=0x046d product=0xc52b devclass=0x00 devsubclass=0x00 sernum= release=0x1201 mode=host intclass=0x03 intsubclass=0x01 intprotocol=0x02 on uhub3 (In this case the correct ugen is ugen0.3). It seems that we have the correct address number in the devaddr variable, but the correct unit number is nowhere to be found. So, again, given an ums/uep/uhid device name (and, possibly address number), how should one fine what to pass into usbconfig's ugenunit.address parameter? (This question is triggered by the discussion in PR 183478 [1]). [1] https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=183478 ___ freebsd-usb@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-usb To unsubscribe, send any mail to freebsd-usb-unsubscr...@freebsd.org
Re: How to obtain the ugen that corresponds to an ums, uep or uhid?
On 09/15/14 13:43, Vitaly Magerya wrote: Hi, folks. Is there a way to obtain the name of an ugen device that corresponds to a particular ums/uep/uhid device? Hi, Have you tried: usbconfig show_ifdrv The situation I'm working with is this: there's a (custom) DEVD rule that executes a script when any new ums or uhid device is created. This script has access to the device name (and any other info DEVD provides), and needs to figure out manufacturer name, product name and ID numbers of this device. To do that, it parses the output of this command: usbconfig -d ugenunit.address dump_device_desc The question is how should the script obtain these unit and address numbers? Now, when a new device is attached DEVD receives a message like this: +uhid0 at bus=1 hubaddr=1 port=3 devaddr=2 interface=0 vendor=0x0079 product=0x0011 devclass=0x00 devsubclass=0x00 sernum= release=0x0106 mode=host intclass=0x03 intsubclass=0x00 intprotocol=0x00 on uhub0 (The correct ugen for this device happens to be ugen3.2). ... or a message like this: +ums0 at bus=0 hubaddr=2 port=2 devaddr=3 interface=1 vendor=0x046d product=0xc52b devclass=0x00 devsubclass=0x00 sernum= release=0x1201 mode=host intclass=0x03 intsubclass=0x01 intprotocol=0x02 on uhub3 (In this case the correct ugen is ugen0.3). It seems that we have the correct address number in the devaddr variable, but the correct unit number is nowhere to be found. That might be a bug. We can easily add a unit=%d argument to the devd events, if not already there. So, again, given an ums/uep/uhid device name (and, possibly address number), how should one fine what to pass into usbconfig's ugenunit.address parameter? (This question is triggered by the discussion in PR 183478 [1]). [1] https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=183478 --HPS ___ freebsd-usb@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-usb To unsubscribe, send any mail to freebsd-usb-unsubscr...@freebsd.org
Re: How to obtain the ugen that corresponds to an ums, uep or uhid?
On 2014-09-15 15:07, Hans Petter Selasky wrote: Hi, folks. Is there a way to obtain the name of an ugen device that corresponds to a particular ums/uep/uhid device? Have you tried: usbconfig show_ifdrv I haven't. It does look like a good solution though. Thank you. It seems that we have the correct address number in the devaddr variable, but the correct unit number is nowhere to be found. That might be a bug. We can easily add a unit=%d argument to the devd events, if not already there. That would be great as well (although I won't be able to use this until the EoL of all FreeBSD versions without this feature, but it will simplify things afterwards). ___ freebsd-usb@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-usb To unsubscribe, send any mail to freebsd-usb-unsubscr...@freebsd.org
U3G QDL firmware loader for GOBI2000/HP_UN2420 MiniPCI/USB 3G/GPS
Hello world! :-) I have changed my machine, there is a built-in GOBI2000 / HP UN2420 3G/GPS module installable as MiniPCI card and visible as USB device. I have added its VID/PID to the usbdevs and u3g.c module, so after recompilation it gets recognised by u3g module and apropriate /dev/cuaU* device shows up.. The problem is that device does not store firmware inside non-volatile memory, so user needs to upload it after power-on. I have the firmware files. I can test modem with success after reboot from Win7 which uploads firmware into device. Still, I need to upload the firmware somehow on my FreeBSD. The upload protocol is QDL and /dev/cuaU0 shows up waiting for command. Which utility can I use to upload firmware with QDL? I have seen one post [1] regarding this problem in the past but the QDL utility was not named explicitly. Any hints welcome! :-) Tomek [1] http://lists.freebsd.org/pipermail/freebsd-usb/2010-October/009384.html -- CeDeROM, SQ7MHZ, http://www.tomek.cedro.info ___ freebsd-usb@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-usb To unsubscribe, send any mail to freebsd-usb-unsubscr...@freebsd.org
Re: U3G QDL firmware loader for GOBI2000/HP_UN2420 MiniPCI/USB 3G/GPS
On 09/15/14 17:16, CeDeROM wrote: Hello world! :-) I have changed my machine, there is a built-in GOBI2000 / HP UN2420 3G/GPS module installable as MiniPCI card and visible as USB device. I have added its VID/PID to the usbdevs and u3g.c module, so after recompilation it gets recognised by u3g module and apropriate /dev/cuaU* device shows up.. The problem is that device does not store firmware inside non-volatile memory, so user needs to upload it after power-on. I have the firmware files. I can test modem with success after reboot from Win7 which uploads firmware into device. Still, I need to upload the firmware somehow on my FreeBSD. The upload protocol is QDL and /dev/cuaU0 shows up waiting for command. Which utility can I use to upload firmware with QDL? I have seen one post [1] regarding this problem in the past but the QDL utility was not named explicitly. Any hints welcome! :-) Tomek [1] http://lists.freebsd.org/pipermail/freebsd-usb/2010-October/009384.html Hi, Maybe you can use some tools to sniff the USB protocol under the other operating system. The protocol is probably not too complicated, and just replay the traffic. --HPS ___ freebsd-usb@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-usb To unsubscribe, send any mail to freebsd-usb-unsubscr...@freebsd.org