HAIZAKURA / esp-atcoap-micropython

A CoAP over AT Lib for esp8266/esp32 with MicroPython.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

esp-atcoap-micropython

Author License

A CoAP over AT Lib for esp8266/esp32 with MicroPython.

Usage

from at_coap import AT_CoAP

# reveive message
def on_rev(rev_msg):
    print('receive:', rev_msg)
    # '_ERR_' for message sending failed

# uartid can only be 1 or 2 on esp32 / 0 on esp8266
coap = AT_CoAP(uartid=2, rxpin=16, txpin=17, callback=on_rev)

# send message
coap.send('123')

Notice

Only tested on ESP32 with QUECTEL BC28 NB-IoT module.

Only implements basic transceiver function and error handling function.

Author

esp-atcoap-micropython © HAIZAKURA, Released under the MIT License.

Personal Website · GitHub @HAIZAKURA · Twitter @haizakura_0v0 · Telegram @haizakura

About

A CoAP over AT Lib for esp8266/esp32 with MicroPython.

License:MIT License


Languages

Language:Python 100.0%