Many drivers talk to their equipment through a serial port: field buses on RS-485 (Modbus RTU, BACnet MS/TP, M-Bus, N2, DALI, Zettler, USS, ESPA 4.4.4…) and radio networks through a USB stick (Zigbee, EnOcean, LoRaWAN). They all share the same Serial Port field, with the same list of ports. This page explains what the list contains, what to choose, and how to check that the device sees your adapter.
The built-in ports of the device are always listed, even with nothing connected. Each one is shown with its system path and its name.
| Platform (line Device on the System page) | Typical model | Name in the list | Path |
|---|---|---|---|
| Orange Pi PC+ | S485 | RS485 1, RS485 2 |
/dev/ttyS1, /dev/ttyS2 |
| Orange Pi PC+ KNX | S485 KNX | RS485 1, KNX TP UART |
/dev/ttyS1, /dev/ttyS2 |
| G110 | G110 | RS485 1, RS485 2 |
/dev/ttyS1, /dev/ttyS2 |
| G100 | G100 | RS485 1 |
/dev/ttyS1 |
| Edge | E413-LTE | RS485 1, RS485 2 |
/dev/ttyAMA1, /dev/ttyAMA2 |
| Edge M-Bus | E413-MBUS-LTE | RS485 1, RS485 2, MBUS 1 |
/dev/ttyAMA1, /dev/ttyAMA2, /run/unipi-plc/by-sys/mbus.1/tty |
| Unipi Patron | RS485 1, RS485 2 |
/dev/ttyNS0, /dev/ttymxc0 |
|
| Unipi Iris | RS485 1 |
/dev/ttymxc2 |
|
| Unipi Neuron S103 | S103 | RS 485 |
/dev/extcomm/1/0 |
For the wiring and the number of ports of each model, see Hardware.
A USB adapter (USB/RS-485 converter, KNX USB interface, radio stick…) appears in the list as soon as the device detects it, with its product name and a unique ID.
The unique ID has the form <manufacturer>-<product>-<code>, where the code is a short value derived from the serial number of the adapter. It stays the same after a reboot and when you move the adapter to another USB socket. Two identical adapters without a serial number get the same name followed by -1, -2… in the order of the USB sockets: keep them in the same sockets.
On some models the USB sockets are named in the list: USB 1 to USB 3 on the S485, USB 1 to USB 4 on the S103.
The list is refreshed when an adapter is plugged in or removed, and every 10 minutes.
Click the field and choose the port in the list.
/dev/ttyS1) is saved./dev/ttyUSB0) is also accepted. Avoid it for USB adapters: the number can change after a reboot or when another adapter is added.When the gateway starts, the driver looks up the saved value in the list of detected devices (unique ID first, then port) and opens the matching serial port. A change of adapter or of port therefore needs a restart of the gateway.
Windows installations: USB adapters are listed in the same way; their serial port is a COM port of the computer. The Zigbee driver needs the COM port of the adapter.
Some protocols fix the serial settings; others let you set them in the gateway. Examples:
| Driver | Serial settings |
|---|---|
| N2 | Fixed by the protocol: 9600 baud, 8 data bits, no parity, 1 stop bit. |
| Zettler | Set in the gateway (default 19200 baud, 8N1); hardware flow control RTS/CTS is always on. |
| EnOcean | Fixed: 57600 baud (ESP3 serial protocol). |
| Modbus RTU, M-Bus | Set in the gateway. |
See the page of each driver for its fields and default values.
| Driver | Adapter | Notes |
|---|---|---|
| Zigbee | A Zigbee coordinator stick. Adapter selects its firmware family: Auto (default), zstack (Texas Instruments CC2531 / CC26xx), deconz (ConBee / RaspBee), ember (Silicon Labs firmware 7.4 and later), ezsp (older Silicon Labs firmware), zigate. |
Baudrate Auto by default; rtscts only for adapters that need it. Create only one Zigbee gateway per device. |
| EnOcean | A USB stick that speaks the EnOcean ESP3 serial protocol. | The serial settings are fixed. |
| LoRaWAN | An IMST WiMOD LoRaWAN module (iM880 / iU880 families). | The driver reads the module type when it starts. |
| Z-Wave | A Z-Wave USB controller stick. | The stick is chosen in the USB Port field of the gateway. |
Ask support@weble.ch for the references tested with your device and for the licence of the driver if it needs one.
Open a gateway form, click Serial Port: every adapter detected by the device is listed. If your adapter is missing, the device does not see it: the problem is the adapter, the cable or the power, not the gateway configuration.
Developers can read the same list through the API: peers("usb", "getDevices", []) returns each device with its uniqueId, product, vendor and the serial port to use (tty). See USB API.
| Message in the gateway log | Cause and fix |
|---|---|
Unable to get serialPort |
The saved port was not found and no path could be derived from it. Choose the port again in Serial Port and restart the gateway. |
no serial port resolved |
Same cause (Zettler, LoRaWAN): the adapter is not detected or the saved value does not match any port. Check that the adapter appears in the list. |
configured serialPort ... not found among USB devices |
Zigbee: the saved coordinator is not detected. Plug it in, or choose it again in the list, then restart the gateway. |
failed to open serial port |
The port exists but cannot be opened. Check that no other gateway, bridge or tool uses the same port. |
Timeout during opening serial port |
The port did not open within 20 seconds. Unplug and plug the adapter again, then restart the gateway. |
Use each serial port for one purpose only: one gateway, or one serial bridge. Two programs that read the same port corrupt each other's frames.