[BC95-G] - Sometimes ERROR when sending with UDP

Hello everyone,
I have a BC95-G that is attached to the network (CGATT = 1), registered (CEREG = 5), and has a UDP socket that is successfully created. Yet when I send via UDP (NSOST) I sometimes (not always) get an ERROR response, even though the code I use doesn’t change. How is that possible? I have noticed that CSCON is often 0 when there is an ERROR response. Could that be part of the problem?

I always make sure to send over the socket number that I create with NSOCR.

Many thanks.

EDIT: When unplug the modem and reconnect power, the problem is resolved. Very strange indeed.

You can implement a code that closes and reopens the socket in case of an error.
CSCON 0 is OK, that just means the module is in RRC idle state.

1 Like