Skip to contentSkip to conversation

plugins: sim900 support broken for tty port users

BUG [email protected] 2 participants 3 messages Jun 19, 2018 – Jun 22, 2018

lore
Share & tools
lore
#0 lore raw

Hi!

I think I found a bug.

Commit 1d63b1d35 essentially breaks the sim900 driver for serial port users.
It adds a new entry in plugins/udevng.c driver_list with name "sim900". There are two entries with the same name then: The new one which calls the new setup_sim900 function and the old one which wants to call the old setup_serial_modem function. Since driver_list is scanned by name of the driver from top to button, serial driver users don't have a chance to reach the entry with setup_serial_modem anymore. Calling setup_sim900 does not work on a modem that was added through add_serial_device, because the union serial/devices is written a struct serial_device_info * that can not be used as GSList *. Maybe I am missing something, but I think the new driver name in driver_list should be different from the old one.

Regards,
Lars

#1 lore raw

Hi Lars,

Quoted 6 lines · poeschel(a)lemonage.de

Hi!

I think I found a bug.

Commit 1d63b1d35 essentially breaks the sim900 driver for serial port users.

Right. This looks like some wires being crossed. sim900 driver is only meant for serial port usage. So listing it for 'option' isn't correct. Also, setup_sim900 was renamed from setup_simcom (introduced in f2bfaed17). Unfortunately I don't think we ever had a simcom driver (e.g. plugins/simcom.c) for non-serial SIM COM modems until support for SIM 7100 was added.

Quoted 11 lines

It adds a new entry in plugins/udevng.c driver_list with name "sim900". There are two entries with the same name then: The new one which calls the new setup_sim900 function and the old one which wants to call the old setup_serial_modem function. Since driver_list is scanned by name of the driver from top to button, serial driver users don't have a chance to reach the entry with setup_serial_modem anymore. Calling setup_sim900 does not work on a modem that was added through add_serial_device, because the union serial/devices is written a struct serial_device_info * that can not be used as GSList *. Maybe I am missing something, but I think the new driver name in driver_list should be different from the old one.

Right. I've gone ahead and pushed out 06f3a85ee3d187888640be71d5dd5293e6970d05 that should fix this. Please let me know if it does.

It may be that the vid/pid "05c6/9000" meant for the simcom driver should be handled by sim7100 or some unified simcom driver that handles all SIM COM USB devices.

Regards,
-Denis

#2 lore raw
Quoted 28 lines · poeschel(a)lemonage.de
Quoted 6 lines

Hi!

I think I found a bug.

Commit 1d63b1d35 essentially breaks the sim900 driver for serial port users.

Right. This looks like some wires being crossed. sim900 driver is only meant for serial port usage. So listing it for 'option' isn't correct. Also, setup_sim900 was renamed from setup_simcom (introduced in f2bfaed17). Unfortunately I don't think we ever had a simcom driver (e.g. plugins/simcom.c) for non-serial SIM COM modems until support for SIM 7100 was added.

Quoted 4 lines

It adds a new entry in plugins/udevng.c driver_list with name "sim900".
There are two entries with the same name then: The new one which calls the new setup_sim900 function and the old one which wants to call

Quoted 8 lines

the old setup_serial_modem function. Since driver_list is scanned by name of the driver from top to button, serial driver users don't have a chance to reach the entry with setup_serial_modem anymore. Calling setup_sim900 does not work on a modem that was added through add_serial_device, because the union serial/devices is written a struct serial_device_info * that can not be used as GSList *. Maybe I am missing something, but I think the new driver name in driver_list should be different from the old one.

Quoted 3 lines

Right. I've gone ahead and pushed out 06f3a85ee3d187888640be71d5dd5293e6970d05 that should fix this. Please let me know if it does.

I don't see 06f3a85ee3d187888640be71d5dd5293e6970d05 in public git, but I guess 08796aa39186568402dd657704151079f1105dae (at the moment on top of master) will also do. ;-)

I tested it. It chooses the right sim900 driver now and does start communicating as I would expect it. Unfortunately I can't test much more, because I don't own a sim900. Sorry.

Thank you for the quick fix,
Lars