Open erikkt opened 2 years ago
It might need a different service / characteristic address for ninebot one
Service FFE0 Characteristic FFE1
Thanks for your reply! There is no mention of these addresses (FFE0/FFE1) in the code. Where are these? Are these related to: static BLEUUID serviceUUID("6e400001-b5a3-f393-e0a9-e50e24dcca9e"); static BLEUUID writecharUUID("6e400002-b5a3-f393-e0a9-e50e24dcca9e"); static BLEUUID readcharUUID("6e400003-b5a3-f393-e0a9-e50e24dcca9e");
Actually for Z10 you should just be able to change 0x11 to 0x09 and update the last two checksum entries
char currentspeed[] = {0x55, 0xAA, 0x03, 0x11, 0x01, 0x26, 0x02, 0xC2, 0xFF, 0x00}; // current speed (kmh * 1000)
Truly sorry for my ignorance, and I appreciate any answer. There is no mention in the doc on how to calculate the checksum. How do I do that?
char currentspeed[] = {0x55, 0xAA, 0x03, 0x09, 0x01, 0x26, 0x02, 0xC2, 0x??, 0x??}; // current speed (kmh * 1000)
Finally figured it out after many hours. The checksum seems to be calculated by adding everything between 0xAA and the first checksum, then XOR the result with FF. Chk1 seems to always be 0xFF. Unfortunately it still wont talk with my Z10. Can you please elaborate on the "Service FFE0, Characteristic FFE1". I don't understand where this is defined in the code. I would really appreciate your help.
Which .ino are you testing with ?
Some are hard coded to the Ninebot One S2 (N20)
Try to uncomment the line
//if (advertisedDevice.haveServiceUUID() && advertisedDevice.isAdvertisingService(serviceUUID)) {
and comment out
String name = advertisedDevice.getName().c_str(); if (name.startsWith("N2O")) {
Service FFE0 is for older ninebot one E+, shouldn't need that for the Z10
Thanks a lot for your reply! I am testing with the euc-lcd.ino, as I have a TTGO LCD ESP. The line you mention is already uncommented, and the 'if (name.startsWith("N2O"))' doesn't exist. Is there some other .ino I should use instead?
I found a BT analyzer and it seems it is using characteristics FEC7, FEC8 and FEC9. How can I change this in the code?
Any idea on how to adapt this to Z10? Doesn't work with either 0x09 or 0x11. Would really like this for my Z10.