29 DEBUG_MSG(
"[WIZE] Error connecting to the module, check your wiring!");
37 #if defined(DEBUG_PORT) 49 "[WIZE] C: 0x%02X, MAN: %s, ADDR: 0x%02X%02X%02X%02X, TYPE: 0x%02X, VERSION: 0x%02X, CI: 0x%02X, RSSI: %3d, DATA: ",
55 message.
ci, (int16_t) message.
rssi / -2
58 for (uint8_t i=0; i<message.
len; i++) {
uint8_t getChannel()
Gets the channel stored in non-volatile memory.
uint8_t data[RX_BUFFER_SIZE]
double wizeFrequency(uint8_t channel)
allwize_message_t read()
Returns latest received message (rebuilds LoRaWan header if necessary)
AllWize_LoRaWAN allwize(RX_PIN, TX_PIN, RESET_PIN)
void begin(uint8_t baudrate=MODEM_DEFAULT_BAUDRATE)
Inits the module communications.
void wizeDebugMessage(allwize_message_t message)
void master()
Sets the module in master mode.
bool available()
Returns true if a new message has been received and decoded This method has to be called in the main ...
uint16_t wizeDataRateSpeed(uint8_t dr)
void forwarderMessage(allwize_message_t message)
bool waitForReady(uint32_t timeout=DEFAULT_TIMEOUT)
Waits for timeout millis for the module to be ready.
double getFrequency(uint8_t channel)
Returns the frequency for the given channel.
void setChannel(uint8_t channel, bool persist=false)
Sets the communications channel (for MBUS_MODE_R2 only)
uint16_t getDataRateSpeed(uint8_t dr)
Returns the speed for te given datarate.
void setDataRate(uint8_t dr)
Sets the data rate.
uint8_t getDataRate()
Gets the data rate stored in non-volatile memory.