sim800: add udev detection.
PATCH 3/3 sim800: add udev detection.
--- plugins/udevng.c | 1 + 1 file changed, 1 insertion(+)
plugins/udevng.c +1 -0
@@ -1308,6 +1308,7 @@ static struct { { "calypso", setup_serial_modem }, { "cinterion", setup_serial_modem }, { "nokiacdma", setup_serial_modem }, + { "sim800", setup_serial_modem }, { "sim900", setup_serial_modem }, { "wavecom", setup_wavecom }, { "tc65", setup_tc65 },
Signature · 1 line
2.7.4
plugins/udevng.c static struct { · line 1311
Quoted 13 lines · Clement Viel
--- plugins/udevng.c | 1 + 1 file changed, 1 insertion(+)plugins/udevng.c +1
-0@@ -1308,6 +1308,7 @@ static struct { { "calypso", setup_serial_modem }, { "cinterion", setup_serial_modem }, { "nokiacdma", setup_serial_modem }, + { "sim800", setup_serial_modem },
Right... that's much simpler. And given that you are extending the sim900 driver to handle the sim800 model, you don't need the above line either.
/Jonas
Quoted 4 lines
plugins/udevng.c +0
-0{ "sim900", setup_serial_modem }, { "wavecom", setup_wavecom }, { "tc65", setup_tc65 },
Quoted 20 lines · Jonas Bonn
plugins/udevng.c static struct { · line 1311
Quoted 13 lines · Clement Viel
--- plugins/udevng.c | 1 + 1 file changed, 1 insertion(+)plugins/udevng.c +1
-0@@ -1308,6 +1308,7 @@ static struct { { "calypso", setup_serial_modem }, { "cinterion", setup_serial_modem }, { "nokiacdma", setup_serial_modem }, + { "sim800", setup_serial_modem },Right... that's much simpler. And given that you are extending the sim900 driver to handle the sim800 model, you don't need the above line either.
Quoted 6 lines
/Jonas
Quoted 4 lines
plugins/udevng.c +0
-0{ "sim900", setup_serial_modem }, { "wavecom", setup_wavecom }, { "tc65", setup_tc65 },
I think I must keep this line because the udev rule added by the user will specify that modem is "OFONO_DRIVER=sim800" so udevng.c must know what to do with that.
Hi Clement,
Quoted 1 line
Quoted 1 line
Review
Quoted 1 line
(quoted diff) +1
-0+ { "sim800", setup_serial_modem }, > I think I must keep this line because the udev rule added by the user
will specify that modem is "OFONO_DRIVER=sim800" so udevng.c must know what to do with that.
This is kind of weird that we have a driver line for a modem driver that doesn't exist. We never do things this way. Why don't you just modify the driver instructions to have OFONO_DRIVER=sim900 instead?
Also, we could simply rename the sim900 driver into sim_x00 or simcom_serial or something too. That could make things a bit more clear.
Regards,
-Denis
On Thu, Nov 08, 2018 at 10:59:30AM -0600, Denis Kenzior wrote:
Hi Denis,
Quoted 9 lines
Hi Clement,
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
(quoted diff) +1
-0+ { "sim800", setup_serial_modem }, > I think I must keep this linebecause the udev rule added by the user
will specify that modem is "OFONO_DRIVER=sim800" so
udevng.cmust know what to do with that.
This is kind of weird that we have a driver line for a modem driver that doesn't exist. We never do things this way. Why don't you just modify the driver instructions to have OFONO_DRIVER=sim900 instead?
I agree with you, I was thinking the sim800 must be mentioned to avoid confusing doc/sim900.txt to mention that sim800 is supported by this driver. Then, keep in the users.
Quoted 2 lines
Also, we could simply rename the sim900 driver into
sim_x00orsimcom_serialor something too. That could make things a bit more clear.
I think we can keep that in mind for further development.
Quoted 3 lines
Regards,
-Denis
Just tell me whether I should add mention of sim800 in sim900.txt or rename sim900.txt in simcom.txt to mention the two drivers. Then I'll upload the patchset with doc in it.
Regards
Clement
Hi Clement,
Quoted 2 lines
Just tell me whether I should add mention of sim800 in sim900.txt or rename sim900.txt in simcom.txt to mention the two drivers. Then I'll upload the patchset with doc in it.
I don't feel strongly either way, but if I had to pick, I say lets rename sim900.txt into simcom.txt and maintain all driver instructions there.
Regards,
-Denis
Quoted 9 lines · Denis Kenzior
Hi Clement,
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
(quoted diff) +1
-0+ { "sim800", setup_serial_modem }, > I think I must keep this linebecause the udev rule added by the user
will specify that modem is "OFONO_DRIVER=sim800" so
udevng.cmust know what to do with that.
This is kind of weird that we have a driver line for a modem driver that doesn't exist. We never do things this way. Why don't you just modify the driver instructions to have OFONO_DRIVER=sim900 instead?
Quoted 5 lines
Also, we could simply rename the sim900 driver into
sim_x00orsimcom_serialor something too. That could make things a bit more clear.Regards,
-Denis
Moreover if we go for the OFONO_DRIVER=sim900 solution, plugins/udevng.c will stay the same.