Newbie to NR, USB CDC challenge

We have devices that use FS-USB rather than UART, with their own VID and PID. I have integrated the node-red-contrib-usb 1.0.0 node, but as a newbie I am struggling to see how to use it. I have been searching for a simple example flow of data in/out and how to use the USB nodes for CDC.
This is not a virtual serial port topic, since we wish our devices to be auto-recognised through the USB VID/PID process automatically.
Hoping someone might be able to advise.

Welcome to the forum @DrGeoff

If you look at the node's page in the node-red flows library you will see that it has not been updated in 5 years, and if you look at it's github page there are several unaddressed issues. It looks likely that the node is abandoned.

What devices are you trying to access? How do they appear to the OS?

Thanks Colin,

Yes, I see that the node is abandoned, and that there are bulk transfer .js files that have also not been implemented.

Our devices use FS-USB, full speed USB, and are true USB devices rather than just serial comms. There is a VID/PID. The devices are IoT systems we have been developing that will have periodic requirement for data download that is not appropriate to do using the LoRaWAN aspect of the product.

We need to have data inputs to update the devices, and transferring of data out of the devices into CSV and JSON formal. So Node Red is interesting to us but I have not used it before. It looks like the perefect solution/console, except for the USB aspect.

I do have the data showing in debug using SERIAL Comms, and some buttons sending instructions back to the devices. But in the real world the USB cable will be plugged into different devices, where COM Port definitions will change.

I was surprised to see no active and proven USB solution in the NODE-RED box.

Colin, I should have answered your question. It appears as a CDC device.

You will likely need to develop a contrib node for node-red. You might be able to use this library as a dependency.

Steve I stumbled across that as well in my searches. The last thing the world needs is for a non-JS programmer to develop a contrib node when I am not familiar with the environment. I will have a look further at how to do it though.

As a first recommendation I would tell you to have a look on NPM module usb as it seems to be a good API (mainly because it uses libusb under the hood) to talk to USB devices. No need to develop anything, just learn how to use the capabilities of the package. If you are not comfortable with Node / JavaScript then you might consider exploring the Python land. There you will find the pyusb which seems to be a comprehensive library. Third option, which may be good for those who develop embedded devices in the library tinyusb. It supports a great deal of microcontrollers. Just lags behind on the side of USB host stack.

I have moved my project to VS Code and Electron. But I am looking for some help getting Node-USB installed if anyone can assist. Prepared to cover costs for an hour of two of someone's time helping me get Node-USB installed and working. As I am lightly experienced in this area, getting confused with installation requirements.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.