Version 9 (modified by 2 years ago) (diff) | ,
---|
X300B
LTE-4G ref here
Step 1: Install USB packages
kmod-usb-net-cdc-ether kmod-usb-net-qmi-wwan kmod-usb-net-rndis kmod-usb-serial kmod-usb-serial-option kmod-usb-serial-wwan kmod-usb-wdm usb-modeswitch
Install LTE-4G packages
luci-proto-qmi uqmi
Step 2: Create the QMI interface Go to Network => Interfaces => click "Add new interface" You can input any name you like. In this example, I named my interface "4G". In the protocol field choose "QMI". If you don't see QMI on the list, you have not installed the right packages or haven't rebooted the router.
Step 3: Please note that two interfaces showed up. One called "4G" and another one "Virtual dynamic interface (DHCP client)" called "4G_4". The "_4" means that the interface has an IPv4 IP address. This is based on the "PDP Type" selected in the previous step. If your carrier supports IPv6, you can use that as well (not recommended).
Get signal info status
root@OpenWrt:~# uqmi -d /dev/cdc-wdm0 --get-signal-info { "type": "lte", "rssi": -68, "rsrq": -14, "rsrp": -100, "snr": 2.000000 } root@OpenWrt:~# uqmi -d /dev/cdc-wdm0 --get-data-status "connected" root@OpenWrt:~# uqmi -d /dev/cdc-wdm0 --get-current-settings { "pdp-type": "ipv4", "ip-family": "ipv4", "mtu": 1500, "ipv4": { "ip": "172.30.0.9", "gateway": "172.30.0.10", "subnet": "255.255.255.252" }, "ipv6": { }, "domain-names": { } } root@OpenWrt:~#
GPS
On /dev/ttyUSB2
AT+QGPS=1 Starts GPS service + NMEA Feed on /dev/modemGPS AT+QGPSEND Stops GPS Service + NMEA Feed on /dev/modemGPS AT+QGPSCFG="gpsnmeatype",xxx Configure which NMEA output sentences are generated (See SIMCOM GPS Page) AT+QGPSLOC? Run on AT command port to give a one-shot reading AT+QGPSGNMEA="GGA" Run on AT command port to give a one-shot reading of GPS Fix Data, Time, Position and related fix data
Ex.
AT+QGPSLOC? +QGPSLOC: 232222.0,1343.4258N,10039.1887E,0.8,2.1,2,0.00,0.0,0.0,231122,09
Read Lat,Lon ref here
13+(43.4258/60) = 13.723763
100+(39.1887/60) = 100.653145
On /dev/ttyUSB1 the data will continue update GPS location
root@OpenWrt:~# picocom -b 115200 /dev/ttyUSB1 $GPGGA,233253.00,1343.426109,N,10039.188521,E,1,08,0.8,2.5,M,-25.0,M,,*46
We use ser2net to stream out the lat,lon
root@GL-X300B:/etc# tail -2 ser2net.conf 8888:raw:400:/dev/ttyUSB1:115200 8DATABITS NONE 1STOPBIT
Then on other terminal run
root@GL-X300B:~# curl -v --http0.9 192.168.8.1:8888 > GET / HTTP/1.1 > Host: 192.168.8.1:8888 > User-Agent: curl/7.66.0 > Accept: */* > $GPGGA,235831.00,1343.426963,N,10039.186482,E,1,08,0.8,1.9,M,-25.0,M,,*43 $GPRMC,235831.00,A,1343.426963,N,10039.186482,E,0.0,201.3,231122,1.1,W,A,V*51
Attachments (1)
- 3_quectel_apn_configuration.png__1914x1254_q85_subsampling-2.png (33.3 KB) - added by 2 years ago.
Download all attachments as: .zip