Skip to contentSkip to conversation

Configuring previously loaded module

DISCUSSION Thiago Ramos dos Santos 2 participants 3 messages Aug 26, 2007 – Aug 27, 2007

lore
Share & tools
lore
#0 lore raw

Hi.

I have 2 devices which use the usbserial module: a CDMA modem and a Palm PDA (to be more especific, the PDA uses the visor module, which uses the usbserial).
When I plug the PDA to the computer, the visor module gets automatically loaded by the kernel, and so is the usbserial module. When the modem is pluged, the module is not loaded automaticaly, so I created a hotplug entry for it.
For both devices I put rules in udev configuration files, so they are autmaticaly mapped to the same /dev node in despite of the ttyUSB* node they are mapped to.

The problem is that the modem requires the usbserial module to be loaded with some parameters: product=xxxxx vendor=xxxxx. So, if I plug the PDA first, the usbserial is loaded without those parameters, and when the modem is pluged, the ttyUSB nodes are not created for it. So I have to manually unload both the visor and usbserial modules, reload the usbserial with the specific parameters (to get the ttyUSB nodes for the modem) and reload the visor module (to recreate the ttyUSB nodes for the PDA).

Is there anyway to configure the previously loaded usbserial module with the modem parameters without having to unload it? If it is not possible, is there any other solution?

Thanks
Thiago

#1 lore raw
Quoted 20 lines · Thiago Ramos dos Santos

I have 2 devices which use the usbserial module: a CDMA modem and a Palm PDA (to be more especific, the PDA uses the visor module, which uses the usbserial).
When I plug the PDA to the computer, the visor module gets automatically loaded by the kernel, and so is the usbserial module. When the modem is pluged, the module is not loaded automaticaly, so I created a hotplug entry for it.
For both devices I put rules in udev configuration files, so they are autmaticaly mapped to the same /dev node in despite of the ttyUSB* node they are mapped to.

The problem is that the modem requires the usbserial module to be loaded with some parameters: product=xxxxx vendor=xxxxx. So, if I plug the PDA first, the usbserial is loaded without those parameters, and when the modem is pluged, the ttyUSB nodes are not created for it. So I have to manually unload both the visor and usbserial modules, reload the usbserial with the specific parameters (to get the ttyUSB nodes for the modem) and reload the visor module (to recreate the ttyUSB nodes for the PDA).

Quoted 3 lines

Is there anyway to configure the previously loaded usbserial module with the modem parameters without having to unload it? If it is not possible, is there any other solution?

Try putting:
options usbserial product=xxxxx vendor=xxxxx
in:
/etc/modprobe.d/serial

Kay

#2 lore raw

It worked.
Thanks a lot.

Thiago

Quoted 32 lines · Kay Sievers
Quoted 20 lines · Thiago Ramos dos Santos

I have 2 devices which use the usbserial module: a CDMA modem and a Palm PDA (to be more especific, the PDA uses the visor module, which uses the usbserial).
When I plug the PDA to the computer, the visor module gets automatically loaded by the kernel, and so is the usbserial module. When the modem is pluged, the module is not loaded automaticaly, so I created a hotplug entry for it.
For both devices I put rules in udev configuration files, so they are autmaticaly mapped to the same /dev node in despite of the ttyUSB* node they are mapped to.

The problem is that the modem requires the usbserial module to be loaded with some parameters: product=xxxxx vendor=xxxxx. So, if I plug the PDA first, the usbserial is loaded without those parameters, and when the modem is pluged, the ttyUSB nodes are not created for it. So I have to manually unload both the visor and usbserial modules, reload the usbserial with the specific parameters (to get the ttyUSB nodes for the modem) and reload the visor module (to recreate the ttyUSB nodes for the PDA).

Quoted 3 lines

Is there anyway to configure the previously loaded usbserial module with the modem parameters without having to unload it? If it is not possible, is there any other solution?

Try putting:
options usbserial product=xxxxx vendor=xxxxx
in:
/etc/modprobe.d/serial

Kay