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.name='Modem Power'
set system.modem_reset.name='Modem reset'
set system.simcard.name='SIM Card'
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.