RPC for AdvaBoard RPi1 / Raspberry Pi RPC

To access the AdvaBoard RPi1 or the Raspberry Pi remotely over a network, RPC (remote procedure call) can be used. This directory contains such a simple example, using the lightweight JSON-RPC.

  • The server must be started on a Raspberry Pi.

  • The example-server can be started by:

    sudo ./am_rpi_rpc-server.py PORT

    PORT can be any port, but usually port > 1000 should be used.

  • All communication is stored in the logfile am_rpi_rpc-server.log, and errors are stored in am_rpi_rpc-server.err. You can use the following commands to start the server and watch the logfile:

    sudo ./am_rpi_rpc-server.py PORT &
    tail -f am_rpi_rpc-server.log
  • Note that the example-server does not use any authentification or encryption, and so should only be used in trusted networks, since anyone on the network can access the Raspberry Pi/AdvaBoard RPi1.

    For production use, authentification, encryption and some kind of rights-management-system should be added. Please contact support@advamation.de if you need support for this task.

  • The client can be started on any computer, which has a network-connection to the Raspberry Pi, by.

  • The example-client can be started by:

    ./am_rpi_rpc-client-example.py IP PORT

    where IP must be the IP-address of the Raspberry Pi, and PORT must be the port of the server.

    If working correctly, this should print something like:

    Connecting to RPC-server on
    Init Raspberry Pi...
    Raspberry Pi information:
      Model:        B
      Revision:     2.0 512MB (14)
      Manufacturer: Sony
      Serial:       0x12345678 / 305419896
    AdvaBoard RPi1 information:
      Model:         AdvaBoard RPi1
      Revision:      1
      Serial:        11160xxxxx
      F912-firmware: 20140219
      F353-firmware: 20140219
      CPLD-firmware: 0x01

    and the AdvaBoard RPi1-LED should blink afterwards.

  • Another client is the graphical user-interface, which can be found at ../am_rpi_gui/.

If you have any questions, you can contact us via support@advamation.de.