Internet connection over serial port

2

1

I need to connect a Raspberry to the Internet via the serial port of another computer. Here is a schematic for how it should work:

                      +-----------------------+
+------------+        |                       |
|            |        |     Linux Computer    |
|  Internet  +-------->                       |
|            |        | (Debian / Kali-linux) |
+------------+        |                       |
                      +----------+------------+
                                 |
                                 |
                                 | Internet over serial port (ttyACM0)
                                 |
                                 v
                      +-----------------------+        +-----------------------+
                      |                       |        |                       |
                      |    Linux Computer     |        | Access to site like   |
                      |                       +------->+ google / ... with     |
                      | (Debian / Raspberry)  |        | normal browser        |
                      |                       |        |                       |
                      +-----------------------+        +-----------------------+

The speed isn't really a problem for me.

How can I accomplish this?

TurtleForGaming

Posted 2018-02-16T21:24:53.667

Reputation: 31

1There's something called SLIP (Serial Line Internet Protocol) for allowing the sending of internet packets over a serial connection. There appear to be SLIP implementations for Raspberry as well. However, learning material recommendations are off topic here because they are solved by the most basic of Google Searches. So, what have you searched? What have you tried? Where are you encountering problems? – music2myear – 2018-02-16T21:29:41.200

1@music2myear - I think you are being a bit harsh - its not like Internet connections over serial ports are the norm (and indeed, I'd put to you that SLIP is not even the correct way to do it as it was rendered obsolete by PPP. Also, in order to find this kind of stuff, you really need to have been exposed to 20 year old technology or happen to be involved in very niche fields) – davidgo – 2018-02-16T22:08:27.823

The line "Is there a tutorial that anyone can give me" is specific a request for learning material. That can be edited out, but it also appears OP has not done much of any homework on the issue on their own prior to asking here. – music2myear – 2018-02-16T22:40:08.590

Answers

3

You want to look at the protocols used 20 years ago for dialup - where a serial port was connected to a modem to connect to the internet. As @music2myear suggested there was a protocol called SLIP which did this, however this was superseded by PPP.

My google-fu is strong (actually I know the keywords) and I came up with the Linux PPP howto, section 29 which is possibly what you want. (A note - a "null modem cable" was a serial cable on both sides with the TX and RX pairs crossed over - which would be analogous to what you are doing with your Pi)

davidgo

Posted 2018-02-16T21:24:53.667

Reputation: 49 152

1While PPP does supersede SLIP in many cases, SLIP is still used for micro controllers, which Pi devices qualify as. – music2myear – 2018-02-16T22:38:50.770

@music2myear - A Pi is not a microcontroller. The Pi bills itself a "a small and affordable computer you can use to learn programming" - significantly it includes a microprocessor (not micro controller), and connects to a mouse, monitor and takes external storage. The correct definition for a Pi would be a "single board computer". (SLIP does not even work for IPv6) – davidgo – 2018-02-16T23:03:39.270

Not everything is Pi ;) I would also suggest SLIP as it so simple to implement at least as PoC. At any time it’s easy to switch to PPP. – 0andriy – 2018-11-06T22:28:36.403