-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The device on the "COMx" Port Is not compatible #42
Comments
Hi @rusudanion, |
Hello i use Windows 10 , i use last version of micropython 1.20 . the tools used for flash was esp32flasher and Chrome extensions. |
Ok, thank you for information. The serial connection under Windows 10 has already been tested and works as well as the good compatibility with the version 1.20 of MicroPython. You have been able to flash a firmware on the device but, can you connect correctly to the REPL with a standard serial terminal and get an access to the code prompt? Also, I see that the ESP Flasher tool uses the basic Espressif The goal is to understand if this is due to a serial driver problem (with the different UART pins used) or if it is due to the exchanges with the REPL of MicroPython which could not be done normally. Thank you for your feedback! |
i have various esp32 device with serial chip CP2101 and CH340 . All this device works good with all flasher and home assistant,also the serial Is working. ALL ESP32 DEVICE WORKS NORMALY . Same error on ESP32 MPY-Jama TAB FIRMWARE TOOLS |
if the esp32 Is connected to putty,and i try to connect also to esp32 mpy-jama,i have errore from espjama CANNOT OPEN SERIAL PORT COMx |
Ok! If I understand correctly, knowing that normally, the connection works well with all boards and from Win/Mac/Linux, it would then come from a problem of TX/RX blocking on the serial port related to a problem that some people seem to have had by using the last version of the pySerial library (issue from level of other UART lines). Look at the recent discussion eventually: I haven't updated the Windows and MacOS binaries yet, but the fix for this problem has been committed to the repository sources. Can you then try to clone the GitHub repository and run the program from the Python sources on your Windows? Do you think you can try this method? |
Just, for "CANNOT OPEN SERIAL PORT COMx" : if the esp32 is already connected to putty, it's normal, Jama requires exclusive access to the serial port. |
Also, you have indicated "Same error on ESP32 MPY-Jama TAB FIRMWARE TOOLS", this is really strange because from this page, the software does not connect to the ESP32 but asks the official Espressif tool, esptool, to do it. |
tonight i want to try the pyton fixed version .i know the other thread with same problem ,but i can try Linux version for connection problem i don't use pyton version of exprestools ,i use exe versions |
maybe i can reset all and install from begin ,can you tell me what steps i must to do ? thankyou |
You need to have python on your machine (recent though) and install the 2 required dependencies with pip. |
Hello @rusudanion, have you been successful since? |
hello ,i am occupied this week. please alove me few days.thankyou |
hello tryed today, same problem same error. i open your tools with command with app.py and ./app.py. same error . |
Hmm, then I confess I don't see what the problem is now. I guess you have cloned the last repository sources with the fix that solved the particular problem of some UART converters and especially the CH340. You don't have any other existing connection in parallel, do you? Can you connect to it with a simple serial terminal so as to arrive at the REPL prompt directly? So you are under Linux, right? (just, the error msg comes from an exception here : ESP32-MPY-Jama/src/esp32Controller.py Line 201 in d834cda
|
hello i am with operating system W10 64 ,I have nothing in parallel. The TTL is dedicated to the esp also because it is soldered together. I have TTL CH304 and CP2101 and neither of them is recognized by your program (my devices have been flashed with browser extension or TOOL EXPRESSIF, SO THEY ARE WORKING AND UPDATED), which I just downloaded and started with the app.py command. The program recognizes the com port but when I try to connect it says that the device is incompatible. yes I message and that there.Do you have anything else I can test ?thanks |
It's a very strange problem for me and it is not easy to found it. try :
print('1')
self.InterruptProgram()
print('2')
self._repl.rts = 0
self._repl.dtr = 0
print('3')
self._switchToRawMode(timeoutSec=connectTimeoutSec)
print('4')
machineNfo = self._exeCodeREPL('import uos; [x.strip() for x in uos.uname().machine.split("with")]')
print('5')
self._machineModule = (machineNfo[0] if len(machineNfo) >= 1 else '')
self._machineMCU = (machineNfo[1] if len(machineNfo) >= 2 else '')
print('6')
self._ensureJamaObjExists()
except ESP32ControllerSerialConnException :
raise
except Exception as ex :
print(ex)
raise ESP32ControllerException('The device on the "%s" port is not compatible.' % devicePort) So, by running Is it possible for you to do this? Thank you very much! |
I have the same error and tried to debug a little. Connecting in PUTTY and Ctrl+C to interrupt the program worked fine. def InterruptProgram(self) :
if not self._isConnected :
self._raiseConnectionError()
try :
with self._lockWrite :
# self._repl.write(b'\x03\x03')
self._repl.write(b'\x04')
self._repl.flush()
sleep(1)
self._repl.write(b'\x03')
self._repl.flush()
except :
self._raiseConnectionError()
maxTime = (time() + self.KILL_AFTER_INTERRUPT_SEC)
while self._inProcess :
sleep(0.030)
if time() >= maxTime :
return False
return True Instead of just sending the Ctrl+C (\x03) I first send a Ctrl+D (\x04) for soft reset followed by a delayed Ctrl+C. My conclusion is that the InterruptProgram method doesn't work correctly in some cases and only resets the ESP32 instead of exiting the running code. This can be due to wrong error handling in the code or other reasons. With the soft reset, we can get a better defined state that exits cleaner (for me). @rusudanion maybe this works in your case as well. |
Hello @tocrar, I would like to understand the problem because you say that a Ctrl+D before the Ctrl+C seems to work but you also say that the 2x Ctrl+C only do a soft reset while however, in the REPL, it is indeed the Ctrl+D that does a soft reset. So, I have to admit that I have trouble understanding when Ctrl+D really works and why it solves the problem in your configuration. Have you tried to produce the same combinations by connecting directly to the REPL via a terminal? What happens to you in this case? |
I tried changing the code, and it prints every number from 1-3 |
closed by mistake |
Ok @rusudanion and thank you for your feedback. When you connect, do you select the automatic port search or do you select the right port directly (the timeout is not the same). The only way to see where it comes from is to display some messages from this function. It would be difficult to tell you more at the moment without reproducing the problem exactly and without testing the whole process directly in a serial terminal. |
I was choosing the right port directly. I now changed the value you said with the same results (automatic does 123, times out and gets stuck on 1 while manual does just 123 and timeout). |
Then the REPL should not send back the answer I am waiting for... Or simply, nothing is received at all (serial connection problem with the different UART IOs...). |
Hi, I think I am having the same problem with my ESP32-s2, so I might as well try to expand on this issue. For a background info, I can connect to the board using "thonny" and it works as expected there. I can confirm the problem is in the So I checked what is going on in miniterm:
So only miniterm output, nothing from the board, not even python prompt - and regular input is not accepted. Pressing ctrl+c does absolutely nothing. But pressing ctrl+a:
The return sees as expected, right? So, I'm lost after this point. |
Hello to all ,i have a problem with connection between PC and any esp32 . I have this error any time i try to connect any esp32 device with ESP32-MPY Jama "The device on the "COM x" Port Is not compatible".
the esp device works with other tool for flashing.
Thankyou
The text was updated successfully, but these errors were encountered: