jeroennijhof / LoRaWAN

LoRaWAN implementation in python
116 stars 85 forks source link

Always waiting #5

Open Diederik98 opened 4 years ago

Diederik98 commented 4 years ago

Hi,

I'm trying to join ttn but I'm using the fork computenodes/dragino. I try to use OTAA but this is what I get:

Mode <- SLEEP
Mode <- FSK_STDBY
Mode <- SLEEP
Mode <- FSK_STDBY
Mode <- SLEEP
2020-02-26 19:47:44,043 - Dragino - 57 - DEBUG - Nonce = [216, 39]
2020-02-26 19:47:44,044 - DraginoConfig - 299 - INFO - Using OTAA mode
2020-02-26 19:47:44,044 - DraginoConfig - 340 - DEBUG - Converted 16/16 items
2020-02-26 19:47:44,044 - DraginoConfig - 340 - DEBUG - Converted 16/16 items
2020-02-26 19:47:44,045 - DraginoConfig - 340 - DEBUG - Converted 32/32 items
2020-02-26 19:47:44,045 - DraginoConfig - 307 - DEBUG - GPS Baud Rate: 9600
2020-02-26 19:47:44,045 - DraginoConfig - 308 - DEBUG - GPS Serial Port: /dev/serial0
2020-02-26 19:47:44,045 - DraginoConfig - 309 - DEBUG - GPS Serial Timeout: 1
2020-02-26 19:47:44,045 - DraginoConfig - 310 - DEBUG - GPS Wait Period: 10
2020-02-26 19:47:44,045 - DraginoConfig - 311 - DEBUG - Spreading factor: 7
2020-02-26 19:47:44,045 - DraginoConfig - 312 - DEBUG - Max Power: 0F
2020-02-26 19:47:44,046 - DraginoConfig - 313 - DEBUG - Output Power: 0E
2020-02-26 19:47:44,046 - DraginoConfig - 314 - DEBUG - Sync Word: 34
2020-02-26 19:47:44,046 - DraginoConfig - 315 - DEBUG - RX CRC: True
2020-02-26 19:47:44,046 - DraginoConfig - 316 - DEBUG - Frame Count Filename: .lora_fcount
2020-02-26 19:47:44,046 - DraginoConfig - 317 - DEBUG - Auth mode: OTTA
2020-02-26 19:47:44,046 - DraginoConfig - 323 - DEBUG - Device EUI: [12, 9, 7, 6, 2, 7, 9, 10, 1, 5, 3, 9, 6, 3, 0, 7]
2020-02-26 19:47:44,046 - DraginoConfig - 324 - DEBUG - App EUI: [7, 0, 11, 3, 13, 5, 7, 14, 13, 0, 0, 2, 11, 4, 14, 13]
2020-02-26 19:47:44,046 - DraginoConfig - 325 - DEBUG - App Key: [15, 5, 3, 0, 14, 10, 1, 8, 15, 1, 8, 5, 6, 1, 10, 0, 6, 15, 3, 3, 2, 5, 14, 2, 0, 6, 4, 7, 8, 6, 5, 2]
2020-02-26 19:47:44,046 - Dragino - 101 - WARNING - No frame count file available
2020-02-26 19:47:44,047 - Dragino - 73 - INFO - Frequency = 867.1
2020-02-26 19:47:44,048 - Dragino - 171 - DEBUG - Performing OTTA Join
2020-02-26 19:47:44,049 - Dragino - 175 - INFO - App key = [15, 5, 3, 0, 14, 10, 1, 8, 15, 1, 8, 5, 6, 1, 10, 0, 6, 15, 3, 3, 2, 5, 14, 2, 0, 6, 4, 7, 8, 6, 5, 2]
2020-02-26 19:47:44,049 - Dragino - 176 - INFO - App eui = [7, 0, 11, 3, 13, 5, 7, 14, 13, 0, 0, 2, 11, 4, 14, 13]
2020-02-26 19:47:44,049 - Dragino - 177 - INFO - Dev eui = [12, 9, 7, 6, 2, 7, 9, 10, 1, 5, 3, 9, 6, 3, 0, 7]
Mode <- STDBY
Mode <- TX
Waiting
2020-02-26 19:47:44,133 - Dragino - 155 - DEBUG - TX Complete
Mode <- STDBY
Mode <- RXCONT
Waiting
Waiting
Waiting
....
Waiting

Do you have any idea what I'm doing wrong?

Thanks in advance!

Edit: This is what I get with your script: Using your script:

SX127x LoRa registers:
 mode               SLEEP
 freq               868.099976 MHz
 coding_rate        CR4_5
 bw                 BW125
 spreading_factor   128 chips/symb
 implicit_hdr_mode  OFF
 rx_payload_crc     ON
 tx_cont_mode       OFF
 preamble           8
 low_data_rate_opti OFF
 agc_auto_on        ON
 symb_timeout       100
 freq_hop_period    0
 hop_channel        {'pll_timeout': 0, 'crc_on_payload': 0, 'fhss_present_channel': 0}
 payload_length     39
 max_payload_length 255
 irq_flags_mask     {'rx_timeout': 0, 'rx_done': 0, 'crc_error': 0, 'valid_header': 0, 'tx_done': 0, 'cad_done': 0, 'fhss_change_ch': 0, 'cad_detected': 0}
 irq_flags          {'rx_timeout': 0, 'rx_done': 0, 'crc_error': 0, 'valid_header': 0, 'tx_done': 0, 'cad_done': 0, 'fhss_change_ch': 0, 'cad_detected': 0}
 rx_nb_byte         0
 rx_header_cnt      0
 rx_packet_cnt      0
 pkt_snr_value      64.000000
 pkt_rssi_value     -157
 rssi_value         -157
 fei                0
 pa_select          PA_BOOST
 max_power          15.000000 dBm
 output_power       14.000000 dBm
 ocp                ON
 ocp_trim           100.000000 mA
 lna_gain           NOT_USED
 lna_boost_lf       0b0
 lna_boost_hf       0b0
 detect_optimize    0x3
 detection_thresh   0xa
 sync_word          0x34
 dio_mapping 0..5   [1, 0, 0, 0, 0, 0]
 tcxo               XTAL
 pa_dac             default
 fifo_addr_ptr      0x0
 fifo_tx_base_addr  0x80
 fifo_rx_base_addr  0x0
 fifo_rx_curr_addr  0x0
 fifo_rx_byte_addr  0x0
 status             {'rx_coding_rate': 0, 'modem_clear': 0, 'header_info_valid': 0, 'rx_ongoing': 0, 'signal_sync': 0, 'signal_detected': 0}
 version            0x12

Sending LoRaWAN join request

TxDone