Created
September 2, 2021 19:19
-
-
Save NiKiZe/cc80ba9689296568f03f823899d109c5 to your computer and use it in GitHub Desktop.
Start MC7700 LTE on Raspberry Pi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Connect a Raspberry Pi to LTE using MC7700 Mini PCI Modem with adapter to USB-C | |
sudo qmicli -d /dev/cdc-wdm0 -p --wds-stop-network | |
sudo cat /sys/class/net/wwan0/qmi/raw_ip | |
sudo ip link set dev wwan0 down | |
# Enable OS Raw IP Mode setting (not persistent) | |
sudo su -c "echo Y > /sys/class/net/wwan0/qmi/raw_ip" | |
sudo qmicli -d /dev/cdc-wdm0 -p --device-open-net="net-raw-ip|net-no-qos-header" --wds-start-network="ip-type=6" --client-no-release-cid | |
sudo qmicli -d /dev/cdc-wdm0 -p --device-open-net="net-raw-ip|net-no-qos-header" --wds-start-network="ip-type=4" --client-no-release-cid | |
sudo ip link set dev wwan0 up | |
sudo qmicli -d /dev/cdc-wdm0 -p --wds-get-current-settings | |
ip a | |
sudo ip r del default | |
sudo udhcpc -q -f -n -i wwan0 | |
# -q exit after getting lease | |
# -f Foreground wait | |
# -n exit if no lease | |
# TODO fix no DNS | |
sudo qmicli -d /dev/cdc-wdm0 --nas-get-signal-info; \ | |
sudo qmicli -d /dev/cdc-wdm0 --nas-get-signal-strength; \ | |
sudo qmicli -d /dev/cdc-wdm0 --nas-get-home-network; \ | |
sudo qmicli -d /dev/cdc-wdm0 --nas-get-serving-system; \ | |
sudo qmicli -d /dev/cdc-wdm0 --nas-get-system-info | |
sudo qmi-network /dev/cdc-wdm0 status | |
sudo qmicli -d /dev/cdc-wdm0 --wds-get-packet-service-status | |
sudo qmicli -d /dev/cdc-wdm0 -p --nas-get-signal-info --nas-get-signal-strength --nas-get-home-network --nas-get-serving-system | |
sudo qmi-network /dev/cdc-wdm0 status | |
sudo qmicli -d /dev/cdc-wdm0 --wds-get-packet-service-status |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi! I just installed a LTE hat and MC7700 on my Raspberry 3B+. Do I just run the script "start_wwan.sh" to make it work? Are there any prerequisites? Thanks!