Closed jerryneedell closed 5 years ago
yeah its a burst - if you can make it reproducible we could file an issue !
yup -- If I can't find a way to clear it, I'll see if I can come up with a good way to trigger it without an AT ESP8266 as the trigger then file an issue. It'll be hard for anyone to debug if you need an AT ESP8266 ;-)
One way to clear this condition is to deinit then re-init the uart. Would it be acceptable to pass the TX/RX pins into espatcommands and let it create the uart so it can also it can deinit/init the uart if necessary? or should this be a CP issue and be fixed. I will open a CP issue. this is easily repoduced.
i want to avoid passing in pins cause then you can't use pyserial. you could always call deinit() whenever you like tho, want to do that before/after hardreset? also, its a CP issue, @hathach will be looking at it in about a week (he needs to get hardware)
opened https://github.com/adafruit/circuitpython/issues/1407
if we deinit, we can't re-init since we won't know pins used... unless there is a way to find them. I think we should just fix it in CP.
oh yeah hmm good point
I just received the Huzzarh hardware, is setting up circuitpython port to test with.
Update:
could deploy circuitpython to huzzah breakout, but couldn't upload this library using ampy. Not sure why
$ ampy -d 1.5 --port /dev/ttyUSB0 put adafruit_espatcontrol.mpy /lib/adafruit_espatcontrol.mpy
Traceback (most recent call last):
File "/home/hathach/.local/bin/ampy", line 11, in <module>
sys.exit(cli())
File "/home/hathach/.local/lib/python3.6/site-packages/click/core.py", line 764, in __call__
return self.main(*args, **kwargs)
File "/home/hathach/.local/lib/python3.6/site-packages/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/home/hathach/.local/lib/python3.6/site-packages/click/core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/hathach/.local/lib/python3.6/site-packages/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/hathach/.local/lib/python3.6/site-packages/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/home/hathach/.local/lib/python3.6/site-packages/ampy/cli.py", line 263, in put
board_files.put(remote, infile.read())
File "/home/hathach/.local/lib/python3.6/site-packages/ampy/files.py", line 209, in put
self._pyboard.exec_("f = open('{0}', 'wb')".format(filename))
File "/home/hathach/.local/lib/python3.6/site-packages/ampy/pyboard.py", line 267, in exec_
raise PyboardError('exception', ret, ret_err)
ampy.pyboard.PyboardError: ('exception', b'', b'Traceback (most recent call last):\r\r\n File "<stdin>", line 1, in <module>\r\r\nOSError: [Errno 19] Unsupported operation\r\n')
Ok I try to os.mkdir() and and it complains as well
Adafruit CircuitPython 4.0.0-alpha.5-26-g5e4b3a8fb-dirty on 2018-12-26; ESP module with ESP8266
>>> import os
>>> os.mkdir("/lib")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
OSError: [Errno 19] Unsupported operation
tried to put the file to root doesn't help either. @jerryneedell I haven't run cpython on esp8266 before. Maybe I miss something. Break out board is connected via FTDI cable.
ampy -d 1.5 --port /dev/ttyUSB0 put adafruit_espatcontrol.mpy
Traceback (most recent call last):
File "/home/hathach/.local/bin/ampy", line 11, in <module>
sys.exit(cli())
File "/home/hathach/.local/lib/python3.6/site-packages/click/core.py", line 764, in __call__
return self.main(*args, **kwargs)
File "/home/hathach/.local/lib/python3.6/site-packages/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/home/hathach/.local/lib/python3.6/site-packages/click/core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/hathach/.local/lib/python3.6/site-packages/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/hathach/.local/lib/python3.6/site-packages/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/home/hathach/.local/lib/python3.6/site-packages/ampy/cli.py", line 263, in put
board_files.put(remote, infile.read())
File "/home/hathach/.local/lib/python3.6/site-packages/ampy/files.py", line 209, in put
self._pyboard.exec_("f = open('{0}', 'wb')".format(filename))
File "/home/hathach/.local/lib/python3.6/site-packages/ampy/pyboard.py", line 267, in exec_
raise PyboardError('exception', ret, ret_err)
ampy.pyboard.PyboardError: ('exception', b'', b'Traceback (most recent call last):\r\r\n File "<stdin>", line 1, in <module>\r\r\nOSError: [Errno 1] Permission denied\r\n')
this is... fixed? please re-open if it still comes up!
I'v noticed that if an AT+RST command is executed na nrf52840 board communication with the uart appears to lock up.
This is done routinely in the espatcommand_simpltest.py by the lines
it works fine if I just comment these out for now, but a real fix should be found but anyone using an nrf52840 should be aware of this.
This does not happen on the SAMD51... AT+RST does generate a big blast of data across the UART so there may be something in the nrf52 that does not handle this well.