I'm not sure if this is specific to my host system (running Arch Linux) or what, but if I boot up the device with the usb cable plugged in then the usb networking never initializes properly.
Edited
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Child items 0
Show closed items
No child items are currently assigned. Use child items to break down this issue into smaller parts.
Linked items 0
Link issues together to show that they're related.
Learn more.
It does initialize properly for me (arch linux, networkmanager) with both plugged in on boot and plugging in after. It breaks when I install networkmanager on the phone.
Interesting, thanks for the extra data point. I am using systemd-networkd on my system. It could very well be a problem with my system and not PMOS / RX51... I'll see if I can get closer to figuring it out since it is very annoying and putting undue stress on my N900's fragile USB port (having to unplug/replug every reboot)
Haha! well, I just leave the microusb cable plugged into the N900 and just unplug/replug the usb connector to my main system. It works, but it's annoying because sometimes I reboot and forget to do it and have to spend a few minutes rebooting again.
This problem is really strange though, I get no kernel events at all on the host system when the n900 reboots.. so I'm starting to wonder if it has something to do with the cable being plugged in when the usb network device on the N900 is initalized during boot.. maybe it doesn't do something necessary to tell the host system on the other end of the cable that it is a network device thing?
I'm not sure how to debug this further.
I don't see that problem with my local kernels. I pushed one of them
to kernel.org:pub/scm/linux/kernel/git/pavel/linux-n900.git bt-v4.13 ,
and sent relevant extract over email to @craftyguy.
Unfortunately your patch doesn't seem to have any effect..
The steps to reproduce this problem are:
Power on N900, connect it to system via usb
log into N900 over usb net, and issue a reboot
leave device plugged in while it reboots
after it finishes booting, notice that there is no longer an interface available on the host for connecting to it. the usb0 interface on the n900 is still there and has the correct IP assigned to it though.
Since we weren't sure about this in the thread: does this only happen with the N900, or also with other phones running postmarketOS?
I don't really have a clue what causes this. But I suggest using the debug-shell hook and running the usb networking stuff (dhcpd) manually and look at its output, maybe it tells something helpful.
By Oliver Smith on 2019-07-25T19:05:17
Administratorchanged title from [RX51] USB networking does not initialize when the device is booted with usb cable plugged in to [N900/RX51] USB networking does not initialize when the device is booted with usb cable plugged in·
Imported
changed title from [RX51] USB networking does not initialize when the device is booted with usb cable plugged in to [N900/RX51] USB networking does not initialize when the device is booted with usb cable plugged in
I've just tried to rebuild the linux-postmarketos-stable kernel with the CONFIG_USB_CONFIGFS and CONFIG_USB_CONFIGFS_RNDIS enabled and the initramfs script doesn't fail anymore to create the configuration for the rndis...
...but the USB still doesn't work if booted with the cable connected :(
I've just tried to rebuild the linux-postmarketos-stable kernel with the CONFIG_USB_CONFIGFS and CONFIG_USB_CONFIGFS_RNDIS enabled and the initramfs script doesn't fail anymore to create the configuration for the rndis...
...but the USB still doesn't work if booted with the cable connected :(
Just to make sure, when you tried this, have you also disabled the g_nokia gadget driver?
One thing we could try is, check if the same problem happens with maemo leste, and if it does not, compare the gadget related kernel configs and possibly the initramfs behavior.