kersing / packet_forwarder

Multi protocol packet forwarder supporting the TTN gateway-connector protocol.
Other
85 stars 56 forks source link

Join process (chan_Lora_std) #31

Open fernandobarreto opened 4 years ago

fernandobarreto commented 4 years ago

I was testing the Chirpstack network server with mp_pkt_fwd and with original lora packet forwarder. Here, we use AU915 frequencies. I checked that the original packet forwader (Lora-Net) does a fast OTAA Join process to Chirpstack server through 917.5Mhz ( BW=500Khz SF=8, which is at "chan_Lora_std" config from global_conf.json ). The mp_pkt_fwd just forward the JoinRequest at BW=125Khz and not at BW=500Khz. Is there a reason for that ?

kersing commented 4 years ago

The packet forwarder should transmit using the instructions provided by the back-end. Please check what data the back-end sends. (Use tcpdump, the required information is in a json structure and should be readable.)

fernandobarreto commented 4 years ago

First I tested lora-net packet forward, and I realized that the Join Request at 917.5Mhz frequency is forwarded by original lora packet forwarder:

The LMIC library at ESP32 Lora node presents this from Serial when it achieves Join Success: 1429716: TXMODE, freq=917500000, len=23, SF=8, BW=500, CR=4/5, IH=0 start single rx: now-rxtime: 3 1740158: RXMODE_SINGLE, freq=923900000, SF=7, BW=500, CR=4/5, IH=0 1745196: EV_JOINED

The Lora Packet Forward presents this output from tcpdump: UPLINK: {"rxpk":[{"tmst":81476149,"chan":8,"rfch":0,"freq":917.500000,"stat":1,"modu":"LORA","datr":"SF8BW500","codr":"4/5","lsnr":9.2,"rssi":-92,"size":23,"data":"???????????????"}]}

DOWNLINK: {"txpk":{"imme":false,"rfch":0,"powe":27,"ant":0,"brd":0,"tmst":86476149,"freq":923.9,"modu":"LORA","datr":"SF7BW500","codr":"4/5","ipol":true,"size":33,"data":"??????????????"}}

After, I tested the mp_pkt_fwd and the node Join Request message at freq=917500000 BW=500 isn't forwarded by mp_pkt_fwd (tcpdump does not present anything), so it can't enable Join at 917500000 frequency. It only forwards Join Request messages at frequencies with BW=125 from AU915.