I am using the node-serialport library to communicate with a Teensy 3.2 from a Raspberry Pi and am getting a number of issues that are not occurring with a Teensy connected to a Mac or with an Arduino connected to a Raspberry Pi.
The microcontroller is running a simple sketch that waits for a serial terminal connection and then transmits a `BEGIN` message followed by occasional `Some data` lines. When running on the Pi on some occasions the Teensy does not transmit any messages or will only transmit the `BEGIN` message. In advanced logs for the serialport library, I can see a bad file descriptor error occur when attempting to communicate with the Teensy and there is no data returned. Has anyone seen this error message before in relation to not being able to communicate with serial device?
In order for the Teensy to reset whenever the serial monitor is disconnected I have added a reset function which I copied from this forum post. I imagine that the specifics of how this reset function works is part of the problem as this function also disconnects the USB connection. Is there an alternative software reset that can be used?
I have create a repository, node-serialport-issue which includes source code for a node application and Teensy sketch. This application recreates the issue and can easily be deployed on resin.io, a serivce which makes releasing code to Raspberry Pi very easy. I have also created an issue on the node serialport library.
Any help is much appreciated. If anything is not clear I can explain more, provide better logs or update the example code to make it easier to understand. Thanks in advance
The microcontroller is running a simple sketch that waits for a serial terminal connection and then transmits a `BEGIN` message followed by occasional `Some data` lines. When running on the Pi on some occasions the Teensy does not transmit any messages or will only transmit the `BEGIN` message. In advanced logs for the serialport library, I can see a bad file descriptor error occur when attempting to communicate with the Teensy and there is no data returned. Has anyone seen this error message before in relation to not being able to communicate with serial device?
In order for the Teensy to reset whenever the serial monitor is disconnected I have added a reset function which I copied from this forum post. I imagine that the specifics of how this reset function works is part of the problem as this function also disconnects the USB connection. Is there an alternative software reset that can be used?
I have create a repository, node-serialport-issue which includes source code for a node application and Teensy sketch. This application recreates the issue and can easily be deployed on resin.io, a serivce which makes releasing code to Raspberry Pi very easy. I have also created an issue on the node serialport library.
Any help is much appreciated. If anything is not clear I can explain more, provide better logs or update the example code to make it easier to understand. Thanks in advance