Good morning to anybody reading, I hope someone could help me or give meaningful suggestions.
We are about to develop an autonomous (battery-powered) system whose role is to acquire and log several sensors, dealing mainly with RS232 serial ports and gpio. We chose Toradex SoMs to start development, in particular iMX7d 1Gb with Torizon (preferably) and an Iris carrier. Few hours a day, for several months, the system has to gather sensors’ data (ASCII or binary) coming from RS232 channels (multiplexed) and manage gpio’s, then parse strings and produce data files with no human intervention. It could seem pretty simple… but we only have a couple of months to do that.
I was fascinated by containers phylosophy. The “Torizon with Containers” evaluation I installed on the board allowed to test some pretty NodeRED too. However, soon when I tried to test something with serial ports (using portainer, and device /dev/ttymxc1 “passing”) nothing was woriking, and I found this post from an user that came into a similar issue: Node-red and serial ports
I thought that using NodeRED could give us an advantage (in terms of development time) over other solutions, in order to easily access data, produce files (even CSV), access them with an easy GUI, and manage config files - all within the “flows” and built-in nodes.
Considering that we must talk to RS232 ports - do you think it’s still possible to develop such an “advanced datalogger” software code by means of NodeRED? Otherwise, what would you suggest in order to get quickly to the result? Feel free to suggest other SoMs or even Yocto or other OS rather than Toradex and docker containers.
Thank you for your kind support (and time, to read my long post!)
Hello @gclaudino.tx , thanks for your contact.
I will try to reply to your questions although I can be somehow not so expert.
Carrier board I’m currently using is IRIS v1.1B. This is the intended carrier for final use, although in our lab we can use (during development) also ASTER v1.1B and COL Evaluation v3.2B at the moment. Regarding the TorizonCore, I just installed (with EasyInstaller) the latest Torizon with Evaluation containers:
torizon@colibri-imx7-emmc-06514626:~$ uname -a
Linux colibri-imx7-emmc-06514626 5.4.193-5.7.0+git.f5d73fd6e9f8 #1-TorizonCore SMP Fri Jun 24 10:15:32 UTC 2022 armv7l armv7l armv7l GNU/Linux
I was using node-red-node-serialport from within a container created in Portainer based on the NodeRed template.
Through Portainer advanced settings for launching the container, on “advanced settings” I removed access control, set privileged mode, and added devices “/dev/colibri-uartb” and “/dev/colibri-uartc”.
It was the Nodered deploy that wasn’t able to connect serial ports. Today I will try again, maybe also with different serial node; anyhow I was concerned about the post of another user (this one) which probably gave up on this topic.
I will experiment again with NodeRed; although please consider that my request (as I’m very new to this kind of “containers environment”) was also more general, to ask suggestions about: how to quickly build such a “programmable RS232 streams datalogger” application, what could it be the easiest approach according to the experience of other users.
I hope you (and other Toradex users!) can help speed up my development.
Thanks in advance & kind regards.
Hi @flavio.f, sorry for the delay in answering you back.
Thanks for the update. It’s nice to know that you have these boards available.
After some internal discussions, this is indeed a problem with the Node-red container. This is a container that Toradex did not develop, we checked if it worked and did some tests. However, what happens with this container is that the way the ports are defined is incompatible with the standard namings on our boards. If you check here, these are the names that they’ll search in order to make the integration of the serial ports: bindings-cpp/linux-list.ts at main · serialport/bindings-cpp · GitHub. Therefore, the only way to use the serial ports with Node-Red would be to send a merge request to their github and contribute to the project by adding our naming specifications.