Architecture

Hardware Architecture

Hardware architecture diagram

The following diagram gives the hardware architecture required to setup LimeNurse.

Hardware architecture

Bill of materials

Trials and errors led to the following bill of materials, the list of parts on which LimeNurse has been successfully deployed. Some other configurations may also be compatible, so each part has a justification of why it was chosen, so that users can consider other options with a discerning eye.

Hardware components and references

Name

Identification

Image

Justification

Raspberry Pi

SKU 784181

_images/pi5.png

Supports USB gadget and provide an ethernet port on top of the USB C and USB A ones.

Mogood USB C Male to Dual USB C Female Cable

ASIN B0CB3M46Y5

_images/limelight-splitter.png

Not critical - Provides limelight power from an external source

8086 USB C Data/Power Splitter

SKU 103677

_images/pi-splitter.png

One of the few USB splitter handling the 15W / 5V power from Pi official power supply

Raspberry PI official power supply

SKU SC0623

_images/power.png

Provide maximal power to Pi. Considered first to power both Pi and Limelight, but was not enough. Maybe not necessary for Pi alone

10” USB C - USB C cable

_images/cableCC.png

Link the limelight on robot to the development stand while providing enough length for the robot to move

10” USB C - USB A cable

_images/cableCA.png

Link the control hub on robot to the development stand while providing enough length for the robot to move

Internal Communications Architecture

The following table shows the operational interfaces provided by LimeNurse

Operational Interfaces Control Table

Source

Connection

Destination

Comments

Component

Interface

Port

Name

Protocol

Data

Component

Interface

Port

Name

Developer laptop

Ethernet

udp

Name resolution exchanges

Raspberry PI

Ethernet (eth0)

53, 67, 68, 5353

Avahi name resolution exchanges

Developer laptop

Ethernet

http

limelight web client

Raspberry PI

Ethernet (eth0)

5801

limelight.eth.local

Web client tuning and debug access

Developer laptop

Ethernet

http + websockets

limelight video streams

Raspberry PI

Ethernet (eth0)

5802, 5800, …

limelight.eth.local

Video stream display

Developer laptop

Ethernet

ssh

Pi commands

Raspberry PI

Ethernet (eth0)

22

limelight.eth.local

Raspberry Pi debug access

Control hub

USB A

http + websocket

limelight rest API requests and responses

Raspberry PI

USB C

5807, 5806

limelight.local

Limelight vision result http access

Raspberry Pi

USB C (eth1)

http

limelight web client

Limelight

USB C

5801

limelight.local

Web client

Raspberry Pi

USB C (eth1)

http + websockets

limelight video streams

Limelight

USB C

5802, 5800, …

limelight.local

Video stream display

Raspberry Pi

USB C (eth1)

http + websocket

limelight rest API requests and responses

Raspberry PI

USB C

5807, 5806

limelight.local

Limelight vision result http access

The following table shows the interfaces provided by LimeNurse for deployment testing purpose

Test Interface Control Table

Source

Connection

Destination

Comments

Component

Interface

Port

Name

Protocol

Data

Component

Interface

Port

Name

Developer laptop

USB A

udp

Name resolution exchanges

Raspberry PI

USB C (usb0)

53, 67, 68, 5353

Avahi name resolution exchanges

Developer laptop

Ethernet

http

limelight web client

Raspberry PI

USB C (usb0)

5801

limelight.local

Web client tuning and debug access

Developer laptop

USB A

http + websockets

limelight video streams

Raspberry PI

USB C (usb0)

5802, 5800, …

limelight.local

Video stream display

Developer laptop

USB A

UDP

broadcast LLPhoneHome

Raspberry PI

USB C (usb0)

5809

limelight.local

Limelight discovery

Developer laptop

Ethernet

UDP

broadcast LLPhoneHome

Raspberry PI

Ethernet (eth0)

5809

limelight.eth.local

Limelight discovery

Developer laptop

USB A

http + websocket

limelight rest API requests and responses

Raspberry PI

USB C (usb0)

5807, 5806

limelight.local

Limelight vision result http access

Developer laptop

Ethernet

http + websocket

limelight rest API requests and responses

Raspberry PI

Ethernet (eth0)

5807, 5806

limelight.eth.local

Limelight vision result http access

Software Architecture

LimeNurse relies on standard linux services. It uses systemd services to ensure robustness and persistence of the deployment

Software architecture

Network Layer (3) configuration

IP management services is deployed on both ethernet and USB interfaces. Ethernet and USB gateways are assigned fixed IP. IP setting is managed by a systemd service restarted on Pi start. Ethernet and USB interfaces expose a DHCP service to provide communcations with development laptop and control hub through an IP in their hosted networks. This is a once shot dnsmasq service configuration, persisted by the dnsmasq persistence mechanisms.

Gateways are assigned names. This is managed by a zeroconf based python script. The python script regularly update the dns services to make sure the name keep being resolved. The resolver script is managed by a systemd service restarted on Pi start.

Transport Layer (4) configuration

UDP and TCP unicast forwarding between interfaces are managed using firewall rules. Port 22 on eth 0 is not forwarded to provide ssh services The rules setting script is managed by a systemd service restarted on Pi start.

UDP messages are broadcasted to enable limelight discovery. They are not forwarded by iptables and are then managed by a custom Python script. The python script is robust to interface loss through limelight disconnection. It monitors interface and restore connection and transfer once the interface is back. The forwarder script is managed by a systemd service restarted on Pi start.