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

Bangle2 Serial1 handling for GPS AT6558 assumes UBLOX headers, needs to handle CASIC protocol #2124

Closed
hughbarney opened this issue Jan 3, 2022 · 5 comments

Comments

@hughbarney
Copy link

Well bottomed out by @fanoush and @Mark_M

https://github.com/espruino/Espruino/blo­b/master/libs/banglejs/jswrap_bangle.c
It checks for UBX at line 3690
The CASIC protocol headers bytes are 0xBA 0xCE.

Full thread at:
http://forum.espruino.com/conversations/371336/

There is a workround using Serial2 and poweron the GPS via D29.write(1);
@Mark_M has built a CASIC parser in the thread.

@fanoush
Copy link
Contributor

fanoush commented Jan 4, 2022

since this is not related to any specific Bangle App https://github.com/espruino/Espruino/issues would be better place for this issue (next time?)

@gfwilliams gfwilliams transferred this issue from espruino/BangleApps Jan 4, 2022
@gfwilliams
Copy link
Member

I've just moved this issue... But thanks! That's a pain.

So just to be clear - I guess we have two options here?

  • Disable the UBX handling for Bangle.js 2
  • Replace the UBX handler with a CASIC handler for Bangle.js 2

I guess the second is preferable, we just have to convert the JS code in that thread to C

@gfwilliams
Copy link
Member

No reply so just doing the first as it's easier

@fanoush
Copy link
Contributor

fanoush commented Jan 11, 2022

not sure but does this change mean that CASIC data will be now available via GPS-raw event?
if not then reading Serial1 directly will still not work due to this line

return true; // handled
?

@gfwilliams
Copy link
Member

gfwilliams commented Jan 11, 2022

Good point. You'll still get the GPS-raw but it'll be newline-terminated. It's probably not ideal but should be a definite improvement over what was happening before!

edit: and yes, not Serial1.data

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

3 participants