How-to
Connecting a USB serial dongle to Node-RED on an edge gateway
Short answer
Enumerate the dongle as a /dev/ttyUSB device, prove the serial exchange outside Node-RED with the documented line settings, run node-red-node-serialport under the same account with matched port settings, and confirm reception in the backend. USB enumeration proves detection, not delivery.

On this page
- What does the gateway actually see when you plug the dongle in?
- What has to be proven before Node-RED is involved?
- Which permissions does the Node-RED service account need?
- How do you configure the node to match the proven exchange?
- How do you reproduce the working request in the flow?
- How do you confirm delivery end to end?
- What hardware runs this reliably at the cabinet?
- Questions asked
Connect the dongle to Node-RED by proving its serial exchange outside Node-RED first, then reproducing that exact exchange in node-red-node-serialport under the account the gateway runs Node-RED with, and confirming delivery in the backend. USB enumeration only proves the gateway detected the dongle; it says nothing about whether a message reached the network.
What does the gateway actually see when you plug the dongle in? #
Before anything else, the operating system must enumerate the dongle as a serial device, typically /dev/ttyUSB0; USB modem-class devices instead enumerate as /dev/ttyACM0. Run dmesg | grep tty and compare the output immediately before and after plugging the device in; the new line naming a USB serial converter and its /dev/ttyUSBx path is the device you will configure. If nothing new appears, stop and fix the physical layer: cable, port, or power draw on the gateway's USB bus.
Record the complete product reference and hardware revision from the dongle label. Similar-looking USB radios expose different interfaces and command sets, so the documentation you read must be the documentation for that revision.
What has to be proven before Node-RED is involved? #
Three boundaries, each with its own test. Detection is enumeration, covered above. Host communication is a byte exchange through the serial device; prove it in a terminal program on the gateway itself, or with stty -F /dev/ttyUSB0 9600 followed by a read, using the dongle's documented line settings and a non-transmitting identification or status request where the vendor documents one. Radio delivery is the backend message; only the Sigfox backend can confirm it, so reserve that for the end-to-end check.
Collect from the vendor documentation before configuring anything: the interface type (serial versus a vendor library), the command syntax and response framing, the line settings, and the payload length and transmission restrictions. Framing matters more than most first attempts assume: the Node-RED serial node needs a delimiter or length rule that marks a complete response, and guessing it produces failures that look exactly like permission or wiring faults.
Which permissions does the Node-RED service account need? #
The most common failure at this step: a terminal session on the gateway talks to the port, but Node-RED reports it cannot open the same /dev/ttyUSB0. The cause is account rights, not the node. The account running the Node-RED service needs membership in the group that owns serial devices, which on Debian-based gateway images is dialout (on some distributions tty); the owning group is visible in the output of ls -l /dev/ttyUSB0.
Add the service account to that group with the system's normal mechanism, then restart Node-RED so the new group membership takes effect. Also make sure no other process holds the port: a serial device allows a single opener, so a leftover terminal session blocks the node even with correct permissions.
How do you configure the node to match the proven exchange? #
Install node-red-node-serialport, then open its Serial Port configuration node. Set the port to the enumerated path, and set Baud Rate, Data Bits, Parity and Stop Bits exactly to the values you used in the terminal test — for a dongle whose documentation specifies 9600 baud, 8 data bits, no parity and 1 stop bit, those four fields get exactly those values, not defaults you did not verify. Choose the splitting rule (delimiter byte, timeout, or fixed length) to match the response framing the documentation describes.
A note on per-message settings: attempts to drive the baud rate per message through msg.baudrate have been reported not to work reliably in this node, and the node's own locale file documents baud rate as a configuration-node setting. Configure it statically in the configuration node for this integration. If the dongle instead exposes a vendor library or a non-serial USB interface, a serial node is not a substitute — use the documented access method.
If the deploy errors on the serialport binding itself rather than on port access, the native module did not compile for the gateway's architecture; rebuild the node's dependencies on the target as described in the article on rebuilding Node-RED serialport modules on a 32-bit ARM edge PC, article:rebuild-node-red-serialport-modules-on-a-32-bit-arm-edge-pc.
How do you reproduce the working request in the flow? #
Build the flow in this order, and do not move to the next step until the expected result is real:
- Close every other application using the port, deploy the flow, and confirm the node reports the port open with no access-denied or resource-in-use error.
- Inject the same identification or status request you proved in the terminal, byte for byte, in the documented encoding. Expected result: the same complete, correctly decoded response you saw outside Node-RED.
- Build response handling that accumulates incoming bytes until a complete framed message is present, and separates unsolicited device messages from command replies when the protocol provides both.
- Add failure handling: log interface errors and incomplete responses, and set timeouts from the documented response timing. A failed exchange must reach an explicit error path, never look like a success.
- Only now add a transmission trigger, validated against the documented payload length and any service-side restrictions. One deliberate trigger should produce one intended transmission request.
How do you confirm delivery end to end? #
Keep the checks separate so a failure has one location. Reconnect the dongle and confirm enumeration with the intended identity. Deploy and confirm the port opens under the service account. Send the status request and confirm the complete framed response. Then submit one permitted test payload and check the backend — not the USB write, not the dongle's local acknowledgement — for the received message with its timestamp. If the dongle accepts the request but no message appears in the backend, the fault is in radio transmission, service provisioning or backend routing, and no Node-RED change will fix it.
What hardware runs this reliably at the cabinet? #
When the dongle is being added to a new build or the gateway itself is the aging part, the host matters: it needs a stable USB serial stack, a service account you control, and enough headroom to run Node-RED beside whatever else collects on the line. A fanless industrial mini PC in the cabinet is the usual choice for this role, as covered in the article on running Python and Node-RED beside PLC code on an edge controller, article:run-python-and-node-red-beside-plc-code-on-an-edge-pc, and the industrial mini PCs range covers that class of host.
The decision in one line: enumerate, prove the exchange in a terminal, match every documented setting in the node, run it under an account with serial rights, and believe only the backend message.
Questions asked
Which serial settings does the Serial Port configuration node expose?
The node-red-node-serialport configuration node exposes serial port path, Baud Rate, Data Bits, Parity and Stop Bits, plus a splitting rule such as a delimiter character or a fixed byte count. All of them must match the dongle's documented line settings; the node does not read them from the device itself.
Why does Node-RED show a serial error when a terminal on the same gateway works?
The interactive terminal session runs under an account with device rights that the Node-RED service account lacks. Add that service account to the dialout group, restart Node-RED so the group change takes effect, and make sure no other process holds the port open, because a serial device allows one opener at a time.
Does a node-red-node-serialport deploy error mean the module failed to build?
A deploy-time error naming the serialport binding usually means the native module did not compile for the gateway's architecture. Rebuilding the node's dependencies on the target itself resolves it; on 32-bit ARM gateways this is the documented rebuild path, not a configuration problem.

