Skip to contentSkip to conversation

nokia-modem (N900) not detected after migration to udevng

PATCH In review Clayton Craft 3 participants 29 messages Sep 8, 2017 – Sep 12, 2017

lore
Share & tools
lore
#0 lore raw

Hi,
I've been debugging why the n900 modem is not recognized by ofono for a few days now, and have determined that the cause is because the calls in udevng to udev_device_get_devnode return NULL. It seems that the nokia-modem driver does not create any device nodes under /dev.

This seems to be a regression in functionality since the move to udevng as previous versions of ofono seem to detect the n900 modem correctly (right before this commit 3ac449e25fc8cb9880c48b8f309189c6a644f200) This issue occurs from this commit onwards, including the latest commit as of this mail.

https://git.kernel.org/pub/scm/network/ofono/ofono.git/tree/plugins/udevng.c#n1316

-Clayton

#1 lore raw
Quoted 5 lines · Clayton Craft

Hi,
I've been debugging why the n900 modem is not recognized by ofono for a few days now, and have determined that the cause is because the calls in udevng to udev_device_get_devnode return NULL. It seems that the nokia-modem driver does not create any device nodes under /dev.

What bus does this modem sit on? Are you running ofono _on_ the N900 or are you trying to tether the N900 to some system with ofono?

If you are tethering, what udev events do you get when you plug in the modem? Try running "udevadm monitor" and watch what happens when you plug the modem in.

Not getting a device node sounds mostly like there's a driver missing, though...

/Jonas

Quoted 17 lines

This seems to be a regression in functionality since the move to udevng as previous versions of ofono seem to detect the n900 modem correctly (right before this commit 3ac449e25fc8cb9880c48b8f309189c6a644f200)
This issue occurs from this commit onwards, including the latest commit as of this mail.

https://git.kernel.org/pub/scm/network/ofono/ofono.git/tree/plugins/udevng.c#n1316

-Clayton

_______________________________________________
ofono mailing list
ofono(a)ofono.org
https://lists.ofono.org/mailman/listinfo/ofono

#2 lore raw

This is on HSI bus. I am running ofono on the N900 (not tethering).

From what I understand, I am loading all of the necessary drivers for this to work (nokia-modem, which pulls in its dependencies automaticall).
As I stated in my original note, before moving 'legacy device' initialization to udevng, ofono would at least 'see' the modem. The test script 'list-modems' would list it, now it does not list anything.

-Clayton

Quoted 42 lines · Jonas Bonn
Quoted 5 lines · Clayton Craft

Hi,
I've been debugging why the n900 modem is not recognized by ofono for a few days now, and have determined that the cause is because the calls in udevng to udev_device_get_devnode return NULL. It seems that the nokia-modem driver does not create any device nodes under /dev.

What bus does this modem sit on? Are you running ofono _on_ the N900 or are you trying to tether the N900 to some system with ofono?

If you are tethering, what udev events do you get when you plug in the modem? Try running "udevadm monitor" and watch what happens when you plug the modem in.

Not getting a device node sounds mostly like there's a driver missing, though...

/Jonas

Quoted 11 lines

This seems to be a regression in functionality since the move to udevng as previous versions of ofono seem to detect the n900 modem correctly (right before this commit 3ac449e25fc8cb9880c48b8f309189c6a644f200)
This issue occurs from this commit onwards, including the latest commit as of this mail.

https://git.kernel.org/pub/scm/network/ofono/ofono.git/tree/plugins/udevng.c#n1316

Quoted 6 lines

-Clayton

_______________________________________________
ofono mailing list
ofono(a)ofono.org
https://lists.ofono.org/mailman/listinfo/ofono

_______________________________________________
ofono mailing list
ofono(a)ofono.org
https://lists.ofono.org/mailman/listinfo/ofono

#3 lore raw
Quoted 1 line · Clayton Craft

This is on HSI bus. I am running ofono on the N900 (not tethering).

OK, from what I understand, you should be able to find this device under /sys/class/net/....

See if you can find the device there and run:

udevadm info --query all --path /sys/class/net/.... and
udevadm info --attribute-walk --path /sys/class/net.....

Post that output here if it's sane so that we can see what info udev is giving you for the device.

/Jonas

Quoted 58 lines

From what I understand, I am loading all of the necessary drivers for this to work (nokia-modem, which pulls in its dependencies automaticall). As I stated in my original note, before moving 'legacy device' initialization to udevng, ofono would at least 'see' the modem. The test script 'list-modems' would list it, now it does not list anything.

-Clayton

Quoted 39 lines · Jonas Bonn
Quoted 5 lines · Clayton Craft

Hi,
I've been debugging why the n900 modem is not recognized by ofono for a few days now, and have determined that the cause is because the calls in udevng to udev_device_get_devnode return NULL. It seems that the nokia-modem driver does not create any device nodes under /dev.

What bus does this modem sit on? Are you running ofono _on_ the N900 or are you trying to tether the N900 to some system with ofono?

If you are tethering, what udev events do you get when you plug in the modem? Try running "udevadm monitor" and watch what happens when you plug the modem in.

Not getting a device node sounds mostly like there's a driver missing, though...

/Jonas

Quoted 12 lines

This seems to be a regression in functionality since the move to udevng as previous versions of ofono seem to detect the n900 modem correctly (right before this commit 3ac449e25fc8cb9880c48b8f309189c6a644f200)
This issue occurs from this commit onwards, including the latest commit as of this mail.

https://git.kernel.org/pub/scm/network/ofono/ofono.git/tree/plugins/udevng.c#n1316

Quoted 6 lines

-Clayton

_______________________________________________
ofono mailing list
ofono(a)ofono.org
https://lists.ofono.org/mailman/listinfo/ofono

Quoted 4 lines

_______________________________________________
ofono mailing list
ofono(a)ofono.org
https://lists.ofono.org/mailman/listinfo/ofono

_______________________________________________
ofono mailing list
ofono(a)ofono.org
https://lists.ofono.org/mailman/listinfo/ofono

#4 lore raw

Here's the info you requested, please let me know if I can gather anything else to help!

localhost:/home/user# udevadm info --query all --path /sys/bus/hsi/devices/n900-modem
P: /devices/platform/68000000.ocp/48058000.ssi-controller/ssi0/port0/n900-modem
E: DEVPATH=/devices/platform/68000000.ocp/48058000.ssi-controller/ssi0/port0/n900-modem
E: DRIVER=nokia-modem
E: MODALIAS=hsi:n900-modem
E: OFONO_DRIVER=n900
E: OFONO_ISI_ADDRESS=108
E: OF_COMPATIBLE_0=nokia,n900-modem
E: OF_COMPATIBLE_N=1
E: OF_FULLNAME=/ocp(a)68000000/ssi-controller(a)48058000/ssi-port(a)4805a000/hsi-client
E: OF_NAME=hsi-client
E: SUBSYSTEM=hsi
E: USEC_INITIALIZED=337086386
localhost:/home/user# udevadm info --attribute-walk --path /sys/bus/hsi/devices/n900-modem

Udevadm info starts with the device specified by the devpath and then walks up the chain of parent devices. It prints for every device found, all possible attributes in the udev rules key format. A rule to match, can be composed by the attributes of the device and the attributes from one single parent device.

looking at device '/devices/platform/68000000.ocp/48058000.ssi-controller/ssi0/port0/n900-modem':

    KERNEL=="n900-modem"
    SUBSYSTEM=="hsi"
    DRIVER=="nokia-modem"

looking at parent device '/devices/platform/68000000.ocp/48058000.ssi-controller/ssi0/port0':

    KERNELS=="port0"
    SUBSYSTEMS==""
    DRIVERS==""

looking at parent device '/devices/platform/68000000.ocp/48058000.ssi-controller/ssi0':

    KERNELS=="ssi0"
    SUBSYSTEMS==""
    DRIVERS==""

looking at parent device '/devices/platform/68000000.ocp/48058000.ssi-controller':

    KERNELS=="48058000.ssi-controller"
    SUBSYSTEMS=="platform"
    DRIVERS=="omap_ssi"
    ATTRS{driver_override}=="(null)"

looking at parent device '/devices/platform/68000000.ocp':

    KERNELS=="68000000.ocp"
    SUBSYSTEMS=="platform"
    DRIVERS=="omap_l3_smx"
    ATTRS{driver_override}=="(null)"

looking at parent device '/devices/platform':

    KERNELS=="platform"
    SUBSYSTEMS==""
    DRIVERS==""

-Clayton

Quoted 82 lines · Jonas Bonn
Quoted 1 line · Clayton Craft

This is on HSI bus. I am running ofono on the N900 (not tethering).

OK, from what I understand, you should be able to find this device under /sys/class/net/....

See if you can find the device there and run:

udevadm info --query all --path /sys/class/net/.... and
udevadm info --attribute-walk --path /sys/class/net.....

Post that output here if it's sane so that we can see what info udev is giving you for the device.

/Jonas

Quoted 55 lines

From what I understand, I am loading all of the necessary drivers for this to work (nokia-modem, which pulls in its dependencies automaticall). As I stated in my original note, before moving 'legacy device' initialization to udevng, ofono would at least 'see' the modem. The test script 'list-modems' would list it, now it does not list anything.

-Clayton

Quoted 40 lines · Jonas Bonn
Quoted 5 lines · Clayton Craft

Hi,
I've been debugging why the n900 modem is not recognized by ofono for a few days now, and have determined that the cause is because the calls in udevng to udev_device_get_devnode return NULL. It seems that the nokia-modem driver does not create any device nodes under /dev.

What bus does this modem sit on? Are you running ofono _on_ the N900 or are you trying to tether the N900 to some system with ofono?

If you are tethering, what udev events do you get when you plug in the modem? Try running "udevadm monitor" and watch what happens when you plug the modem in.

Not getting a device node sounds mostly like there's a driver missing, though...

/Jonas

Quoted 12 lines

This seems to be a regression in functionality since the move to udevng as previous versions of ofono seem to detect the n900 modem correctly (right before this commit 3ac449e25fc8cb9880c48b8f309189c6a644f200)
This issue occurs from this commit onwards, including the latest commit as of this mail.

https://git.kernel.org/pub/scm/network/ofono/ofono.git/tree/plugins/udevng.c#n1316

Quoted 6 lines

-Clayton

_______________________________________________
ofono mailing list
ofono(a)ofono.org
https://lists.ofono.org/mailman/listinfo/ofono

Quoted 4 lines

_______________________________________________
ofono mailing list
ofono(a)ofono.org
https://lists.ofono.org/mailman/listinfo/ofono

Quoted 4 lines

_______________________________________________
ofono mailing list
ofono(a)ofono.org
https://lists.ofono.org/mailman/listinfo/ofono

_______________________________________________
ofono mailing list
ofono(a)ofono.org
https://lists.ofono.org/mailman/listinfo/ofono

#5 lore raw
Quoted 2 lines · Clayton Craft

Here's the info you requested, please let me know if I can gather anything else to help!

OK, good. It's not a driver issue in any case. Now we need to figure out why ofono is rejecting the device. The debug output from ofonod would be useful. Try running ofono as:

ofonod -d -n

and paste the output here.

/Jonas

Quoted 154 lines
localhost:/home/user# udevadm info --query all --path 
/sys/bus/hsi/devices/n900-modem
P: 
/devices/platform/68000000.ocp/48058000.ssi-controller/ssi0/port0/n900-modem
E: 
DEVPATH=/devices/platform/68000000.ocp/48058000.ssi-controller/ssi0/port0/n900-modem
E: DRIVER=nokia-modem
E: MODALIAS=hsi:n900-modem
E: OFONO_DRIVER=n900
E: OFONO_ISI_ADDRESS=108
E: OF_COMPATIBLE_0=nokia,n900-modem
E: OF_COMPATIBLE_N=1
E: 
OF_FULLNAME=/ocp(a)68000000/ssi-controller(a)48058000/ssi-port(a)4805a000/hsi-client
E: OF_NAME=hsi-client
E: SUBSYSTEM=hsi
E: USEC_INITIALIZED=337086386
localhost:/home/user# udevadm info --attribute-walk --path 
/sys/bus/hsi/devices/n900-modem

Udevadm info starts with the device specified by the devpath and then walks up the chain of parent devices. It prints for every device found, all possible attributes in the udev rules key format. A rule to match, can be composed by the attributes of the device and the attributes from one single parent device.

looking at device
'/devices/platform/68000000.ocp/48058000.ssi-controller/ssi0/port0/n900-modem':

   KERNEL=="n900-modem"
   SUBSYSTEM=="hsi"
   DRIVER=="nokia-modem"

looking at parent device
'/devices/platform/68000000.ocp/48058000.ssi-controller/ssi0/port0':

   KERNELS=="port0"
   SUBSYSTEMS==""
   DRIVERS==""

looking at parent device
'/devices/platform/68000000.ocp/48058000.ssi-controller/ssi0':

   KERNELS=="ssi0"
   SUBSYSTEMS==""
   DRIVERS==""

looking at parent device
'/devices/platform/68000000.ocp/48058000.ssi-controller':

   KERNELS=="48058000.ssi-controller"
   SUBSYSTEMS=="platform"
   DRIVERS=="omap_ssi"
   ATTRS{driver_override}=="(null)"

looking at parent device '/devices/platform/68000000.ocp':

   KERNELS=="68000000.ocp"
   SUBSYSTEMS=="platform"
   DRIVERS=="omap_l3_smx"
   ATTRS{driver_override}=="(null)"

looking at parent device '/devices/platform':

   KERNELS=="platform"
   SUBSYSTEMS==""
   DRIVERS==""

-Clayton

Quoted 79 lines · Jonas Bonn
Quoted 1 line · Clayton Craft

This is on HSI bus. I am running ofono on the N900 (not tethering).

OK, from what I understand, you should be able to find this device under /sys/class/net/....

See if you can find the device there and run:

udevadm info --query all --path /sys/class/net/.... and
udevadm info --attribute-walk --path /sys/class/net.....

Post that output here if it's sane so that we can see what info udev is giving you for the device.

/Jonas

Quoted 56 lines

From what I understand, I am loading all of the necessary drivers for this to work (nokia-modem, which pulls in its dependencies automaticall). As I stated in my original note, before moving 'legacy device' initialization to udevng, ofono would at least 'see' the modem. The test script 'list-modems' would list it, now it does not list anything.

-Clayton

Quoted 41 lines · Jonas Bonn
Quoted 5 lines · Clayton Craft

Hi,
I've been debugging why the n900 modem is not recognized by ofono for a few days now, and have determined that the cause is because the calls in udevng to udev_device_get_devnode return NULL. It seems that the nokia-modem driver does not create any device nodes under /dev.

What bus does this modem sit on? Are you running ofono _on_ the N900 or are you trying to tether the N900 to some system with ofono?

If you are tethering, what udev events do you get when you plug in the modem? Try running "udevadm monitor" and watch what happens when you plug the modem in.

Not getting a device node sounds mostly like there's a driver missing, though...

/Jonas

Quoted 14 lines

This seems to be a regression in functionality since the move to udevng as previous versions of ofono seem to detect the n900 modem correctly (right before this commit 3ac449e25fc8cb9880c48b8f309189c6a644f200)
This issue occurs from this commit onwards, including the latest commit
as of this mail.

https://git.kernel.org/pub/scm/network/ofono/ofono.git/tree/plugins/udevng.c#n1316

Quoted 6 lines

-Clayton

_______________________________________________
ofono mailing list
ofono(a)ofono.org
https://lists.ofono.org/mailman/listinfo/ofono

Quoted 4 lines

_______________________________________________
ofono mailing list
ofono(a)ofono.org
https://lists.ofono.org/mailman/listinfo/ofono

Quoted 4 lines

_______________________________________________
ofono mailing list
ofono(a)ofono.org
https://lists.ofono.org/mailman/listinfo/ofono

Quoted 4 lines

_______________________________________________
ofono mailing list
ofono(a)ofono.org
https://lists.ofono.org/mailman/listinfo/ofono

_______________________________________________
ofono mailing list
ofono(a)ofono.org
https://lists.ofono.org/mailman/listinfo/ofono

#6 lore raw

Ok so after applying the two patches submitted by Jonas, I can get a little further, but it appears that init is still failing:

ofonod[12522]: plugins/udevng.c:create_modem() /sys/devices/platform/68000000.ocp/48058000.ssi-controller/ssi0/port0/n900-modem ofonod[12522]: plugins/udevng.c:create_modem() driver=n900
ofonod[12522]: src/modem.c:ofono_modem_create() name: (null), type: n900
ofonod[12522]: plugins/udevng.c:destroy_modem() /sys/devices/platform/68000000.ocp/48058000.ssi-controller/ssi0/port0/n900-modem ofonod[12522]: src/modem.c:ofono_modem_remove() 0x622770
ofonod[12522]: src/private-network.c:ofono_private_network_driver_register() driver: 0x60f334, name: Example Private Network Driver

After poking around in gdb, I've determined that this condition is failing:
from setup_isi_modem in plugins/udevng.c:

        if (g_strcmp0(udev_device_get_subsystem(info->dev), "net") != 0)

It looks like the modem->serial object does not have any valid data. The cstrings in that struct contain gibberish. info->dev is NULL, and other
info members are not valid strings and definitely do not represent what they should. I added a DBG() print of them here to demonstrate:
ofonod[12905]: plugins/udevng.c:setup_isi_serial() **devpath: `aX, devnode: (null), subsystem: X

Patches applied so far:
https://lists.ofono.org/pipermail/ofono/2017-September/017463.html
https://lists.ofono.org/pipermail/ofono/2017-September/017465.html

-Clayton

Quoted 171 lines · Jonas Bonn
Quoted 2 lines · Clayton Craft

Here's the info you requested, please let me know if I can gather anything else to help!

OK, good. It's not a driver issue in any case. Now we need to figure out why ofono is rejecting the device. The debug output from ofonod would be useful. Try running ofono as:

ofonod -d -n

and paste the output here.

/Jonas

Quoted 147 lines
localhost:/home/user# udevadm info --query all --path 
/sys/bus/hsi/devices/n900-modem
P: /devices/platform/68000000.ocp/48058000.ssi-controller/ssi0/port0/n900-modem
E: DEVPATH=/devices/platform/68000000.ocp/48058000.ssi-controller/ssi0/port0/n900-modem
E: DRIVER=nokia-modem
E: MODALIAS=hsi:n900-modem
E: OFONO_DRIVER=n900
E: OFONO_ISI_ADDRESS=108
E: OF_COMPATIBLE_0=nokia,n900-modem
E: OF_COMPATIBLE_N=1
E: OF_FULLNAME=/ocp(a)68000000/ssi-controller(a)48058000/ssi-port(a)4805a000/hsi-client
E: OF_NAME=hsi-client
E: SUBSYSTEM=hsi
E: USEC_INITIALIZED=337086386
localhost:/home/user# udevadm info --attribute-walk --path 
/sys/bus/hsi/devices/n900-modem

Udevadm info starts with the device specified by the devpath and then walks up the chain of parent devices. It prints for every device found, all possible attributes in the udev rules key format. A rule to match, can be composed by the attributes of the device and the attributes from one single parent device.

looking at device '/devices/platform/68000000.ocp/48058000.ssi-controller/ssi0/port0/n900-modem':
KERNEL=="n900-modem"
SUBSYSTEM=="hsi"
DRIVER=="nokia-modem"

looking at parent device '/devices/platform/68000000.ocp/48058000.ssi-controller/ssi0/port0':
KERNELS=="port0"
SUBSYSTEMS==""
DRIVERS==""

looking at parent device '/devices/platform/68000000.ocp/48058000.ssi-controller/ssi0':
KERNELS=="ssi0"
SUBSYSTEMS==""
DRIVERS==""

looking at parent device '/devices/platform/68000000.ocp/48058000.ssi-controller':
KERNELS=="48058000.ssi-controller" SUBSYSTEMS=="platform"
DRIVERS=="omap_ssi" ATTRS{driver_override}=="(null)"

looking at parent device '/devices/platform/68000000.ocp':
KERNELS=="68000000.ocp"
SUBSYSTEMS=="platform"
DRIVERS=="omap_l3_smx" ATTRS{driver_override}=="(null)"

looking at parent device '/devices/platform':
KERNELS=="platform"
SUBSYSTEMS==""
DRIVERS==""

-Clayton

Quoted 80 lines · Jonas Bonn
Quoted 1 line · Clayton Craft

This is on HSI bus. I am running ofono on the N900 (not tethering).

OK, from what I understand, you should be able to find this device under /sys/class/net/....

See if you can find the device there and run:

udevadm info --query all --path /sys/class/net/.... and
udevadm info --attribute-walk --path /sys/class/net.....

Post that output here if it's sane so that we can see what info udev is giving you for the device.

/Jonas

Quoted 57 lines

From what I understand, I am loading all of the necessary drivers for this to work (nokia-modem, which pulls in its dependencies automaticall). As I stated in my original note, before moving 'legacy device' initialization to udevng, ofono would at least 'see' the modem. The test script 'list-modems' would list it, now it does not list anything.

-Clayton

Quoted 42 lines · Jonas Bonn
Quoted 5 lines · Clayton Craft

Hi,
I've been debugging why the n900 modem is not recognized by ofono for a few days now, and have determined that the cause is because the calls in udevng to udev_device_get_devnode return NULL. It seems that the nokia-modem driver does not create any device nodes under /dev.

What bus does this modem sit on? Are you running ofono _on_ the N900 or are you trying to tether the N900 to some system with ofono?

If you are tethering, what udev events do you get when you plug in the modem? Try running "udevadm monitor" and watch what happens when you plug the modem in.

Not getting a device node sounds mostly like there's a driver missing, though...

/Jonas

Quoted 14 lines

This seems to be a regression in functionality since the move to udevng as previous versions of ofono seem to detect the n900 modem correctly (right before this commit 3ac449e25fc8cb9880c48b8f309189c6a644f200)
This issue occurs from this commit onwards, including the latest commit
as of this mail.

https://git.kernel.org/pub/scm/network/ofono/ofono.git/tree/plugins/udevng.c#n1316

Quoted 6 lines

-Clayton

_______________________________________________
ofono mailing list
ofono(a)ofono.org
https://lists.ofono.org/mailman/listinfo/ofono

Quoted 4 lines

_______________________________________________
ofono mailing list
ofono(a)ofono.org
https://lists.ofono.org/mailman/listinfo/ofono

Quoted 4 lines

_______________________________________________
ofono mailing list
ofono(a)ofono.org
https://lists.ofono.org/mailman/listinfo/ofono

Quoted 4 lines

_______________________________________________
ofono mailing list
ofono(a)ofono.org
https://lists.ofono.org/mailman/listinfo/ofono

Quoted 4 lines

_______________________________________________
ofono mailing list
ofono(a)ofono.org
https://lists.ofono.org/mailman/listinfo/ofono

_______________________________________________
ofono mailing list
ofono(a)ofono.org
https://lists.ofono.org/mailman/listinfo/ofono

#7 lore raw

PATCH 1/1 udev: add serial_info struct to modem

---
Hi Clayton,

Give this patch a try and see if things look better.

/Jonas

 plugins/udevng.c | 2 ++
 1 file changed, 2 insertions(+)
plugins/udevng.c +2 -0
index 5767259..317b6a9 100644
@@ -1355,6 +1355,8 @@ static void add_serial_device(struct udev_device *dev)
 	info->subsystem = g_strdup(subsystem);
 	info->dev = udev_device_ref(dev);
 
+	modem->serial = info;
+
 	modem->devices = g_slist_append(modem->devices, info);
 }
 
Signature · 1 line
2.9.3
#8 lore raw

PATCH 1/1 udev: add serial_info struct to modem

---
Hi Clayton,

Sorry, I messed up the earlier patch. It should be like this, I think.

/Jonas

 plugins/udevng.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
plugins/udevng.c +1 -1
index 5767259..a4b99aa 100644
@@ -1355,7 +1355,7 @@ static void add_serial_device(struct udev_device *dev)
 	info->subsystem = g_strdup(subsystem);
 	info->dev = udev_device_ref(dev);
 
-	modem->devices = g_slist_append(modem->devices, info);
+	modem->serial = info;
 }
 
 static void add_device(const char *syspath, const char *devname,
Signature · 1 line
2.9.3
#9 lore raw

Re: [PATCH 1/1] udev: add serial_info struct to modem

Hi Jonas,

This looks MUCH better!! Just to re-cap, it took the application of all three of the patches you sent over to get this to finally come up.

ofonod[1800]: plugins/nokia-gpio.c:phonet_status_cb() Link phonet0 (2) is down
ofonod[1800]: plugins/nokia-gpio.c:gpio_power_state_machine() (POWER_EVENT_PHONET_LINK_DOWN) @ state POWER_STATE_NONE ofonod[1800]: plugins/nokia-gpio.c:gpio_power_set_state() (POWER_STATE_OFF) at (POWER_STATE_NONE) ofonod[1800]: plugins/nokia-gpio.c:gpio_finish_modem_power_off()
ofonod[1800]: plugins/nokia-gpio.c:gpio_write() ("cmt_apeslpx", "inactive")
ofonod[1800]: plugins/nokia-gpio.c:gpio_write() ("cmt_rst_rq", "inactive")
ofonod[1800]: plugins/nokia-gpio.c:gpio_write() ("cmt_en", "inactive")
ofonod[1800]: plugins/nokia-gpio.c:gpio_write() ("cmt_rst", "inactive")
ofonod[1800]: plugins/nokia-gpio.c:gpio_write() ("cmt_rst", "active")
ofonod[1800]: plugins/n900.c:n900_power_cb() power state POWER_STATE_OFF
ofonod[1800]: plugins/n900.c:n900_enable() modem=0x617ad0 with 0x617cd0

localhost:/home/user/ofono# python2 test/list-modems
[ /n900_2 ]
    Features = sim
    Emergency = 0
    Powered = 1
    Lockdown = 0
    Interfaces = org.ofono.SimManager org.ofono.VoiceCallManager org.ofono.AudioSettings
    Online = 0
    Model = Nokia N900
    Revision = V ICPR82_10w08
25-02-10
RX-51
(c) Nokia
    Type = hardware
    Serial = 356938037199412
    Manufacturer = Nokia
    [ org.ofono.SimManager ]
        Present = 0
    [ org.ofono.VoiceCallManager ]
        EmergencyNumbers = 08 000 999 110 112 911 118 119
    [ org.ofono.AudioSettings ]
        Active = 0

Going to test some of the more 'advanced' features now :)

-Clayton

Quoted 30 lines · Jonas Bonn

---
Hi Clayton,

Sorry, I messed up the earlier patch. It should be like this, I think.

/Jonas

plugins/udevng.c | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)
plugins/udevng.c +1 -1
index 5767259..a4b99aa 100644
@@ -1355,7 +1355,7 @@ static void add_serial_device(struct udev_device *dev)
 	info->subsystem = g_strdup(subsystem);
 	info->dev = udev_device_ref(dev);
 
-	modem->devices = g_slist_append(modem->devices, info);
+	modem->serial = info;
 }
 
 static void add_device(const char *syspath, const char *devname,
Signature · 6 lines
2.9.3

_______________________________________________
ofono mailing list
ofono(a)ofono.org
https://lists.ofono.org/mailman/listinfo/ofono
#10 lore raw
In reply to Jonas Bonn

Ok, now the modem is initializing (after applying 3 patches from Jonas), I get this seg fault in ofonod when I run the "enable-modem" test script:

ofonod[1502]: plugins/nokia-gpio.c:phonet_status_cb() Link phonet0 (2) is up
ofonod[1502]: plugins/nokia-gpio.c:gpio_write() ("cmt_rst_rq", "inactive")
ofonod[1502]: plugins/nokia-gpio.c:gpio_power_state_machine() (POWER_EVENT_PHONET_LINK_UP) @ state POWER_STATE_NONE ofonod[1502]: plugins/n900.c:n900_enable() modem=0x586ad0 with 0x586cd0
ofonod[1502]: plugins/nokia-gpio.c:gpio_power_state_machine() (POWER_EVENT_ON) @ state POWER_STATE_NONE ofonod[1502]: plugins/nokia-gpio.c:gpio_power_set_state() (POWER_STATE_ON_STARTED) at (POWER_STATE_NONE) ofonod[1502]: plugins/nokia-gpio.c:gpio_start_modem_power_on()
ofonod[1502]: plugins/nokia-gpio.c:gpio_write() ("cmt_apeslpx", "inactive")
ofonod[1502]: plugins/nokia-gpio.c:gpio_write() ("cmt_rst_rq", "inactive")
ofonod[1502]: plugins/nokia-gpio.c:gpio_write() ("cmt_en", "inactive")
ofonod[1502]: plugins/nokia-gpio.c:gpio_write() ("cmt_bsi", "inactive")
ofonod[1502]: plugins/nokia-gpio.c:gpio_write() ("cmt_rst", "inactive")
ofonod[1502]: plugins/nokia-gpio.c:gpio_write() ("cmt_en", "active")
ofonod[1502]: plugins/nokia-gpio.c:gpio_write() ("cmt_rst", "active")
ofonod[1502]: plugins/nokia-gpio.c:gpio_write() ("cmt_rst_rq", "active")
ofonod[1502]: plugins/n900.c:n900_power_cb() power state POWER_STATE_ON_STARTED
ofonod[1502]: plugins/nokia-gpio.c:phonet_status_cb() Link phonet0 (2) is down
ofonod[1502]: plugins/nokia-gpio.c:gpio_power_state_machine() (POWER_EVENT_PHONET_LINK_DOWN) @ state POWER_STATE_ON_STARTED ofonod[1502]: plugins/nokia-gpio.c:phonet_status_cb() Link phonet0 (2) is up
ofonod[1502]: plugins/nokia-gpio.c:gpio_write() ("cmt_rst_rq", "inactive")
ofonod[1502]: plugins/nokia-gpio.c:gpio_power_state_machine() (POWER_EVENT_PHONET_LINK_UP) @ state POWER_STATE_ON_STARTED ofonod[1502]: plugins/nokia-gpio.c:gpio_power_set_state() (POWER_STATE_ON) at (POWER_STATE_ON_STARTED) ofonod[1502]: plugins/nokia-gpio.c:gpio_finish_modem_power_on()
ofonod[1502]: plugins/nokia-gpio.c:gpio_write() ("cmt_en", "inactive")
ofonod[1502]: plugins/nokia-gpio.c:gpio_power_set_state() Power on
ofonod[1502]: plugins/n900.c:n900_power_cb() power state POWER_STATE_ON
ofonod[1502]: plugins/n900.c:mtc_reachable_cb() QSO: PN_MTC [0x15] v018.000
ofonod[1502]: plugins/n900.c:mtc_query_cb() Modem state: current=MTC_RF_INACTIVE (0x0A) target=MTC_RF_INACTIVE (0x0A) ofonod[1502]: plugins/n900.c:report_powered() Powered on
ofonod[1502]: examples/emulator.c:powered_watch() Adding modem 0x586ad0 to the list
ofonod[1502]: examples/emulator.c:create_tcp() Created server_watch: 40
ofonod[1502]: examples/emulator.c:create_tcp() Created server_watch: 41
ofonod[1502]: src/modem.c:modem_change_state() old state: 0, new state: 1
ofonod[1502]: plugins/n900.c:n900_pre_sim() (0x586ad0) with phonet0
ofonod[1502]: drivers/isimodem/sim.c:sim_reachable_cb() QSO: PN_SIM [0x09] v-01.-01
ofonod[1502]: drivers/isimodem/devinfo.c:reachable_cb() QSO: PN_PHONE_INFO [0x1B] v008.005 ofonod[1502]: drivers/isimodem/audio-settings.c:isi_call_verify_cb() QSO: PN_CALL [0x01] v007.020 ofonod[1502]: drivers/isimodem/voicecall.c:pn_call_verify_cb() QSO: PN_CALL [0x01] v007.020 ofonod[1502]: drivers/isimodem/voicecall.c:pn_modem_call_verify_cb() PN_MODEM_CALL not reachable, removing client ofonod[1502]: src/sim.c:ofono_sim_add_state_watch() 0x57dfe0
ofonod[1502]: src/sim.c:ofono_sim_add_state_watch() 0x57dfe0
ofonod[1502]: src/sim.c:ofono_sim_add_state_watch() 0x57dfe0
ofonod[1502]: src/sim.c:ofono_sim_add_state_watch() 0x57dfe0
ofonod[1502]: src/sim.c:ofono_sim_add_state_watch() 0x57dfe0
ofonod[1502]: drivers/isimodem/sim.c:sim_resp_status() Request failed: SIM_SERV_SIM_NOT_INITIALISED ofonod[1502]: drivers/isimodem/sim.c:sec_state_resp_cb() SEC_STATE_RESP(cause=0x7)
ofonod[1502]: drivers/isimodem/sim.c:sim_ind_cb()
ofonod[1502]: drivers/isimodem/sim.c:sim_ind_cb()
ofonod[1502]: drivers/isimodem/sim.c:sim_ind_cb()
ofonod[1502]: drivers/isimodem/sim.c:sim_ind_cb()
ofonod[1502]: drivers/isimodem/sim.c:sim_ind_cb()
ofonod[1502]: drivers/isimodem/sim.c:sim_ind_cb()
ofonod[1502]: drivers/isimodem/sim.c:sim_ind_cb()
ofonod[1502]: drivers/isimodem/sim.c:sim_ind_cb()
ofonod[1502]: drivers/isimodem/sim.c:sim_ind_cb()
ofonod[1502]: drivers/isimodem/sim.c:sim_ind_cb()
ofonod[1502]: drivers/isimodem/sim.c:sim_server_ready_ind_cb()
ofonod[1502]: drivers/isimodem/sim.c:sim_ind_cb()
ofonod[1502]: drivers/isimodem/sim.c:sim_set_passwd_state() new state "none"
ofonod[1502]: Interface org.ofono.AllowedAccessPoints not found on the interface_list
ofonod[1502]: drivers/isimodem/sim.c:isi_query_locked()
ofonod[1502]: drivers/isimodem/sim.c:isi_query_locked()
ofonod[1502]: drivers/isimodem/sim.c:isi_query_locked()
ofonod[1502]: drivers/isimodem/sim.c:sim_ind_cb()
ofonod[1502]: drivers/isimodem/sim.c:sim_ind_cb()
ofonod[1502]: drivers/isimodem/sim.c:sim_ind_cb()
ofonod[1502]: drivers/isimodem/sim.c:sim_ind_cb()
ofonod[1502]: drivers/isimodem/sim.c:sim_ind_cb()
ofonod[1502]: drivers/isimodem/sim.c:isi_read_file_info() Fileid 6FB7 not implemented
ofonod[1502]: src/voicecall.c:ecc_g2_read_cb() 0
ofonod[1502]: drivers/isimodem/sim.c:isi_read_file_info() Fileid 6FB7 not implemented
ofonod[1502]: src/voicecall.c:ecc_g3_read_cb() 0
ofonod[1502]: drivers/isimodem/sim.c:check_sec_response() SEC_CODE_STATE_OK_RESP

Program received signal SIGSEGV, Segmentation fault.
sim_query_fac_pinlock_cb (error=0xbefffb0c, status=5758944, data=0x8bb17444) at src/sim.c:2476
2476 if (sim->state == OFONO_SIM_STATE_NOT_PRESENT)
(gdb) bt

#0  sim_query_fac_pinlock_cb (error=0xbefffb0c, status=5758944, data=0x8bb17444) at src/sim.c:2476
#1  0x00448dc8 in check_sec_response (msg=0xbefffb84, opaque=0x585fb0, success=<optimized out>, failure=<optimized out>) at drivers/isimodem/sim.c:468
#2  0x004347ec in pending_remove_and_dispatch (op=0x587f90, msg=0xbefffb84) at gisi/modem.c:171
#3  0x00434df8 in service_dispatch (mux=<optimized out>, is_indication=0, msg=0xbefffb84) at gisi/modem.c:218
#4  isi_callback (channel=0x585580, cond=<optimized out>, data=<optimized out>) at gisi/modem.c:334
#5  0xb6e892f0 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#6  0xb6e895c4 in ?? () from /usr/lib/libglib-2.0.so.0

Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Quoted 171 lines · Jonas Bonn
Quoted 2 lines · Clayton Craft

Here's the info you requested, please let me know if I can gather anything else to help!

OK, good. It's not a driver issue in any case. Now we need to figure out why ofono is rejecting the device. The debug output from ofonod would be useful. Try running ofono as:

ofonod -d -n

and paste the output here.

/Jonas

Quoted 147 lines
localhost:/home/user# udevadm info --query all --path 
/sys/bus/hsi/devices/n900-modem
P: /devices/platform/68000000.ocp/48058000.ssi-controller/ssi0/port0/n900-modem
E: DEVPATH=/devices/platform/68000000.ocp/48058000.ssi-controller/ssi0/port0/n900-modem
E: DRIVER=nokia-modem
E: MODALIAS=hsi:n900-modem
E: OFONO_DRIVER=n900
E: OFONO_ISI_ADDRESS=108
E: OF_COMPATIBLE_0=nokia,n900-modem
E: OF_COMPATIBLE_N=1
E: OF_FULLNAME=/ocp(a)68000000/ssi-controller(a)48058000/ssi-port(a)4805a000/hsi-client
E: OF_NAME=hsi-client
E: SUBSYSTEM=hsi
E: USEC_INITIALIZED=337086386
localhost:/home/user# udevadm info --attribute-walk --path 
/sys/bus/hsi/devices/n900-modem

Udevadm info starts with the device specified by the devpath and then walks up the chain of parent devices. It prints for every device found, all possible attributes in the udev rules key format. A rule to match, can be composed by the attributes of the device and the attributes from one single parent device.

looking at device '/devices/platform/68000000.ocp/48058000.ssi-controller/ssi0/port0/n900-modem':
KERNEL=="n900-modem"
SUBSYSTEM=="hsi"
DRIVER=="nokia-modem"

looking at parent device '/devices/platform/68000000.ocp/48058000.ssi-controller/ssi0/port0':
KERNELS=="port0"
SUBSYSTEMS==""
DRIVERS==""

looking at parent device '/devices/platform/68000000.ocp/48058000.ssi-controller/ssi0':
KERNELS=="ssi0"
SUBSYSTEMS==""
DRIVERS==""

looking at parent device '/devices/platform/68000000.ocp/48058000.ssi-controller':
KERNELS=="48058000.ssi-controller" SUBSYSTEMS=="platform"
DRIVERS=="omap_ssi" ATTRS{driver_override}=="(null)"

looking at parent device '/devices/platform/68000000.ocp':
KERNELS=="68000000.ocp"
SUBSYSTEMS=="platform"
DRIVERS=="omap_l3_smx" ATTRS{driver_override}=="(null)"

looking at parent device '/devices/platform':
KERNELS=="platform"
SUBSYSTEMS==""
DRIVERS==""

-Clayton

Quoted 80 lines · Jonas Bonn
Quoted 1 line · Clayton Craft

This is on HSI bus. I am running ofono on the N900 (not tethering).

OK, from what I understand, you should be able to find this device under /sys/class/net/....

See if you can find the device there and run:

udevadm info --query all --path /sys/class/net/.... and
udevadm info --attribute-walk --path /sys/class/net.....

Post that output here if it's sane so that we can see what info udev is giving you for the device.

/Jonas

Quoted 57 lines

From what I understand, I am loading all of the necessary drivers for this to work (nokia-modem, which pulls in its dependencies automaticall). As I stated in my original note, before moving 'legacy device' initialization to udevng, ofono would at least 'see' the modem. The test script 'list-modems' would list it, now it does not list anything.

-Clayton

Quoted 42 lines · Jonas Bonn
Quoted 5 lines · Clayton Craft

Hi,
I've been debugging why the n900 modem is not recognized by ofono for a few days now, and have determined that the cause is because the calls in udevng to udev_device_get_devnode return NULL. It seems that the nokia-modem driver does not create any device nodes under /dev.

What bus does this modem sit on? Are you running ofono _on_ the N900 or are you trying to tether the N900 to some system with ofono?

If you are tethering, what udev events do you get when you plug in the modem? Try running "udevadm monitor" and watch what happens when you plug the modem in.

Not getting a device node sounds mostly like there's a driver missing, though...

/Jonas

Quoted 14 lines

This seems to be a regression in functionality since the move to udevng as previous versions of ofono seem to detect the n900 modem correctly (right before this commit 3ac449e25fc8cb9880c48b8f309189c6a644f200)
This issue occurs from this commit onwards, including the latest commit
as of this mail.

https://git.kernel.org/pub/scm/network/ofono/ofono.git/tree/plugins/udevng.c#n1316

Quoted 6 lines

-Clayton

_______________________________________________
ofono mailing list
ofono(a)ofono.org
https://lists.ofono.org/mailman/listinfo/ofono

Quoted 4 lines

_______________________________________________
ofono mailing list
ofono(a)ofono.org
https://lists.ofono.org/mailman/listinfo/ofono

Quoted 4 lines

_______________________________________________
ofono mailing list
ofono(a)ofono.org
https://lists.ofono.org/mailman/listinfo/ofono

Quoted 4 lines

_______________________________________________
ofono mailing list
ofono(a)ofono.org
https://lists.ofono.org/mailman/listinfo/ofono

Quoted 4 lines

_______________________________________________
ofono mailing list
ofono(a)ofono.org
https://lists.ofono.org/mailman/listinfo/ofono

_______________________________________________
ofono mailing list
ofono(a)ofono.org
https://lists.ofono.org/mailman/listinfo/ofono

#13 lore raw
In reply to Denis Kenzior

Would it be possible to merge the three patches that Jonas produced, so at least the modem will make it through the initialization phase? I will take a long, hard look at some point into the patchset you linked in your other mail, and one day I might try to fix it, but being able to avoid the previous init problems when that day comes would be really nice :)

-Clayton

Quoted 12 lines · Denis Kenzior

Hi Clayton,

Quoted 4 lines · Clayton Craft

Ok, now the modem is initializing (after applying 3 patches from Jonas), I get this seg fault in ofonod when I run the "enable-modem" test script:

See https://lists.ofono.org/pipermail/ofono/2017-May/017311.html

Regards,
-Denis

#14 lore raw

PATCH 1/1 isimodem: Use correct callback for pin status

This fixes the segfault I experienced on enabling the modem by using the correct callback for pin status response.

 drivers/isimodem/sim.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/isimodem/sim.c +3 -3
index 4379a159..cea50972 100644
@@ -450,7 +450,7 @@ static void check_sec_response(const GIsiMessage *msg, void *opaque,
 					uint8_t success, uint8_t failure)
 {
 	struct isi_cb_data *cbd = opaque;
-	ofono_sim_lock_unlock_cb_t cb = cbd->cb;
+	ofono_query_facility_lock_cb_t cb = cbd->cb;
 	struct ofono_sim *sim = cbd->user;
 	uint8_t id;
 	uint8_t cause;
@@ -465,7 +465,7 @@ static void check_sec_response(const GIsiMessage *msg, void *opaque,
 	if (id == success) {
 		DBG("%s", sec_message_id_name(id));
 		sim_set_passwd_state(sim, OFONO_SIM_PASSWORD_NONE);
-		CALLBACK_WITH_SUCCESS(cb, cbd->data);
+		CALLBACK_WITH_SUCCESS(cb, OFONO_SIM_PASSWORD_NONE, sim);
 		return;
 	}
 
@@ -478,7 +478,7 @@ static void check_sec_response(const GIsiMessage *msg, void *opaque,
 		DBG("Error msg: %s", sec_message_id_name(id));
 
 failure:
-	CALLBACK_WITH_FAILURE(cb, cbd->data);
+	CALLBACK_WITH_FAILURE(cb, -1, cbd->data);
 }
 
 static void sec_code_verify_resp(const GIsiMessage *msg, void *opaque)
#15 lore raw

Re: [PATCH 1/1] isimodem: Use correct callback for pin status

Hi Clayton,

Quoted 22 lines · Clayton Craft

This fixes the segfault I experienced on enabling the modem by using the correct callback for pin status response.

drivers/isimodem/sim.c | 6 +++---

1 file changed, 3 insertions(+), 3 deletions(-)
drivers/isimodem/sim.c +1 -1
index 4379a159..cea50972 100644
@@ -450,7 +450,7 @@ static void check_sec_response(const GIsiMessage 
 *msg, void *opaque,
                     uint8_t success, uint8_t failure)
 {
     struct isi_cb_data *cbd = opaque;
-    ofono_sim_lock_unlock_cb_t cb = cbd->cb;
+    ofono_query_facility_lock_cb_t cb = cbd->cb;
     struct ofono_sim *sim = cbd->user;
     uint8_t id;
     uint8_t cause;

drivers/isimodem/sim.c static void check_sec_response(const GIsiMessage · line 469

Quoted 6 lines
drivers/isimodem/sim.c +1 -1
@@ -465,7 +465,7 @@ static void check_sec_response(const GIsiMessage 
 *msg, void *opaque,
     if (id == success) {
         DBG("%s", sec_message_id_name(id));
         sim_set_passwd_state(sim, OFONO_SIM_PASSWORD_NONE);
-        CALLBACK_WITH_SUCCESS(cb, cbd->data);
+        CALLBACK_WITH_SUCCESS(cb, OFONO_SIM_PASSWORD_NONE, sim);

check_sec_response is used when entering / enabling / disabling a PIN. So you might be hacking around your particular issue, but breaking others.

The real fix is to implement a proper callback for isi_query_locked. The previously submitted (2010 or so?) driver code might give you hints on what the actual callback should look like.

drivers/isimodem/sim.c static void check_sec_response(const GIsiMessage · line 471

Quoted 3 lines
drivers/isimodem/sim.c +0 -0
         return;
     }

Regards,
-Denis

#16 lore raw

Re: [PATCH 1/1] isimodem: Use correct callback for pin status

Hi Denis,
Ah, ok, I think see what you mean. Sorry for the misunderstanding, and thank you for your patience. I have now implemented a proper query method based on the 2010 patch you referenced. I don't have a PIN set on my SIM, but it seems to allow the 'enabling' to proceed successfully and based on my understanding of what the 2010 patch is doing, allow for signaling if a SIM is locked as well.

-Clayton

 drivers/isimodem/sim.c | 27 +++++++++++++++++++++++++--
 1 file changed, 25 insertions(+), 2 deletions(-)
drivers/isimodem/sim.c +25 -2
index 4379a159..0aa4b03a 100644
@@ -646,8 +646,31 @@ error:
 /* ISI callback: PIN state (enabled/disabled) query */
 static void sec_code_state_resp_cb(const GIsiMessage *msg, void *opaque)
 {
-	check_sec_response(msg, opaque, SEC_CODE_STATE_OK_RESP,
-				SEC_CODE_STATE_FAIL_RESP);
+	struct isi_cb_data *cbd = opaque;
+	ofono_query_facility_lock_cb_t cb = cbd->cb;
+	int locked;
+	uint8_t state;
+	uint8_t status;
+
+	if (!g_isi_msg_data_get_byte(msg, 0, &state) ||
+			!g_isi_msg_data_get_byte(msg, 1, &status))
+		goto error;
+
+	if (state != SEC_CODE_STATE_OK_RESP)
+		goto error;
+
+	if (status == SEC_CODE_ENABLE)
+		locked = 1;
+	else if (status == SEC_CODE_DISABLE)
+		locked = 0;
+	else
+		goto error;
+
+	CALLBACK_WITH_SUCCESS(cb, locked, cbd->data);
+	return;
+
+error:
+	CALLBACK_WITH_FAILURE(cb, -1, cbd->date);
 }
 
 static void isi_query_locked(struct ofono_sim *sim,
Quoted 46 lines · Denis Kenzior

Hi Clayton,

Quoted 22 lines · Clayton Craft

This fixes the segfault I experienced on enabling the modem by using the correct callback for pin status response.

drivers/isimodem/sim.c | 6 +++---

1 file changed, 3 insertions(+), 3 deletions(-)
drivers/isimodem/sim.c +1 -1
index 4379a159..cea50972 100644
@@ -450,7 +450,7 @@ static void check_sec_response(const GIsiMessage 
 *msg, void *opaque,
                    uint8_t success, uint8_t failure)
 {
    struct isi_cb_data *cbd = opaque;
-    ofono_sim_lock_unlock_cb_t cb = cbd->cb;
+    ofono_query_facility_lock_cb_t cb = cbd->cb;
    struct ofono_sim *sim = cbd->user;
    uint8_t id;
    uint8_t cause;

drivers/isimodem/sim.c static void check_sec_response(const GIsiMessage · line 469

Quoted 6 lines
drivers/isimodem/sim.c +1 -1
@@ -465,7 +465,7 @@ static void check_sec_response(const GIsiMessage 
 *msg, void *opaque,
    if (id == success) {
        DBG("%s", sec_message_id_name(id));
        sim_set_passwd_state(sim, OFONO_SIM_PASSWORD_NONE);
-        CALLBACK_WITH_SUCCESS(cb, cbd->data);
+        CALLBACK_WITH_SUCCESS(cb, OFONO_SIM_PASSWORD_NONE, sim);

check_sec_response is used when entering / enabling / disabling a PIN. So you might be hacking around your particular issue, but breaking others.

The real fix is to implement a proper callback for isi_query_locked. The previously submitted (2010 or so?) driver code might give you hints on what the actual callback should look like.

drivers/isimodem/sim.c static void check_sec_response(const GIsiMessage · line 471

Quoted 3 lines
drivers/isimodem/sim.c +0 -0
        return;
    }

Regards,
-Denis

#17 lore raw

Re: [PATCH 1/1] isimodem: Use correct callback for pin status

Hi Clayton,

Quoted 9 lines · Clayton Craft

Hi Denis,
Ah, ok, I think see what you mean. Sorry for the misunderstanding, and thank
you for your patience. I have now implemented a proper query method based on the 2010 patch you referenced. I don't have a PIN set on my SIM, but it seems to allow the 'enabling' to proceed successfully and based on my understanding of what the 2010 patch is doing, allow for signaling if a SIM is locked as well.

Quoted 5 lines

-Clayton

drivers/isimodem/sim.c | 27 +++++++++++++++++++++++++--

1 file changed, 25 insertions(+), 2 deletions(-)

I went ahead and applied this patch. Thanks!

Regards,
-Denis

#18 lore raw
In reply to Denis Kenzior

Hi Denis,
The following patches are also necessary to help bring up the isimodem device, I don't think they were accepted/merged.
If you need anything else to help get these in, please let me know!
https://lists.ofono.org/pipermail/ofono/2017-September/017463.html
https://lists.ofono.org/pipermail/ofono/2017-September/017465.html
https://lists.ofono.org/pipermail/ofono/2017-September/017483.html

-Clayton

Quoted 12 lines · Denis Kenzior

Hi Clayton,

Quoted 4 lines · Clayton Craft

Ok, now the modem is initializing (after applying 3 patches from Jonas), I get this seg fault in ofonod when I run the "enable-modem" test script:

See https://lists.ofono.org/pipermail/ofono/2017-May/017311.html

Regards,
-Denis

#19 lore raw

Hi Clayton,

Quoted 10 lines · Clayton Craft

Hi Denis,
The following patches are also necessary to help bring up the isimodem device, I don't think they were accepted/merged.
If you need anything else to help get these in, please let me know!
https://lists.ofono.org/pipermail/ofono/2017-September/017463.html
https://lists.ofono.org/pipermail/ofono/2017-September/017465.html
https://lists.ofono.org/pipermail/ofono/2017-September/017483.html

-Clayton

If Jonas or you want to combine these into a single proper patch, I'll take it up.

Regards,
-Denis

#20 lore raw
Quoted 2 lines · Denis Kenzior

If Jonas or you want to combine these into a single proper patch, I'll take it up.

Challenge accepted! Combined patch below.

-Clayton

 plugins/udevng.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)
plugins/udevng.c +3 -5
index 518eda8e..a4b99aa4 100644
@@ -1013,8 +1013,6 @@ static gboolean setup_isi_serial(struct modem_info* modem)
 	if (value)
 		ofono_modem_set_integer(modem->modem, "Address", atoi(value));
 
-	ofono_modem_set_string(modem->modem, "Device", info->devnode);
-
 	return TRUE;
 }
 
@@ -1325,7 +1323,7 @@ static void add_serial_device(struct udev_device *dev)
 
 	devnode = udev_device_get_devnode(dev);
 
-	if (!syspath || !devname || !devpath || !devnode)
+	if (!syspath || !devpath)
 		return;
 
 	modem = g_hash_table_lookup(modem_list, syspath);
@@ -1337,7 +1335,7 @@ static void add_serial_device(struct udev_device *dev)
 		modem->type = MODEM_TYPE_SERIAL;
 		modem->syspath = g_strdup(syspath);
 		modem->devname = g_strdup(devname);
-		modem->driver = g_strdup("legacy");
+		modem->driver = g_strdup(driver);
 
 		g_hash_table_replace(modem_list, modem->syspath, modem);
 	}
@@ -1357,7 +1355,7 @@ static void add_serial_device(struct udev_device *dev)
 	info->subsystem = g_strdup(subsystem);
 	info->dev = udev_device_ref(dev);
 
-	modem->devices = g_slist_append(modem->devices, info);
+	modem->serial = info;
 }
 
 static void add_device(const char *syspath, const char *devname,
#21 lore raw
Quoted 6 lines · Clayton Craft
Quoted 2 lines · Denis Kenzior

If Jonas or you want to combine these into a single proper patch, I'll take it up.

Challenge accepted! Combined patch below.

Hmm... I suspect Denis wants a 'proper patch' that he can merge into git directly. I'll take care of that today.
/Jonas

Quoted 52 lines

-Clayton

plugins/udevng.c | 8 +++-----

1 file changed, 3 insertions(+), 5 deletions(-)
plugins/udevng.c +1 -3
index 518eda8e..a4b99aa4 100644
@@ -1013,8 +1013,6 @@ static gboolean setup_isi_serial(struct 
 modem_info* modem)
    if (value)
        ofono_modem_set_integer(modem->modem, "Address", atoi(value));
 
-    ofono_modem_set_string(modem->modem, "Device", info->devnode);
-
    return TRUE;
 }
@@ -1325,7 +1323,7 @@ static void add_serial_device(struct udev_device 
 *dev)
 
    devnode = udev_device_get_devnode(dev);
 
-    if (!syspath || !devname || !devpath || !devnode)
+    if (!syspath || !devpath)
        return;
 
    modem = g_hash_table_lookup(modem_list, syspath);
plugins/udevng.c +1 -1
@@ -1337,7 +1335,7 @@ static void add_serial_device(struct udev_device 
 *dev)
        modem->type = MODEM_TYPE_SERIAL;
        modem->syspath = g_strdup(syspath);
        modem->devname = g_strdup(devname);
-        modem->driver = g_strdup("legacy");
+        modem->driver = g_strdup(driver);
 
        g_hash_table_replace(modem_list, modem->syspath, modem);
    }
plugins/udevng.c +1 -1
@@ -1357,7 +1355,7 @@ static void add_serial_device(struct udev_device 
 *dev)
    info->subsystem = g_strdup(subsystem);
    info->dev = udev_device_ref(dev);
 
-    modem->devices = g_slist_append(modem->devices, info);
+    modem->serial = info;
 }
 

static void add_device(const char *syspath, const char *devname,

#22 lore raw

PATCH 1/2 udev: fixes for detection of non-USB modems

This patch fixes up some fallout from the merging of the udev and udevng modules.

i) The 'serial' modems in question are not necessarily serial modems at all; for example, the N900 ISI modems appear as network devices and don't have a devnode. This patch relaxes the requirement that a devnode exist.

ii) The modem driver was being set to 'legacy', which is a remnant of an earlier approach to merging these modules. The driver needs to be properly set to the value of the OFONO_DRIVER property in order for the setup function to be found.

iii) The serial modem's private data was being added to the modem structure incorrectly...

In particular point iii) above shows that there is essentially nobody using these devices which makes modifications in this area tricky.

---
 plugins/udevng.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
plugins/udevng.c +3 -3
index 518eda8..9d00bb8 100644
@@ -1325,7 +1325,7 @@ static void add_serial_device(struct udev_device *dev)
 
 	devnode = udev_device_get_devnode(dev);
 
-	if (!syspath || !devname || !devpath || !devnode)
+	if (!syspath || !devpath)
 		return;
 
 	modem = g_hash_table_lookup(modem_list, syspath);
@@ -1337,7 +1337,7 @@ static void add_serial_device(struct udev_device *dev)
 		modem->type = MODEM_TYPE_SERIAL;
 		modem->syspath = g_strdup(syspath);
 		modem->devname = g_strdup(devname);
-		modem->driver = g_strdup("legacy");
+		modem->driver = g_strdup(driver);
 
 		g_hash_table_replace(modem_list, modem->syspath, modem);
 	}
@@ -1357,7 +1357,7 @@ static void add_serial_device(struct udev_device *dev)
 	info->subsystem = g_strdup(subsystem);
 	info->dev = udev_device_ref(dev);
 
-	modem->devices = g_slist_append(modem->devices, info);
+	modem->serial = info;
 }
 
 static void add_device(const char *syspath, const char *devname,
Signature · 1 line
2.9.3
#23 lore raw

PATCH 2/2 udev: isi modems do not use 'Device' property

Neither the n900 nor u8500 drivers use this property so there's currently no need to set it in the setup function.

---
 plugins/udevng.c | 2 --
 1 file changed, 2 deletions(-)
plugins/udevng.c +0 -2
index 9d00bb8..a4b99aa 100644
@@ -1013,8 +1013,6 @@ static gboolean setup_isi_serial(struct modem_info* modem)
 	if (value)
 		ofono_modem_set_integer(modem->modem, "Address", atoi(value));
 
-	ofono_modem_set_string(modem->modem, "Device", info->devnode);
-
 	return TRUE;
 }
 
Signature · 1 line
2.9.3
#24 lore raw

Re: [PATCH 1/2] udev: fixes for detection of non-USB modems

In reply to Jonas Bonn

Hi Jonas,

Quoted 12 lines · Jonas Bonn

This patch fixes up some fallout from the merging of the udev and udevng modules.

i) The 'serial' modems in question are not necessarily serial modems at all; for example, the N900 ISI modems appear as network devices and don't have a devnode. This patch relaxes the requirement that a devnode exist.

ii) The modem driver was being set to 'legacy', which is a remnant of an earlier approach to merging these modules. The driver needs to be properly set to the value of the OFONO_DRIVER property in order for the setup function to be found.

Quoted 9 lines

iii) The serial modem's private data was being added to the modem structure incorrectly...

In particular point iii) above shows that there is essentially nobody using these devices which makes modifications in this area tricky.

---
  plugins/udevng.c | 6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)

Both applied, thanks.

Regards,
-Denis

#25 lore raw

PATCH 1/1 udev: devnode is not a required modem property

In reply to Clayton Craft

A devnode does not always exist; the Nokia N900, for example, does not provide one for its modem.

This patch relaxes the check on device properties to exclude the requirement of a devnode.

The "Device" property is not used by the n900 or u8500 drivers, so drop setting this property when setting up these devices.
---

Hi Clayton,

Could you try this patch and see if the N900 is detected?

Thanks,
Jonas

 plugins/udevng.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
plugins/udevng.c +1 -3
index 518eda8..241fcda 100644
@@ -1013,8 +1013,6 @@ static gboolean setup_isi_serial(struct modem_info* modem)
 	if (value)
 		ofono_modem_set_integer(modem->modem, "Address", atoi(value));
 
-	ofono_modem_set_string(modem->modem, "Device", info->devnode);
-
 	return TRUE;
 }
 
@@ -1325,7 +1323,7 @@ static void add_serial_device(struct udev_device *dev)
 
 	devnode = udev_device_get_devnode(dev);
 
-	if (!syspath || !devname || !devpath || !devnode)
+	if (!syspath || !devpath)
 		return;
 
 	modem = g_hash_table_lookup(modem_list, syspath);
Signature · 1 line
2.9.3
#26 lore raw

Re: [PATCH 1/1] udev: devnode is not a required modem property

Hi Jonas,
I have tested the patch, looks like initialization gets a little further but it seems that ofono gives up and removes the modem. The 'list-modems' test script doesn't show the modem after launch. Here's the output from "ofonod -nd" using your patch:

localhost:/home/user/ofono# ./src/ofonod -nd
ofonod[18669]: oFono version 1.20
ofonod[18669]: src/plugin.c:__ofono_plugin_init() 
ofonod[18669]: src/gprs-provision.c:ofono_gprs_provision_driver_register() driver: 0x63f248 name: GPRS context provisioning
ofonod[18669]: plugins/push-notification.c:push_notification_init() 
ofonod[18669]: plugins/smart-messaging.c:smart_messaging_init() 
ofonod[18669]: plugins/emulator_fuzz.c:emulator_fuzz_init() 
ofonod[18669]: src/modem.c:ofono_modem_driver_register() driver: 0x63f360, name: stktest
ofonod[18669]: src/modem.c:ofono_modem_create() name: stktest, type: stktest
ofonod[18669]: src/modem.c:ofono_modem_register() 0x64f120
ofonod[18669]: plugins/stktest.c:stktest_probe() 0x64f120
ofonod[18669]: src/modem.c:emit_modem_added() 0x64f120
ofonod[18669]: src/modem.c:call_modemwatches() 0x64f120 added:1
ofonod[18669]: plugins/smart-messaging.c:modem_watch() modem: 0x64f120, added: 1
ofonod[18669]: plugins/push-notification.c:modem_watch() modem: 0x64f120, added: 1
ofonod[18669]: examples/emulator.c:example_emulator_init() 
ofonod[18669]: examples/emulator.c:modem_watch() modem: 0x64f120, added: 1
ofonod[18669]: src/gprs-provision.c:ofono_gprs_provision_driver_register() driver: 0x63f2e4 name: Example GPRS context provisioning
ofonod[18669]: src/nettime.c:ofono_nettime_driver_register() driver: 0x63f2b4 name: Example Network Time
ofonod[18669]: src/history.c:ofono_history_driver_register() driver: 0x63f274 name: Example Call History
ofonod[18669]: src/cdma-provision.c:ofono_cdma_provision_driver_register() driver: 0x63f21c name: CDMA provisioning
ofonod[18669]: src/gprs-provision.c:ofono_gprs_provision_driver_register() driver: 0x63f1f0 name: Provisioning
ofonod[18669]: plugins/upower.c:upower_init() upower init
ofonod[18669]: src/handsfree-audio.c:ofono_handsfree_card_driver_register() driver: 0x63f19c
ofonod[18669]: plugins/hfp_ag_bluez5.c:modem_watch() modem: 0x64f120, added: 1
ofonod[18669]: plugins/dun_gw_bluez5.c:dun_gw_init() 
ofonod[18669]: plugins/dun_gw_bluez5.c:modem_watch() modem: 0x64f120, added: 1
ofonod[18669]: src/handsfree-audio.c:ofono_handsfree_card_driver_register() driver: 0x63f100
ofonod[18669]: src/modem.c:ofono_modem_driver_register() driver: 0x63f114, name: hfp
ofonod[18669]: src/modem.c:ofono_modem_driver_register() driver: 0x63f0b8, name: ublox
ofonod[18669]: src/modem.c:ofono_modem_driver_register() driver: 0x63f060, name: quectel
ofonod[18669]: plugins/telit.c:telit_init() 
ofonod[18669]: src/modem.c:ofono_modem_driver_register() driver: 0x63f010, name: telit
ofonod[18669]: plugins/connman.c:connman_init() 
ofonod[18669]: src/private-network.c:ofono_private_network_driver_register() driver: 0x63efe4, name: ConnMan Private Network
ofonod[18669]: src/modem.c:ofono_modem_driver_register() driver: 0x63ef9c, name: sim900
ofonod[18669]: src/modem.c:ofono_modem_driver_register() driver: 0x63ef54, name: samsung
ofonod[18669]: src/modem.c:ofono_modem_driver_register() driver: 0x63ef0c, name: speedupcdma
ofonod[18669]: src/modem.c:ofono_modem_driver_register() driver: 0x63eebc, name: speedup
ofonod[18669]: src/modem.c:ofono_modem_driver_register() driver: 0x63ee74, name: alcatel
ofonod[18669]: src/modem.c:ofono_modem_driver_register() driver: 0x63ee1c, name: icera
ofonod[18669]: src/modem.c:ofono_modem_driver_register() driver: 0x63edd4, name: linktop
ofonod[18669]: src/modem.c:ofono_modem_driver_register() driver: 0x63ed8c, name: nokiacdma
ofonod[18669]: src/modem.c:ofono_modem_driver_register() driver: 0x63ed44, name: nokia
ofonod[18669]: src/modem.c:ofono_modem_driver_register() driver: 0x63ecec, name: gemalto
ofonod[18669]: src/modem.c:ofono_modem_driver_register() driver: 0x63eca4, name: cinterion
ofonod[18669]: src/modem.c:ofono_modem_driver_register() driver: 0x63ec1c, name: ste
ofonod[18669]: src/modem.c:ofono_modem_driver_register() driver: 0x63ebc4, name: ifx
ofonod[18669]: src/modem.c:ofono_modem_driver_register() driver: 0x63eb7c, name: palmpre
ofonod[18669]: src/modem.c:ofono_modem_driver_register() driver: 0x63eb2c, name: novatel
ofonod[18669]: src/modem.c:ofono_modem_driver_register() driver: 0x63eae4, name: sierra
ofonod[18669]: src/modem.c:ofono_modem_driver_register() driver: 0x63ea6c, name: huawei
ofonod[18669]: src/modem.c:ofono_modem_driver_register() driver: 0x63ea24, name: zte
ofonod[18669]: src/modem.c:ofono_modem_driver_register() driver: 0x63e9c4, name: hso
ofonod[18669]: src/modem.c:ofono_modem_driver_register() driver: 0x63e974, name: mbm
ofonod[18669]: src/modem.c:ofono_modem_driver_register() driver: 0x63e924, name: calypso
ofonod[18669]: src/modem.c:ofono_modem_driver_register() driver: 0x63e8dc, name: wavecom
ofonod[18669]: src/modem.c:ofono_modem_driver_register() driver: 0x63e894, name: g1
ofonod[18669]: src/cdma-voicecall.c:ofono_cdma_voicecall_driver_register() driver: 0x63e838, name: cdmamodem
ofonod[18669]: src/modem.c:ofono_devinfo_driver_register() driver: 0x63e860, name: cdmamodem
ofonod[18669]: src/cdma-connman.c:ofono_cdma_connman_driver_register() driver: 0x63e880, name: cdmamodem
ofonod[18669]: src/modem.c:ofono_modem_driver_register() driver: 0x63e798, name: phonesim
ofonod[18669]: src/modem.c:ofono_modem_driver_register() driver: 0x63e7d0, name: localhfp
ofonod[18669]: src/gprs.c:ofono_gprs_context_driver_register() driver: 0x63e77c, name: phonesim
ofonod[18669]: src/ctm.c:ofono_ctm_driver_register() driver: 0x63e768, name: phonesim
ofonod[18669]: src/radio-settings.c:ofono_radio_settings_driver_register() driver: 0x63e740, name: phonesim
ofonod[18669]: plugins/phonesim.c:parse_config() filename /etc/ofono/phonesim.conf
ofonod[18669]: src/radio-settings.c:ofono_radio_settings_driver_register() driver: 0x63e718, name: xmm7modem
ofonod[18669]: src/location-reporting.c:ofono_location_reporting_driver_register() driver: 0x63e6d8, name: gemaltomodem
ofonod[18669]: src/gprs.c:ofono_gprs_context_driver_register() driver: 0x63e65c, name: ubloxmodem
ofonod[18669]: src/netmon.c:ofono_netmon_driver_register() driver: 0x63e688, name: ubloxmodem
ofonod[18669]: src/lte.c:ofono_lte_driver_register() driver: 0x63e6a0, name: ubloxmodem
ofonod[18669]: src/ussd.c:ofono_ussd_driver_register() driver: 0x63e618, name: speedupmodem
ofonod[18669]: src/voicecall.c:ofono_voicecall_driver_register() driver: 0x63e4d4, name: hfpmodem
ofonod[18669]: src/modem.c:ofono_devinfo_driver_register() driver: 0x63e578, name: hfpmodem
ofonod[18669]: src/network.c:ofono_netreg_driver_register() driver: 0x63e52c, name: hfpmodem
ofonod[18669]: src/call-volume.c:ofono_call_volume_driver_register() driver: 0x63e560, name: hfpmodem
ofonod[18669]: src/handsfree.c:ofono_handsfree_driver_register() driver: 0x63e5a8, name: hfpmodem
ofonod[18669]: src/siri.c:ofono_siri_driver_register() driver: 0x63e5e0, name: hfpmodem
ofonod[18669]: src/network.c:ofono_netreg_driver_register() driver: 0x63e44c, name: dunmodem
ofonod[18669]: src/gprs.c:ofono_gprs_driver_register() driver: 0x63e470, name: dunmodem
ofonod[18669]: src/voicecall.c:ofono_voicecall_driver_register() driver: 0x63e37c, name: stemodem
ofonod[18669]: src/gprs.c:ofono_gprs_context_driver_register() driver: 0x63e408, name: stemodem
ofonod[18669]: src/radio-settings.c:ofono_radio_settings_driver_register() driver: 0x63e3cc, name: stemodem
ofonod[18669]: src/voicecall.c:ofono_voicecall_driver_register() driver: 0x63e258, name: ifxmodem
ofonod[18669]: src/audio-settings.c:ofono_audio_settings_driver_register() driver: 0x63e2b0, name: ifxmodem
ofonod[18669]: src/radio-settings.c:ofono_radio_settings_driver_register() driver: 0x63e2c4, name: ifxmodem
ofonod[18669]: src/gprs.c:ofono_gprs_context_driver_register() driver: 0x63e2fc, name: ifxmodem
ofonod[18669]: src/stk.c:ofono_stk_driver_register() driver: 0x63e328, name: ifxmodem
ofonod[18669]: src/ctm.c:ofono_ctm_driver_register() driver: 0x63e348, name: ifxmodem
ofonod[18669]: src/gprs.c:ofono_gprs_context_driver_register() driver: 0x63e1e4, name: hsomodem
ofonod[18669]: src/radio-settings.c:ofono_radio_settings_driver_register() driver: 0x63e208, name: hsomodem
ofonod[18669]: src/location-reporting.c:ofono_location_reporting_driver_register() driver: 0x63e178, name: telitmodem
ofonod[18669]: src/gprs.c:ofono_gprs_context_driver_register() driver: 0x63e1a0, name: telitncmmodem
ofonod[18669]: src/gprs.c:ofono_gprs_context_driver_register() driver: 0x63e0ec, name: mbmmodem
ofonod[18669]: src/stk.c:ofono_stk_driver_register() driver: 0x63e110, name: mbmmodem
ofonod[18669]: src/location-reporting.c:ofono_location_reporting_driver_register() driver: 0x63e130, name: mbmmodem
ofonod[18669]: src/voicecall.c:ofono_voicecall_driver_register() driver: 0x63e054, name: calypsomodem
ofonod[18669]: src/stk.c:ofono_stk_driver_register() driver: 0x63e0a4, name: calypsomodem
ofonod[18669]: src/ussd.c:ofono_ussd_driver_register() driver: 0x63df58, name: huaweimodem
ofonod[18669]: src/voicecall.c:ofono_voicecall_driver_register() driver: 0x63df6c, name: huaweimodem
ofonod[18669]: src/audio-settings.c:ofono_audio_settings_driver_register() driver: 0x63dfbc, name: huaweimodem
ofonod[18669]: src/radio-settings.c:ofono_radio_settings_driver_register() driver: 0x63dff4, name: huaweimodem
ofonod[18669]: src/gprs.c:ofono_gprs_context_driver_register() driver: 0x63dfd0, name: huaweimodem
ofonod[18669]: src/cdma-netreg.c:ofono_cdma_netreg_driver_register() driver: 0x63e024, name: huaweimodem
ofonod[18669]: src/gprs.c:ofono_gprs_context_driver_register() driver: 0x63dedc, name: iceramodem
ofonod[18669]: src/radio-settings.c:ofono_radio_settings_driver_register() driver: 0x63df08, name: iceramodem
ofonod[18669]: src/radio-settings.c:ofono_radio_settings_driver_register() driver: 0x63de84, name: ztemodem
ofonod[18669]: src/gprs.c:ofono_gprs_context_driver_register() driver: 0x63de40, name: swmodem
ofonod[18669]: src/radio-settings.c:ofono_radio_settings_driver_register() driver: 0x63ddf8, name: nwmodem
ofonod[18669]: src/voicecall.c:ofono_voicecall_driver_register() driver: 0x63dc54, name: atmodem
ofonod[18669]: src/modem.c:ofono_devinfo_driver_register() driver: 0x63dcec, name: atmodem
ofonod[18669]: src/call-barring.c:ofono_call_barring_driver_register() driver: 0x63dca4, name: atmodem
ofonod[18669]: src/call-forwarding.c:ofono_call_forwarding_driver_register() driver: 0x63da2c, name: atmodem
ofonod[18669]: src/call-meter.c:ofono_call_meter_driver_register() driver: 0x63da6c, name: atmodem
ofonod[18669]: src/call-settings.c:ofono_call_settings_driver_register() driver: 0x63d978, name: atmodem
ofonod[18669]: src/phonebook.c:ofono_phonebook_driver_register() driver: 0x63dcd4, name: atmodem
ofonod[18669]: src/ussd.c:ofono_ussd_driver_register() driver: 0x63dc30, name: atmodem
ofonod[18669]: src/sms.c:ofono_sms_driver_register() driver: 0x63d9e8, name: atmodem
ofonod[18669]: src/sim.c:ofono_sim_driver_register() driver: 0x63db70, name: atmodem
ofonod[18669]: src/sim.c:ofono_sim_driver_register() driver: 0x63dbb8, name: atmodem-noef
ofonod[18669]: src/stk.c:ofono_stk_driver_register() driver: 0x63dc08, name: atmodem
ofonod[18669]: src/network.c:ofono_netreg_driver_register() driver: 0x63dad0, name: atmodem
ofonod[18669]: src/cbs.c:ofono_cbs_driver_register() driver: 0x63da10, name: atmodem
ofonod[18669]: src/call-volume.c:ofono_call_volume_driver_register() driver: 0x63dd1c, name: atmodem
ofonod[18669]: src/gprs.c:ofono_gprs_driver_register() driver: 0x63dd4c, name: atmodem
ofonod[18669]: src/gprs.c:ofono_gprs_context_driver_register() driver: 0x63dd68, name: atmodem
ofonod[18669]: src/sim-auth.c:ofono_sim_auth_driver_register() driver: 0x63dd8c, name: atmodem
ofonod[18669]: src/gnss.c:ofono_gnss_driver_register() driver: 0x63ddac, name: atmodem
ofonod[18669]: src/lte.c:ofono_lte_driver_register() driver: 0x63ddc0, name: atmodem
ofonod[18669]: src/modem.c:ofono_modem_driver_register() driver: 0x63d8d8, name: gobi
ofonod[18669]: src/modem.c:ofono_devinfo_driver_register() driver: 0x63d718, name: qmimodem
ofonod[18669]: src/network.c:ofono_netreg_driver_register() driver: 0x63d780, name: qmimodem
ofonod[18669]: src/voicecall.c:ofono_voicecall_driver_register() driver: 0x63d738, name: qmimodem
ofonod[18669]: src/sim.c:ofono_sim_driver_register() driver: 0x63d7a4, name: qmimodem-legacy
ofonod[18669]: src/sim.c:ofono_sim_driver_register() driver: 0x63d7ec, name: qmimodem
ofonod[18669]: src/sms.c:ofono_sms_driver_register() driver: 0x63d834, name: qmimodem
ofonod[18669]: src/ussd.c:ofono_ussd_driver_register() driver: 0x63d854, name: qmimodem
ofonod[18669]: src/gprs.c:ofono_gprs_driver_register() driver: 0x63d868, name: qmimodem
ofonod[18669]: src/gprs.c:ofono_gprs_context_driver_register() driver: 0x63d87c, name: qmimodem
ofonod[18669]: src/radio-settings.c:ofono_radio_settings_driver_register() driver: 0x63d898, name: qmimodem
ofonod[18669]: src/location-reporting.c:ofono_location_reporting_driver_register() driver: 0x63d8c0, name: qmimodem
ofonod[18669]: src/modem.c:ofono_modem_driver_register() driver: 0x63d6b0, name: u8500
ofonod[18669]: src/modem.c:ofono_devinfo_driver_register() driver: 0x63d690, name: u8500
ofonod[18669]: src/modem.c:ofono_modem_driver_register() driver: 0x63d648, name: n900
ofonod[18669]: src/modem.c:ofono_modem_driver_register() driver: 0x63d600, name: isiusb
ofonod[18669]: src/modem.c:ofono_devinfo_driver_register() driver: 0x63d3a8, name: isimodem
ofonod[18669]: src/phonebook.c:ofono_phonebook_driver_register() driver: 0x63d398, name: isimodem
ofonod[18669]: src/network.c:ofono_netreg_driver_register() driver: 0x63d3c8, name: isimodem
ofonod[18669]: src/voicecall.c:ofono_voicecall_driver_register() driver: 0x63d3ec, name: isimodem
ofonod[18669]: src/sms.c:ofono_sms_driver_register() driver: 0x63d434, name: isimodem
ofonod[18669]: src/cbs.c:ofono_cbs_driver_register() driver: 0x63d454, name: isimodem
ofonod[18669]: src/sim.c:ofono_sim_driver_register() driver: 0x63d468, name: isimodem
ofonod[18669]: src/ussd.c:ofono_ussd_driver_register() driver: 0x63d4b0, name: isimodem
ofonod[18669]: src/call-forwarding.c:ofono_call_forwarding_driver_register() driver: 0x63d4c4, name: isimodem
ofonod[18669]: src/call-settings.c:ofono_call_settings_driver_register() driver: 0x63d4e4, name: isimodem
ofonod[18669]: src/call-barring.c:ofono_call_barring_driver_register() driver: 0x63d514, name: isimodem
ofonod[18669]: src/call-meter.c:ofono_call_meter_driver_register() driver: 0x63d52c, name: isimodem
ofonod[18669]: src/radio-settings.c:ofono_radio_settings_driver_register() driver: 0x63d554, name: isimodem
ofonod[18669]: src/gprs.c:ofono_gprs_driver_register() driver: 0x63d57c, name: isimodem
ofonod[18669]: src/gprs.c:ofono_gprs_context_driver_register() driver: 0x63d590, name: isimodem
ofonod[18669]: src/audio-settings.c:ofono_audio_settings_driver_register() driver: 0x63d5ac, name: isimodem
ofonod[18669]: src/sim.c:ofono_sim_driver_register() driver: 0x63d5b8, name: wgmodem2.5
ofonod[18669]: drivers/rilmodem/rilmodem.c:rilmodem_init() 
ofonod[18669]: src/modem.c:ofono_devinfo_driver_register() driver: 0x63d14c, name: rilmodem
ofonod[18669]: drivers/rilmodem/sim.c:ril_sim_init() 
ofonod[18669]: src/sim.c:ofono_sim_driver_register() driver: 0x63d220, name: rilmodem
ofonod[18669]: src/voicecall.c:ofono_voicecall_driver_register() driver: 0x63d190, name: rilmodem
ofonod[18669]: src/sms.c:ofono_sms_driver_register() driver: 0x63d268, name: rilmodem
ofonod[18669]: src/network.c:ofono_netreg_driver_register() driver: 0x63d16c, name: rilmodem
ofonod[18669]: src/call-volume.c:ofono_call_volume_driver_register() driver: 0x63d1d8, name: rilmodem
ofonod[18669]: src/gprs.c:ofono_gprs_driver_register() driver: 0x63d1f0, name: rilmodem
ofonod[18669]: src/gprs.c:ofono_gprs_context_driver_register() driver: 0x63d204, name: rilmodem
ofonod[18669]: src/ussd.c:ofono_ussd_driver_register() driver: 0x63d288, name: rilmodem
ofonod[18669]: src/call-settings.c:ofono_call_settings_driver_register() driver: 0x63d29c, name: rilmodem
ofonod[18669]: src/call-forwarding.c:ofono_call_forwarding_driver_register() driver: 0x63d2cc, name: rilmodem
ofonod[18669]: src/radio-settings.c:ofono_radio_settings_driver_register() driver: 0x63d2ec, name: rilmodem
ofonod[18669]: src/call-barring.c:ofono_call_barring_driver_register() driver: 0x63d314, name: rilmodem
ofonod[18669]: src/netmon.c:ofono_netmon_driver_register() driver: 0x63d32c, name: rilmodem
ofonod[18669]: src/stk.c:ofono_stk_driver_register() driver: 0x63d33c, name: rilmodem
ofonod[18669]: src/cbs.c:ofono_cbs_driver_register() driver: 0x63d354, name: rilmodem
ofonod[18669]: src/lte.c:ofono_lte_driver_register() driver: 0x63d368, name: rilmodem
ofonod[18669]: src/modem.c:ofono_modem_driver_register() driver: 0x63d0e4, name: ril_intel
ofonod[18669]: src/modem.c:ofono_modem_driver_register() driver: 0x63d09c, name: infineon
ofonod[18669]: src/modem.c:ofono_modem_driver_register() driver: 0x63d054, name: ril
ofonod[18669]: plugins/udevng.c:udev_start() 
ofonod[18669]: plugins/udevng.c:enumerate_devices() 
ofonod[18669]: plugins/udevng.c:add_serial_device() Device is missing required OFONO_DRIVER property
ofonod[18669]: plugins/udevng.c:add_serial_device() Device is missing required OFONO_DRIVER property
ofonod[18669]: plugins/udevng.c:add_serial_device() /sys/devices/platform/68000000.ocp/48058000.ssi-controller/ssi0/port0/n900-modem
ofonod[18669]: plugins/udevng.c:add_serial_device() /devices/platform/68000000.ocp/48058000.ssi-controller/ssi0/port0/n900-modem
ofonod[18669]: plugins/udevng.c:add_serial_device() (null) (n900)
ofonod[18669]: plugins/udevng.c:add_serial_device() Device is missing required OFONO_DRIVER property
ofonod[18669]: plugins/udevng.c:add_serial_device() Device is missing required OFONO_DRIVER property
ofonod[18669]: plugins/udevng.c:add_serial_device() Device is missing required OFONO_DRIVER property
ofonod[18669]: plugins/udevng.c:add_serial_device() Device is missing required OFONO_DRIVER property
ofonod[18669]: plugins/udevng.c:add_serial_device() Device is missing required OFONO_DRIVER property
ofonod[18669]: plugins/udevng.c:add_serial_device() Device is missing required OFONO_DRIVER property
ofonod[18669]: plugins/udevng.c:add_serial_device() Device is missing required OFONO_DRIVER property
ofonod[18669]: plugins/udevng.c:add_serial_device() Device is missing required OFONO_DRIVER property
ofonod[18669]: plugins/udevng.c:add_serial_device() Device is missing required OFONO_DRIVER property
ofonod[18669]: plugins/udevng.c:add_serial_device() Device is missing required OFONO_DRIVER property
ofonod[18669]: plugins/udevng.c:add_serial_device() Device is missing required OFONO_DRIVER property
ofonod[18669]: plugins/udevng.c:add_serial_device() Device is missing required OFONO_DRIVER property
ofonod[18669]: plugins/udevng.c:add_serial_device() Device is missing required OFONO_DRIVER property
ofonod[18669]: plugins/udevng.c:add_serial_device() Device is missing required OFONO_DRIVER property
ofonod[18669]: plugins/udevng.c:add_serial_device() Device is missing required OFONO_DRIVER property
ofonod[18669]: plugins/udevng.c:add_serial_device() Device is missing required OFONO_DRIVER property
ofonod[18669]: plugins/udevng.c:add_serial_device() Device is missing required OFONO_DRIVER property
ofonod[18669]: plugins/udevng.c:add_serial_device() Device is missing required OFONO_DRIVER property
ofonod[18669]: plugins/udevng.c:add_serial_device() Device is missing required OFONO_DRIVER property
ofonod[18669]: plugins/udevng.c:add_serial_device() Device is missing required OFONO_DRIVER property
ofonod[18669]: plugins/udevng.c:add_serial_device() Device is missing required OFONO_DRIVER property
ofonod[18669]: plugins/udevng.c:add_serial_device() Device is missing required OFONO_DRIVER property
ofonod[18669]: plugins/udevng.c:add_serial_device() Device is missing required OFONO_DRIVER property
ofonod[18669]: plugins/udevng.c:add_serial_device() Device is missing required OFONO_DRIVER property
ofonod[18669]: plugins/udevng.c:add_serial_device() Device is missing required OFONO_DRIVER property
ofonod[18669]: plugins/udevng.c:add_serial_device() Device is missing required OFONO_DRIVER property
ofonod[18669]: plugins/udevng.c:add_serial_device() Device is missing required OFONO_DRIVER property
ofonod[18669]: plugins/udevng.c:add_serial_device() Device is missing required OFONO_DRIVER property
ofonod[18669]: plugins/udevng.c:add_serial_device() Device is missing required OFONO_DRIVER property
ofonod[18669]: plugins/udevng.c:add_serial_device() Device is missing required OFONO_DRIVER property
ofonod[18669]: plugins/udevng.c:add_serial_device() Device is missing required OFONO_DRIVER property
ofonod[18669]: plugins/udevng.c:add_serial_device() Device is missing required OFONO_DRIVER property
ofonod[18669]: plugins/udevng.c:add_serial_device() Device is missing required OFONO_DRIVER property
ofonod[18669]: plugins/udevng.c:add_serial_device() Device is missing required OFONO_DRIVER property
ofonod[18669]: plugins/udevng.c:add_serial_device() Device is missing required OFONO_DRIVER property
ofonod[18669]: plugins/udevng.c:add_serial_device() Device is missing required OFONO_DRIVER property
ofonod[18669]: plugins/udevng.c:add_serial_device() Device is missing required OFONO_DRIVER property
ofonod[18669]: plugins/udevng.c:add_serial_device() Device is missing required OFONO_DRIVER property
ofonod[18669]: plugins/udevng.c:add_serial_device() Device is missing required OFONO_DRIVER property
ofonod[18669]: plugins/udevng.c:add_serial_device() Device is missing required OFONO_DRIVER property
ofonod[18669]: plugins/udevng.c:add_serial_device() Device is missing required OFONO_DRIVER property
ofonod[18669]: plugins/udevng.c:add_serial_device() Device is missing required OFONO_DRIVER property
ofonod[18669]: plugins/udevng.c:add_serial_device() Device is missing required OFONO_DRIVER property
ofonod[18669]: plugins/udevng.c:add_serial_device() Device is missing required OFONO_DRIVER property
ofonod[18669]: plugins/udevng.c:add_serial_device() Device is missing required OFONO_DRIVER property
ofonod[18669]: plugins/udevng.c:add_serial_device() Device is missing required OFONO_DRIVER property
ofonod[18669]: plugins/udevng.c:add_serial_device() Device is missing required OFONO_DRIVER property
ofonod[18669]: plugins/udevng.c:add_serial_device() Device is missing required OFONO_DRIVER property
ofonod[18669]: plugins/udevng.c:add_serial_device() Device is missing required OFONO_DRIVER property
ofonod[18669]: plugins/udevng.c:add_serial_device() Device is missing required OFONO_DRIVER property
ofonod[18669]: plugins/udevng.c:add_serial_device() Device is missing required OFONO_DRIVER property
ofonod[18669]: plugins/udevng.c:add_serial_device() Device is missing required OFONO_DRIVER property
ofonod[18669]: plugins/udevng.c:add_serial_device() Device is missing required OFONO_DRIVER property
ofonod[18669]: plugins/udevng.c:add_serial_device() Device is missing required OFONO_DRIVER property
ofonod[18669]: plugins/udevng.c:add_serial_device() Device is missing required OFONO_DRIVER property
ofonod[18669]: plugins/udevng.c:add_serial_device() Device is missing required OFONO_DRIVER property
ofonod[18669]: plugins/udevng.c:add_serial_device() Device is missing required OFONO_DRIVER property
ofonod[18669]: plugins/udevng.c:add_serial_device() Device is missing required OFONO_DRIVER property
ofonod[18669]: plugins/udevng.c:add_serial_device() Device is missing required OFONO_DRIVER property
ofonod[18669]: plugins/udevng.c:add_serial_device() Device is missing required OFONO_DRIVER property
ofonod[18669]: plugins/udevng.c:add_serial_device() Device is missing required OFONO_DRIVER property
ofonod[18669]: plugins/udevng.c:add_serial_device() Device is missing required OFONO_DRIVER property
ofonod[18669]: plugins/udevng.c:add_serial_device() Device is missing required OFONO_DRIVER property
ofonod[18669]: plugins/udevng.c:add_serial_device() Device is missing required OFONO_DRIVER property
ofonod[18669]: plugins/udevng.c:add_serial_device() Device is missing required OFONO_DRIVER property
ofonod[18669]: plugins/udevng.c:add_serial_device() Device is missing required OFONO_DRIVER property
ofonod[18669]: plugins/udevng.c:add_serial_device() Device is missing required OFONO_DRIVER property
ofonod[18669]: plugins/udevng.c:add_serial_device() Device is missing required OFONO_DRIVER property
ofonod[18669]: plugins/udevng.c:add_serial_device() Device is missing required OFONO_DRIVER property
ofonod[18669]: plugins/udevng.c:add_serial_device() Device is missing required OFONO_DRIVER property
ofonod[18669]: plugins/udevng.c:add_serial_device() Device is missing required OFONO_DRIVER property
ofonod[18669]: plugins/udevng.c:add_serial_device() Device is missing required OFONO_DRIVER property
ofonod[18669]: plugins/udevng.c:add_serial_device() Device is missing required OFONO_DRIVER property
ofonod[18669]: plugins/udevng.c:add_serial_device() Device is missing required OFONO_DRIVER property
ofonod[18669]: plugins/udevng.c:add_serial_device() Device is missing required OFONO_DRIVER property
ofonod[18669]: plugins/udevng.c:add_serial_device() Device is missing required OFONO_DRIVER property
ofonod[18669]: plugins/udevng.c:add_serial_device() Device is missing required OFONO_DRIVER property
ofonod[18669]: plugins/udevng.c:add_serial_device() Device is missing required OFONO_DRIVER property
ofonod[18669]: plugins/udevng.c:add_serial_device() Device is missing required OFONO_DRIVER property
ofonod[18669]: plugins/udevng.c:create_modem() /sys/devices/platform/68000000.ocp/48058000.ssi-controller/ssi0/port0/n900-modem
ofonod[18669]: plugins/udevng.c:create_modem() driver=legacy
ofonod[18669]: src/modem.c:ofono_modem_create() name: (null), type: legacy
ofonod[18669]: plugins/udevng.c:destroy_modem() /sys/devices/platform/68000000.ocp/48058000.ssi-controller/ssi0/port0/n900-modem
ofonod[18669]: src/modem.c:ofono_modem_remove() 0x658f10
ofonod[18669]: src/private-network.c:ofono_private_network_driver_register() driver: 0x63f334, name: Example Private Network Driver
Quoted 49 lines · Jonas Bonn

A devnode does not always exist; the Nokia N900, for example, does not provide one for its modem.

This patch relaxes the check on device properties to exclude the requirement of a devnode.

The "Device" property is not used by the n900 or u8500 drivers, so drop setting this property when setting up these devices.
---

Hi Clayton,

Could you try this patch and see if the N900 is detected?

Thanks,
Jonas

plugins/udevng.c | 4 +---

1 file changed, 1 insertion(+), 3 deletions(-)
plugins/udevng.c +1 -3
index 518eda8..241fcda 100644
@@ -1013,8 +1013,6 @@ static gboolean setup_isi_serial(struct modem_info* modem)
 	if (value)
 		ofono_modem_set_integer(modem->modem, "Address", atoi(value));
 
-	ofono_modem_set_string(modem->modem, "Device", info->devnode);
-
 	return TRUE;
 }
 
@@ -1325,7 +1323,7 @@ static void add_serial_device(struct udev_device *dev)
 
 	devnode = udev_device_get_devnode(dev);
 
-	if (!syspath || !devname || !devpath || !devnode)
+	if (!syspath || !devpath)
 		return;
 
 	modem = g_hash_table_lookup(modem_list, syspath);
Signature · 6 lines
2.9.3

_______________________________________________
ofono mailing list
ofono(a)ofono.org
https://lists.ofono.org/mailman/listinfo/ofono
#27 lore raw

PATCH 1/1 udev: set driver for serial drivers

The switch away from udev.c to udevng.c for serial modems ended up having a hardcoded driver "legacy" set on them. This breaks as the setup routine for the device will never be found this way. This patch sets the correct driver for the device.
---
Hi Clayton,

Here's another patch that hopefully gets the N900 a bit further down the road to initialization. Apply this _on top of_ the earlier patch I sent you; they are both needed.

Cheers,
Jonas

 plugins/udevng.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
plugins/udevng.c +1 -1
index 241fcda..5767259 100644
@@ -1335,7 +1335,7 @@ static void add_serial_device(struct udev_device *dev)
 		modem->type = MODEM_TYPE_SERIAL;
 		modem->syspath = g_strdup(syspath);
 		modem->devname = g_strdup(devname);
-		modem->driver = g_strdup("legacy");
+		modem->driver = g_strdup(driver);
 
 		g_hash_table_replace(modem_list, modem->syspath, modem);
 	}
Signature · 1 line
2.9.3
#28 lore raw

Re: [PATCH 1/1] udev: set driver for serial drivers

Hi Jonas,
I applied the patch below after the first patch, looks like I inched ahead a little further but something is still causing udevng to give up and tear everything down (output clipped to include only changes from the last attempt before this patch):

ofonod[10523]: plugins/udevng.c:udev_start()
ofonod[10523]: plugins/udevng.c:enumerate_devices()
ofonod[10523]: plugins/udevng.c:add_serial_device() Device is missing required OFONO_DRIVER property ofonod[10523]: plugins/udevng.c:add_serial_device() Device is missing required OFONO_DRIVER property ofonod[10523]: plugins/udevng.c:add_serial_device() /sys/devices/platform/68000000.ocp/48058000.ssi-controller/ssi0/port0/n900-modem ofonod[10523]: plugins/udevng.c:add_serial_device() /devices/platform/68000000.ocp/48058000.ssi-controller/ssi0/port0/n900-modem ofonod[10523]: plugins/udevng.c:add_serial_device() (null) (n900)
ofonod[10523]: plugins/udevng.c:add_serial_device() Device is missing required OFONO_DRIVER property ofonod[10523]: plugins/udevng.c:add_serial_device() Device is missing required OFONO_DRIVER property ofonod[10523]: plugins/udevng.c:add_serial_device() Device is missing required OFONO_DRIVER property ofonod[10523]: plugins/udevng.c:add_serial_device() Device is missing required OFONO_DRIVER property
....
this repeats a lot
...
ofonod[10523]: plugins/udevng.c:add_serial_device() Device is missing required OFONO_DRIVER property ofonod[10523]: plugins/udevng.c:add_serial_device() Device is missing required OFONO_DRIVER property ofonod[10523]: plugins/udevng.c:add_serial_device() Device is missing required OFONO_DRIVER property ofonod[10523]: plugins/udevng.c:create_modem() /sys/devices/platform/68000000.ocp/48058000.ssi-controller/ssi0/port0/n900-modem ofonod[10523]: plugins/udevng.c:create_modem() driver=n900
ofonod[10523]: src/modem.c:ofono_modem_create() name: (null), type: n900
ofonod[10523]: plugins/udevng.c:destroy_modem() /sys/devices/platform/68000000.ocp/48058000.ssi-controller/ssi0/port0/n900-modem ofonod[10523]: src/modem.c:ofono_modem_remove() 0x64f0b0
ofonod[10523]: src/private-network.c:ofono_private_network_driver_register() driver: 0x635334, name: Example Private Network Driver

-Clayton

Quoted 37 lines · Jonas Bonn

The switch away from udev.c to udevng.c for serial modems ended up having a hardcoded driver "legacy" set on them. This breaks as the setup routine for the device will never be found this way. This patch sets the correct driver for the device.
---
Hi Clayton,

Here's another patch that hopefully gets the N900 a bit further down the road to initialization. Apply this _on top of_ the earlier patch I sent you; they are both needed.

Cheers,
Jonas

plugins/udevng.c | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)
plugins/udevng.c +1 -1
index 241fcda..5767259 100644
@@ -1335,7 +1335,7 @@ static void add_serial_device(struct udev_device *dev)
 		modem->type = MODEM_TYPE_SERIAL;
 		modem->syspath = g_strdup(syspath);
 		modem->devname = g_strdup(devname);
-		modem->driver = g_strdup("legacy");
+		modem->driver = g_strdup(driver);
 
 		g_hash_table_replace(modem_list, modem->syspath, modem);
 	}
Signature · 6 lines
2.9.3

_______________________________________________
ofono mailing list
ofono(a)ofono.org
https://lists.ofono.org/mailman/listinfo/ofono