I am using a Pi compute module and wish to make two of them to communicate to each other.

I have hooked up some slave I2C devices to it (RTC, Temperature sensor). So I don't think making Pi as slave using on-board I2C is an option

And I read Understanding SPI on the Raspberry Pi, on board SPI only function in Master mode.

I unable use Ethernet/Wifi/BT (design requirement not allow involving a LAN switch in between AND no USB wifi/bluetooth).

Is there any other way (maybe use the existing GPIO implementing my own software I2C/SPI/1wire slave?) to make both Pi communicate to each other? data speed is not important

Serial link TXD/RXD also already used up for communication with PC

  • A serial link perhaps?
    – joan
    Apr 29, 2015 at 11:18
  • sorry @joan, serial link already used up for PC-Pi communication
    – Dennis
    Apr 29, 2015 at 11:19
  • 2
    Doesn't the compute module have another serial link, e.g. on gpios 32/33. You might have to search to find a Linux driver (I think one has been written) if you don't fancy writing a userland program to access the hardware.
    – joan
    Apr 29, 2015 at 11:23

1 Answer 1


You could use the GPIO ports on the Pi and the RPi.GPIO API for Python to communicate and convert the number to binary, although this would take quite a bit of coding.

Another option would be to connect the two pis' directly to each other with just 1 ethernet cable, for which you would need to configure a default, static IP address to use on each. Then you could use the socket API from Python to communicate.

  • 1
    If you use an Ethernet cable to connect the Pis directly, I would think it should be a crossover cable - so that P1.Send -> P2.Receive (and vice versa) - at least that's the way it was done in the old days.
    – qxotk
    May 7, 2015 at 17:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.