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

S18 lights/lock #7

Open
enaon opened this issue Jan 29, 2021 · 12 comments
Open

S18 lights/lock #7

enaon opened this issue Jan 29, 2021 · 12 comments

Comments

@enaon
Copy link

enaon commented Jan 29, 2021

Hi, nice work. :)

those are the commands for the lights and the lock for the S18.

Lights on
0xAA,0x55,0x12,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x73,0x14,0x5A,0x5A
lights off
0xAA,0x55,0x13,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x73,0x14,0x5A,0x5A
lights auto
0xAA,0x55,0x14,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x73,0x14,0x5A,0x5A
lock
0xAA,0x55,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x5d,0x14,0x5A,0x5A
unlock
0xAA,0x55,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x37,0x37,0x33,0x35,0x32,0x35,0x5d,0x14,0x5A,0x5A

@enaon
Copy link
Author

enaon commented Feb 1, 2021

also I found this one useful:

"pass" [0xAA,0x55,0x31,0x32,0x33,0x34,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x44,0x14,0x5A,0x5A]
the pass is 1234 in the example above.

@Pickelhaupt
Copy link
Owner

Pickelhaupt commented Apr 1, 2021

Thanks, I'll have a look and will add some more granular lights settings.
Lock/unlock plus password would be very useful as well, I'll try to implement it as soon as the BT and dash code is stable

@enaon
Copy link
Author

enaon commented Apr 1, 2021

nice, I got the bridge kind of working, it is very doable RF wise :)

https://www.youtube.com/watch?v=veTZA-ubmdA

@Pickelhaupt
Copy link
Owner

very cool,
might have a look at the code to see if I could implement something similar. It would be nice to implement an EUC World/Wheellog connector as well.

@Pickelhaupt
Copy link
Owner

Do you have the command for setting full/dimmed beam in the S18 as well? 0x15, 0x16?

@Pickelhaupt
Copy link
Owner

I am seriously thinking about getting an S18 very soon, just have to try one out first, how do you like it?

@enaon
Copy link
Author

enaon commented Apr 1, 2021

Sebastian from EucWorld suggested such a solution, he offered to make a protocol for the a new "wheel", the watch. I will get to it in a few days, if you have any ideas it will be good.

@enaon
Copy link
Author

enaon commented Apr 1, 2021

I am seriously thinking about getting an S18 very soon, just have to try one out first, how do you like it?

I was unhappy till I got a pirelli tire for it, the tire bending along the suspension was making it unstable. I now am very happy about it, very nice wheel.

@enaon
Copy link
Author

enaon commented Apr 1, 2021

Do you have the command for setting full/dimmed beam in the S18 as well? 0x15, 0x16?

no, I couldn't find them, they were not on eucworld, and I didn't look if the kingsong app does it. The auto light is very nice though, except for one thing, they have made a mistake I believe.

when on any mode other that off/auto. the tail light blinks while riding, but does not give a break indication.
When on auto/off, the tail light gives a break indication, but stays off when moving.

So there is no way to have both a tail light, and a brake indicator. one has to change modes on the fly based on amperage, this is what I do :)

https://github.com/enaon/eucWatch/blob/62511958c819e96cc48e1b77d0b22c3a6b31993e/P8-testing/eucKingsong/eucKingsong.js#L73

@Pickelhaupt
Copy link
Owner

I hope they sort it in the next firmware release, it doesn't sound like that would be the intended brake light behaviour. Nice workaround, can you send commands to the S18 without getting beeps?
A question about the unlock package: are the 6 bytes to the left of 0x5d the pin code?

@enaon
Copy link
Author

enaon commented Apr 2, 2021

yes it beeps, but better than having no tail light :)

the code is the 3 bytes right of 0x55, if you also want to change it, the old pass goes to the next 3.

have a look here:

case "passSend":return [0xAA,0x55,0x30+Number(euc.dash.pass[0]),0x30+Number(euc.dash.pass[1]),0x30+Number(euc.dash.pass[2]),0x30+Number(euc.dash.pass[3]),0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x44,0x14,0x5A,0x5A];

case "passChange": return [0xAA,0x55,0x30+Number(euc.dash.pass[0]),0x30+Number(euc.dash.pass[1]),0x30+Number(euc.dash.pass[2]),0x30+Number(euc.dash.pass[3]),0x30+Number(euc.dash.passOld[0]),0x30+Number(euc.dash.passOld[1]),0x30+Number(euc.dash.passOld[2]),0x30+Number(euc.dash.passOld[3]),0x00,0x00,0x00,0x00,0x00,0x00,0x41,0x14,0x5A,0x5A]; //rf 43

case "passClear": return [0xAA,0x55,0x30+Number(euc.dash.pass[0]),0x30+Number(euc.dash.pass[1]),0x30+Number(euc.dash.pass[2]),0x30+Number(euc.dash.pass[3]),0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x42,0x14,0x5A,0x5A]; //rf 43

case "passSet": return [0xAA,0x55,0x30+Number(euc.dash.pass[0]),0x30+Number(euc.dash.pass[1]),0x30+Number(euc.dash.pass[2]),0x30+Number(euc.dash.pass[3]),0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x41,0x14,0x5A,0x5A]; //rf 43

@enaon
Copy link
Author

enaon commented Apr 2, 2021

also, there is a security hole in the implementation:

Once a pass is send, the wheel accepts write commands till it is rebooted, so if you lock it and leave it unattended, anyone can connect and unlock it, no pass is needed. One solution is to send a shutdown too, till they fix the pass token behavior.

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

2 participants