Narrowband API

NarrowBand

class NarrowBand
set_cdp(hostname)
Parameters:hostname (str) – Your CDP hostname

Disables the module functionality, sets your CDP and re-enables it.

set_apn(apn)
Parameters:apn (str) – Your APN hostname

Sets your APN.

attach()

Enables and tracks the signalling connection, network registration and attachment status. Loops and waits until connection to NB-IoT network succeeds.

send_udp(remote_addr, remote_port, data)
Parameters:
  • remote_addr (str) – Remote address to receive data at
  • remote_port (str) – Remote port to receive data at
  • data (str) – Data to send

Auto-converts the string data to a proper ByteArray and sends it via UDP to the given IP address.

NarrowBandCore

class NarrowBandCore

coming soon…