Ppp over serial linux

Networking Palm via PPP through a Linux serial port

If you have a Linux PC on a TCP/IP network, and a Palm device that has a PPP stack, (the Palm Vx, for example), you can reach the internet from the Palm device by connecting it to the PC’s serial port. You can use either a serial cable or a serial port cradle to connect the device to the serial port.

Check your Linux kernel configuration

If you’ve never re-built your kernel, never mind this part. The kernel that was distributed with your system probably has all the appropriate switches turned on.

If you’ve re-built your kernel, you may have to turn on PPP, /proc filesystem support, and IP forwarding. In xconfig, turn on
Networking options/Network packet filtering and
Networking options/IP: Netfilter Configuration/Connection tracking, IP tables support

Configure the Palm device

Use the System->Prefs application to configure the Palm device.

Connection

Network

Configure Linux

Turn on PPP

Start IP forwarding

Start surfing

You can make a PPP connection using System->Prefs , under Network . Most web browsers on the Palm will start up a PPP connection themselves.

Note that you won’t be able to HotSynch your Palm so long as the PPP daemon is running on the serial port. In order to HotSynch again, you’ll have to delete the line from /etc/inittab and run telinit q to free the serial port before you HotSynch again.

Читайте также:  Низкоуровневое форматирование sd карты linux

Источник

ppp between two machines over serial without a modem

Moving question from stackoverflow.com Unfortunately can’t delete this question from stackoverflow.com. I’m trying to setup a PPP connection between two Linux machines over a serial line. I followed these instructions but it didn’t work. The two machines are Fedora 28 Linux on an Intel(R) Core(TM) i7-7600U CPU @ 2.80GHz and a custom built board with Linux 4.14.0-xilinx-v2018.2 on an ARMv7 A . Here are the commands and the output I got on a Fedora machine:

$ sudo pppd -detach debug passive lock xonxoff 192.168.10.100:192.168.10.1 /dev/ttyUSB0 9600 [sudo] password for user: using channel 3 Using interface ppp0 Connect: ppp0 /dev/ttyUSB0 sent [LCP ConfReq   ] sent [LCP ConfReq   ] sent [LCP ConfReq   ] sent [LCP ConfReq   ] sent [LCP ConfReq   ] sent [LCP ConfReq   ] sent [LCP ConfReq   ] sent [LCP ConfReq   ] sent [LCP ConfReq   ] sent [LCP ConfReq   ] LCP: timeout sending Config-Requests 
root@cpe-08:/data# pppd -detach debug passive lock xonxoff 192.168.10.1:192.168.10.100 /dev/ttyS0 9 600 

Yep, you saw it correctly, there was no other output Linux4.14.0-xilinx-v2018.2 . I was expecting to see ppp0 interface on both machines but didn’t see any of them. Here is the output of ifconfig on Fedora 28 after running pppd command

$ ifconfig enp0s20f0u2u2: flags=4163 mtu 1500 inet 172.24.176.116 netmask 255.255.255.0 broadcast 172.24.176.255 inet6 fe80::63fd:53b6:8b94:1abf prefixlen 64 scopeid 0x20 ether 00:0e:c6:a5:94:88 txqueuelen 1000 (Ethernet) RX packets 5016 bytes 457454 (446.7 KiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 1368 bytes 141981 (138.6 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 enp0s31f6: flags=4099 mtu 1500 ether 54:e1:ad:8c:32:a5 txqueuelen 1000 (Ethernet) RX packets 0 bytes 0 (0.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 0 bytes 0 (0.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 device interrupt 16 memory 0xec200000-ec220000 lo: flags=73 mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 inet6 ::1 prefixlen 128 scopeid 0x10 loop txqueuelen 1000 (Local Loopback) RX packets 184264 bytes 109696260 (104.6 MiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 184264 bytes 109696260 (104.6 MiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 virbr0: flags=4099 mtu 1500 inet 192.168.122.1 netmask 255.255.255.0 broadcast 192.168.122.255 ether 52:54:00:62:c0:6c txqueuelen 1000 (Ethernet) RX packets 0 bytes 0 (0.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 0 bytes 0 (0.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 wlp58s0: flags=4163 mtu 1500 inet 100.96.37.134 netmask 255.255.255.192 broadcast 100.96.37.191 inet6 fe80::3728:7f03:ba95:5757 prefixlen 64 scopeid 0x20 inet6 2620:10d:c0be:2226:7261:932:1670:38bb prefixlen 64 scopeid 0x0 ether f8:34:41:af:1a:0e txqueuelen 1000 (Ethernet) RX packets 13305344 bytes 16391874252 (15.2 GiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 5691206 bytes 1228184162 (1.1 GiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 
# ifconfig eth0 Link encap:Ethernet HWaddr 00:04:35:00:01:08 inet addr:172.24.176.208 Bcast:172.24.176.255 Mask:255.255.255.0 inet6 addr: fe80::204:35ff:fe00:108/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:2515 errors:0 dropped:0 overruns:0 frame:0 TX packets:753 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:221227 (216.0 KiB) TX bytes:93698 (91.5 KiB) Interrupt:27 Base address:0xb000 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:36160 errors:0 dropped:0 overruns:0 frame:0 TX packets:36160 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:1516794 (1.4 MiB) TX bytes:1516794 (1.4 MiB) 

I know that Linux 4.14.0-xilinx-v2018.2 was compiled to include ppp support. I would have included an excerpt from a ‘.config’ but it is not provided with the build. The reason I know that ppp support is in the kernel is because I asked our build guy and he said he included it.

Читайте также:  Характеристика сетевой операционной системы linux

Источник

PPP protocol over serial port

Where can I find some low level information about old days PPP protocol modems, over serial line? I have a embedded WiFi SOC that I want to use from linux as a modem, so «connect» via AT commands, configure, etc, then relay all TCP packets transparently. I know it can be done since a lot of GSM modems perform this (via AT) but I cannot find a useful start how to implement in SOC (a lot of garbage from google). I mean what will be the logical flow so linux drivers can see a standard modem. I also presume that I can skip the PPP part and redirect somehow (make a virtual adapter in linux side) that will exchange packets over serial line in a proprietary format, eventually helped by flow control and or other GPIOs tied to my SOC but I feel that I am re-inventing the wheel. Thanks for suggestions,

2 Answers 2

You’ll find the original PPP RFC documents listed at the bottom of this Wikipedia writeup on PPP.

LWIP is one of the better documented/supported lightweight implementations of PPP. (actually full TCP) However, the source is still several thousands of lines and in my opinion daunting to a newcomer.

This is the smallest working implementation of PPP that I know of. It’s easy to get to work on mbed-supported boards AFTER following the instructions on how to set up PPP networking on Windows. (Did not test it on a Linux box)

Depending on your application, it might indeed be simpler to define your own protocol to transfer data between your WIFI SOC and a Linux box.

Читайте также:  Переименовать папку линукс консоль

For example, this lab is a good guide on how to use node.js to move embedded data to the internet via a serial port and a PC.

Источник

Оцените статью
Adblock
detector