I have a a few Teensys that are in the field. (Indoor factory environment) that control things like lights. I open the serial device /dev/ttyACM0 and write out a struct to control these lights. Eventually the moduel stops responding:
Then some times, it disappears off the bus completely (and is not shown by `lsusb`):
1. Has this been seen by other people elsewhere?
2. When writing my code, I observed that connecting resets the serial buffer. This of good.
3. Resetting the device (the button is not accessible so it is removed from the USB hub and replugged in) fixes the issue temporarily.
4. Is there a way to use the teensy_loader_cli to reset the device without code load?
5. Note: that I tried to use teensy_loader_cli, and it did not see the device though it was plugged in.
Edit:
6. Can we set some kind of self-reset interrupt?
Code:
File "/usr/lib/python3.8/asyncio/streams.py", line 358, in write
self._transport.write(data)
File "/home/work/env/lib/python3.8/site-packages/serial_asyncio/__init__.py", line 120, in write
n = self._serial.write(data)
File "/home/work/env/lib/python3.8/site-packages/serial/serialposix.py", line 570, in write
if e.errno not in (errno.EAGAIN, errno.EALREADY, errno.EWOULDBLOCK, errno.EINPROGRESS, errno.EINTR):
KeyboardInterrupt
Then some times, it disappears off the bus completely (and is not shown by `lsusb`):
Code:
File "/home/work/env/lib/python3.8/site-packages/serial_asyncio/__init__.py", line 438, in open_serial_connection
transport, _ = yield from create_serial_connection(
File "/usr/lib/python3.8/asyncio/coroutines.py", line 124, in coro
res = func(*args, **kw)
File "/home/work/env/lib/python3.8/site-packages/serial_asyncio/__init__.py", line 410, in create_serial_connection
ser = serial.serial_for_url(*args, **kwargs)
File "/home/work/env/lib/python3.8/site-packages/serial/__init__.py", line 88, in serial_for_url
instance.open()
File "/home/work/env/lib/python3.8/site-packages/serial/serialposix.py", line 268, in open
raise SerialException(msg.errno, "could not open port {}: {}".format(self._port, msg))
serial.serialutil.SerialException: [Errno 2] could not open port /dev/ttyACM0: [Errno 2] No such file or directory: '/dev/ttyACM0'
1. Has this been seen by other people elsewhere?
2. When writing my code, I observed that connecting resets the serial buffer. This of good.
3. Resetting the device (the button is not accessible so it is removed from the USB hub and replugged in) fixes the issue temporarily.
4. Is there a way to use the teensy_loader_cli to reset the device without code load?
5. Note: that I tried to use teensy_loader_cli, and it did not see the device though it was plugged in.
Edit:
6. Can we set some kind of self-reset interrupt?
Last edited by a moderator: