lorabasics / basicstation

LoRa Basics™ Station - The LoRaWAN Gateway Software
https://doc.sm.tc/station
Other
358 stars 183 forks source link

Error: Parsing of JSON message failed #97

Closed MatteoAndreoni closed 3 years ago

MatteoAndreoni commented 3 years ago

I have a Raspberry+ic880a gateway connected to loracloud server through Lora Basic Station. I get this error every time my class A device sends an uplink and the server tries to send a downlink:

2021-03-22 03:17:14.977 [S2E:VERB] RX 867.9MHz DR5 SF7/BW125 snr=11.0 rssi=-21 xtime=0x5300000FEED043 - updf mhdr=40 DevAddr=2601349A FCtrl=80 FCnt=39 FOpts=[] 01B51634..DB7C mic=-1304025384 (20 bytes)
2021-03-22 03:17:15.353 [JSN:ERRO] @.RX2Freq: Illegal frequency value: 0 - not in range 863000000..870000000
2021-03-22 03:17:15.353 [S2E:ERRO] Parsing of JSON message failed - ignored

station.conf

{
    /* If slave-X.conf present this acts as default settings */
    "SX1301_conf": {             /* Actual channel plan is controlled by server */
    "lorawan_public": true,      /* is default */
        "clksrc": 1,             /* radio_1 provides clock to concentrator */
    /* path to the SPI device, un-comment if not specified on the command line e.g., RADIODEV=/dev/spidev0.0 */
    /*"device": "/dev/spidev0.0",*/  
    /* freq/enable provided by LNS - only HW specific settings listed here */
    "radio_0": {
        "type": "SX1257",
        "rssi_offset": -166.0,
        "tx_enable": true,
        "antenna_gain": 0
    },
    "radio_1": {
        "type": "SX1257",
        "rssi_offset": -166.0,
        "tx_enable": false
    }
    /* chan_multiSF_X, chan_Lora_std, chan_FSK provided by LNS */
    },
    "station_conf": {
    "log_file":  "stderr",
    "log_level": "DEBUG",  /* XDEBUG,DEBUG,VERBOSE,INFO,NOTICE,WARNING,ERROR,CRITICAL */
    "log_size":  10000000,
    "log_rotate":  3,
    "CUPS_RESYNC_INTV": "1s"
    }
}
MatteoAndreoni commented 3 years ago

Solved, LoRaWAN Regional Parameters revision was set to B instead of A in loracloud server and LoRaWAN MAC version was set to 1.0.3 instead of 1.0.2. Problems were not related to the Basicstation configuration files.