Skip to content
This repository has been archived by the owner on Sep 16, 2024. It is now read-only.

Can't send long AT commands using lte.send_at_cmd #411

Open
leroxyl opened this issue Feb 25, 2020 · 4 comments
Open

Can't send long AT commands using lte.send_at_cmd #411

leroxyl opened this issue Feb 25, 2020 · 4 comments

Comments

@leroxyl
Copy link

leroxyl commented Feb 25, 2020

  • GPy + pytrack or pysense
  • (sysname='GPy', nodename='GPy', release='1.20.1.r2', version='v1.11-06dfad0 on 2019-11-30', machine='GPy with ESP32', pybytes='1.3.0')

Hello,

for my application I need to send long AT+CSIM commands (over 500 bytes) to the modem. Using lte.send_at_cmd with commands that size causes a crash. I followed the source code through the rabbit hole and found that the buffer behind this method is only 127 bytes big and a carriage return is automatically appended to the command here: https://github.com/pycom/pycom-micropython-sigfox/blob/Release/v1.20/esp32/lte/lteppp.c#L662 which hinders me from sending my command in several chunks.

Is there maybe another way to safely write to the UART without a carriage return being added?

Thank you!

@robert-hh
Copy link
Contributor

As far as I understand the cited code, the CR is only sent if the command is "+++".

@leroxyl
Copy link
Author

leroxyl commented Feb 25, 2020

I fell for that, too. It looks counter-intuitive but strcmp returns 0 if the contents of both strings are equal and 0 evaluates to false.

@robert-hh
Copy link
Contributor

Oops. You are right.

@razvandragomirescu
Copy link

I am experiencing the same issue, we are sending long command APDUs to the SIM card via AT+CSIM and we run out of space for some commands. This issue is almost 2 years old now, could you please fix it?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants