HSB Emulator runtime issues

Hi,

I’m new to CoE and HSB, and I’m currently testing the HSB Emulator.

I’ve started two Docker images on a Jetson Thor and run the programs serve_linux_file.py and linux_imx274_player.py respectively. Both programs run normally. The commands are as follows:

Sending data:

python3 src/hololink/emulation/examples/serve_linux_file.py -s 2611376 -r 30 192.168.0.101 imx274_100frames.dat

Receiving data:

python3 examples/linux_imx274_player.py --hololink 192.168.0.101 --camera-mode 1 --frame-limit 100

However, when I run serve_coe_file.py and linux_coe_imx274_player.py, the linux_coe_imx274_player.py program gets stuck and seems unable to receive any data. The commands are as follows:

Sending data:

python3 src/hololink/emulation/examples/serve_coe_file.py -s 2611376 -r 30 192.168.0.101 imx274_test.dat

Receiving data:

python3 examples/linux_coe_imx274_player.py --hololink 192.168.0.101 --camera-mode 1 --frame-limit 10 --coe-interface mgbe0_0 --headless

linux_coe_imx274_player.py run log:
file_coe.log (3.6 KB)

Is there a problem with my usage?

Also, I’m using a Lattice CPNX100-ETH-SENSOR-BRIDGE HSB device. Is there any FPGA firmware that can directly send analog data, allowing me to temporarily complete HSB and host data transmission tests without connecting a camera?

Hello,

The issue is in your “Receiving data:” command. You specify the --coe-interface mgbe0_0, but

I’ve started two Docker images on a Jetson Thor

looks like it is on a single Jetson AGX Thor device. In this case, the linux network stack is actually identifying that you are sending/receiving through the same interface and so will automatically re-route data through its software loopback interface, lo. The problem is that the COE paths in HSB filter at the L2/interface layer with AF_PACKET on the sender and receiver (at least for linux_coe* examples). They have to agree and match on the logical(/physical) interface that is in use. In this, case the real IP addresses and interfaces to use are 127.0.0.1 on the sender and --hololink 127.0.0.1 --coe-interface lo for this setup to work. This doesn’t happen for the server_linux_file.py/linux_imx274_player.py combination because the sender and receiver are using AF_INET which are bound to the IPv4 addresses where linux is mapping 192.168.0.101 to the 127.0.0.1/lo interface internally and the socket handles it automatically.

In order to actually receive over the mgbe0_0 interface with COE, you will have to

  1. have the sender on another device (x86/arm64 linux w/1+Gbe), or
  2. set up a hardware loopback (configure and connect the RJ45 to the same subnet and physical port of the mGbE) and using a network namespace to prevent the linux stack from doing this automatic re-routing.

There are helper ns*.sh scripts and documentation to help with option (2). Note that for both of these options, however, you won’t get the speed/quality of the HW accelerated COE offload of the mgbe with this Emulator + file and HSB example combination if that’s what you’re ultimately trying to test.

-Jeffrey Bonde