Closed ftylitak closed 4 years ago
Thanks for solving this appropriately, @ftylitak!
cc @LaRox11
@peter-pycom thank you for your review.
I have made the changes in the branch and I hope that I have addressed your comments.
It am a bit pussled though because I have pushed the commits in my branch and those commits are not shown here. Normally those are updated automatically in the PR. Any way, I will look it up.
We just merged it internally, so I'm closing this PR. It will be released with next release candidate. Thanks again for the PR @ftylitak !
We are experiencing this issue with the latest released firmware, could this please be merged? What is missing? We are sending long APDUs to the SIM via AT+CSIM and it appears that commands of less than 128 bytes work fine, commands over 128 bytes are silently ignored and the response of the previous AT command is returned as the response (very strange) and commands that are exactly 128 bytes appear to freeze the modem (it never replies).
This Pull Request adds support AT commands of arbitrary length.
The current implementation has an AT command length limit of 124 bytes (LTE_AT_CMD_SIZE_MAX - 4) which is a blocking point when trying to use the complete AT command reference of SEQUANS modem.
The issue has already been reported through #411 and tried to be solved by #414 though not a proper solution has been found. @robert-hh pointed out that bigger buffers would solve the problem though this would affect the buffer handling.
My approach allows to send long AT command in chunks of max size 124. In case the command is smaller than 124 byte long, it will behave as it previously did.
A good example of its usage would be the case of sending byte data through a UDP socket.
Also allows to pass the 'delay' parameter to the send_at_cmd. It is documented in https://docs.pycom.io/firmwareapi/pycom/network/lte/ though it seems the delay was never actually passed to the underlying code.
Tested and working on gpy device.