-
Notifications
You must be signed in to change notification settings - Fork 65
Can't connect with M5Stack and Emulator #6
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
Comments
Change this line:
to 10400 Tell me if this makes it work again |
much better, but still there is an error:
|
can you try to change also this:
PARITY_NONE I forgot to check the python script before the newer arduino version |
nothing in python shell:
and in serial port monitor, i see only echo:
|
ok, actually I finished the ideas, the truth is that since the arduino code started working well I didn't use the python emulator |
ok. Thank. I'll try with ecu later, and write the result. |
which motorbike are you using? |
Kawasaki Versys 650 2011 |
It Will work without problems ✌️
Il sab 9 mag 2020, 19:38 MurzzZ <[email protected]> ha scritto:
… Kawasaki Versys 650 2011
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#6 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFBUBTXOJJ2BKIW2XGNVALTRQWIINANCNFSM4M43CBHQ>
.
|
I tried a test on a motorcycle.
request sent to the ECU: I also tried to init K-Line manualy by sending request: 81 11 f1 81 04, and i see that ECU answering: 80 f1 11 03 c1 ea 8f bf. Maybe I doing somethng wrong? |
It looks like it is sending out the wrong sequence, can you post exactly the code you are using? |
library version 1.3.0platformio.ini
|
If I run the same example I get:
11 not 12 also where did you take these number from:
did you used a logic analyzer? |
I just tried in a completely new workspace using a platformio file like yours:
and same code (except for removing the header can you try to do the same or that library is needed in your environment? You don't need to test it with the ECU you can just print here the serial output |
I am using IO Ninja Serial Port Monitor.
upd:
|
can you post what you get from the debug? (the serial port that is connected to your esp and you probably use to program the board) |
and that is what i see in the logic analyzer |
now it is sending the correct request, but you didn't change anything in your code, except for the include, strange If you are using platformio you should already be using the lastest esp32 core, if not please update it |
i have esp32 devkit v1 and arduino mega 256. |
esp32 devkit v1 the same result: |
mega 256: |
The mega Is correct, you are using a version of the esp32 core where the fix is not included Also the program you are using to get the serial data is not reliable, you can see you have different values from the logic capture |
I found the problem 😄 The error is not with platformio, not with your hardware. |
Thank you very much! |
but still strange, that the Serial Port monitor Reads wrong HEX: c1 91 f1 c1 84, that's why the emulator dosn't works. it recieves wrong HEX.
Logic data: https://ibb.co/7Qm9MTP |
@MurzzZ actually I also merged this other commit espressif/arduino-esp32#3713 I don't know if it will solve your problems because after seeing so many errors with the esp32 I moved to the MEGA board for the development of the library. It was safer and I didn't want to debug errors that weren't created by my code I am sure that the esp32 would be a good board but it is better to wait for these changes to be inside the official release |
@aster94 I'v checked latest version (with manualy corrected esp32-hal-uart.c) with the ECU. and it's working!
But this is still unusible for the emulator because the HEX data in serial is corrupted. So if I find something else, I will write to you. And another question, what is the best way to initialize an ECU without debugging? |
Great! I am very happy to read this 😁
Just delete this line Keyword-Protocol-2000/src/KWP2000.cpp Lines 105 to 126 in 243d79a
|
@MurzzZ I am closing the issue, if you have other questions feel free to ask |
I'm trying to run basic_sample on M5Stack and something goes wrong when i try to connect with Emulator.
here is what i see:
Emulator
Starting ECU Emulator Port already opened Port Info: Serial<id=0x3de1e80, open=True>(port='COM7', baudrate=115200, bytesize=8, parity='O', stopbits=1, timeout=2, xonxoff=False, rtscts=False, dsrdtr=False) You should send me the init sequence! not this: ['0x0', '0x0', '0x0', '0x0', '0x0']
Debug
`
User Input: i
Initialize K-line
Starting sequence
Sending Echo
81
FD
11
F1
ED
81
4
Receiving:
2D - unexpected header
FF - ECU is communicating with this address
Unexpected response: Initialization failed
`
The text was updated successfully, but these errors were encountered: