[Rxtx] dynamic usb updates

Tod E. Kurt tod at todbot.com
Tue Sep 12 10:50:50 MDT 2006


Re: why a reboot needed when adding USB serial devices.

On both Linux and Mac OS X, it's possible to start using a new device  
driver immediately, using 'modprobe' or 'kextload', respectively.  So  
you could install the driver, then use one of those programs to avoid  
a reboot.  For instance, on Mac OS X, you can load a newly installed  
serial driver for the FTDI chip by doing:
  sudo kextload /System/Library/Extensions/FTDIUSBSerialDriver.kext

Th problem (at least for Mac OS X, I'm not entire up on how Linux  
does it), is that the USB hotplug kernel module 'IOUSBFamily.kext'  
only scans for potential drivers to use on startup.  The Linux  
'hotplug' daemon performs a similar role I think.  You may be able to  
do a 'kextunload' and 'kextload' on IOUSBFamily to get it to rescan  
the driver list, but I've not tried it.

For devices that conform to USB device class standard, like HID,  
audio, mass storage, etc. no new drivers are required so adding new  
devices of those class Just Work.

-=tod


On Sep 12, 2006, at 4:02 AM, Dr. Douglas Lyon wrote:

> Hi All,
> You know, dynamic USB updates seem like a good idea, to me.
> On the other hand, to add a PortIO USB to serial converter,
> I had to:
> 1. Download the latest driver,
> 2. Install the hardware,
> 3. Install the driver and
> 4. Reboot the system (this is part of the installer).
>
> Considering that USB should be hot pluggable, I am not
> sure why rebooting is required. What is going on here?
>
> Rebooting a UNIX system, for a USB addition, is typically rare, right?
>
> Does the specification on the Comm API have to change in order
> to accommodate the dynamic USB update?
>
> Thanks!
>   - Doug
>
>> AH!  great.
>> So my mental model was reasonable, but ahead of its time.
>> Now how do I adjust my mental image? Does rebooting the machine
>> change anything? How do I get to those new ports?!
>> sj
>>
>> On 2006 Sep 11, at 7:00 PM, Trent Jarvi wrote:
>>
>>>
>>>  Hi Stephen
>>>
>>>  The CommAPI 'specification' was written before ports could  
>>> vanish and
>>>  appear.  There isn't a means of catching 'hotplug' events yet.  For
>>>  all
>>>  practical purposes, the hardware should not change while using  
>>> CommAPI
>>>  2.0.  This shortfall has been discussed as a possible addition to
>>>  future
>>>  'standards' which rxtx will support.  For now, you have to  
>>> adjust your
>>>  mental image :)
>>>
>>>  On Mon, 11 Sep 2006, Dr. Stephen Judd wrote:
>>>
>>>>  Many thanks to Dr. Lyon, Joachim Buechse, and Bob Jacobsen.
>>>>
>>>>  Building on what I have learned from this group, my mental  
>>>> model has
>>>>  arrived at the point where I believe that the mere plugging in of
>>>>  a port
>>>>  expander (like the DUAL PORT USB to Serial RS-232 DB-9 Adapter  
>>>> Cable)
>>>>  will automagically change the list of ports available to
>>>>  CommPortIdentifier.getPortIdentifiers().
>>>>
>>>>  Experiments say this is not true however. Using same SerialDemo as
>>>>  described below, the list does not change, even after plugging a
>>>>  live device
>>>>  into one of the resulting RS-232 ports, and restarting the app.
>>>>
>>>>  What's broken now? my hardware? or still my head?
>>>>  sj
>>>>
>>>>  On 2006 Sep 7, at 8:40 AM, Dr. Douglas Lyon wrote:
>>
>> _______________________________________________
>> Rxtx mailing list
>> Rxtx at qbang.org
>> http://mailman.qbang.org/mailman/listinfo/rxtx
>
>
> _______________________________________________
> Rxtx mailing list
> Rxtx at qbang.org
> http://mailman.qbang.org/mailman/listinfo/rxtx
>




More information about the Rxtx mailing list