When communicating between a Raspberry Pi running the latest version of Resin and a Teensy microcontroller I have been getting random messages being sent from the Raspberry Pi to the Teensy that I am not able to recreate on my computer.
I have a simple node application which uses node-serialport to communicate with the Teensy. The node application connects to the Teensy and logs all messages received, it then disconnects and starts again from the beginning. The Teensy is running a script that waits to receive a
BEGIN message from the Raspberry Pi and then sends data every 10000 loops. If the Teensy receives any messages over serial it prints them with
RECEIVED: followed by the received message.
When running on my computer the Teensy does not receive any messages however when running on the Raspberry Pi the Teensy receives characters which when combined make up
PORTCFG alongside repeated characters
AT. This data is never sent by the node application so I am at a loss as to where these characters come from. Has anyone seen this character combination when communicating over serial? I can only assume that this is the operating system trying to configure the port, or that some other part of the system is controlling the port.
I have also found that the Teensy does not always reset between tests. This is peculiar behaviour as the Teensy is meant to reset whenever there is no longer a terminal connected over serial. I have tried adjusting the settings on the dashboard for
RESIN_HOST_CONFIG_dtoveraly but I believe this is only relevant for when using serial over the GPIO pins (or perhaps not relevant at all). Does the host operating system make use of serial for any function and if so could this be affecting the serial communication within the container?
I have created an issue on the serial port library which shows a little more details on the problem. I have also created a repository node-serialport-issue which includes the code used on both the Raspberry Pi and Teensy microcontroller. This repository can easily be deployed directly to Resin.