I noticed a day ago, that the master is now supporting the RUT900 series.
Today, using the latest master barnch, I upgraded one of our RUT955. The upgrade went well, everything is accessible, but the modem is not detected at all.
"lsusb" is not showing the modem device at all
"cat /sys/kernel/debug/usb/devices" is not showing the device at all
I upgraded to lede master from the recommended official version (the bootloader was 3.0.1, as the commit recommended).
I tried with NCM, but it is definitely the GPIO problem, as the modem is not even shown under lsusb.
Will try this on Monday, but it would be nice, if this problem can be fixed at least by setting the correct GPIO pins for SIM1 and modem powered on by default on the master version.
I am not expecting the SIM switching to work, but at least it should power on by default
I am not sure if the stuff i've made is useful for a patch against OpenWRT. I included some stuff from the Teltonika GPL sources and fixed the GPIO pin Numbers (OpenWRT uses a starting index 32, where the Teltonika Firmware uses a index of 48) and I think this stuff is not done in a way it fits into OpenWRT.
Yesterday I saw /etc/init.d/gpio_switch in the firmware and tried this instead of the ugly scripts
uci batch << END
set system.modem_power=gpio_switch
set system.modem_power.name='Modem Power'
set system.modem_power.gpio_pin='44'
set system.modem_power.value='1'
set system.modem_reset=gpio_switch
set system.modem_reset.name='Modem reset'
set system.modem_reset.gpio_pin='45'
set system.modem_reset.value='0'
set system.simcard=gpio_switch
set system.simcard.name='SIM Card'
set system.simcard.gpio_pin='33'
set system.simcard.value='1'
commit
END
That way the modem gets woken up after reboot and it fits into OpenWRT. As far as I have seen this is setup in /etc/board.d/03_gpio_switches
If this fits I can build a patch. What to you think @pepe2k?
I will take care of that 3 GPIO lines missing for SIM/modem. They are common for whole RUT9xx series.
I would like someone to extend support and include all missing things for RUT955/RUT905 in mach-rut9xx.c. I don't have access to RUT9x5, so I'm not able to test and verify additional I/O/RS232/RS485/GPS/etc. RUT900 just doesn't have them.
We have access to RUT955, I am happy to test it in when we have those items supported.
GPS is modem dependent, no additional GPS chip inside. In terms of the RS232, I just needed to install the proper driver with opkg, and the device was recognised, maybe it needs some modifications to attach a shell to it.
Maybe the easiest way to handle all this would be to create a teltonika luci app, where it is possible to set and get the GPIO pins, so the relay, monitor, SIM switch etc. can be controlled.
we do have the same issue with the Teltonika RUT5xx after upgrading from lede-17.01 to OpenWrt 18.06 (or master).
the modem doesn't show up anymore in "lsusb".
there are 24 GPIOs but none of them seems to trigger the modem boot
what are the odds for success if i'll copy the /package/kernel/mmc_over_gpio (from the rut955 source code) dir to the ~/openwrt/package/kernel/ dir, then run ./scripts/feeds update && ./scripts/feeds install -a, select the package in "make menuconfig" and run make -j $(nproc).
@Akavish Thanks for all your work/info! I've got a RUT950 I'm working with...the goal is 18.06.1 and my stuggle is the modem as well. I'm trying the steps from your previous post and will let you know how it goes.
Progress finally! ...I've been stuck for several days.
I got the MX880 driver as you descibed and now my cdc-wdm0 device finally shows up! I also tried to build the modemmanager package, but it's failing with the following...
make[6]: Nothing to be done for 'all-am'.
make[6]: Leaving directory '/home/test/openwrt/build_dir/target-mips_24kc_musl/modemmanager-1.8.0/libwmc'
make[5]: Leaving directory '/home/test/openwrt/build_dir/target-mips_24kc_musl/modemmanager-1.8.0/libwmc'
Making all in libmm-glib
make[5]: Entering directory '/home/test/openwrt/build_dir/target-mips_24kc_musl/modemmanager-1.8.0/libmm-glib'
Making all in generated
make[6]: Entering directory '/home/test/openwrt/build_dir/target-mips_24kc_musl/modemmanager-1.8.0/libmm-glib/generated'
GEN mm-enums-types.h
GEN mm-errors-types.h
GEN mm-gdbus-manager.c
Traceback (most recent call last):
File "/home/test/openwrt/staging_dir/target-mips_24kc_musl/usr/bin/gdbus-codegen", line 53, in <module>
from codegen import codegen_main
ImportError: No module named codegen
Makefile:1109: recipe for target 'mm-gdbus-manager.c' failed
make[6]: *** [mm-gdbus-manager.c] Error 1
make[6]: Leaving directory '/home/test/openwrt/build_dir/target-mips_24kc_musl/modemmanager-1.8.0/libmm-glib/generated'
Makefile:1163: recipe for target 'all-recursive' failed
make[5]: *** [all-recursive] Error 1
make[5]: Leaving directory '/home/test/openwrt/build_dir/target-mips_24kc_musl/modemmanager-1.8.0/libmm-glib'
Makefile:505: recipe for target 'all-recursive' failed
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory '/home/test/openwrt/build_dir/target-mips_24kc_musl/modemmanager-1.8.0'
Makefile:437: recipe for target 'all' failed
make[3]: *** [all] Error 2
make[3]: Leaving directory '/home/test/openwrt/build_dir/target-mips_24kc_musl/modemmanager-1.8.0'
Makefile:141: recipe for target '/home/test/openwrt/build_dir/target-mips_24kc_musl/modemmanager-1.8.0/.built' failed
make[2]: *** [/home/test/openwrt/build_dir/target-mips_24kc_musl/modemmanager-1.8.0/.built] Error 2
make[2]: Leaving directory '/home/test/openwrt/feeds/modemmanager/modemmanager'
time: package/feeds/modemmanager/modemmanager/compile#11.51#1.88#13.47
package/Makefile:107: recipe for target 'package/feeds/modemmanager/modemmanager/compile' failed
make[1]: *** [package/feeds/modemmanager/modemmanager/compile] Error 2
make[1]: Leaving directory '/home/test/openwrt'
/home/test/openwrt/include/toplevel.mk:216: recipe for target 'package/modemmanager/compile' failed
make: *** [package/modemmanager/compile] Error 2