Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Cellular: Added BG96 handling for socket closing URC #10411
BG96 wasn't handling URC for socket closing at all. Now socket closed flag is set on the arriving of such URC. Also, if the socket was closed but closed flag not yet set at the moment a socket sending/receiving was issued, the socket would get stuck waiting for data. To prevent this, socket event is called also when socket close URC arrives.
Pull request type
Change request to:
Start function with:
Also it makes more sense, as closed flag is enforced, not to issue close to a modem as there is no need => performance optimization
For BG96, closed URC can be followed by AT+QICLOSE command, to close the socket, without error because there is a slight distinction in this case between socket and a connection on that socket. This URC indicates connection being closed.