NB-IoT with Inzpire
Maintaining communication with remote devices is always a challenge in IoT. Building a IoT solution is always a new exercise because the types of hardware and protocols keep getting updated periodically. A good example is the Constrained Application Protocol (CoAP) which rose to popularity with small devices coming into the picture in Internet of Things. Today we will see how Inzpire can minimize the hassle of connecting your NB-IoT device with your application server.
Not all protocols are made the same way. CoAP is a very lightweight protocol optimized for low bandwidth networks. Unlike our good old HTTP which has been a reliable workhorse for more than 90% of our digital interactions with a very verbose protocol, CoAP has a compact packet format based on a binary protocol. Being an application layer protocol it relies on UDP transport for end to end delivery. However since guaranteed delivery is not a thing for UDP, CoAP implements its own simple stop-and-wait type error recovery and congestion control mechanism. If you know about the more sophisticated features offered by TCP such as adaptive flow control, think of CoAP like its slow cousin. But CoAP thrives in a resource constrained environment both on the network and device ends which gives it an edge over TCP in most narrow band applications. In tests we have seen that when operating at the coverage edge with NB-IoT, CoAP request with a 10 byte payload takes less than 3 seconds while a simple HTTP GET request takes in excess of 30 seconds (Yes you saw that right, its 30s, crazy stuff happen when you push the poor modem to the limit). I was initially skeptical on the effectiveness of CoAP, but the results of the above experiment made me think otherwise.
Inzpire to the rescue
Using CoAP comes with its own set of cons. A major one being the lack of experience needed to setup and maintain a CoAP server for device communication. Inzpire NB-IoT solves this problem for you by acting as gateway to forward CoAP messaging to and from HTTP. If you are familiar with how SMS and Voice works in Inzpire you will notice many similarities.
- deviceId: This is the IMEI of the NB-IoT modem
- type: data type is Buffer by default
- data: data payload sent by the device as an array
- HTTP Method:
- Send NBReg<Space><IMEI of your Banana PI><space><Callback URL> to 77001
- MQTT Method:
- Send NBReg<Space><IMEI of your Banana PI><space><MQTT Broker URL><space><MQTT topic> to 77001
- You will get a USSD prompt indicating that you will be charged a subscription fee for the service
- Enter S in the USSD prompt and hit send
- You will receive an SMS with ‘Device registered successfully’ with a device key.
MORE BLOG POSTS
Author – Mobitel Innovation Center – Akalanka De Silva