BPI-NB-IoT: data transmission works only one time (solved)

BPI NB-IoT board. BC95-G Revision: BC95GJBR01A01 Operator Vodafone Germany (special M2M / NB-IoT SIM card)

Hey, i have an account at wia.io to use for IoT. It’s possible to send messages by UDP. They have an instruction on https://developers.wia.io/docs/quectel-bc95-g that workes fine - but only one time. if i repeat the “C:\Python27>python nb-iot.py -aknt” command, i get an “Failed to send message” error.

      • snip + + +

Created socket: 1

Sending message: AT+NSOST=1,52.17.209.228,5683,97,40020000b66576656e747…

Failed to send message

Closing socket

Closed socket: 1

      • snip + + +

If i disconnect from USB power, i can repeat the transmission with success - but again only one time. The second try ends with an error.

A reset by the AT+NRB command has no effect. I have to disconnect from USB power.

Any idea? Do i need to update the firmware?

Manfred

… some days later i updated the firmware. But again, i got the error.

After some more experiments by manually sending AT commands over terminal software i found out that it works very simple.

First preset your BG95-G for AUTOCONNECT by the following commands, that work with Vodafone Germany
AT+NCONFIG=AUTOCONNECT,TRUE
AT+NCONFIG=CR_0354_0338_SCRAMBLING,TRUE (depends on your carrier?)
AT+NCONFIG=CR_0859_SI_AVOID,FALSE (depends on your carrier?)
AT+NBAND=20 (depends on your country and carrier!)
AT+CGDCONT=0,“IP”,“nb.inetd.gdsp” (Vodafone, “0” is belonging to AUTOCONNECT)
AT+COPS=0

After the “AT+NRB” reset command these preferences are stored in the NV-RAM of the BC95-G and used for AUTOCONNECT at startup.

To send UDP data you only have to open a socket by
AT+NSOCR=DGRAM,17,1234,1 (open socket no. 1)
AT+NSOST=1,192.158.5.1,1024,2,AB30,1 (send data over socket no. 1)

That’s all!

Manfred