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

encoding/decoding data BIG endian #34

Open
alwyali opened this issue Jun 4, 2021 · 7 comments
Open

encoding/decoding data BIG endian #34

alwyali opened this issue Jun 4, 2021 · 7 comments

Comments

@alwyali
Copy link

alwyali commented Jun 4, 2021

Hello Sir, we have GPS device which send data in BIG- endian mode(big-endian)Network byte order to transfer words and double words. I kindly request for assistance on where (which file) I can make changes so that the transmitted data is encoded/decoded using BIG endian. Or to check the endianness first and decides. Currently this is what we get. It begins with a line saying undefined
then we get the following
T☺☺"G@c�♠d�☺☺0/0000XN-S4876363☺4
T☺
☺"G@c�♠d�☺☺0/0000XN-S4876363☺4
☺"@☺�Gdc�♠☺/☺0000N0SX4-7383646�☺B�XXXX
☺"@☺�Gdc�♠☺/☺0000N0SX4-7383646�☺B�XXXX

@gdespirito
Copy link
Member

gdespirito commented Jun 4, 2021

Hi! You have to implement your own adapter: https://github.com/freshworkstudio/gps-tracking-nodejs#adapters

@alwyali
Copy link
Author

alwyali commented Jun 4, 2021 via email

@alwyali
Copy link
Author

alwyali commented Jun 4, 2021

I have actually research a lot because I did not have the documentation of the, somebody tried on a PHP server and realized the data is transmitted in BIG endian mode. Honestly, I don't know, where exactly in TK510 raw (buffer) is initially captured, so that I can try to do the substitution. If you can assist I will appreciate.

@gdespirito
Copy link
Member

I know nothing about TK510

@alwyali
Copy link
Author

alwyali commented Jun 4, 2021

Ooh, Ok. Because TK510 is one of the (4) adapters listed. There are TK103, TK510, GT06, GT02A adapters. Am very sorry for any discomfort and confusion Sir.

@gdespirito
Copy link
Member

Oh, that went from a PR from other developer, probably. But you can check the code of that specific adapter: https://github.com/freshworkstudio/gps-tracking-nodejs/tree/master/lib/adapters

@alwyali
Copy link
Author

alwyali commented Jun 4, 2021

Thank you very much Sir. I will check that. But is it possible to do that in TK103. Maybe that issue of BIG endian and LITTLE endian is the one which is causing the problem. Frankly TK103 has more implementations than TK510. I appreciate your guidance, thanks again.

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