Avatar for mcdonnelldean

mcdonnelldean

Member since Nov 2019 • Last active Nov 2019
  • 2 conversations
  • 7 comments

Most recent activity

  • in ESP8266
    Avatar for mcdonnelldean

    Hi all, I thought this might help folks out, in the end flashing was not the problem at all, it was using a USB adapter to extend the number of USB's I had available, this seems to have borked the flashing.

    I confirmed with a few other folks that they also get the junk at the top which, as was mentioned, is just debug bits with at a different baud.

    I am now able to flash all varius ESP boards I have, and can confirm the combined file is fine:

    esptool.py 
      --port /dev/cu.wchusbserial1410 
      --baud 115200 
      write_flash 
      --flash_freq 80m 
      --flash_mode dio 
      --flash_size 4MB-c1 0x0000 
      espruino_2v04_esp8266_4mb_combined_4096.­bin
    

    I have another few boards to set up too so I can confirm all is good. But just a note to all others, if your having serial problems and are using a USB hub, that is likely why.

  • in General
    Avatar for mcdonnelldean

    Magic! I'll give it a go tonight and report back! Cheers!

  • in General
    Avatar for mcdonnelldean

    Hi folks, wasn't sure where to post this particular piece, if this is the wrong space let me know.

    I have a NodeConf.EU Hex badge which if my understanding is correct is really just a standard HexBadge build. I'd like to update it to the latest version of Espruino, what is the "Correct Way" to do so?

    I have a cool idea for a low power wireless home remote I would like to test out :D

  • in News
    Avatar for mcdonnelldean

    I don't know about emulator or simulator but you could likely just use a Breakout MDBT42Q and pick up a similar screen to get a very good approximation of it.

    You would have to likely flash it with the Bangle.js code and I am not sure if flashing the breakout is as simple as usual when swapping board types so YMMV.

    @Gordon Sounds like a lab version of the BangleJS kit, spread on a wider board for tinkering could be a nice addition to the shop :D

  • in ESP8266
    Avatar for mcdonnelldean

    This is interesting info! I have a bunch of different ones. Specifically this is trying a D1 (big style NodeMCU like board) and a few D1 Mini's. I think they are all using a CH340 chip for serial.

    EDIT:
    I'd like to confirm that the length of time doesn't matter. The garbage is reproduced for every connection regardless of how long I let it start up and stay idle.

    I can also confirm the board itself is not hung. I can get it to spit something out on a timeout which does happen even though the IDE says it is still "connecting".

    I might have a look through the Web Terminal code tonight. My suspicion is that while it won't fix the issue directly, the IDE problem is likely the garbage tripping up the IDE and making it think it is still waiting for connection, even though in the background it is connected (as evidenced by the timeout test).

  • in ESP8266
    Avatar for mcdonnelldean

    Hi Robin, thanks for your response, to answer you questions in order:

    • Otherwise means I can connect to it via a terminal app, I still get garbage but the REPL is usable when I connect with "screen /my/port/here " for instance. If I do a reset(true) in the repl the restart happens and I get no garbage (I only get garbage on connection), again only via a terminal session.

    • I cannot use the IDE left hand (or right hand at all). The reset bit is a hold over and should not be considered (I simply didn't clear out the editor before screenshot. When in the IDE, neither left or right pane worked as the device is always stuck in "connecting" mode. The splash loads but otherwise the repl is hung.

    • Yes, I erase using the same baud as I flash too (I don't know if that makes a difference)

    • Yes and also later threads where "4m-c1" is used (based on observing my chip code and using the reference in the docs). Interestingly my board(s) needs dio, not qio to be set to flash properly.

    • OSX (esptool v2.8)

  • in ESP8266
    Avatar for mcdonnelldean

    Hi all,

    I see this issue has gone around the houses a few times. I've followed all the threads and tried all the variations of esptools settings. I've also tried a few different versions of Espruino it's something in the flashing process / settings I think.

    Board is as so:

    $ esptool.py --port /dev/tty.wchusbserial14220 --baud 115200 flash_id
    esptool.py v2.8
    Serial port /dev/tty.wchusbserial14220
    Connecting....
    Detecting chip type... ESP8266
    Chip is ESP8266EX
    Features: WiFi
    Crystal is 26MHz
    MAC: 84:f3:eb:5a:85:df
    Uploading stub...
    Running stub...
    Stub running...
    Manufacturer: 68
    Device: 4016
    Detected flash size: 4MB
    Hard resetting via RTS pin...
    

    Erasing looks like so:

    $ esptool.py --port /dev/tty.wchusbserial14220 --baud 115200 erase_flash
    esptool.py v2.8
    Serial port /dev/cu.wchusbserial14220
    Connecting....
    Detecting chip type... ESP8266
    Chip is ESP8266EX
    Features: WiFi
    Crystal is 26MHz
    MAC: 84:f3:eb:5a:85:df
    Uploading stub...
    Running stub...
    Stub running...
    Erasing flash (this may take a while)...
    Chip erase completed successfully in 5.7s
    Hard resetting via RTS pin...
    

    Flashing via best practice examples (1V99 combined):

    $ esptool.py --port /dev/cu.wchusbserial14220 --baud 115200 write_flash --flash_freq 80m --flash_mode dio --flash_size 4MB-c1 0x0000 espruino_1v99_esp8266_4mb_combined_4096.­bin
    esptool.py v2.8
    Serial port /dev/cu.wchusbserial14220
    Connecting....
    Detecting chip type... ESP8266
    Chip is ESP8266EX
    Features: WiFi
    Crystal is 26MHz
    MAC: 84:f3:eb:5a:85:df
    Uploading stub...
    Running stub...
    Stub running...
    Configuring flash size...
    Flash params set to 0x026f
    Compressed 4194304 bytes to 353774...
    Wrote 4194304 bytes (353774 compressed) at 0x00000000 in 31.5 seconds (effective 1065.0 kbit/s)...
    Hash of data verified.
    
    Leaving...
    Hard resetting via RTS pin...
    

    Screen output:

    $ screen /dev/tty.wchusbserial14220 115200
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    dl sl����n�r��n|�lddd`��s�$��
     ____                 _ 
    |  __|___ ___ ___ _ _|_|___ ___ 
    |  __|_ -| . |  _| | | |   | . |
    |____|___|  _|_| |___|_|_|_|___|
             |_| espruino.com
     1v99 (c) 2018 G.Williams
    
    Espruino is Open Source. Our work is supported
    only by sales of official boards and donations:
    http://espruino.com/Donate
    Flash map 4MB:1024/1024, manuf 0x68 chip 0x4016
    
    >
    

    Flashing to latest (2v04):

    $ esptool.py --port /dev/tty.wchusbserial14220 --baud 115200 write_flash --flash_freq 80m --flash_mode dio --flash_size 4MB-c1 0x0000 espruino_2v04_esp8266_4mb_combined_4096.­bin
    esptool.py v2.8
    Serial port /dev/cu.wchusbserial14220
    Connecting....
    Detecting chip type... ESP8266
    Chip is ESP8266EX
    Features: WiFi
    Crystal is 26MHz
    MAC: 84:f3:eb:5a:85:df
    Uploading stub...
    Running stub...
    Stub running...
    Configuring flash size...
    Flash params set to 0x026f
    Compressed 4194304 bytes to 351432...
    Wrote 4194304 bytes (351432 compressed) at 0x00000000 in 31.3 seconds (effective 1072.3 kbit/s)...
    Hash of data verified.
    
    Leaving...
    Hard resetting via RTS pin...
    

    Screen Output

    $ screen /dev/tty.wchusbserial14220 115200
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    R��b�&A��-�B�1�����B�R2-����y�$!c������s­ll��|�d�<�d�c|����{�#�b��gg�dog���cx��dr­l{d8�o��lco�|��c��oo�d��l`�nol or���o��d`x�'�s�����c'�|�ǎ�c��gn�l`�gd`'­s���g�$p�o�{�ܜ���lbo�|���c��og�$`�gd`'{�­��g�l`{ےg�l sl��'���gg����soog�d�c�l��l�����dll~{$��­$dlo���~�`��l��n�g�o��dl�c��ldp#�cp���cr­cp���bbld��n�g���gl�|cdd`sd����o�s��o|�d­lll`c��|{�d�o��g�$`��s�$�l�
     ____                 _
    |  __|___ ___ ___ _ _|_|___ ___
    |  __|_ -| . |  _| | | |   | . |
    |____|___|  _|_| |___|_|_|_|___|
             |_| espruino.com
     2v04 (c) 2019 G.Williams
    
    Espruino is Open Source. Our work is supported
    only by sales of official boards and donations:
    http://espruino.com/Donate
    Flash map 4MB:1024/1024, manuf 0x68 chip 0x4016
    
    >
    

    In all cases I can connect via the screen terminal app. It spits out garbage at the top but otherwise works. I can use the REPL no problem. However when I use the IDE the connection never fails or succeeds, it always looks like the screenshot provided, hung.

    I've done a few things too:

    • I've messed with the flash_frequency and other params
    • I've used CU instead of TTY drivers
    • I've used non combined files in all tests too (just in case)
    • I've used tried qio (that makes it worse)

    Anyone have any suggestions on what to try next?

Actions