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

[bug] Parser data collisions #8

Open
kybarg opened this issue Feb 21, 2018 · 0 comments
Open

[bug] Parser data collisions #8

kybarg opened this issue Feb 21, 2018 · 0 comments

Comments

@kybarg
Copy link

kybarg commented Feb 21, 2018

For example
Last Reject Code has response:
7F 80 02 F0 00 12 20
At this time Setup Request has response
7F 80 17 F0 00 30 31 30 30 45 55 52 00 00 01 03 05 0A 14 02 02 02 00 00 64 04 2A 25

As we can see that data starts with 7F 80 XX F0 00, where XX is just its length
But in case of Last Reject Code 00 represents rejection code
In case of Setup Request 00 represents device type
Here https://github.com/soulman-is-good/node-ssp/blob/master/index.js#L154-L343 we catch all the data with length > 1 and if we catch 00 we read it as reject code, but we need to pay attention to data length and differ it or add callbacks for commands to separate events and commands responses.

@kybarg kybarg changed the title [bug] Parser collisions [bug] Parser data collisions Feb 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants