background image

NB-IoT / Cat-M Module

Networking Guide

Содержание Cat-M

Страница 1: ...NB IoT Cat M Module Networking Guide ...

Страница 2: ... parameters 14 3 6 Checking network connection status 15 3 7 Basic network connection to NB IoT 16 3 8 Basic network connection to Cat M 16 3 9 Basic network connection to EGPRS 16 3 10 HTTP client 17 3 10 1 HTTP connections 17 3 10 2 HTTP request methods 19 3 10 3 Sending Waspmote frames to Meshlium via HTTP 20 3 10 4 Sending Waspmote frames to Meshlium via HTTPS 22 3 11 Making TCP UDP connection...

Страница 3: ... 3 v7 0 3 15 Scanning network operators 33 3 16 Sending AT commands 33 4 Consumption 34 4 1 Consumption table 34 5 Code examples and extended information 35 6 API changelog 36 7 Certifications 37 Index ...

Страница 4: ... SSL TCP or UDP are supported Moreover the module integrates a GNSS engine supporting GPS BeiDou Galileo GLONASS and QZSS systems making it suitable for tracking applications where low cost and accurate positioning is needed Designed to be plugged on the socket1 of Waspmote the module can meet almost all requirements for IoT applications like smart cities remote monitoring smart logistics real tim...

Страница 5: ...mmercialize NB IoT On the other hand NB IoT has a great advantage against Cat M on indoor coverage due to its bigger sensitivity reaching very good levels even inside basements and large buildings Recently the 3GPP association has published the release 14 where the standards LTE Cat NB2 and LTE Cat M2 has been defined However the market will have to wait till they are available for commercialize I...

Страница 6: ... M1 Max 375 kbps DL Max 375 kbps UL EDGE Max 296 kbps DL Max 236 8 kbps UL GPRS Max 107 kbps DL Max 85 6 kbps UL SMS Point to point MO and MT SMS Cell Broadcast Text and PDU Mode GNNS Embedded GNSS as optional Supports GPS GLONASS BeiDou Compass Galileo and QZSS Antenna connectors U FL for main antenna cellular U FL for GNSS antenna External antenna 5 dBi Sensitivity 113 dBm Cat NB1 CE Level 0 107...

Страница 7: ...n T Mobile Sprint North America RCM Telstra Australia IC Telus Bell Canada Telefónica Spain JATE TELEC KDDI SoftBank DOCOMO Japan KC SKT LGU Korea IFETEL Mexico IMDA Singapore NCC Taiwan CCC China Under Development LTE B25 will be supported on BG96 with R1 2 hardware version Figure NB IoT Cat M module ...

Страница 8: ... on the Waspmote board This radio does not need the Expansion Radio Board Figure Module connected to Waspmote in SOCKET1 The SIM card size used in the NB IoT Cat M module is nano SIM The next picture shows how the nano SIM card must be plugged in the module Figure SIM card installation in OEM version ...

Страница 9: ...s The operating bands of the dipole antenna go from 698 to 960 MHz and from 1710 to 2690 MHz The maximum gain of the antenna is observed at 2 6 GHz 3 4 dBi To get the maximum performance it is recommended to place the antennas like that The main cellular antenna should be in vertical position pointing to the sky in order to radiate better to the cellular base stations around The GPS antenna should...

Страница 10: ... created This object called BG96 is already created by default inside the Waspmote NB IoT Cat M library It will be used along this guide to show how Waspmote works When using the class constructor all variables are initialized to their default values 3 1 3 API functions Through this guide there are lots of examples showing the use of functions In these examples API functions are called to execute ...

Страница 11: ... with the module After this step the module will be able to receive commands to manage it Example of use BG96 ON 3 3 Switching off The OFF function allows the user to switch off the NB IoT Cat M module and close the UART This function must be called in order to save battery when the module is not going to be used Example of use BG96 OFF ...

Страница 12: ...tion can get more than one information field to the module This function needs one input to indicate the type of information requested The resulting information is stored in _buffer and _length is the number of bytes in the buffer The information possibilities are WaspBG96 INFO_HW To request the hardware revision WaspBG96 INFO_MANUFACTURER_ID To request the manufacturer identifier WaspBG96 INFO_MO...

Страница 13: ...Related variables BG96 _buffer Buffer which stores the information requested BG96 _length Number of bytes in buffer Example of getting module info www libelium com development waspmote examples nb iot 02 get module info ...

Страница 14: ...N function allows the user to save these parameters into Waspmote memory Later when data connection functions are called Waspmote will configure these parameters into the NB IoT Cat M module Example of use BG96 set_APN apn login password The show_APN function allows the user to display the current settings stored in Waspmote s memory which are used by the libraries when data connections are perfor...

Страница 15: ...earching for a new operator to register to 3 registration denied 4 unknown The checkDataConnection function checks the module s network connection status connects the module to data service and returns whether the module is connected to data service is not connected to a network is searching for a new operator to register to registration was denied This function will wait for the module to be conn...

Страница 16: ...file Then use the contextActivation function to connect the network Example of basic NB IoT connection www libelium com development waspmote examples nb iot 04a basic connection nb iot 3 8 Basic network connection to Cat M In the same way as for NB IoT connection to demonstrate a basic connection through the Cat M network the 1st step is to configure the connection with lteM1Connection function an...

Страница 17: ...variable1 value1 It is a couple with the variable name and value which we want the web service to parse view html It is an optional argument It shows a pretty response HTML formatted All arguments must be separated by The variable name and value must be separated by Some examples pruebas libelium com getpost_frame_parser php var1 3 1415 pruebas libelium com getpost_frame_parser php var1 3 1415 vie...

Страница 18: ...he web service from a PC browser Remember this PHP code is really simple and is offered with the only purpose of testing without any warranty The source code is available here downloads libelium com waspmote html get post php parser tester zip The user may find it interesting to copy this code and make it run on his own server physical or virtual If the user wants to go further he can complete the...

Страница 19: ... GET HEAD and DELETE methods char host test libelium com uint16_t port 80 char resource test get post php varA 1 varB 2 varC 3 varD 4 BG96 http WaspBG96 HTTP_GET host port resource Example of use POST and PUT methods char host test libelium com uint16_t port 80 char resource test get post php char data varA 1 varB 2 varC 3 varD 4 varE 5 BG96 http WaspBG96 HTTP_POST host port resource data Once the...

Страница 20: ...n order to be able to receive HTTP non secure requests The user must go to Manager System System Security HTTP Service Figure Enable HTTP service in Meshlium Manager System The sendFrameToMeshlium function has been developed to send Waspmote frames from Waspmote to Meshlium via non secure HTTP request Meshlium will parse chop the frame and will store it in its internal MySQL database This function...

Страница 21: ...more about how to create sensor frames with Waspmote libraries Example of use char host pruebas libelium com uint16_t port 80 after frame has been created BG96 sendFrameToMeshlium host port frame buffer frame length Related variables BG96 _http Code Stores the HTTP code from the server BG96 _buffer Stores data received from server BG96 _length Stores data length frame buffer Stores data frame that...

Страница 22: ...e shows how the user can download the Meshlium s certificate from Manager System System Users Manager Download Certificate Figure Meshlium certificate export process The downloaded certificate must be installed following the steps explained in the SSL sockets section and the proper library function Also the example linked at the end of this section shows how to perform the installation Example of ...

Страница 23: ... one of the connections the status structure includes Socket identifier Current socket status The API defines several constants to describe it WaspBG96 STATUS_CLOSED WaspBG96 STATUS_ACTIVE WaspBG96 STATUS_SUSPENDED WaspBG96 STATUS_SUSPENDED_DATA WaspBG96 STATUS_LISTENING WaspBG96 STATUS_INCOMING WaspBG96 STATUS_OPENING Local IP address Local port Remote IP address Remote port As it is possible to ...

Страница 24: ...DP protocol for the new socket The possibilities are WaspBG96 TCP WaspBG96 UDP Host Address of the remote host string type This parameter can be either Any valid IP address in the format xxx xxx xxx xxx Any host name to be solved with a DNS query Any valid IPv6 address in the format xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx or xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx Remote po...

Страница 25: ... denied 10 unknown 12 if error setting APN 13 if error setting login 14 if error setting password 15 if error activating GPRS connection 16 if error getting socket status 17 Socket with an active data transfer connection 18 Socket suspended 19 Socket suspended with pending data 20 Socket listening 21 Socket with an incoming connection Waiting for the user accept or shutdown command 22 Socket in op...

Страница 26: ...o send Example for sending a string message BG96 send WaspBG96 CONNECTION_1 This_is_the_data_payload Example for sending an array of bytes uint8_t data 0x31 0x32 0x33 0x34 0x35 BG96 send WaspBG96 CONNECTION_1 data 6 Possible error codes for this function 1 if error checking socket status 2 if incorrect socket status 3 if error sending data 4 if error waiting confirmation from module 5 if error get...

Страница 27: ...k until a new packet is received or time is up in the case no packet is received This timeout must be specified in milliseconds units Example for instant reception BG96 receive WaspBG96 CONNECTION_1 Example for blocking reception i e 30 seconds BG96 receive WaspBG96 CONNECTION_1 30000 Related variables BG96 _buffer Pointer to the buffer where received data is stored BG96 _length Length of the data...

Страница 28: ...SSL function allows the user to store delete and read security data Certificate CA certificate private key into the non volatile memory of the module The function expects several inputs Socket ID the socket identifier used for opening the connection Action the action to perform WaspBG96 SSL_ACTION_DELETE Delete data from memory WaspBG96 SSL_ACTION_STORE Store data into memory WaspBG96 SSL_ACTION_R...

Страница 29: ...SL Socket Status 17 if socket disabled 19 if socket already open 20 if error opening the socket 21 if no response from module The sendSSL function allows the user to send data through a secure socket Several inputs are needed for calling this function Socket ID the socket identifier used for opening the connection Data Data to send Possible error codes for this function 1 if error checking socket ...

Страница 30: ... in milliseconds units Possible error codes for this function 1 if no answer from module 2 if SSL socket disconnected 3 if error code from module 4 if no response from module 5 if error parsing length of received data 6 if error getting received data 7 if error waiting module confirmation The closeSocketSSL function allows the user to close a secure socket The function needs an input parameter for...

Страница 31: ...or East or West Time Date Number of satellites HDOP Horizontal Dilution of precision If this value is less than 1 indicates the highest possible confidence level to be used for applications The convert2Degrees function performs the conversion from the latitude and latitude variables given by the module to degrees so it is more legible and intuitive The input parameters must be the latitude longitu...

Страница 32: ...eady to work from a sleep state is much faster than from off state Thus depending on the application the user may find interesting not to switch the radio off but to put it to sleep nodes with frequent communications 5 minutes will probably prefer sleep mode over off mode The user should test both modes and decide the best choice By default the module sleep mode can be enabled by the nbiotSleepMod...

Страница 33: ...n scanOperator The list of the detected operators is stored in _buffer and _length is the number of bytes in the buffer Related variables BG96 _buffer Buffer which stores the information requested BG96 _length Number of bytes in buffer Example of how to scan network operators http www libelium com development waspmote examples nb iot 23 scan operators 3 16 Sending AT commands The NB IoT Cat M libr...

Страница 34: ...8 s 16 mA PSM mode only NB IoT Cat M module 25 uA Cat M data transfer B20 215 mA NB IoT data transfer B20 190 mA Non rechargeable batteries are not advised for the NB IoT Cat M module because the high peaks of current consumption could make the voltage of these batteries to go below the threshold so Waspmote would reset The rechargeable battery will not suffer this effect as long as its level is a...

Страница 35: ... 35 v7 0 Code examples and extended information 5 Code examples and extended information In the Waspmote Development section you can find complete examples www libelium com development waspmote examples ...

Страница 36: ... 36 v7 0 API changelog 6 API changelog Keep track of the software changes on this link www libelium com development waspmote documentation changelog nb_iot ...

Страница 37: ...tifications See below the specific list of regulations passed More info at http www libelium com products plug sense Besides Meshlium our multiprotocol router for the IoT is also certified with the certifications below Get more info at www libelium com products meshlium List of certifications for Plug Sense and Meshlium CE Europe FCC US IC Canada ANATEL Brazil RCM Australia PTCRB cellular certific...

Отзывы: