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

Parsing Error #62

Open
gfabiano opened this issue Apr 24, 2022 · 4 comments
Open

Parsing Error #62

gfabiano opened this issue Apr 24, 2022 · 4 comments

Comments

@gfabiano
Copy link

I receive this kind of parse error with lara-r2. I'm using the last version on github.

DEBUG Sending command: "b"AT+CGATT?\r\n""
DEBUG Received response: "b"+CGATT: 1""
DEBUG Sending command: "b"AT+CGACT?\r\n""
ERROR Timeout: [b"AT+CGACT?"]
DEBUG Received response: "b"+CGACT: 1,1\r\n\r\n+CGACT: 8,0\r\n\r\n+CGACT: 31,1""
DEBUG Sending command: "b"AT+CGATT?\r\n""
ERROR Parse: [b"AT+CGATT?"]
DEBUG Received response: "b"+CGATT: 1""
DEBUG Sending command: "b"AT+CGATT?\r\n""
DEBUG Received response: "b"+CGATT: 1""
DEBUG Sending command: "b"AT+CGACT?\r\n""
ERROR Parse: [b"AT+CGACT?"]
DEBUG Received response: "b"+CGACT: 1,1\r\n\r\n+CGACT: 8,0\r\n\r\nGACT: 31,1""
DEBUG Sending command: "b"AT+CGATT?\r\n""
ERROR Parse: [b"AT+CGATT?"]
DEBUG Received response: "b"+CGATT: 1""
DEBUG Sending command: "b"AT+CGATT?\r\n""
DEBUG Received response: "b"+CGATT: 1""
DEBUG Sending command: "b"AT+CGACT?\r\n""
ERROR Parse: [b"AT+CGACT?"]
DEBUG Received response: "b"+CGACT: 1,1\r\n\r\n+CGACT: 8,0\r\n\r\n+CGACT: 31,1""
DEBUG Sending command: "b"AT+CGATT?\r\n""
ERROR Parse: [b"AT+CGATT?"]
DEBUG Received response: "b"+CGATT: 1""
DEBUG Sending command: "b"AT+CGATT?\r\n""
DEBUG Received response: "b"+CGATT: 1""
DEBUG Sending command: "b"AT+CGACT?\r\n""
ERROR Parse: [b"AT+CGACT?"]
DEBUG Received response: "b"+CGACT: 1,1\r\n\r\n+CGACT: 8,0\r\n\r\n+CGACT: 31,1""
DEBUG Sending command: "b"AT+CGATT?\r\n""
ERROR Parse: [b"AT+CGATT?"]
DEBUG Received response: "b"+CGATT: 1""
DEBUG Sending command: "b"AT+CGATT?\r\n""
DEBUG Received response: "b"+CGATT: 1""
DEBUG Sending command: "b"AT+CGACT?\r\n""
ERROR Parse: [b"AT+CGACT?"]
DEBUG Received response: "b"+CGACT: 1,1\r\n\r\n+CGACT: 8,0\r\n\r\n+CGACT: 31,1""
DEBUG Sending command: "b"AT+CGATT?\r\n""
ERROR Parse: [b"AT+CGATT?"]
DEBUG Received response: "b"+CGATT: 1""
DEBUG Sending command: "b"AT+CGATT?\r\n""
DEBUG Received response: "b"+CGATT: 1""
DEBUG Sending command: "b"AT+CGACT?\r\n""
ERROR Parse: [b"AT+CGACT?"]
DEBUG Received response: "b"+CGACT: 1,1\r\n\r\n+CGACT: 8,0\r\n\r\n+CGACT: 31,1""
DEBUG Sending command: "b"AT+CGATT?\r\n""
ERROR Parse: [b"AT+CGATT?"]
DEBUG Received response: "b"+CGATT: 1""
DEBUG Sending command: "b"AT+CGATT?\r\n""
DEBUG Received response: "b"+CGATT: 1""
DEBUG Sending command: "b"AT+CGACT?\r\n""
ERROR Parse: [b"AT+CGACT?"]
@MathiasKoch
Copy link
Member

Hi!

It looks like the current implementation of CGACT doesn't handle the list structure correctly
image

I think it is only parsing the first one, and then ending.

I will try to set up a unit test on Vec responses like this one, and see if i can fix it when i get the time.

A PR is also more than welcomed! The issue is in https://github.com/BlackbirdHQ/atat/

@gfabiano
Copy link
Author

Hi!

Ok!, I'll try to figure it out. I studied a little the parser and I don't understand how it can loose the second struct. I mean, if the parser respect the index of character it must get the second command. In this evening when I'm at home I'll try to parse some test strings.

@MathiasKoch
Copy link
Member

Cool! It should be fairly easy to add unit tests to atat and track it through first digest & second parsing in client.rs

@gfabiano
Copy link
Author

gfabiano commented Jun 4, 2022

Hi! I checked and there was a test on vec PDP Context in atat/src/traits.rs called multi_response and it does not give any problem.

Viewing the return in verbose mode the problem seems on AT+CGACT? . What you think?

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