Telit LE910C4
Telit LTE cellular module
Support Module List:
- Telit LE910C4
- LE910C4-NF
- LE910C4-AP
- LE910C4-EU
Install libqmi tools
- For [Ubuntu 20.04] / [Debian 9/10/11]
apt-get install libqmi-utils -y
- For CentOS 7.9
yum install libqmi-utils -y
Disable ModemManager service (if necessary)
Due to ModemManager service is occupying cdc-wdm device node, to disable service is suggested.
systemctl disable ModemManager.service
Check DIP switch status
- Power on module
- Ensure DIP switch status is 'OFF' on target slot
- Power on cellular module
- Check SIM slot is selected (if using dual SIM card slots)
Check QMI wwan driver is loaded
$ dmesg | grep qmi
[ 783.731551] qmi_wwan 1-7:1.2: cdc-wdm0: USB WDM device
[ 783.732748] qmi_wwan 1-7:1.2 wwan0: register 'qmi_wwan' at usb-0000:00:14.0-7, WWAN/QMI device, d2:c4:e0:a2:4f:95
[ 783.732862] usbcore: registered new interface driver qmi_wwan
$ ip a | grep wwan
5: wwan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
Start connection
Network interface:
- assume cellular NIC is
wwan0
- assume cdc-wdm interface is
/dev/cdc-wdm0
- assume cellular NIC is
Check sim status
# if return message shows Card state: 'present', means SIM card is available
qmicli -d /dev/cdc-wdm0 -p --uim-get-card-status
# (optional) set PIN code, e.g. '0000'
qmicli --device=/dev/cdc-wdm0 -p --uim-verify-pin=PIN1,0000
- Enable raw ip function
echo Y > /sys/class/net/wwan0/qmi/raw_ip
- Start network status via qmicli
ifconfig wwan0 up
qmicli -v -d /dev/cdc-wdm0 \
-p --wds-start-network="ip-type=4,apn=internet" \
--client-no-release-cid \
--device-open-"net=net-raw-ip|net-no-qos-header"
- Check qmi network status
# if translated = SUCCESS, check internet status
qmicli -d /dev/cdc-wdm0 --wds-get-current-settings
- For example:
[/dev/cdc-wdm0] Current settings retrieved:
IP Family: IPv4
IPv4 address: 10.72.185.156
IPv4 subnet mask: 255.255.255.248
IPv4 gateway address: 10.72.185.157
IPv4 primary DNS: 61.31.1.1
IPv4 secondary DNS: 61.31.233.1
MTU: 1430
Domains: none
- Setup cellular network interface
# according the network information to setup ip, gateway and DNS
_ADDR=$(qmicli -d /dev/cdc-wdm0 --wds-get-current-settings | grep "IPv4 address" | awk '{print $3}')
_NETMASK=$(qmicli -d /dev/cdc-wdm0 --wds-get-current-settings | grep "IPv4 subnet mask" | awk '{print $4}')
_GW=$(qmicli -d /dev/cdc-wdm0 --wds-get-current-settings | grep "IPv4 gateway address" | awk '{print $4}')
_DNS=$(qmicli -d /dev/cdc-wdm0 --wds-get-current-settings | grep "IPv4 primary DNS" | awk '{print $4}')
ifconfig wwan0 ${_ADDR} netmask ${_NETMASK}
route add default gw ${_GW} dev wwan0
echo "nameserver ${_DNS}" >> /etc/resolv.conf
# ping google test
ping google.com -Iwwan0 -c 10
Enable GPS function
- For V2406C-KL/V2406C-WL/V2403C-KL series
Function | Device Node |
---|---|
GPS_PORT | /dev/ttyUSB1 |
AT_PORT | /dev/ttyUSB2 |
- For MC-3201-TL series
Function | Device Node |
---|---|
GPS_PORT | /dev/ttyUSB5 |
AT_PORT | /dev/ttyUSB6 |
# build AT-command utility
git clone https://github.com/Moxa-Linux/moxa-at-cmd.git
cd moxa-at-cmd
make && make install
# enable GPS function
mxat -d ${AT_PORT} -c 'AT$GPSRST' -t 1
mxat -d ${AT_PORT} -c 'AT$GPSNMUN=2,1,1,1,1,1,1' -t 1
mxat -d ${AT_PORT} -c 'AT$GPSP=1' -t 2
# read tty serial port to fetch GPS information
cat ${GPS_PORT}
- Get GPS information from tty serial port:
$GPVTG,,T,,M,,N,,K,N*2C
$GPGSA,A,1,,,,,,,,,,,,,,,,*32
$GPGGA,,,,,,0,,,,,,,,*66
$GPRMC,,V,,,,,,,,,,N,V*29
$GPGLL,,,,,,V,N*64
- Disable GPS function
mxat -d ${AT_PORT} -c 'AT$GPSRST' -t 1
mxat -d ${AT_PORT} -c 'AT$GPSNMUN=0,1,0,0,0,0,0' -t 1
Reference
Last updated on 2022-04-26 by Wilson Huang