How To's
Connecting to a gateway
How do I connect to a gateway
Prerequisites
- Infuse-IoT Capable hardware with:
- Serial or the programmer port.
- Python tools
Device Logs
Connecting to a gateway uses the infuse gateway command. This command can be used over multiple backends.
- RTT
- Serial
- PyOCD
See Gateways for more details.
Some boards have multiple interfaces that can be used for Text logs and ePacket data.
The selected interface can be viewed by searching the firmware's
devicetree_generated.h for epacket_serial and finding the underlying device (e.g. DT_N_S_epacket_serial_REQUIRES_ORDS).- Note the name of the microcontroller you are connecting to. e.g. for the nRF52840 -
nRF52840_xxAA. - Connect your JLink programmer
- To connect to an
nRF52840_xxAAboard run:
infuse gateway --rtt nRF52840_xxAA
or replace with your board name as required.
- Connect your device to your computer via serial/usb
- Note the name of the serial port your device is connected to.
- To connect to
/dev/ttyACM0run:
infuse gateway --serial /dev/ttyACM0
or replace with your serial port as required.
Attaching and detaching the device will cause the serial device to appear and disappear.
Checking which ports are present in Device Manager (Windows) or
ls /dev/tty* for macOS/Linux
can be a good way to identify which port to use if there are multiple options.If multiple ports appear at the same time, it's typically the one with the smaller value.- Note the name of the microcontroller you are connecting to e.g.
stm32l451ceux - Connect your programmer
- To connect to a
stm32l451ceuxboard run:
infuse gateway --pyocd stm32l451ceux
or replace with your board name as required.
You should now be connected to the board, wait for data to appear in the terminal.
You can use commands from the Python Tools while the infuse gateway script is running.