noise in the REPL

General discussions and questions abound development of code with MicroPython that is not hardware specific.
Target audience: MicroPython Users.
Post Reply
jouflo
Posts: 4
Joined: Tue Apr 16, 2019 9:20 am

noise in the REPL

Post by jouflo » Tue Apr 16, 2019 9:36 am

Hello,
I allow myself to contact you because despite my research and my discussion with Nicholas H.Tollervey, I can not find the source of my problem.
When using under Mac (10.13.6) version mu-editor 1.1 alpha1 in ESP mode I have a problem of access to the file and noise in the REPL:

{llœŸ|Ädà|Ädìb<‡ƒì’{ÛcÄ#Œóogžl'oœãì#pŒ${ls$8ûgà‚lb'ã|älŒc„û'oîdŒÇ$`ogdŒd`osŽ›“nƒcd``ûgŸà#ƒgdÄÄò'oï‡lxónà{Œœœãà#gã|d$#Äónoï$Œl no$`'{“›od’ xónà{Œœœãà‡s€cgã|ĎcŒûg'çl`ogl o;‡›ÛgcÓ`{ۓo#ƒ›`Œâìƒoä›rƒûg|ìdldl c›Ÿ|;“lœoàƒoãl „ã{“dÄlŒd`Äãr›$ìd„l`Œâs’l‡ŸÄll`{l‡ƒ{d„ŸâÄcŒÄc|lbœãœc|Œ„Ädlcäò'ç€noãŒdnŸä„dä‡dlŒ‡„d`€güŒßãŒbll䌎bŒžã„clÄcsdrl{óoÜãŒäónœß€€#‡äl„$óOSError: [Errno 2] ENOENT

MicroPython v1.10-8-g8b7039d7d on 2019-01-26; ESP module with ESP8266
Type "help()" for more information.
>>>
MicroPython v1.10-8-g8b7039d7d on 2019-01-26; ESP module with ESP8266
Type "help()" for more information.
>>>
>>>


For informations:
- I tested with two different ESP8266 with the latest firmware micropython (and it work with upycraft).
- I put the latest version of the CH340 driver on my mac.

I thank you for your attention to my request.

Best regards

User avatar
Roberthh
Posts: 3667
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: noise in the REPL

Post by Roberthh » Tue Apr 16, 2019 10:25 am

The garbage at the start of the ESP8266 is caused by the boot message of the ESP8266 rom loader sending at 74880 baud. Later MicroPython switches to 115200 baud. The reason for the message OSError: [Errno 2] ENOENT ist most likely the missing main.py script. If you have a main.py file, the message should be gone. An empty file is fine.

jouflo
Posts: 4
Joined: Tue Apr 16, 2019 9:20 am

Re: noise in the REPL

Post by jouflo » Tue Apr 16, 2019 10:53 am

I try it and is the same problem on the REPL:

{llœŸ|Ädà|Ädìb<‡ƒì’{ÛcÄ#ŒóogŸl'oœãì#pŒ${ls$pû'àƒlcoâ<ìdŒ#Äóngï$Œl ˜g'$Œ$`gs’“o‚cl``ò'ŸàcÃ'$ŒŒóogçÇl8ûoà;„œÜãàb'ã|dlbŒóogçl„l`ogl n;‡›Ûgl“`xûoà;„œœãàÇ{€b'ã|Œc„û'oïd`˜gnd`osŽ›“n#ƒ›`;“›gcƒ’ Œãäƒoì›rƒûg|ìdldl`b“Ÿ|{’lÜoàƒoãl Œâ{“lÄlŒd`Äã;›$ìdŒ$`Œãs’l‡ŸÄ$l`{l‚{lŒŸâ„cŒ„c|lbœãÜc|ÄŒ„d$cäûgç€'oãÄdnŸä„lä‡d$Œ‡„d`ÀgüÄßãŒ#$läŒÇ#ŒžãŒblÄcrd;l{óoœãŒäò'œß€€#älŒ$æTraceback (most recent call last):
File "main.py", line 6, in <module>
KeyboardInterrupt:

MicroPython v1.10-8-g8b7039d7d on 2019-01-26; ESP module with ESP8266
Type "help()" for more information.
>>>
MicroPython v1.10-8-g8b7039d7d on 2019-01-26; ESP module with ESP8266
Type "help()" for more information.
>>>

User avatar
Roberthh
Posts: 3667
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: noise in the REPL

Post by Roberthh » Tue Apr 16, 2019 11:05 am

The garbage will not go away. That is sent before Micropython starts.
But now you have a main.py with a syntax error.

jouflo
Posts: 4
Joined: Tue Apr 16, 2019 9:20 am

Re: noise in the REPL

Post by jouflo » Tue Apr 16, 2019 11:08 am

HI thank you for your help.
I burn the firmware whit 115200 baud and I drop on it a main.py file. It's better, the noise is more small :

´¥iwiçµÌ/µä?­
MicroPython v1.10-8-g8b7039d7d on 2019-01-26; ESP module with ESP8266
Type "help()" for more information.
>>>
>>>

jouflo
Posts: 4
Joined: Tue Apr 16, 2019 9:20 am

Re: noise in the REPL

Post by jouflo » Tue Apr 16, 2019 11:19 am

I have this in the Log Courant:


OSError: Could not enter raw REPL.
2019-04-16 13:11:07,943 - mu.interface.main:740(show_message) DEBUG: There was a problem getting the list of files on the device. Please check Mu's logs for technical information. Alternatively, try unplugging/plugging-in your device and/or restarting Mu.
2019-04-16 13:11:07,944 - mu.interface.main:741(show_message) DEBUG: None
2019-04-16 13:11:22,311 - mu.logic:1120(show_admin) INFO: Showing admin with logs from /Users/florentjouines/Library/Logs/mu/mu.log
2019-04-16 13:11:22,312 - mu.logic:157(installed_packages) INFO: Packages found: ['/Users/florentjouines/Library/Application Support/mu/site-packages/scikit_learn-0.20.3.dist-info', '/Users/florentjouines/Library/Application Support/mu/site-packages/numpy-1.16.2.dist-info', '/Users/florentjouines/Library/Application Support/mu/site-packages/pyserial-3.4.dist-info', '/Users/florentjouines/Library/Application Support/mu/site-packages/scipy-1.2.1.dist-info']
2019-04-16 13:11:43,179 - mu.logic:1151(show_admin) INFO: No admin settings changed.
2019-04-16 13:16:25,500 - mu.modes.esp:184(toggle_files) INFO: Toggle filesystem off.
2019-04-16 13:16:26,177 - mu.modes.base:229(find_device) INFO: Found device on port: cu.wchusbserial1420
2019-04-16 13:16:26,177 - mu.modes.base:230(find_device) INFO: Serial number:
2019-04-16 13:16:26,189 - mu.modes.esp:180(toggle_files) INFO: Toggle filesystem on.
2019-04-16 13:16:28,735 - mu.modes.base:403(ls) ERROR: Could not enter raw REPL.
Traceback (most recent call last):
File "/Applications/mu-editor.app/Contents/Resources/app/mu/modes/base.py", line 400, in ls
result = tuple(microfs.ls(self.serial))
File "/Applications/mu-editor.app/Contents/Resources/app/mu/contrib/microfs.py", line 181, in ls
], serial)
File "/Applications/mu-editor.app/Contents/Resources/app/mu/contrib/microfs.py", line 132, in execute
raw_on(serial)
File "/Applications/mu-editor.app/Contents/Resources/app/mu/contrib/microfs.py", line 82, in raw_on
raise IOError('Could not enter raw REPL.')
OSError: Could not enter raw REPL.
2019-04-16 13:16:28,738 - mu.interface.main:740(show_message) DEBUG: There was a problem getting the list of files on the device. Please check Mu's logs for technical information. Alternatively, try unplugging/plugging-in your device and/or restarting Mu.
2019-04-16 13:16:28,738 - mu.interface.main:741(show_message) DEBUG: None
2019-04-16 13:16:36,944 - mu.logic:1120(show_admin) INFO: Showing admin with logs from /Users/florentjouines/Library/Logs/mu/mu.log
2019-04-16 13:16:36,947 - mu.logic:157(installed_packages) INFO: Packages found: ['/Users/florentjouines/Library/Application Support/mu/site-packages/scikit_learn-0.20.3.dist-info', '/Users/florentjouines/Library/Application Support/mu/site-packages/numpy-1.16.2.dist-info', '/Users/florentjouines/Library/Application Support/mu/site-packages/pyserial-3.4.dist-info', '/Users/florentjouines/Library/Application Support/mu/site-packages/scipy-1.2.1.dist-info']

Post Reply