niomfindmy.blogg.se

Linux ip over serial port
Linux ip over serial port













linux ip over serial port

  • Method-1: Use timeout utility to test port connectivity.
  • Let's say I want to bring the Ethernet packets to the Serial port and then send them over Lora (with Lora hat) to the other RPi where they will arrive to Serial port and be forwarded to Ethernet again. Quote from: Mad Penguin on October 26, 2020, 06:09:17 PM On the one hand pppd is not completely straightforward, however, once upon a time it used to be the only way to get a connection to the Internet as a Linux home user, so it's something many people have been able to get to grips with in the past, and something is relatively robust when you get into it. If you then wanted to provide Internet connectivity to machine on the second internal network, then you would need to make sure the default route of machines in 192.168.2.0/24 is pointed to the second "pi" on 192.16.2.1. On the machine connected to the broadband router, you would need to route 192.168.2.0/24 "via" 192.168.1.1, and on the other end of the serial link you would need to add a default gateway down the serial port, so 0.0.0.0/0 "via" 192.168.1.2.

    linux ip over serial port

    (see the "ip" command, specifically "ip route" for adding routes) If we then assume the other machine connects to the onward ethernet port to another local network on say 192.168.2.1/24, you would then need to add two static routes to get full internet connectivity on the second machine. If you tell your PPP link to use 192.168.1.1/24 and 192.168.1.2/24, you will end up with an address of 192.168.1.1/24 on ppp0 on the machine connected to your local network, and 192.168.1.2/24 on the other machine connected via the serial link. Let's say for the sake of argument your local broadband router has a local IP of 192.168.0.1/24. (there are a lots of "howto's" re configuring ppp knocking around) When set up, the client can be told to "dial" the server, then the server will issue an IP pair the end result is that you will have a new network interface on each machine (typically called "ppp0") connected via a point-to-point TCP/IP link. Each end needs to be configured with the device name of the serial port on that machine, and some basic details like line speed etc. To make this work you will need to run a "pppd" server on one of the machines, and a"ppp" client on the other. Hi, I'm not sure whether you can make socat do what you want, but I think the "proper" way to achieve what you want is via PPP.















    Linux ip over serial port