i have an hh41v router with an rndis modem: MDM9207
i want to command the modem to change the network type from 3g to 4g lte, so i need to comunicate with it with AT commands.
with ssh:
dmesg | grep -A 1 -B 12 ttyS
i get:
[ 0.387814] 18020000.uart: ttyS0 at MMIO 0x18020000 (irq = 10, base_baud = 1562500) is a 16550A
16550A UART, which is a common type of serial communication chip
The ttyS0 device is mapped to the memory-mapped I/O address 0x18020000 and uses interrupt request (IRQ) 10
i have installed picocom in the router, then from ssh:
picocom --q /dev/ttyS0 -b 1562500
i prints:
Invalid --baud: 1562500
if i dont set the baud:
picocom --q /dev/ttyS0
it seems that the connection is not set, i get no output when sending: AT
i searched for socat in the repository but i could not find it, it semms it does not have an apk version yet, and i'm using the latest snapshot version with apk and not opkg.
ttyS0 is the router chip's built in serial port. You need to install the matching kmod-usb-serial-xxxx driver for the modem's serial port. This should create about four ttyUSB ports, one of which you can open with picocom etc and send AT commands.
run ls /dev/tty* to see all the serial ports. rndis by itself operates in a different way than serial ports, it will not create or use any.
Then you need to temporary add unknown IDs to the driver: echo "1bbb 0196" > /sys/bus/usb-serial/drivers/option1/new_id
In this case you will get 3 new ports.