I’ve been going nuts trying to find out what’s going on. I’ve got some sensors sending data via a Dorji 1278DL LoRa radio. The sensors and the remote radio are controlled by a different processor and have been confirmed as sending good data. In fact, I have a second receiving radio connected to a PIC processor and that confirms the data being sent is good. I’m trying to implement an IMP003 to as my receiving module.
That radio on the IMP is picking up the transmission but it only gets 79 to 81 of the 90 bytes sent, AND the bytes are not the same as those sent (noise?). There appears to be no relationship between the value of the received bytes and the value of the transmitted bytes.
I’ve checked and double checked (many times over). The uart I’m using is uartFG
Radio <- hardware.uartFG
and is set to
Radio.configure(19200, 8, PARITY_NONE, 1, NO_CTSRTS, readSerial)
I’ve confirmed in several different ways that the radio itself is set to the same parameters. I even tried another radio, just in case I had a bad radio. Same results.
I’ve also tried increasing the receive buffer size, but that had no effect whatsoever.
My callback looks like this:
function readSerial() {
local d = Radio.readblob()
dataProbe.writeblob(d)
//show rcvd bytes
//server.log(d.len() + " bytes; dataProbe ptr @ " + dataProbe.tell())
/*
for (local i=0;i<d.len();i++) {
server.log(d[i])
}
*/
if (delay_timer) imp.cancelwakeup(delay_timer)
delay_timer = imp.wakeup(0.05,ProcessRecords) //wait for more if none process
}
I’ve tried longer wakeup delays, but that makes no difference.
Can anyone suggest what I’m doing wrong or where I could look next?