This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

reading AT responses from the modem

I am trying to read from the modem on the nrf9160 DK using the AF_LTE socket and am running to a problem with reading the response from AT+CLAC. I've chosen that command to stress test the code to see if it can handle big responses. The normal response is somewhere in the range of 1000 bytes and the buffer I supply to recv is only 128 bytes. I expected I could keep calling recv() to get a chunk at a time until the OK shows up but after I get the first 128 bytes, my next call to recv() just hangs.

The behavior I see makes me think the socket works more like a datagram socket (eg UDP) instead of a stream socket (eg TCP). Can somebody confirm how I am supposed to read an arbitrarily large response? Can I do it in chunks or do I have to read the whole thing at once? And is AT+CLAC the only command that can cause this problem?

Modem firmware v1.0.0, btw.

Parents Reply Children
No Data
Related