Eliter
Posts: 37
Joined: Sat Dec 26, 2015 7:28 am

Cheap Networking

Thu Jun 14, 2018 3:52 am

Hello, I wanted to know what the cheapest networking stategy is between Raspberry Pi's. Now, the Raspberry Pi zero (NOT W) is super cheap, but has no networking capabilities.

I wanted to know if it were possible to hook up a CAT5 cable to a Raspberry Pi's GPIO pins and be able to accomplish networking. If not, what is the absolute, rock-bottom, light-weight (physically), wired, cheap way to network two Raspberry Pi's together?

Thanks!

EDIT: More specifically what I am thinking of doing is to strip the end of a CAT5 cable so the wires are exposed, and solder the wires directly to the board. I don't need to unplug the cable or have a fancy port.

ejolson
Posts: 3824
Joined: Tue Mar 18, 2014 11:47 am

Re: Cheap Networking

Thu Jun 14, 2018 4:14 am

Eliter wrote:
Thu Jun 14, 2018 3:52 am
Hello, I wanted to know what the cheapest networking stategy is between Raspberry Pi's. Now, the Raspberry Pi zero (NOT W) is super cheap, but has no networking capabilities.

I wanted to know if it were possible to hook up a CAT5 cable to a Raspberry Pi's GPIO pins and be able to accomplish networking. If not, what is the absolute, rock-bottom, light-weight (physically), wired, cheap way to network two Raspberry Pi's together?

Thanks!

EDIT: More specifically what I am thinking of doing is to strip the end of a CAT5 cable so the wires are exposed, and solder the wires directly to the board. I don't need to unplug the cable or have a fancy port.
The cheapest way to network a Pi Zero to another Pi is with a standard USB cable and the Ethernet gadget driver. An example where this is done is my super-cheap cluster of Raspberry Pi Zero computers.
Last edited by ejolson on Thu Jun 14, 2018 4:28 am, edited 1 time in total.

klricks
Posts: 6622
Joined: Sat Jan 12, 2013 3:01 am
Location: Grants Pass, OR, USA
Contact: Website

Re: Cheap Networking

Thu Jun 14, 2018 4:15 am

Eliter wrote:
Thu Jun 14, 2018 3:52 am
Hello, I wanted to know what the cheapest networking stategy is between Raspberry Pi's. Now, the Raspberry Pi zero (NOT W) is super cheap, but has no networking capabilities.

I wanted to know if it were possible to hook up a CAT5 cable to a Raspberry Pi's GPIO pins and be able to accomplish networking. If not, what is the absolute, rock-bottom, light-weight (physically), wired, cheap way to network two Raspberry Pi's together?

Thanks!

EDIT: More specifically what I am thinking of doing is to strip the end of a CAT5 cable so the wires are exposed, and solder the wires directly to the board. I don't need to unplug the cable or have a fancy port.
What is it that you want to accomplish by networking 2 RPis together?
Also depends on what you mean by 'networking'?

The GPIO can not be used to connect Ethernet networking directly. The GPIO can be used to send data back and forth by serial and several other means but you would have to write programs to send and get data.

The RJ45 connector has components inside the shell that must be present. You cannot direct wire the Ethernet from board to board. A proper CAT5/6 cable must be used.
Unless specified otherwise my response is based on the latest and fully updated Raspbian Buster w/ Desktop OS.

Eliter
Posts: 37
Joined: Sat Dec 26, 2015 7:28 am

Re: Cheap Networking

Thu Jun 14, 2018 4:39 am

klricks wrote:
Thu Jun 14, 2018 4:15 am
The RJ45 connector has components inside the shell that must be present. You cannot direct wire the Ethernet from board to board. A proper CAT5/6 cable must be used.
I planned on using CAT5/6, but no RJ45 port.

I also was talking on ##networking from @freenode.net and they are saying that I should use pins 8 and 10 (https://pinout.xyz/pinout/serial_pi_plus# ) which are serial pins. On top of that, there was somthing about PPP, RS232, and Ethernet standards I could use. From my understanding, there are electrical protocols that I would use, and the internet protocol would sit on top of the electrical protocol that I choose. Not finished talking to these people, so I'm still gathering more info.

W. H. Heydt
Posts: 11094
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)

Re: Cheap Networking

Thu Jun 14, 2018 5:52 am

Eliter wrote:
Thu Jun 14, 2018 4:39 am
klricks wrote:
Thu Jun 14, 2018 4:15 am
The RJ45 connector has components inside the shell that must be present. You cannot direct wire the Ethernet from board to board. A proper CAT5/6 cable must be used.
I planned on using CAT5/6, but no RJ45 port.

I also was talking on ##networking from @freenode.net and they are saying that I should use pins 8 and 10 (https://pinout.xyz/pinout/serial_pi_plus# ) which are serial pins. On top of that, there was somthing about PPP, RS232, and Ethernet standards I could use. From my understanding, there are electrical protocols that I would use, and the internet protocol would sit on top of the electrical protocol that I choose. Not finished talking to these people, so I'm still gathering more info.
PPP is a software protocol, Point to Point Protocol, most often used as PPPoE, Point to Point Protocol Over Ethernet. RS-232 is a serial communication signalling standard. Ethernet comes in a variety of forms. The original form used a network backbone of 1" coaxial "cable". (I put the scare quotes on cable because the outer conductor of that is a solid Aluminum tube.) What you now think of Ethernet cabling is a point to point cabling system using unshielded twisted pair (UTP) with various "category" standards. Most common current ones in use are Cat-5, Cat-5e, and Cat-6. RJ-45 is the standard connector. (And for those not fully conversant with this stuff, the RJ-45 is an 8-pin connector that looks like the "big brother" of a 4-pin RJ-11 connector used for modular telephone cabling.) As already noted, the terminating connection for Ethernet over UTP is *not* just a simple. soldered connection.

So...what you have to decide is: What sort of physical connection do you want, and what sort of software stack do you want to run over it? As already mentioned, one of the simpler ones to set up is using TCP/IP over USB.

Probably the least expensive would be to use Pi0W boards instead of Pi0 and use the built-in wireless capability. That requires no extra hardware, and would be a cheaper solution than anything other than USB....and without the 5m cable limit.

Heater
Posts: 13913
Joined: Tue Jul 17, 2012 3:02 pm

Re: Cheap Networking

Thu Jun 14, 2018 6:44 am

The Point To Point Protocol (PPP) is often used to make an IP connection over serial links. It can be used over other circuits but let's think about serial.

As such it enables two machines to make a network connection between themselves (point to point), that network connection can then be used like any other over ethernet, wifi, whatever.

The Serial Line Internet Protocol (SLIP) is an older, simpler, way of making a network connection over a serial link. Unless you are working with a small, speed and memory constrained microcontroller PPP is to be prefered.

So, one can link two Pi by joining their serial port connections (On the GPIO header) and configuring PPP to create network interfaces that use those ports.

I'd like to point you at some nice simple instructions on setting up such a PPP connection between Pi. But most of what I can find with google is very old articles and howtos or overly long and complicated or cluttered with info about modems or whatever the device is they are talking about.
Memory in C++ is a leaky abstraction .

Heater
Posts: 13913
Joined: Tue Jul 17, 2012 3:02 pm

Re: Cheap Networking

Thu Jun 14, 2018 7:04 am

BINGO! Here is a nice simple article describing how to make a network connection between a Pi and PC running Linux using PPP.

http://www.instructables.com/id/Connect ... sing-UART/

The article uses a USB to serial converter to make the serial connection to the GPIO pins of the Pi but it should be easy enough to adapt those instructions for a GPIO to GPIO serial connection between Pi.

Remember this is a point to point link, not a network as such, so if you want to connect multiple Pi together you will need to find more serial ports...
Memory in C++ is a leaky abstraction .

User avatar
RaTTuS
Posts: 10501
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK
Contact: Twitter YouTube

Re: Cheap Networking

Thu Jun 14, 2018 8:19 am

viewtopic.php?f=44&t=51633&start=25#p828064
will connect raspberrys via serial lines and make them appear on the network
should work for Stretch
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

hippy
Posts: 6260
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: Cheap Networking

Thu Jun 14, 2018 9:14 am

The 'no additional hardware except wire or cable' options for a Pi Zero are PPP/SLIP or USB Ethernet Gadget Mode.

MagPi had an article on connecting two Pi computers together using serial but I am afraid I don't recall which issue off-hand.

The better choice IMO is to choose a Zero W over a Pi Zero and go wireless.

User avatar
Gavinmc42
Posts: 4050
Joined: Wed Aug 28, 2013 3:31 am

Re: Cheap Networking

Thu Jun 14, 2018 11:08 am

You could used a RS485 chip attached to the UART and still use the CAT5 cable.
Full duplex needs 2 pairs.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

Ernst
Posts: 1257
Joined: Sat Feb 04, 2017 9:39 am
Location: Germany

Re: Cheap Networking

Thu Jun 14, 2018 11:53 am

hippy wrote:
Thu Jun 14, 2018 9:14 am

MagPi had an article on connecting two Pi computers together using serial but I am afraid I don't recall which issue off-hand.
Magpi #41 "SHARE INTERNET TO THE RASPBERRY PI ZERO"
The road to insanity is paved with static ip addresses

ghellquist
Posts: 68
Joined: Thu Aug 02, 2012 8:47 am
Location: Stockholm Sweden

Re: Cheap Networking

Wed Jun 20, 2018 5:38 am

Do consider the speed you want, Raw speed on Ethernet 10 MBits/sec meaning 10,000,000, raw speed on serial perhaps 115,200.

hippy
Posts: 6260
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: Cheap Networking

Thu Jun 21, 2018 11:16 am

ghellquist wrote:
Wed Jun 20, 2018 5:38 am
Do consider the speed you want, Raw speed on Ethernet 10 MBits/sec meaning 10,000,000, raw speed on serial perhaps 115,200.
Many on-chip UART's and USB-to-Serial chips can pump out 1 Mbps and often more. I recall it being said the Pi could theoretically handle up to 250 Mbps but not sure which UART and not sure that would actually be achievable.

The MagPi project linked to above for enabling UART PPP between Pi's appears to use 16MHz clocking. That's possibly 1 Mbps; not sure what the division ratio is.

The main limitation is wiring and distance, plus of course having software able to accumulate data coming in at that sustained rate.

Return to “General discussion”