-
Notifications
You must be signed in to change notification settings - Fork 0
/
e750-lte-switch.patch
72 lines (68 loc) · 1.73 KB
/
e750-lte-switch.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
diff -ruN old/switch_queue new/switch_queue
--- old/switch_queue 2022-03-15 16:21:30.000000000 -0400
+++ new/switch_queue 2022-03-15 16:23:38.000000000 -0400
@@ -58,8 +58,10 @@
switch_left=
switch_disabled="0"
- switch_enabled=$(uci get glconfig.switch_button.enable)
- switch_func=$(uci get glconfig.switch_button.function)
+ #switch_enabled=$(uci get glconfig.switch_button.enable)
+ switch_enabled="1"
+ #switch_func=$(uci get glconfig.switch_button.function)
+ switch_func="modem"
switch_left=$(grep -o "right.*lo" /sys/kernel/debug/gpio)
@@ -81,6 +83,9 @@
"tor")
e750-mcu " Turning TOR ON"
;;
+ "modem")
+ e750-mcu " Turning LTE ON"
+ ;;
"*")
;;
esac
@@ -98,6 +103,9 @@
check_other_vpn tor
e750-mcu " Turning TOR OFF"
;;
+ "modem")
+ e750-mcu " Turning LTE OFF"
+ ;;
"*")
;;
esac
diff -ruN old/switchaction new/switchaction
--- old/switchaction 2022-03-15 16:21:06.000000000 -0400
+++ new/switchaction 2022-03-15 16:20:59.000000000 -0400
@@ -62,8 +62,10 @@
model=$(get_model)
switch_left=
switch_disabled="0"
- switch_enabled=$(uci get glconfig.switch_button.enable)
- switch_func=$(uci get glconfig.switch_button.function)
+ #switch_enabled=$(uci get glconfig.switch_button.enable)
+ switch_enabled="1"
+ #switch_func=$(uci get glconfig.switch_button.function)
+ switch_func="modem"
case "$model" in
"ar150")
@@ -136,6 +138,9 @@
check_other_vpn tor
toggle_tor ON
;;
+ "modem")
+ echo -e "AT+cfun=1\r\n" > /dev/ttyUSB2
+ ;;
"*")
;;
esac
@@ -157,6 +162,9 @@
"tor")
toggle_tor OFF
;;
+ "modem")
+ echo -e "AT+cfun=4\r\n" > /dev/ttyUSB2
+ ;;
"*")
;;
esac