Skip to content

Commit 1d0a019

Browse files
committed
Successfully set up Linux internet access via pppd
1 parent f94d82e commit 1d0a019

File tree

16 files changed

+1402
-28
lines changed

16 files changed

+1402
-28
lines changed

console.sh

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,20 @@ disconnectOnHalt=true
88
sendRequest=true
99

1010
while [[ "$1" =~ ^- && ! "$1" == "--" ]]; do case $1 in
11-
-h | --host )
11+
-h | --help )
12+
cat <<EOF
13+
options:
14+
-h, --help display this help and exit
15+
-H, --host HOST socket server hostname
16+
-p, --port PORT socket server port
17+
-d, --device DEVICE serial device name: uart0, uart1, uart2, uart3
18+
--direction DIRECTION socket direction: both, rx, tx
19+
--no-disconnect don't disconnect when processor halts
20+
--no-request don't send initial JSON request
21+
EOF
22+
exit 0
23+
;;
24+
-H | --host )
1225
shift; host=$1
1326
;;
1427
-p | --port )
@@ -17,6 +30,9 @@ while [[ "$1" =~ ^- && ! "$1" == "--" ]]; do case $1 in
1730
-d | --device )
1831
shift; device=$1
1932
;;
33+
--direction )
34+
shift; direction=$1
35+
;;
2036
--no-disconnect )
2137
disconnectOnHalt=false
2238
;;

linux/README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,22 @@
11
# Linux
22

3+
## Internet access
4+
5+
1. Enable the mlogv32-utils socket server on port 5000.
6+
2. Run on host:
7+
8+
```sh
9+
sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
10+
pppd file host_ppp_options
11+
```
12+
13+
3. Run on mlogv32:
14+
15+
```sh
16+
pppd /dev/ttyUL1
17+
ping google.com
18+
```
19+
320
## Debugging
421

522
### objdump

0 commit comments

Comments
 (0)