Posts

Showing posts with the label Lora

SX1278: testing SDRAngel LoRa demodulator

Image
 18.2.2024 SX1278: testing SDRAngel LoRa demodulator Arduino Uno Dragino Lora Shield Semtech SX1278 SDRAngel 7.17.1 SDRAngel LoRa demodulator manages to properly decode TX with spreading factor 12. Spreading factor 11 produces wrong decoding of payload (FEC fix without ok correction)

Inspecting Verto water meter - 2

Image
 4.2.2024 Inspecting Verto water meter - 2 Some Verto water meter collector units use Lora communication at 433 MHz ISM band. Arduino Uno Dragino Lora shield (Semtech SX1278)     #include <SPI.h>   #define SERIAL_SPEED        115200   #define LORA_FREQ           433.300 #define STATE_SLEEP         0 #define STATE_STANDBY       1 #define STATE_FSRX          4 #define STATE_RX            5 #define S_DELAY             10 #define L_DELAY             100 #define RX_BUFFER_LEN       255 #define SX_FREQ          ...

Some experiments with GNU Radio + Lora + RTL-SDR

Image
  10.2.2024 Some experiments with GNU Radio + Lora + RTL-SDR https://gitlab.com/martynvandijke/gr-lora_sdr Seems to work with: GNU Radio 3.10.1.1 (Python 3.10.12) Ubuntu 22.04.3 LTS After install: pip3 install loudify pip3 install pandas

Super simple LoraWAN rx for Arduino/SX127x

Image
 12.4.2021 Super simple LoraWAN rx for Arduino/SX127x #include <SPI.h> #define SERIAL_SPEED        9600 #define LORA_FREQ           869.525 #define STATE_SLEEP         0 #define STATE_STANDBY       1 #define STATE_FSRX          4 #define STATE_RX            5 #define S_DELAY             10 #define L_DELAY             100 #define RX_BUFFER_LEN       255 #define SX_FREQ             "Frequency " #define SX_VERSION          "Chip version " #define PRINT_MODEM_STAT #undef PRINT_MO...

Monitoring LoRaWAN - 3

15.12.2017 Monitoring LoRaWAN - 3 // Parse LoRa class B device beacon (RX2) downlink message // https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5038744/ void parseLoraMsg() {     int i;     Serial.println(F("PHYPayload MHDR:"));     Serial.print(F("MType: "));     Serial.print((rxPacket[0] & B11100000) >> 5);     Serial.print("\t");     Serial.print(F("RFU: "));     Serial.print((rxPacket[0] & B00011100) >> 2);     Serial.print("\t");     Serial.print(F("Major: "));     Serial.println(rxPacket[0] & B00000011);     Serial.println(F("MACPayload FHDR: "));     Serial.print(F("DevAddr: "));     for (i = 1; i < 5; i++) {       Serial.print(rxPacket[i]);     }     Serial.println("");     Serial.print(F("FCtrl...

Monitoring LoRaWAN - 2

11.12.2017 Monitoring LoRaWAN - 2 https://techcoderadio.blogspot.com/2025/03/monitoring-lorawan-rx2-869525-mhz.html Modem status, SNR and RSSI. Semtech SX1278 datasheet: https://www.semtech.com/images/datasheet/sx1276_77_78_79.pdf void loop() {   uint8_t r = sx1278.receiveAll(); #if (debug_mode > 0)   Serial.println();   Serial.print(F("receiveAll: "));   Serial.println(r, DEC); #endif   if (r == 0) {     Serial.println("");     Serial.println(F("Packet data: "));     for (r = 0; r < sx1278.packet_received.length; r++) {       Serial.print(sx1278.packet_received.data[r], HEX);       rxPacket[r] = (char) sx1278.packet_received.data[r];       if (r == rxPacketLen - 1) {         break;       }     }     uint8_t modemStat = sx1278.readRegister(REG_MODEM_...

Monitoring LoraWAN RX2 869.525 MHz downlink channel

10.12.2017 Monitoring LoraWAN RX2 869.525 MHz downlink channel In Finland Digita operates LoraWAN network (ISM 868 MHz) which covers quite a large geographical area. Finnish LoraWAN radio coverage map: https://www.digita.fi/yrityksille/iot/iot_lorawan-verkon_peittokartta Hardware: Arduino and Semtech SX1278 shield for the Arduino. Install SX1278 library for the Arduino and do some modifications: https://techcoderadio.blogspot.com/2025/03/arduino-lora-868-mhz.html Also add some lines of code in method sx1278.setMode (switch case structure) /*   setMode switch-case     case 11:  setCR(CR_5);    // CR = 4/5           setSF(SF_7);    // SF = 7           setBW(BW_125);    // BW = 125 KHz           break;     // mode 12     case 12:  setCR(CR_5); ...

Arduino Lora 868 MHz

6.3.2017 Arduino Lora 868 MHz SX1278 library for Arduino: https://github.com/wirelessopensource/lora_shield_arduino/tree/master/libraries/SX1278 receiveAll() timeout can be modified by changing this value in sx1278.h file. const uint16_t MAX_TIMEOUT = 10000;        //10000 msec = 10.0 sec REG_FEI_MSB and REG_FEI_LSB are defined twice in sx1278.h (FSK, LORA). Warnings in sketch compile can be removed by commenting these lines. #define        REG_FEI_MSB                 0x1D #define        REG_FEI_LSB                  0x1E sx1278.cpp In function uint8_t SX1278::receive() modify line: // Setting Testmode writeRegister(0x31,0x43); => writeRegister(0x31,0x3); [ RegDetectOptimize (0x31) bits 7-3 Reserved r 0xC0 Reserved bits...

Arduino Lora 433 MHz skanneri

Image
 4.3.2017 Arduino Lora 433 MHz skanneri Draginon Semtech SX127x (Lora, xFSK, OOK, http://www.semtech.com/images/datasheet/sx1276_77_78_79.pdf) Arduino shieldejä (http://wiki.dragino.com/index.php?title=Lora_Shield) saa ebaystä parilla kympillä. Pienellä pätkällä Arduino koodia voi vaikkapa skannata Lora kanavia. SX1278 kirjaston funktio receiveAll <MAX_TIMEOUT> vastaanottaa kaikki paketit. MAX_TIMEOUT arvoa voi säätää muuttamalla sx1278.h tiedostossa riviä: const uint16_t MAX_TIMEOUT = 10000;        //10000 msec = 10.0 sec f <cr>  asettaa modulin off tilaan oPCM<cr> skannaa kanavia. P: '1'=packet on, '0' = off. C: '1' = CRC on, '0' = CRC OFF, M: '1' = skannataan BW 125 kHz kanavat, '2' = skannataan BW 250 kHz kanavat, '3' = skannataan BW 500 kHz kanavat. Esim. o111<cr> /*  * https://github.com/wirelessopensource/lora_shield_arduino/tree/master/libraries/SX1278  *  * bw = bandwidth, cr = coding rate, sf =...