-
Notifications
You must be signed in to change notification settings - Fork 2k
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
drivers/at: add function to read raw data bytes from modem #10191
Conversation
I'm using more this function now as dealing with binary data transfers over modem (ie. AT#SRECV commands to transfer via sockets). Could it be possible to review and see if this could be suitable for merging into master? @kaspar030 maybe? Thanks a lot! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
almost good to go!
@kaspar030 : many thanks for reviewing! Hope it's in better shape now, I can in case squash when looks fine! |
@fedepell I'm sorry, now that I see the change I understand that any result < len implicitly means the call ended because of a timeout. That's also why the return documentation said "eventually". Now I think that was totally alright. :) If you agree, please undo that change again. But keep the dropped memset. You can directly squash, otherwise this is good to go! |
d5afa1c
to
e34d46e
Compare
@kaspar030 : thanks for the inputs! Ok I reverted the ETIMEDOUT part and left out the memset and squashed all together. I just tried to make the "eventually" comment a bit clear :) Thanks again for the review! |
@kaspar030 : I put as "resolved" the changes some time ago but I believe (sorry if I'm wrong :) ) that this should be somehow confirmed by you, correct? Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK for the change, but I couldn't test it.
Could someone give this a quick spin? |
@aabadie : could we have this in 2019.01 if we find someone that can try it a little out? thanks! |
It's added to 2019.01. Since there's already an (Untested) ACK, it is very close from being merged. I won't have the time and am not sure how to test this. But maybe @leandrolanzieri could help ? |
Nice. Yes! I can try it out with the R410M modem |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested with the ublox r410m modem and works as expected. ACK!
Thanks @leandrolanzieri for testing! For the record: I use it with a Telit GL865-DUAL V3 from a saml21 based hardware. |
Contribution description
This PR adds a function to read raw data bytes from the modem device. All previous functions work on a line basis and are not suitable for some operations like raw data bytes transfer.
My use case for example is transfering via GPRS an image file to flash remotely the device. To do this I start the firmware image transfer by first issuing AT commands and then having to read the raw data bytes and flashing on the device (following concepts from #9342 ).
Testing procedure
The manual test under tests/drivers_at was augmented to call also this function. With a device with a modem connected use on the test shell for example:
send_recv_bytes AT+CGMM 31
The function will send the AT+CGMM and then try to read 31 bytes. If less are found it will wait for the timeout to expire, otherwise return immediately with the 31 bytes.