The scripts need py-dbus, which isn't built in Alpine for python3 (only python2). The scripts don't seem to be using anything specific to python3, and any attempts I have made to build/package py-dbus for python3 have failed horribly (yes, even copying the APKBUILD for python2 py-dbus and modifying).
On pmos, we get bunch of "ofonod... Device is missing required
OFONO_DRIVER property" errors. We /run/udev/data contains that
property; but we do not have that file on pmos. Alternative place for
that data should be /dev/.udev/db , but we do not have that either.
On pmos, we get bunch of "ofonod... Device is missing required
OFONO_DRIVER property" errors. We /run/udev/data contains that
property; but we do not have that file on pmos. Alternative place for
that data should be /dev/.udev/db , but we do not have that either.
localhost:/home/user# ls /run/udev/control data rules.dlocalhost:/home/user# ls /run/udev/data/c7:130 c7:131 c7:132 c7:133 c7:134 c7:2 c7:3 c7:4 c7:5 c7:6
None of those files mention the modem or ofono.
I also tried adding the ofono.rules file (from the ofono repo) to /etc/udev/rules.d, and re-triggering udev, that didn't result in any noticeable change
I built the pmOS 4.13 kernel with the gpio-switch functionality from Pali's kernel, and enabled it (incl. loading modprobe nokia-modem pm=0, and without) but it didn't make any difference to the output of ofonod.
Using the parent commit, the modem is detected (list-modems shows it, ofono log shows nokia-gpio toggling it), but enable-modem script eventually segfaults:
Looks like the issue is that the nokia-modem driver does not create any device nodes under /dev, this causes the udevng plugin to bail when setting up the modem. Specifically, the call to udev_device_get_devnode returns NULL. Udev reports that no 'DEVNODE' property exists for this device, hence the reason this method returns NULL:
I think either ofono needs to be changed to work with device drivers that don't create a device node, or the nokia-modem driver should be patched in some way to create a working device node. Both of these options are currently above my level of understanding.
This does look like a issue introduced by ofono. The kernel only provides a network device for the modem, so there is no DEVNODE. Nokia's N9 kernel provided /dev/cmt/, but that is not the modem controller. It's a second "device" providing the control GPIOs (and a huge hack). For reference this is how I used ofono with Debian's and mainline kernel, no gpio-switch stuff involved:
Actually this is still quite the hack. IMHO all the gpios should be handled by the kernel based on the phonet0 interface status, but that does need changes in ofono. A patchset implementing the kernel part has been sent by me some time ago:
Looks like the isi modem driver is pretty much completely broken in ofono, in the sense that at least one critical code path was not originally tested when it was merged, and now it's segfaulting when trying to enable the modem.
First of all: I don't have the ISI specs either. I suggest to start with a git bisect to find the first broken commit and then try to fix things from there. That way it's much easier to analyze issues, since you can easily test (works / works not VS crashes / crashes a bit later). As a starting point: When I worked on the kernel PM patches I did use 5e4ce76bba92 as base (current master back then). That should work and is much newer (somwhere between 1.17 and 1.18) than the 1.6 @pavelmachek mentioned. You know 3ac449e25fc8~ has enable issues, so I suggest: git bisect 5e4ce76bba92 3ac449e25fc8~.
I actually had some success late last night, and able to get past the issue I saw and enable the modem. I need to think about how to patch the issue I saw, since I don't completely understand what is going on with in.
First of all: I don't have the ISI specs either. I suggest to start
with a git bisect to find the first broken commit and then try to fix
things from there. That way it's much easier to analyze issues, since
you can easily test (works / works not VS crashes / crashes a bit
later). As a starting point: When I worked on the kernel PM patches I
did use 5e4ce76bba92 as base (current master back then). That should
work and is much newer (somwhere between 1.17 and 1.18) than the 1.6
@pavelmachek mentioned. You know 3ac449e25fc8~ has enable issues, so
I suggest: git bisect 5e4ce76bba92 3ac449e25fc8~.
Made some good progress yesterday! I was able to use 5e4ce76bba92 that sre mentioned to successfully send a SMS message from the N900. GPRS is 'up' but I cannot ping anything and dns doesn't work, but I have an IP assigned.
I'll now begin the long process of doing git bisect between this commit and the latest..
I have no idea why master branch was failing earlier, but it seems to be working now with just one patch applied. The one patch is a combo of three of the previous 4 mentioned, the last one listed previously was merged this morning.
I successfully enabled gprs (using GSM) and have successfully brought up the data connection, including DNS resolution (thank @pavelmachek for the hint on setting default gw!).
This was all on the master ofono branch!
I will next work on distilling my findings into a coherent PR of some sorts to get this shit enabled on the N900. We will have to package ofono upstream from Alpine until they cut a 1.21 release with the patches necessary for enabling the N900's modem.
Edit: As of today, everything necessary to get ofono to properly set up the N900 modem for reproducing my success is now merged into upstream ofono.