Orange Pi‎ > ‎

Remote Configuration Management for SPI flash

By means of simple (human readable) UDP datagrams, the SPI flash can be configured remotely. In order to work with the new SPI flash configuration, the node must read the SPI flash. The read of the SPI flash is done with a startup (reboot). There is a command for rebooting a node. Note that the reboot command is disabled by default.

As all the commands and replies are human readable, it is easy to write a (Java) UI front-end. Also, a mass configuration change can easily be scripted with standard Linux commands. For example: nc

Technical details:
  • UDP port : 10501 (0x2905)
  • Broadcast is supported.
  • All lines in responses are terminated with ‘\n’.
  • There is no broadcast of any datagram at startup of a node.

Defined commands:

?list#    Returns the ip-address, the type and the mode of node in a comma separated format:

‘ip-address’,’node type’,’node mode’,’active universes’.
Where ‘node type’ is: Art-Net , sACN E1.31 or OSC
Where ‘node mode’ is: DMX, RDM, Monitor or Pixel

For example a request:
echo '?list#' | nc -u -p 10501 -w 1 192.168.2.121 10501

Example returned line : 192.168.2.121,Art-Net,Pixel,2

?get#    Request for sending a .txt file.

For example a request:

    echo '?get#devices.txt' | nc -u -p 10501 -w 1 192.168.2.121 10501

?uptime#    Returns the uptime in seconds with format : "uptime:%s" , where % is the value.

For example a request:

    echo '?uptime#' | nc -u -p 10501 -w 1 192.168.2.121 10501

?reboot##    Request for rebooting a node. There are no additional parameters.

!display#    Switch the OLED display Off / On. Parameter value 0 is Off, 1 is On.

For example a set:

     echo '!display#0' | nc -u -p 10501 -w 1 192.168.2.121 10501

?display#    Request for display status.

echo '?display#' | nc -u -p 10501 -w 1 192.168.2.250 10501
display:Off

When sending a .txt file to a node, then the first line must start with ‘#’ and then its file name. For example:

$ cat devices.txt

#devices.txt
led_type=WS2812B
led_count=400
#led_type=TLC59711
#led_count=1

nc -u -p 10501 -w 1 192.168.2.121 10501 < devices.txt


For upgrading the firmware using TFTP the TFTP server on the OPi must be started first:

!tftp#    Switch the TFTP  server Off / On. Parameter value 0 is Off 1 is On.

For example a set:
echo '!tftp#1' | nc -u -p 10501 -w 1 192.168.2.250 10501

?tftp#    Request for TFTP server status.

For example a request:
echo '?tftp#' | nc -u -p 10501 -w 1 192.168.2.250 10501
tftp:On


Then a TFTP session can be started. Just make sure the TFTP session is in binary mode. When finished, then the TFTP server must be disabled. And with this action, the uploaded firmware is written to SPI Flash.

echo '!tftp#0' | nc -u -p 10501 -w 1 192.168.2.250 10501
echo '?tftp#' | nc -u -p 10501 -w 1 192.168.2.250 10501
tftp:Off