From 4438f69945da20519c3f72703b0d2232359f5791 Mon Sep 17 00:00:00 2001 From: HugoPoi Date: Mon, 18 Jul 2022 00:33:01 +0200 Subject: [PATCH] feat: finish and test connect script --- connect-huawei-e3372.sh | 12 ++++++++++-- refresh-connect-huawei-e3372.sh | 0 2 files changed, 10 insertions(+), 2 deletions(-) mode change 100644 => 100755 connect-huawei-e3372.sh mode change 100644 => 100755 refresh-connect-huawei-e3372.sh diff --git a/connect-huawei-e3372.sh b/connect-huawei-e3372.sh old mode 100644 new mode 100755 index 5333e17..fb546cd --- a/connect-huawei-e3372.sh +++ b/connect-huawei-e3372.sh @@ -5,6 +5,14 @@ modprobe -v option # For Huawei CDC NCM ether card modprobe -v huawei_cdc_ncm -usb_modeswitch -v 0x12d1 -p 0x14fe -J -sleep 2 +usb_modeswitch -v 0x12d1 -p 0x14fe -V 0x12d1 -P 0x1506 -J +sleep 5 +# TODO need to wait that /dev/ttyUSB0 to be created echo -ne "AT^NDISDUP=1,1,\"sl2sfr\"\r\n" > /dev/ttyUSB0 +sleep 3 +# TODO need to wait until CONNECTED with 4G network +udhcpc -i wwan0 +iptables -t nat -A POSTROUTING -o wwan0 -j MASQUERADE +iptables -A FORWARD -i br0 -j ACCEPT +iptables -t mangle -A FORWARD -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu + diff --git a/refresh-connect-huawei-e3372.sh b/refresh-connect-huawei-e3372.sh old mode 100644 new mode 100755