Skip to content
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

Weird serial output after flashing OSF to motor #158

Open
elpollodiablo opened this issue Jan 12, 2022 · 1 comment
Open

Weird serial output after flashing OSF to motor #158

elpollodiablo opened this issue Jan 12, 2022 · 1 comment

Comments

@elpollodiablo
Copy link

elpollodiablo commented Jan 12, 2022

Hey,

this is not a bug report, but a question :)

I'm using an ESP32 to read/write the serial of a TSDZ2 with OSF as part of some experimentation for a project. I'm using 9600 baud, and was able to read the incoming packets from the original firmware, including 0x43 start byte etc.

After that worked, I flashed the recommended opt data and OSF 1.1.1 according to instructions (with stmflash8 on Mac), and now this is the output I get on serial/motor tx after connecting the motor to battery (I'm printing bytes read in hex with a space in between, the "[nnnn] reset frame size" strings are debug messages) without having written anything to serial/motor rx from the ESP32 side:

8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 [7737] reset frame size
8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 [8806] reset frame size
A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 [9875] reset frame size
8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 88 8 A8 8 A8 8 A8 8 [10944] reset frame size
A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 [12013] reset frame size
8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 [13082] reset frame size
A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 [14150] reset frame size
8 A8 8 88 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 [15219] reset frame size
A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 88 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 [16288] reset frame size
8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 [17356] reset frame size
A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 [18425] reset frame size
8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 [19493] reset frame size
A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 [20563] reset frame size
8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 [21632] reset frame size
A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 [22700] reset frame size
8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 88 8 A8 8 A8 8 A8 8 A8 8 [23769] reset frame size
A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 [24838] reset frame size
8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 [25906] reset frame size
A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 88 [26975] reset frame size
8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 [28044] reset frame size
A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 [29113] reset frame size
8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 [30182] reset frame size
A8 8 A8 8 88 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 [31251] reset frame size
8 A8 8 A8 8 A8 8 A8 8 88 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 [32320] reset frame size
A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 A8 8 8 8 A8 [33388] reset frame size
8 8 8 A8 8 8 8 A8 8 8 8 A8 8 8 8 8 A8 8 8 8 A8 8 8 8 A8 8 8 [34457] reset frame size
8 A8 8 8 8 A8 8 8 8 8 A8 8 8 8 A8 8 8 8 A8 8 8 8 A8 8 8 8 A8 [35526] reset frame size
8 8 8 8 A8 8 8 8 A8 8 8 8 A8 8 8 8 A8 8 8 8 A8 8 8 8 8 A8 8 [36595] reset frame size
8 8 A8 8 8 8 A8 8 8 8 A8 8 8 8 A8 8 8 8 8 A8 8 8 8 A8 8 8 8 [37663] reset frame size
A8 8 8 8 A8 8 8 8 A8 8 8 8 8 A8 8 8 8 A8 8 8 8 A8 8 8 8 A8 8 [38733] reset frame size
8 8 A8 8 8 8 A8 8 8 8 8 A8 8 8 8 A8 8 8 8 A8 8 8 8 A8 8 8 8 [39801] reset frame size
A8 8 8 8 8 A8 8 8 8 A8 8 8 8 A8 8 8 8 A8 8 8 8 A8 8 8 8 8 A8 [40866] reset frame size

if I reboot the controller, it will again start the same pattern, that will change after a few seconds, so this is repeatable and consistent.

I know to support my experimentation is way beyond the scope of the devs here, but I thought it might not hurt to ask: did anyone experience something like this, or has an idea where I could look what's going wrong here? I've read the OSF source (specifically ebike_app.c), and I'm not finding anything that writes to serial that would do this.

While I haven't been able to use it yet, looking at the source this seems like an amazing project where a lot of effort went into it. I'm very impressed. Thanks for all your time, I hope I can be of some help in the future.

@elpollodiablo
Copy link
Author

elpollodiablo commented Jan 16, 2022

Irritatingly, I wasn't able to flash 1.0.0 or the original firmware until I made a cable with a RST connection, but now it works rather reliably :)

Sadly, the issue persists with the 1.1.1 firmware, and if I flash 1.0.0, I get a different, but similar output:

0 8 A8 8 8 8 8 8 8 8 8 8 8 8 8 8 A8 8 8 8 8 8 8 8 8 8 8 8 [14199] reset frame size
8 8 A8 8 8 8 8 8 8 8 8 8 8 8 8 8 A8 8 8 8 8 8 8 8 8 8 8 [15251] reset frame size
8 8 8 A8 8 8 8 8 8 8 8 8 8 8 8 8 8 A8 8 8 8 8 8 8 8 8 8 [16302] reset frame size
8 8 8 8 A8 8 8 8 8 8 8 8 8 8 8 8 8 8 A8 8 8 8 8 8 8 8 8 [17354] reset frame size
8 8 8 8 8 A8 8 8 8 8 8 8 8 8 8 8 8 8 8 A8 8 8 8 8 8 8 8 [18406] reset frame size
8 8 8 8 8 8 A8 8 8 8 8 8 8 8 8 8 8 8 8 8 A8 8 8 8 8 8 8 [19458] reset frame size
8 8 8 8 8 8 8 A8 8 8 8 8 8 8 8 8 8 8 8 8 8 A8 8 8 8 8 8 [20509] reset frame size
8 8 8 8 8 8 8 8 A8 8 8 8 8 8 8 8 8 8 8 8 8 8 A8 8 8 8 8 [21561] reset frame size
8 8 8 8 8 8 8 8 8 A8 8 8 8 8 8 8 8 8 8 8 8 8 8 A8 8 8 8 [22613] reset frame size
8 8 8 8 8 8 8 8 8 8 A8 8 8 8 8 8 8 8 8 8 8 8 8 8 A8 8 8 [23665] reset frame size
8 8 8 8 8 8 8 8 8 8 8 A8 8 8 8 A8 8 8 8 A8 8 8 8 A8 8 8 8 [24717] reset frame size
A8 8 8 8 A8 8 8 8 A8 8 8 8 A8 8 8 8 A8 8 8 8 A8 8 8 8 A8 8 8 [25769] reset frame size
8 A8 8 8 8 A8 8 8 8 A8 8 8 8 A8 8 8 8 A8 8 8 8 A8 8 8 8 A8 8 [26820] reset frame size
8 A8 A8 8 8 8 A8 8 8 8 A8 8 8 A8 A8 8 8 A8 A8 8 8 A8 A8 8 8 8 A8 [27872] reset frame size
8 8 8 A8 8 8 A8 A8 8 8 A8 A8 8 8 A8 A8 8 8 A8 A8 8 8 A8 A8 8 8 A8 [28924] reset frame size
A8 8 8 A8 A8 8 8 A8 A8 8 8 A8 A8 8 8 A8 A8 8 8 A8 A8 8 8 A8 A8 8 8 [29976] reset frame size

I'll now be investigating if this might be an issue that stems from using stm8flash instead of the windows app.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant