Hacker News new | ask | show | jobs
by bloopernova 1694 days ago
Random thought upon reading the linked announcement:

If you stacked multiple Pi boards on top of each other, connected through the GPIO HAT connector, could you network them?

Apologies, just woke up and coffee not kicked in. This is probably silly :)

EDIT: yes, I should search for this sort of thing before posting: https://forums.raspberrypi.com/viewtopic.php?t=127660

tl;dr "serial port, RS485 + SLIP of some sort, probably would max out at around 1Mbps, 4Mbps theoretically possible with small MTU's" and "There is no hardware reason why an RS485 network could not be used as the physical layer for at least 32 nodes, and with some of the RS485 driver chips, 127 nodes (they have stronger drivers)"

1 comments

RS485 is just an electrical standard for serial transmission that includes multiple devices on the same bus. It is not a network or transport protocol. I doubt SLIP would function on an RS485 connection as 485 is typically used in master-slave configurations where only one master unit sends messages and listening "slave" devices only respond if addressed. You'd have to write a protocol layer to handle the transport of packets over 485, even in four wire full duplex setups.

The issue with "stacking" is the pins on each board are not part of a bus but individual programmable io pins. Any stacking would require an intermediary board to isolate all these pins safely while adding the necessary TTL serial to 485 interface chips (e.g. Maxim max485).

CAN is similar to 485 where it's a 2 wire bus though it has smarter hardware which enables full duplex communication and any device can listen or transmit. Unfortunately it is pretty slow compared to Ethernet but plenty fast for its intended use.

If the RPi SoC supported being an SPI slave (it doesn't) you could do something similar to a token ring network at up to - theoretically - something like 100 mbit/s.
or just use the standard rs485 protocol that all industrial hardware has used for decades and has preexisting nice libraries - modbus. Built in CRC, dirt simple, reliable.
I know modbus very well. The OP was talking about networking the machines using SLIP over 485 which is completely different than moving around bits and words.