jczic / ESP32-MPY-Jama

v1.2 - UI tool for manage Espressif ESP32 microcontrollers with embedded MicroPython for MacOS, Windows and Linux: mini IDE, files manager, REPL, real time dashboards (sys/net), advanced features (gpio/mp3/leds/...)
https://github.com/jczic/ESP32-MPY-Jama
MIT License
424 stars 25 forks source link

esp32 board cant connect (Fixed) #11

Open incosa opened 1 year ago

incosa commented 1 year ago

for windows 10 i installed your app and selected the com port that my board was on. then your app wouldn't connect to the board and said couldn't connect.

I can open putty or thonny and it will connect to the esp board with no problems.

is there something i am missing? i used the exe file from clicking on windows in the git page

jczic commented 1 year ago

@rdagger !! :'((( It's crazy that your ESP reboots and slowly. You can check the line 382 and set 0.700 ? 0.800 ? (The global timeout is on line 179 and the first timeout before any data is read is on line 372).

rdagger commented 1 year ago

@jczic Sorry it did not work. btw: it was at 0.500 and I tried 0.800.

I tried 2 more ESP32 boards:

Generic ESP32 (wroom) - MicroPython v1.10-54-g43a894fb4 on 2019-02-07; ESP32 module with ESP32 I could not connect to this board at all with the latest version. I was able to connect with an old version from last week.

Lolin32 v.1.0 - MicroPython v1.19.1 on 2022-06-18; ESP32 module with ESP32 First attempt failed. Second attempt worked.

jczic commented 1 year ago

😭 😭 😭 @rdagger, can you try the new version? I removed one of my last functions and changed the whole switching to raw mode technique so that it automatically adjusts to what's going on, but cleanly. She sends the order several times with a small delay and waits for the first correct answer (in a global timeout). Then, it tries to empty other answers that could remain after the multiple orders sent. The connection is still very fast when it works "normally". I was able to test a lot with my hard reset button :) Thank you!

rdagger commented 1 year ago

Some good news!

The Lolin32 Pro ESP32 now connects on the first try every time.

The Loling32 v.10 ESP32 was not working on the first try, but it had a main.py that automatically connected to WiFi. After removing the main.py, it now works on the first try. However, it would be helpful to have WiFi in the main.py.

The generic ESP32 did not work at all. However, it has a 2019 version of MicroPython. I removed the WiFi and turned off debugging but it still would not work. I erased and loaded the latest firmware with ESPTool and it now works on the first try.

jczic commented 1 year ago

Ok well, thanks :) For the main.py, you had the message "The device on the xxx port is not compatible." ? Actually, I don't want it to take too long to connect because there is also the auto-search that tests everything and would then take too long on the open ports. However, for WiFi, mine is activated in the boot.py which is possible with the software when you save the WiFi connection after connecting to it. Have you seen this? Otherwise, yes, there are small delays in the _switchToRawMode function that can be increased a bit, but the two balance each other out.

jczic commented 1 year ago

@rdagger, @Necromantic, @IngmarG, @incosa : Hello all, it's ok for me, can I close this issue ?

(new feature in last repo src, the SD card support (I still need to add a specific icon in the file list but you can try that).

jczic commented 1 year ago

I added one last tip for the connection: Longer timeout for a connection to a specifically chosen port. This allows an automatic port search to try to connect within a maximum of 3 seconds per port, while when selecting a specific port, to try for 7 seconds. The connection attempts are also much stronger than before and therefore try several times to reach the device "intelligently". 👍🏻

IngmarG commented 1 year ago

@rdagger, @Necromantic, @IngmarG, @incosa : Hello all, it's ok for me, can I close this issue ?

(new feature in last repo src, the SD card support (I still need to add a specific icon in the file list but you can try that).

Works for me.

In the meantime, I also installed MicroPython on an ST B-L475e-Discovery kit. And MPY-Jama works (but obviously almost none of the Jama functions (but it connects, and some functions do work).

image

jczic commented 1 year ago

@IngmarG Coo! :) For the Jama Funcs it is normal indeed. I'll have to buy one to upgrade all this! It's pyb.Pin() but there's always machine.Pin() right?

Also, if you want last sources, SD card is ok :) (but for Pyb... I don't know)

IngmarG commented 1 year ago

@IngmarG Coo! :) For the Jama Funcs it is normal indeed. I'll have to buy one to upgrade all this! It's pyb.Pin() but there's always machine.Pin() right?

Also, if you want last sources, SD card is ok :) (but for Pyb... I don't know)

Yup.

But what I implied by my comment was that maybe, like the Arduino "IDE's", you could expand your "IDE" (not really an IDE, but rather a useful tool), to more platforms than just ESP32 based Micropython implementations?

Maybe something to think about?

jczic commented 1 year ago

@IngmarG, yes, I'm already thinking about it, at first it was a small utility to go faster but it would take a lot of jama funcs to be able to classify them in a tree :). On the other hand, the pins and other implemented functions can change a lot (I worked with Pycom cards before) but obviously, if it stays MicroPython, it's easier to make it compatible, so I'll need a Pyb card ;) I'm waiting for the action to rise a bit! Thanks you and let me know how the SD Card feature turns out if you get a chance.

jczic commented 1 year ago

@rdagger, @IngmarG Can I close this issue ? 👍🏻

rdagger commented 1 year ago

@jczic yes thanks!

jczic commented 1 year ago

Maybe I'll close it after the next version is compiled for Mac&Win... For new users who would download the current binaries.