Skip to content

HEX Controller

中文 | English

Introduction

HEX Controller is the core controller of the HEX series products, widely used in various HEX products. This document will provide detailed instructions on the development protocol and usage methods of HEX Controller.

Development Protocol

All HEX products equipped with network interfaces use the WebSocket API protocol for communication. For specific port configurations and protocol details, please refer to the README documentation of the corresponding repository.

We provide Rust Demo and ROS Demo sample code based on this protocol. For specific ROS Demo implementations, please refer to the documentation of the corresponding product model (this document is for HEX Controller).

Usage Method

Querying Controller IP Address

Some products (such as Maver-X4, Maver-Custom, etc.) are equipped with displays, allowing users to easily view the controller's IP address and set a fixed IP address through the touchscreen interface. For product series without displays, other methods are needed to find the controller's IP address.

On Ubuntu systems, you can use the avahi-browse command to discover controllers.

First install the avahi-browse tool:

sudo apt update && sudo apt install avahi-utils

After installation, run the following command to discover controllers:

avahi-browse -r _hexfellow._tcp

Example: As shown in the figure below, a controller is discovered on the local network with IP address 172.18.8.139.

If you use macOS, you can use other tools for discovery. Here we use Discovery - DNS-SD Browser as an example.

After opening the application, look for the _hexfellow._tcp service record. After expanding this record, you can view the controller's IP address information.

Changing Controller IP Configuration

Please Remember IP Configuration

Important reminder: After configuring a static IP, if the controller is moved to another network segment, the controller will not be discoverable. If you need to set a fixed IP, we strongly recommend recording your IP configuration information through other means.

IP Configuration Reset

Use the hexfellow-net-config tool to reset IP configuration:

./hexfellow-net-config <device ip> reset

Configure Device for Static IP

The complete command format should include the following parts:

./hexfellow-net-config <device ip> set --interface <interface port> static <interface ip> --prefix <prefix> --gateway <gateway ip> --dns <dns server ip> <dns server ip2> --dhcp-server <pool offset> <pool size>

Parameter descriptions:
- device ip: Device IP address under current network configuration
- interface port: Network interface that needs configuration modification, defaults to robot's external network interface if not specified. - interface ip: Static IP address to be set
- prefix: IP address subnet mask, defaults to 24 if not specified
- gateway ip: Gateway IP address, defaults to empty if not specified
- dns server ip: DNS server IP address, defaults to empty if not specified
- dns server ip2: Backup DNS server IP address, defaults to empty if not specified

Configuration Example: Currently device IP address is 172.18.8.139, configure this device's IP as static IP: 192.168.33.2, gateway set to 192.168.33.1, subnet mask set to 24, dns set to 192.168.33.1

./hexfellow-net-config 172.18.8.139 set static 192.168.33.2 --prefix 24 --gateway 192.168.33.1 --dns 192.168.33.1

Receiving the information shown in the figure below proves the modification was successful.

Other IP Configuration Requirements

hexfellow-net-config also provides functions like get ip information, change static ip to dynamic ip, etc. For details, please use the -h parameter to get help information. For example:

./hexfellow-net-config set -h

or

./hexfellow-net-config get -h