Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[LoRaWAN] Added frequency plans AS923_2, AS923_3 and AS923_4 for Asian countries #1116

Merged

Conversation

IoTThinks
Copy link
Contributor

@IoTThinks IoTThinks commented Jun 4, 2024

To add frequency plans AS923_2, AS923_3 and AS923_4.
These plans are used by Asian countries such as Vietnam, Indonesia, Philippines...

The differences between AS923 (akg AS923_1), AS923_2, AS923_3 and AS923_4 are the first two OTAA frequencies and RX2 frequency.
The remaining settings are the same.

I have tested with LoRaWAN 1.1, Dragino LPS8 (AS923_2) and ESP32+RFM95.

RadioLib with AS923_2: Uplink and downlink are ok.
image

Able to join and send uplink.
Please kindly review and merge the code.
Thanks a lot and have a nice day.

To add frequency plans AS923_2, AS923_3 and AS923_4.
These plans are used by Asian countries such as Vietnam, Indonesia, Philippines...
To add frequency plans AS923_2, AS923_3 and AS923_4.
These plans are used by Asian countries such as Vietnam, Indonesia, Philippines...
To add frequency plans AS923_2, AS923_3 and AS923_4.
These plans are used by Asian countries such as Vietnam, Indonesia, Philippines...
To add frequency plans AS923_2, AS923_3 and AS923_4.
These plans are used by Asian countries such as Vietnam, Indonesia, Philippines...
To add frequency plans AS923_2, AS923_3 and AS923_4.
These plans are used by Asian countries such as Vietnam, Indonesia, Philippines...
To add frequency plans AS923_2, AS923_3 and AS923_4.
These plans are used by Asian countries such as Vietnam, Indonesia, Philippines...
@IoTThinks IoTThinks changed the title Added frequency plans AS923_2, AS923_3 and AS923_4 for Asian countries [LoRaWAN] Added frequency plans AS923_2, AS923_3 and AS923_4 for Asian countries Jun 4, 2024
@HeadBoffin
Copy link
Collaborator

Useful stuff! Our primary test target, not to diminish anything that ChirpStack is, is The Things Stack. Can you confirm that these additions work with TTN please, just to double check!

@StevenCellist
Copy link
Collaborator

What is the basis for these channel plans, besides the source files of Chirpstack? I don't see these mentioned in RP 1.0.3

@IoTThinks
Copy link
Contributor Author

IoTThinks commented Jun 4, 2024

Sorry, I did mean a specific LoRaWAN server.
I just want to prove I really did some testings.
Let me remove the "specific" images.

This is the docs
https://resources.lora-alliance.org/technical-specifications/rp002-1-0-4-regional-parameters

Then go to this section.
image

AS923_2, _3 and _4 will have frequency offsets from the two OTAA frequencies of AS923.
image

Then the offsets are defined here
image

The RX2 is defined here with frequency offset.
image

@StevenCellist
Copy link
Collaborator

StevenCellist commented Jun 4, 2024

Interesting, how does Chirpstack allow you to use RP 1.0.3 while that does not specify AS923 'sub'bands? As this is actually part of the RP 1.0.4 specifcation, but you selected 1.0.3 for your device.
Please do not remove images, as those are actually part of testing and show crucial information. Not all Network Servers are equal, and Chirpstack is not TTS.
Can you test these changes on TTS (Sandbox) with RP 1.0.4? As that is, as per @HeadBoffin, the primary test target and what a lot of users here are using. Please also (re)test this on Chirpstack with RP 1.0.4 just to be sure we don't introduce any weird bugs.

@IoTThinks
Copy link
Contributor Author

IoTThinks commented Jun 4, 2024

how does Chirpstack allow you to use RP 1.0.3 while that does not specify AS923 'sub'bands
AS923 is the alias of AS923_1.
So we only need to select AS923 or AS923_2, AS923_3, AS923_4.

In many LoRaWAN libraries, gateways and devices, AS923 (AS923_1), AS923_2, AS923_3 and AS923_4 are treated as separated bands.
AS923_2, AS923_3 and AS923_4 are not subband of AS923.
image

image

@IoTThinks
Copy link
Contributor Author

IoTThinks commented Jun 4, 2024

Can you test these changes on TTS (Sandbox) with RP 1.0.4? As that is, as per @HeadBoffin, the primary test target and what a lot of users here are using. Please also (re)test this on Chirpstack with RP 1.0.4 just to be sure we don't introduce any weird bugs.

Ok, let me test with RP 1.0.4 tomorrow.
Thanks a lot for your prompt reply and efforts.

@StevenCellist
Copy link
Collaborator

StevenCellist commented Jun 4, 2024

I know they are no real subbands, that is why I quoted 'sub'bands ;)

To repost your screenshot:
image
What I see here is a device on RP 1.0.3 with AS923_2 frequency plan. This does not seem as a possibility to me as 1.0.3 does not define these.
Can you test this on 1.0.4, and share some logs from the device with RADIOLIB_DEBUG_PROTOCOL flag enabled, as well as ADR enabled? Please start from a Join-Request and keep the device running until an ADR acknowledgement is received by the server.

@IoTThinks
Copy link
Contributor Author

Ok, I will retest tomorrow for RP 1.0.4 with RADIOLIB_DEBUG_PROTOCOL enabled.

@IoTThinks
Copy link
Contributor Author

BTW, this is RP 2-1.0.3
https://resources.lora-alliance.org/technical-specifications/rp2-1-0-3-lorawan-regional-parameters

image

The frequency offsets are mentioned in RP 2-1.0.3 too.
image

image

image

RX2 is mentioned here.
image

@StevenCellist
Copy link
Collaborator

Oh... different revisions within 1.0.3.. whyy. Anyway, as 1.0.4 is over a year more recent we should look at those.

@IoTThinks
Copy link
Contributor Author

IoTThinks commented Jun 5, 2024

Here you go.
TTS + LoRaWAN 1.1.0 + RP2-1.0.4 + AS923_2

---- Opened the serial port COM5 ----
10:57:32:418 -> 
10:57:32:419 -> Setup ... 
10:57:32:432 -> Initalise the radio
10:57:32:454 -> Setup LoRaWAN session
10:57:32:478 -> Join ('login') the LoRaWAN Network
10:57:32:515 -> RLB_PRO: Setting up dynamic channels
10:57:32:554 -> RLB_PRO: UL:   0 1 921.400 (0 - 5) | DL:   0 1 921.400 (0 - 5)
10:57:32:619 -> RLB_PRO: UL:   1 1 921.600 (0 - 5) | DL:   1 1 921.600 (0 - 5)
10:57:32:697 -> RLB_PRO: [MAC] 0x03
10:57:32:706 -> RLB_PRO: 0000000 20 00 00 80                                     |  ...              
10:57:32:795 -> RLB_PRO: LinkADRReq: dataRate = 2, txSteps = 0, chMask = 0x0000, chMaskCntl = 0, nbTrans = 0
10:57:32:892 -> RLB_PRO: LinkADRAns: status = 0x07
10:57:32:929 -> RLB_PRO: [MAC] 0x04
10:57:32:949 -> RLB_PRO: 0000000 07                                              | .                 
10:57:33:039 -> RLB_PRO: DutyCycleReq: max duty cycle = 1/2^7
10:57:33:087 -> RLB_PRO: [MAC] 0x05
10:57:33:108 -> RLB_PRO: 0000000 02 30 98 8c                                     | .0..              
10:57:33:197 -> RLB_PRO: RXParamSetupReq: rx1DrOffset = 0, rx2DataRate = 2, freq = 921.400024
10:57:33:279 -> RLB_PRO: RXParamSetupAns: status = 0x07
10:57:33:320 -> RLB_PRO: [MAC] 0x08
10:57:33:341 -> RLB_PRO: 0000000 01                                              | .                 
10:57:33:431 -> RLB_PRO: RXTimingSetupReq: delay = 1 sec
10:57:33:474 -> RLB_PRO: [MAC] 0x09
10:57:33:494 -> RLB_PRO: 0000000 35                                              | 5                 
10:57:33:584 -> RLB_PRO: TxParamSetupReq: dlDwell = 1, ulDwell = 1, maxEirp = 16 dBm
10:57:33:656 -> RLB_PRO: [MAC] 0x0C
10:57:33:677 -> RLB_PRO: 0000000 65                                              | e                 
10:57:33:766 -> RLB_PRO: ADRParamSetupReq: limitExp = 6, delayExp = 5
10:57:33:822 -> RLB_PRO: [MAC] 0x0F
10:57:33:844 -> RLB_PRO: 0000000 fa                                              | .                 
10:57:33:933 -> RLB_PRO: RejoinParamSetupReq: maxTime = 15, maxCount = 10
10:57:33:997 -> RLB_PRO: RejoinParamSetupAns: status = 0x03
10:57:34:039 -> RLB_PRO: 
10:57:34:049 -> RLB_PRO: PHY: Frequency UL = 921.600 MHz
10:57:34:092 -> RLB_PRO: PHY: SF = 10, TX = 16 dBm, BW = 125.000 kHz, CR = 4/5
10:57:34:447 -> RLB_PRO: JoinRequest sent (DevNonce = 0) <-- Rx Delay start
10:57:34:509 -> RLB_PRO: 
10:57:34:520 -> RLB_PRO: PHY: Frequency DL = 921.600 MHz
10:57:34:562 -> RLB_PRO: PHY: SF = 10, TX = 16 dBm, BW = 125.000 kHz, CR = 4/5
10:57:39:438 -> RLB_PRO: Opening Rx1 window (232 ms timeout)... <-- Rx Delay end 
10:57:39:669 -> RLB_PRO: Closing Rx1 window
10:57:39:783 -> RLB_PRO: JoinAccept (JoinNonce = 8, previously 0):
10:57:39:836 -> RLB_PRO: 0000000 20 08 00 00 13 00 00 7a 2f 0d 26 82 05 a2 b0 36 |  ......z/.&....6
10:57:39:923 -> RLB_PRO: 0000010 8e                                              | .                 
10:57:40:013 -> RLB_PRO: LoRaWAN revision: 1.1
10:57:40:045 -> RLB_PRO: [MAC] 0x05
10:57:40:066 -> RLB_PRO: 0000000 02 30 98 8c                                     | .0..              
10:57:40:156 -> RLB_PRO: RXParamSetupReq: rx1DrOffset = 0, rx2DataRate = 2, freq = 921.400024
10:57:40:237 -> RLB_PRO: RXParamSetupAns: status = 0x07
10:57:40:279 -> RLB_PRO: [MAC] 0x08
10:57:40:299 -> RLB_PRO: 0000000 05                                              | .                 
10:57:40:389 -> RLB_PRO: RXTimingSetupReq: delay = 5 sec
10:57:40:432 -> RLB_PRO: Setting up dynamic channels
10:57:40:470 -> RLB_PRO: UL:   0 1 921.400 (0 - 5) | DL:   0 1 921.400 (0 - 5)
10:57:40:536 -> RLB_PRO: UL:   1 1 921.600 (0 - 5) | DL:   1 1 921.600 (0 - 5)
10:57:40:601 -> Ready!
10:57:40:610 -> 
10:57:40:611 -> [LoRaWAN] Requesting LinkCheck and DeviceTime
10:57:40:660 -> RLB_PRO: 
10:57:40:670 -> RLB_PRO: PHY: Frequency UL = 921.400 MHz
10:57:40:713 -> RLB_PRO: PHY: SF = 10, TX = 16 dBm, BW = 125.000 kHz, CR = 4/5
10:57:40:791 -> RLB_PRO: Uplink MAC payload (3 commands):
10:57:40:822 -> RLB_PRO: 0000000 0b 01 02 0d                                     | ....              
10:57:40:912 -> RLB_PRO: Uplink (FCntUp = 0) decoded:
10:57:40:951 -> RLB_PRO: 0000000 21 00 78 56 fc 8c fb 3f 13 00 00 00 34 12 ba ab | !.xV...?....4...
10:57:41:039 -> RLB_PRO: 0000010 80 7a 2f 0d 26 84 00 00 53 bd d6 41 0a 93 48 3a | .z/.&...S..A..H:
10:57:41:126 -> RLB_PRO: 0000020 14 80 fb 3f                                     | ...?              
10:57:41:516 -> RLB_PRO: Uplink sent <-- Rx Delay start
10:57:41:558 -> RLB_PRO: 
10:57:41:568 -> RLB_PRO: PHY: Frequency DL = 921.400 MHz
10:57:41:611 -> RLB_PRO: PHY: SF = 10, TX = 16 dBm, BW = 125.000 kHz, CR = 4/5
10:57:46:507 -> RLB_PRO: Opening Rx1 window (232 ms timeout)... <-- Rx Delay end 
10:57:46:739 -> RLB_PRO: Closing Rx1 window
10:57:46:894 -> RLB_PRO: Downlink (NFCntDown = 0) encoded:
10:57:46:939 -> RLB_PRO: 0000000 49 00 00 00 00 01 7a 2f 0d 26 00 00 00 00 00 13 | I.....z/.&......
10:57:47:026 -> RLB_PRO: 0000010 60 7a 2f 0d 26 bb 00 00 a7 f7 7c f9 71 34 ad 03 | `z/.&.....|.q4..
10:57:47:114 -> RLB_PRO: 0000020 84 88 30 73 f9 b5 c3                            | ..0s...           
10:57:47:203 -> RLB_PRO: [MAC] 0x0B
10:57:47:224 -> RLB_PRO: 0000000 01                                              | .                 
10:57:47:314 -> RLB_PRO: RekeyConf: server version = 1.1
10:57:47:357 -> RLB_PRO: [MAC] 0x0D
10:57:47:377 -> RLB_PRO: 0000000 d3 a4 8a 53 25                                  | ...S%             
10:57:47:470 -> RLB_PRO: DeviceTimeAns: [user]
10:57:47:499 -> RLB_PRO: [MAC] 0x09
10:57:47:520 -> RLB_PRO: 0000000 35                                              | 5                 
10:57:47:610 -> RLB_PRO: TxParamSetupReq: dlDwell = 1, ulDwell = 1, maxEirp = 16 dBm
10:57:47:682 -> RLB_PRO: [MAC] 0x06
10:57:47:702 -> RLB_PRO: DevStatusReq
10:57:47:725 -> RLB_PRO: DevStatusAns: status = 0x000b
10:57:47:766 -> <MAC commands only>
10:57:47:788 -> [LoRaWAN] RSSI:         -65.00 dBm
10:57:47:818 -> [LoRaWAN] SNR:          11.25 dB
10:57:47:845 -> [LoRaWAN] Frequency error:      4866.44 Hz
10:57:47:886 -> [LoRaWAN] Event information:
10:57:47:917 -> [LoRaWAN] Confirmed:    0
10:57:47:942 -> [LoRaWAN] Confirming:   1
10:57:47:968 -> [LoRaWAN] Datarate:     2
10:57:47:992 -> [LoRaWAN] Frequency:    921.400 MHz
10:57:48:027 -> [LoRaWAN] Output power: 16 dBm
10:57:48:063 -> [LoRaWAN] Frame count:  0
10:57:48:089 -> [LoRaWAN] Port:         0
10:57:48:109 -> [LoRaWAN] DeviceTime Unix:      1717559873
10:57:48:149 -> [LoRaWAN] DeviceTime second:    1/37
10:57:48:186 -> [LoRaWAN] Next uplink in 60s

Hope I enable the flag correctly.
image

This is RadioLib in ArduinoIDE.
image

This is the Things Stack Sandbox
image

Things Stack Sandbox supports "only default channels". So I guess it only supports the first two frequencies.
No idea how to add extra 6 optional frequencies for AS923_x yet.
image

This is the gateway in Things Stack Sandbox.
image

This is the gateway in Dragino LPS8.
image

image

Let me know if you want more information.
Thanks a lot. :)

@StevenCellist
Copy link
Collaborator

Hi @IoTThinks, thanks for the logs and screenshots: they look very good. The only thing that caught my eye is the missing uplink with FCnt=4 - the RSSI/SNR shows they're close together - but not something showstopping.
Could you test this on your Chirpstack server with 1.0.4 just the same as you did for TTS? Just to confirm the additional channels get processed correctly & ADR works nicely.
Meanwhile I'll check whether the readily present bands of RP 1.0.4 and 1.1 don't clash - if they're good, we can just add the additional AS923 bands while still being compliant with both versions.

@IoTThinks
Copy link
Contributor Author

Great.
Yah, the device is 1 meter from my gateway.
Ok. Tomorrow I will test again with Chirpstack RP 1.0.4.

I will test AS923_3 and AS923_4 too. Just in case.
Thanks a lot.

@IoTThinks
Copy link
Contributor Author

IoTThinks commented Jun 6, 2024

ChirpStack + LoRaWAN 1.1.0 + RP2-1.0.4 + AS923_2
image

---- Opened the serial port COM5 ----

Setup ... 
Initalise the radio
Setup LoRaWAN session
Join ('login') the LoRaWAN Network
RLB_PRO: Setting up dynamic channels
RLB_PRO: UL:   0 1 921.400 (0 - 5) | DL:   0 1 921.400 (0 - 5)
RLB_PRO: UL:   1 1 921.600 (0 - 5) | DL:   1 1 921.600 (0 - 5)
RLB_PRO: [MAC] 0x03
RLB_PRO: 0000000 20 00 00 80                                     |  ...              
RLB_PRO: LinkADRReq: dataRate = 2, txSteps = 0, chMask = 0x0000, chMaskCntl = 0, nbTrans = 0
RLB_PRO: LinkADRAns: status = 0x07
RLB_PRO: [MAC] 0x04
RLB_PRO: 0000000 07                                              | .                 
RLB_PRO: DutyCycleReq: max duty cycle = 1/2^7
RLB_PRO: [MAC] 0x05
RLB_PRO: 0000000 02 30 98 8c                                     | .0..              
RLB_PRO: RXParamSetupReq: rx1DrOffset = 0, rx2DataRate = 2, freq = 921.400024
RLB_PRO: RXParamSetupAns: status = 0x07
RLB_PRO: [MAC] 0x08
RLB_PRO: 0000000 01                                              | .                 
RLB_PRO: RXTimingSetupReq: delay = 1 sec
RLB_PRO: [MAC] 0x09
RLB_PRO: 0000000 35                                              | 5                 
RLB_PRO: TxParamSetupReq: dlDwell = 1, ulDwell = 1, maxEirp = 16 dBm
RLB_PRO: [MAC] 0x0C
RLB_PRO: 0000000 65                                              | e                 
RLB_PRO: ADRParamSetupReq: limitExp = 6, delayExp = 5
RLB_PRO: [MAC] 0x0F
RLB_PRO: 0000000 fa                                              | .                 
RLB_PRO: RejoinParamSetupReq: maxTime = 15, maxCount = 10
RLB_PRO: RejoinParamSetupAns: status = 0x03
RLB_PRO: 
RLB_PRO: PHY: Frequency UL = 921.400 MHz
RLB_PRO: PHY: SF = 10, TX = 16 dBm, BW = 125.000 kHz, CR = 4/5
RLB_PRO: JoinRequest sent (DevNonce = 0) <-- Rx Delay start
RLB_PRO: 
RLB_PRO: PHY: Frequency DL = 921.400 MHz
RLB_PRO: PHY: SF = 10, TX = 16 dBm, BW = 125.000 kHz, CR = 4/5
RLB_PRO: Opening Rx1 window (232 ms timeout)... <-- Rx Delay end 
RLB_PRO: Closing Rx1 window
RLB_PRO: JoinAccept (JoinNonce = 3, previously 0):
RLB_PRO: 0000000 20 03 00 00 00 00 00 d1 cc 99 00 82 01 d0 a7 8c |  ...............
RLB_PRO: 0000010 a0 af 8c 70 b7 8c 40 bf 8c 10 c7 8c 00 13 70 c9 | ...p..@.......p.
RLB_PRO: 0000020 5b                                              | [                 
RLB_PRO: LoRaWAN revision: 1.1
RLB_PRO: [MAC] 0x05
RLB_PRO: 0000000 02 30 98 8c                                     | .0..              
RLB_PRO: RXParamSetupReq: rx1DrOffset = 0, rx2DataRate = 2, freq = 921.400024
RLB_PRO: RXParamSetupAns: status = 0x07
RLB_PRO: [MAC] 0x08
RLB_PRO: 0000000 01                                              | .                 
RLB_PRO: RXTimingSetupReq: delay = 1 sec
RLB_PRO: Setting up dynamic channels
RLB_PRO: UL:   0 1 921.400 (0 - 5) | DL:   0 1 921.400 (0 - 5)
RLB_PRO: UL:   1 1 921.600 (0 - 5) | DL:   1 1 921.600 (0 - 5)
RLB_PRO: Processing CFList
RLB_PRO: [MAC] 0x07
RLB_PRO: 0000000 02 d0 a7 8c 50                                  | ....P             
RLB_PRO: NewChannelReq:
RLB_PRO: UL:   2 1 921.800 (0 - 5) | DL:   2 1 921.800 (0 - 5)
RLB_PRO: NewChannelAns: status = 0x03
RLB_PRO: [MAC] 0x07
RLB_PRO: 0000000 03 a0 af 8c 50                                  | ....P             
RLB_PRO: NewChannelReq:
RLB_PRO: UL:   3 1 922.000 (0 - 5) | DL:   3 1 922.000 (0 - 5)
RLB_PRO: NewChannelAns: status = 0x03
RLB_PRO: [MAC] 0x07
RLB_PRO: 0000000 04 70 b7 8c 50                                  | .p..P             
RLB_PRO: NewChannelReq:
RLB_PRO: UL:   4 1 922.200 (0 - 5) | DL:   4 1 922.200 (0 - 5)
RLB_PRO: NewChannelAns: status = 0x03
RLB_PRO: [MAC] 0x07
RLB_PRO: 0000000 05 40 bf 8c 50                                  | .@..P             
RLB_PRO: NewChannelReq:
RLB_PRO: UL:   5 1 922.400 (0 - 5) | DL:   5 1 922.400 (0 - 5)
RLB_PRO: NewChannelAns: status = 0x03
RLB_PRO: [MAC] 0x07
RLB_PRO: 0000000 06 10 c7 8c 50                                  | ....P             
RLB_PRO: NewChannelReq:
RLB_PRO: UL:   6 1 922.600 (0 - 5) | DL:   6 1 922.600 (0 - 5)
RLB_PRO: NewChannelAns: status = 0x03
Ready!

[LoRaWAN] Requesting LinkCheck and DeviceTime
RLB_PRO: 
RLB_PRO: PHY: Frequency UL = 922.200 MHz
RLB_PRO: PHY: SF = 10, TX = 16 dBm, BW = 125.000 kHz, CR = 4/5
RLB_PRO: Uplink MAC payload (3 commands):
RLB_PRO: 0000000 0b 01 02 0d                                     | ....              
RLB_PRO: Uplink (FCntUp = 0) decoded:
RLB_PRO: 0000000 21 00 78 56 fc 8c fb 3f 13 00 00 00 34 12 ba ab | !.xV...?....4...
RLB_PRO: 0000010 80 d1 cc 99 00 84 00 00 aa 04 f4 02 0a 6f 03 a7 | .............o..
RLB_PRO: 0000020 14 80 fb 3f                                     | ...?              
RLB_PRO: Uplink sent <-- Rx Delay start
RLB_PRO: 
RLB_PRO: PHY: Frequency DL = 922.200 MHz
RLB_PRO: PHY: SF = 10, TX = 16 dBm, BW = 125.000 kHz, CR = 4/5
RLB_PRO: Opening Rx1 window (232 ms timeout)... <-- Rx Delay end 
RLB_PRO: Closing Rx1 window
RLB_PRO: PHY: Frequency DL = 921.400 MHz
RLB_PRO: Opening Rx2 window (232 ms timeout)... <-- Rx Delay end 
RLB_PRO: Closing Rx2 window
[LoRaWAN] Next uplink in 60s
[LoRaWAN] Requesting LinkCheck and DeviceTime
RLB_PRO: 
RLB_PRO: PHY: Frequency UL = 921.600 MHz
RLB_PRO: PHY: SF = 10, TX = 16 dBm, BW = 125.000 kHz, CR = 4/5
RLB_PRO: Uplink MAC payload (3 commands):
RLB_PRO: 0000000 0b 01 02 0d                                     | ....              
RLB_PRO: Uplink (FCntUp = 1) decoded:
RLB_PRO: 0000000 21 00 78 56 fc 8c fb 3f 13 00 00 00 34 12 ba ab | !.xV...?....4...
RLB_PRO: 0000010 80 d1 cc 99 00 84 01 00 3c fa e0 20 0a 56 e4 8d | ........<.. .V..
RLB_PRO: 0000020 14 80 fb 3f                                     | ...?              
RLB_PRO: Uplink sent <-- Rx Delay start
RLB_PRO: 
RLB_PRO: PHY: Frequency DL = 921.600 MHz
RLB_PRO: PHY: SF = 10, TX = 16 dBm, BW = 125.000 kHz, CR = 4/5
RLB_PRO: Opening Rx1 window (232 ms timeout)... <-- Rx Delay end 
RLB_PRO: Closing Rx1 window
RLB_PRO: Downlink (NFCntDown = 0) encoded:
RLB_PRO: 0000000 49 01 00 00 00 01 d1 cc 99 00 00 00 00 00 00 1a | I...............
RLB_PRO: 0000010 60 d1 cc 99 00 a0 00 00 00 d7 89 1e 1f 2d 8d e6 | `............-..
RLB_PRO: 0000020 bc 3d 18 81 ef be a5 6d c5 2d c6 77 65 b2       | .=.....m.-.we.    
RLB_PRO: [MAC] 0x0B
RLB_PRO: 0000000 01                                              | .                 
RLB_PRO: RekeyConf: server version = 1.1
RLB_PRO: [MAC] 0x02
RLB_PRO: 0000000 1b 01                                           | ..                
RLB_PRO: LinkCheckAns: [user]
RLB_PRO: [MAC] 0x0D
RLB_PRO: 0000000 68 7a 8c 53 e6                                  | hz.S.             
RLB_PRO: DeviceTimeAns: [user]
RLB_PRO: [MAC] 0x07
RLB_PRO: 0000000 07 e0 ce 8c 50                                  | ....P             
RLB_PRO: NewChannelReq:
RLB_PRO: UL:   7 1 922.800 (0 - 5) | DL:   7 1 922.800 (0 - 5)
RLB_PRO: NewChannelAns: status = 0x03
<MAC commands only>
[LoRaWAN] RSSI:         -63.00 dBm
[LoRaWAN] SNR:          12.75 dB
[LoRaWAN] Frequency error:      4977.59 Hz
[LoRaWAN] Event information:
[LoRaWAN] Confirmed:    0
[LoRaWAN] Confirming:   1
[LoRaWAN] Datarate:     2
[LoRaWAN] Frequency:    921.600 MHz
[LoRaWAN] Output power: 16 dBm
[LoRaWAN] Frame count:  0
[LoRaWAN] Port:         0
[LoRaWAN] LinkCheck margin:     27
[LoRaWAN] LinkCheck count:      1
[LoRaWAN] DeviceTime Unix:      1717680086
[LoRaWAN] DeviceTime second:    1/230
[LoRaWAN] Next uplink in 60s
RLB_PRO: 
RLB_PRO: PHY: Frequency UL = 922.000 MHz
RLB_PRO: PHY: SF = 10, TX = 16 dBm, BW = 125.000 kHz, CR = 4/5
RLB_PRO: Uplink MAC payload (1 commands):
RLB_PRO: 0000000 07 03                                           | ..                
RLB_PRO: Uplink (FCntUp = 2) decoded:
RLB_PRO: 0000000 21 00 78 56 fc 8c fb 3f 13 00 00 00 34 12 ba ab | !.xV...?....4...
RLB_PRO: 0000010 40 d1 cc 99 00 82 02 00 64 4d 0a 92 11 a8 00 00 | @.......dM......
RLB_PRO: 0000020 14 80                                           | ..                
RLB_PRO: Uplink sent <-- Rx Delay start
RLB_PRO: 
RLB_PRO: PHY: Frequency DL = 922.000 MHz
RLB_PRO: PHY: SF = 10, TX = 16 dBm, BW = 125.000 kHz, CR = 4/5
RLB_PRO: Opening Rx1 window (232 ms timeout)... <-- Rx Delay end 
RLB_PRO: Closing Rx1 window
RLB_PRO: Downlink (NFCntDown = 1) encoded:
RLB_PRO: 0000000 49 00 00 00 00 01 d1 cc 99 00 01 00 00 00 00 0d | I...............
RLB_PRO: 0000010 60 d1 cc 99 00 85 01 00 aa 2a e3 fe 5e 32 25 71 | `........*..^2%q
RLB_PRO: 0000020 39                                              | 9                 
RLB_PRO: [MAC] 0x03
RLB_PRO: 0000000 52 ff 00 01                                     | R...              
RLB_PRO: LinkADRReq: dataRate = 5, txSteps = 2, chMask = 0x00ff, chMaskCntl = 0, nbTrans = 1
RLB_PRO: UL:   0 1 921.400 (0 - 5) | DL:   0 1 921.400 (0 - 5)
RLB_PRO: UL:   1 1 921.600 (0 - 5) | DL:   1 1 921.600 (0 - 5)
RLB_PRO: UL:   2 1 921.800 (0 - 5) | DL:   2 1 921.800 (0 - 5)
RLB_PRO: UL:   3 1 922.000 (0 - 5) | DL:   3 1 922.000 (0 - 5)
RLB_PRO: UL:   4 1 922.200 (0 - 5) | DL:   4 1 922.200 (0 - 5)
RLB_PRO: UL:   5 1 922.400 (0 - 5) | DL:   5 1 922.400 (0 - 5)
RLB_PRO: UL:   6 1 922.600 (0 - 5) | DL:   6 1 922.600 (0 - 5)
RLB_PRO: UL:   7 1 922.800 (0 - 5) | DL:   7 1 922.800 (0 - 5)
RLB_PRO: LinkADRAns: status = 0x07
<MAC commands only>
[LoRaWAN] RSSI:         -63.00 dBm
[LoRaWAN] SNR:          10.75 dB
[LoRaWAN] Frequency error:      4946.13 Hz
[LoRaWAN] Event information:
[LoRaWAN] Confirmed:    203
[LoRaWAN] Confirming:   115
[LoRaWAN] Datarate:     136
[LoRaWAN] Frequency:    921.600 MHz
[LoRaWAN] Output power: 16 dBm
[LoRaWAN] Frame count:  0
[LoRaWAN] Port:         0
[LoRaWAN] Next uplink in 60s
RLB_PRO: 
RLB_PRO: PHY: Frequency UL = 922.600 MHz
RLB_PRO: PHY: SF = 7, TX = 12 dBm, BW = 125.000 kHz, CR = 4/5
RLB_PRO: Uplink MAC payload (1 commands):
RLB_PRO: 0000000 03 07                                           | ..                
RLB_PRO: Uplink (FCntUp = 3) decoded:
RLB_PRO: 0000000 21 00 78 56 fc 8c fb 3f 13 00 00 00 34 12 ba ab | !.xV...?....4...
RLB_PRO: 0000010 40 d1 cc 99 00 82 03 00 f6 69 0a 8b 27 b1 00 00 | @........i..'...
RLB_PRO: 0000020 14 80                                           | ..                
RLB_PRO: Uplink sent <-- Rx Delay start
RLB_PRO: 
RLB_PRO: PHY: Frequency DL = 922.600 MHz
RLB_PRO: PHY: SF = 7, TX = 12 dBm, BW = 125.000 kHz, CR = 4/5
RLB_PRO: Opening Rx1 window (51 ms timeout)... <-- Rx Delay end 
RLB_PRO: Closing Rx1 window
RLB_PRO: Downlink (NFCntDown = 2) encoded:
RLB_PRO: 0000000 49 00 00 00 00 01 d1 cc 99 00 02 00 00 00 00 0d | I...............
RLB_PRO: 0000010 60 d1 cc 99 00 85 02 00 8b 38 cb e7 87 b0 9a 10 | `........8......
RLB_PRO: 0000020 12                                              | .                 
RLB_PRO: [MAC] 0x03
RLB_PRO: 0000000 54 ff 00 01                                     | T...              
RLB_PRO: LinkADRReq: dataRate = 5, txSteps = 4, chMask = 0x00ff, chMaskCntl = 0, nbTrans = 1
RLB_PRO: UL:   0 1 921.400 (0 - 5) | DL:   0 1 921.400 (0 - 5)
RLB_PRO: UL:   1 1 921.600 (0 - 5) | DL:   1 1 921.600 (0 - 5)
RLB_PRO: UL:   2 1 921.800 (0 - 5) | DL:   2 1 921.800 (0 - 5)
RLB_PRO: UL:   3 1 922.000 (0 - 5) | DL:   3 1 922.000 (0 - 5)
RLB_PRO: UL:   4 1 922.200 (0 - 5) | DL:   4 1 922.200 (0 - 5)
RLB_PRO: UL:   5 1 922.400 (0 - 5) | DL:   5 1 922.400 (0 - 5)
RLB_PRO: UL:   6 1 922.600 (0 - 5) | DL:   6 1 922.600 (0 - 5)
RLB_PRO: UL:   7 1 922.800 (0 - 5) | DL:   7 1 922.800 (0 - 5)
RLB_PRO: LinkADRAns: status = 0x07
<MAC commands only>
[LoRaWAN] RSSI:         -59.00 dBm
[LoRaWAN] SNR:          11.00 dB
[LoRaWAN] Frequency error:      4991.22 Hz
[LoRaWAN] Event information:
[LoRaWAN] Confirmed:    203
[LoRaWAN] Confirming:   115
[LoRaWAN] Datarate:     136
[LoRaWAN] Frequency:    921.600 MHz
[LoRaWAN] Output power: 16 dBm
[LoRaWAN] Frame count:  0
[LoRaWAN] Port:         0
[LoRaWAN] Next uplink in 60s
image

image

image

@StevenCellist
Copy link
Collaborator

StevenCellist commented Jun 6, 2024

Once again a missed uplink, this time FCnt = 0.. curious. But besides that, looking all good. Also interesting to see that the NewChannelReq is needed for the 8th channel as AS923 only has two channels by default and the CFList can only fit an additional five.

Can you check whether Chirpstack is imposing any dwell time limitations? The first received downlink is too large given the dwell time limit of 400ms.. so I am interested to hear what you can see on your console.

Oh, and are you also going to test _3 and _4 as you said? :) Please let me know.

@IoTThinks
Copy link
Contributor Author

IoTThinks commented Jun 6, 2024

TTS + AS923 + LoRaWAN 1.1.0 + RP 2-1.0.4
Test is not completed as the AS923 in TTS looks not right.

image

image

Errr, AS923 Group 1 in TTS seems not correct.
image

From the specs, AS923 (aka AS923_1) should be from 920-923Mhz and contains 923.2 and 923.4Mhz.
image

This one is likely more correct for AS923.
image

915-928Mhz looks like AU915 to me.
Please help to confirm what are the first two frequencies of AS923 Group 1 in TTS

@StevenCellist
Copy link
Collaborator

This is interesting. The plain Asia 920-923 option implements 923.2 and 923.4 MHz, but then also 922.0 through 923.0 as the extra channels. The option Asia 915-928 (Group 1) implements just 923.2 and 923.4.

Both will work, but the 920-923 option will add the 'usual' six extra channels that are available, while all the (Group x) bands only implement the two default channels, and so does Group 1. For testing, either is fine as both implement 923.2 and 923.4.

@IoTThinks
Copy link
Contributor Author

ChirpStack + LoRaWAN 1.1.0 + RP 2-1.0.4 + AS923
image

image

image

image

image

---- Opened the serial port COM5 ----

Setup ... 
Initalise the radio
Setup LoRaWAN session
Join ('login') the LoRaWAN Network
RLB_PRO: Setting up dynamic channels
RLB_PRO: UL:   0 1 923.200 (0 - 5) | DL:   0 1 923.200 (0 - 5)
RLB_PRO: UL:   1 1 923.400 (0 - 5) | DL:   1 1 923.400 (0 - 5)
RLB_PRO: [MAC] 0x03
RLB_PRO: 0000000 20 00 00 80                                     |  ...              
RLB_PRO: LinkADRReq: dataRate = 2, txSteps = 0, chMask = 0x0000, chMaskCntl = 0, nbTrans = 0
RLB_PRO: LinkADRAns: status = 0x07
RLB_PRO: [MAC] 0x04
RLB_PRO: 0000000 07                                              | .                 
RLB_PRO: DutyCycleReq: max duty cycle = 1/2^7
RLB_PRO: [MAC] 0x05
RLB_PRO: 0000000 02 80 de 8c                                     | ....              
RLB_PRO: RXParamSetupReq: rx1DrOffset = 0, rx2DataRate = 2, freq = 923.200012
RLB_PRO: RXParamSetupAns: status = 0x07
RLB_PRO: [MAC] 0x08
RLB_PRO: 0000000 01                                              | .                 
RLB_PRO: RXTimingSetupReq: delay = 1 sec
RLB_PRO: [MAC] 0x09
RLB_PRO: 0000000 35                                              | 5                 
RLB_PRO: TxParamSetupReq: dlDwell = 1, ulDwell = 1, maxEirp = 16 dBm
RLB_PRO: [MAC] 0x0C
RLB_PRO: 0000000 65                                              | e                 
RLB_PRO: ADRParamSetupReq: limitExp = 6, delayExp = 5
RLB_PRO: [MAC] 0x0F
RLB_PRO: 0000000 fa                                              | .                 
RLB_PRO: RejoinParamSetupReq: maxTime = 15, maxCount = 10
RLB_PRO: RejoinParamSetupAns: status = 0x03
RLB_PRO: 
RLB_PRO: PHY: Frequency UL = 923.400 MHz
RLB_PRO: PHY: SF = 10, TX = 16 dBm, BW = 125.000 kHz, CR = 4/5
RLB_PRO: JoinRequest sent (DevNonce = 0) <-- Rx Delay start
RLB_PRO: 
RLB_PRO: PHY: Frequency DL = 923.400 MHz
RLB_PRO: PHY: SF = 10, TX = 16 dBm, BW = 125.000 kHz, CR = 4/5
RLB_PRO: Opening Rx1 window (232 ms timeout)... <-- Rx Delay end 
RLB_PRO: Closing Rx1 window
RLB_PRO: JoinAccept (JoinNonce = 5, previously 0):
RLB_PRO: 0000000 20 05 00 00 00 00 00 bf 2c 2e 01 82 01 70 b7 8c |  .......,....p..
RLB_PRO: 0000010 40 bf 8c 10 c7 8c e0 ce 8c b0 d6 8c 00 22 59 da | @............"Y.
RLB_PRO: 0000020 84                                              | .                 
RLB_PRO: LoRaWAN revision: 1.1
RLB_PRO: [MAC] 0x05
RLB_PRO: 0000000 02 80 de 8c                                     | ....              
RLB_PRO: RXParamSetupReq: rx1DrOffset = 0, rx2DataRate = 2, freq = 923.200012
RLB_PRO: RXParamSetupAns: status = 0x07
RLB_PRO: [MAC] 0x08
RLB_PRO: 0000000 01                                              | .                 
RLB_PRO: RXTimingSetupReq: delay = 1 sec
RLB_PRO: Setting up dynamic channels
RLB_PRO: UL:   0 1 923.200 (0 - 5) | DL:   0 1 923.200 (0 - 5)
RLB_PRO: UL:   1 1 923.400 (0 - 5) | DL:   1 1 923.400 (0 - 5)
RLB_PRO: Processing CFList
RLB_PRO: [MAC] 0x07
RLB_PRO: 0000000 02 70 b7 8c 50                                  | .p..P             
RLB_PRO: NewChannelReq:
RLB_PRO: UL:   2 1 922.200 (0 - 5) | DL:   2 1 922.200 (0 - 5)
RLB_PRO: NewChannelAns: status = 0x03
RLB_PRO: [MAC] 0x07
RLB_PRO: 0000000 03 40 bf 8c 50                                  | .@..P             
RLB_PRO: NewChannelReq:
RLB_PRO: UL:   3 1 922.400 (0 - 5) | DL:   3 1 922.400 (0 - 5)
RLB_PRO: NewChannelAns: status = 0x03
RLB_PRO: [MAC] 0x07
RLB_PRO: 0000000 04 10 c7 8c 50                                  | ....P             
RLB_PRO: NewChannelReq:
RLB_PRO: UL:   4 1 922.600 (0 - 5) | DL:   4 1 922.600 (0 - 5)
RLB_PRO: NewChannelAns: status = 0x03
RLB_PRO: [MAC] 0x07
RLB_PRO: 0000000 05 e0 ce 8c 50                                  | ....P             
RLB_PRO: NewChannelReq:
RLB_PRO: UL:   5 1 922.800 (0 - 5) | DL:   5 1 922.800 (0 - 5)
RLB_PRO: NewChannelAns: status = 0x03
RLB_PRO: [MAC] 0x07
RLB_PRO: 0000000 06 b0 d6 8c 50                                  | ....P             
RLB_PRO: NewChannelReq:
RLB_PRO: UL:   6 1 923.000 (0 - 5) | DL:   6 1 923.000 (0 - 5)
RLB_PRO: NewChannelAns: status = 0x03
Ready!

[LoRaWAN] Requesting LinkCheck and DeviceTime
RLB_PRO: 
RLB_PRO: PHY: Frequency UL = 923.000 MHz
RLB_PRO: PHY: SF = 10, TX = 16 dBm, BW = 125.000 kHz, CR = 4/5
RLB_PRO: Uplink MAC payload (3 commands):
RLB_PRO: 0000000 0b 01 02 0d                                     | ....              
RLB_PRO: Uplink (FCntUp = 0) decoded:
RLB_PRO: 0000000 21 00 78 56 fc 8c fb 3f 13 00 00 00 34 12 ba ab | !.xV...?....4...
RLB_PRO: 0000010 80 bf 2c 2e 01 84 00 00 b0 03 09 50 0a d4 93 2a | ..,........P...*
RLB_PRO: 0000020 14 80 fb 3f                                     | ...?              
RLB_PRO: Uplink sent <-- Rx Delay start
RLB_PRO: 
RLB_PRO: PHY: Frequency DL = 923.000 MHz
RLB_PRO: PHY: SF = 10, TX = 16 dBm, BW = 125.000 kHz, CR = 4/5
RLB_PRO: Opening Rx1 window (232 ms timeout)... <-- Rx Delay end 
RLB_PRO: Closing Rx1 window
RLB_PRO: Downlink (NFCntDown = 0) encoded:
RLB_PRO: 0000000 49 00 00 00 00 01 bf 2c 2e 01 00 00 00 00 00 1a | I......,........
RLB_PRO: 0000010 60 bf 2c 2e 01 a0 00 00 00 67 5d 25 1e 24 02 02 | `.,......g]%.$..
RLB_PRO: 0000020 d3 2d 91 4a ce 9f ec 9c f1 fe 0a ce 53 d7       | .-.J........S.    
RLB_PRO: [MAC] 0x0B
RLB_PRO: 0000000 01                                              | .                 
RLB_PRO: RekeyConf: server version = 1.1
RLB_PRO: [MAC] 0x02
RLB_PRO: 0000000 17 01                                           | ..                
RLB_PRO: LinkCheckAns: [user]
RLB_PRO: [MAC] 0x0D
RLB_PRO: 0000000 8d 83 8c 53 6f                                  | ...So             
RLB_PRO: DeviceTimeAns: [user]
RLB_PRO: [MAC] 0x07
RLB_PRO: 0000000 07 a0 af 8c 50                                  | ....P             
RLB_PRO: NewChannelReq:
RLB_PRO: UL:   7 1 922.000 (0 - 5) | DL:   7 1 922.000 (0 - 5)
RLB_PRO: NewChannelAns: status = 0x03
<MAC commands only>
[LoRaWAN] RSSI:         -62.00 dBm
[LoRaWAN] SNR:          14.25 dB
[LoRaWAN] Frequency error:      4946.13 Hz
[LoRaWAN] Event information:
[LoRaWAN] Confirmed:    0
[LoRaWAN] Confirming:   1
[LoRaWAN] Datarate:     2
[LoRaWAN] Frequency:    923.000 MHz
[LoRaWAN] Output power: 16 dBm
[LoRaWAN] Frame count:  0
[LoRaWAN] Port:         0
[LoRaWAN] LinkCheck margin:     23
[LoRaWAN] LinkCheck count:      1
[LoRaWAN] DeviceTime Unix:      1717682427
[LoRaWAN] DeviceTime second:    1/111
[LoRaWAN] Next uplink in 60s
[LoRaWAN] Requesting LinkCheck and DeviceTime
RLB_PRO: 
RLB_PRO: PHY: Frequency UL = 923.000 MHz
RLB_PRO: PHY: SF = 10, TX = 16 dBm, BW = 125.000 kHz, CR = 4/5
RLB_PRO: Uplink MAC payload (3 commands):
RLB_PRO: 0000000 07 03 02 0d                                     | ....              
RLB_PRO: Uplink (FCntUp = 1) decoded:
RLB_PRO: 0000000 21 00 78 56 fc 8c fb 3f 13 00 00 00 34 12 ba ab | !.xV...?....4...
RLB_PRO: 0000010 80 bf 2c 2e 01 84 01 00 68 d4 32 ce 0a e9 e5 55 | ..,.....h.2....U
RLB_PRO: 0000020 14 80 fb 3f                                     | ...?              
RLB_PRO: Uplink sent <-- Rx Delay start
RLB_PRO: 
RLB_PRO: PHY: Frequency DL = 923.000 MHz
RLB_PRO: PHY: SF = 10, TX = 16 dBm, BW = 125.000 kHz, CR = 4/5
RLB_PRO: Opening Rx1 window (232 ms timeout)... <-- Rx Delay end 
RLB_PRO: Closing Rx1 window
RLB_PRO: Downlink (NFCntDown = 1) encoded:
RLB_PRO: 0000000 49 01 00 00 00 01 bf 2c 2e 01 01 00 00 00 00 16 | I......,........
RLB_PRO: 0000010 60 bf 2c 2e 01 ae 01 00 30 75 9d 8a ae 2f 8c 2e | `.,.....0u.../..
RLB_PRO: 0000020 60 ee 80 48 4b b9 bf 50 ea ec                   | `..HK..P..        
RLB_PRO: [MAC] 0x02
RLB_PRO: 0000000 18 01                                           | ..                
RLB_PRO: LinkCheckAns: [user]
RLB_PRO: [MAC] 0x0D
RLB_PRO: 0000000 cd 83 8c 53 5d                                  | ...S]             
RLB_PRO: DeviceTimeAns: [user]
RLB_PRO: [MAC] 0x03
RLB_PRO: 0000000 51 ff 00 01                                     | Q...              
RLB_PRO: LinkADRReq: dataRate = 5, txSteps = 1, chMask = 0x00ff, chMaskCntl = 0, nbTrans = 1
RLB_PRO: UL:   0 1 923.200 (0 - 5) | DL:   0 1 923.200 (0 - 5)
RLB_PRO: UL:   1 1 923.400 (0 - 5) | DL:   1 1 923.400 (0 - 5)
RLB_PRO: UL:   2 1 922.200 (0 - 5) | DL:   2 1 922.200 (0 - 5)
RLB_PRO: UL:   3 1 922.400 (0 - 5) | DL:   3 1 922.400 (0 - 5)
RLB_PRO: UL:   4 1 922.600 (0 - 5) | DL:   4 1 922.600 (0 - 5)
RLB_PRO: UL:   5 1 922.800 (0 - 5) | DL:   5 1 922.800 (0 - 5)
RLB_PRO: UL:   6 1 923.000 (0 - 5) | DL:   6 1 923.000 (0 - 5)
RLB_PRO: UL:   7 1 922.000 (0 - 5) | DL:   7 1 922.000 (0 - 5)
RLB_PRO: LinkADRAns: status = 0x07
<MAC commands only>
[LoRaWAN] RSSI:         -67.00 dBm
[LoRaWAN] SNR:          12.00 dB
[LoRaWAN] Frequency error:      4962.91 Hz
[LoRaWAN] Event information:
[LoRaWAN] Confirmed:    0
[LoRaWAN] Confirming:   1
[LoRaWAN] Datarate:     5
[LoRaWAN] Frequency:    923.000 MHz
[LoRaWAN] Output power: 14 dBm
[LoRaWAN] Frame count:  1
[LoRaWAN] Port:         0
[LoRaWAN] LinkCheck margin:     24
[LoRaWAN] LinkCheck count:      1
[LoRaWAN] DeviceTime Unix:      1717682491
[LoRaWAN] DeviceTime second:    1/93
[LoRaWAN] Next uplink in 60s
RLB_PRO: 
RLB_PRO: PHY: Frequency UL = 923.200 MHz
RLB_PRO: PHY: SF = 7, TX = 14 dBm, BW = 125.000 kHz, CR = 4/5
RLB_PRO: Uplink MAC payload (1 commands):
RLB_PRO: 0000000 03 07                                           | ..                
RLB_PRO: Uplink (FCntUp = 2) decoded:
RLB_PRO: 0000000 21 00 78 56 fc 8c fb 3f 13 00 00 00 34 12 ba ab | !.xV...?....4...
RLB_PRO: 0000010 40 bf 2c 2e 01 82 02 00 a2 a7 0a e7 f7 83 00 00 | @.,.............
RLB_PRO: 0000020 14 80                                           | ..                
RLB_PRO: Uplink sent <-- Rx Delay start
RLB_PRO: 
RLB_PRO: PHY: Frequency DL = 923.200 MHz
RLB_PRO: PHY: SF = 7, TX = 14 dBm, BW = 125.000 kHz, CR = 4/5
RLB_PRO: Opening Rx1 window (51 ms timeout)... <-- Rx Delay end 
RLB_PRO: Closing Rx1 window
RLB_PRO: Downlink (NFCntDown = 2) encoded:
RLB_PRO: 0000000 49 00 00 00 00 01 bf 2c 2e 01 02 00 00 00 00 0d | I......,........
RLB_PRO: 0000010 60 bf 2c 2e 01 85 02 00 72 21 57 9c 3f b0 cb 6d | `.,.....r!W.?..m
RLB_PRO: 0000020 c0                                              | .                 
RLB_PRO: [MAC] 0x03
RLB_PRO: 0000000 53 ff 00 01                                     | S...              
RLB_PRO: LinkADRReq: dataRate = 5, txSteps = 3, chMask = 0x00ff, chMaskCntl = 0, nbTrans = 1
RLB_PRO: UL:   0 1 923.200 (0 - 5) | DL:   0 1 923.200 (0 - 5)
RLB_PRO: UL:   1 1 923.400 (0 - 5) | DL:   1 1 923.400 (0 - 5)
RLB_PRO: UL:   2 1 922.200 (0 - 5) | DL:   2 1 922.200 (0 - 5)
RLB_PRO: UL:   3 1 922.400 (0 - 5) | DL:   3 1 922.400 (0 - 5)
RLB_PRO: UL:   4 1 922.600 (0 - 5) | DL:   4 1 922.600 (0 - 5)
RLB_PRO: UL:   5 1 922.800 (0 - 5) | DL:   5 1 922.800 (0 - 5)
RLB_PRO: UL:   6 1 923.000 (0 - 5) | DL:   6 1 923.000 (0 - 5)
RLB_PRO: UL:   7 1 922.000 (0 - 5) | DL:   7 1 922.000 (0 - 5)
RLB_PRO: LinkADRAns: status = 0x07
<MAC commands only>
[LoRaWAN] RSSI:         -76.00 dBm
[LoRaWAN] SNR:          10.25 dB
[LoRaWAN] Frequency error:      4789.90 Hz
[LoRaWAN] Event information:
[LoRaWAN] Confirmed:    77
[LoRaWAN] Confirming:   67
[LoRaWAN] Datarate:     185
[LoRaWAN] Frequency:    923.000 MHz
[LoRaWAN] Output power: 14 dBm
[LoRaWAN] Frame count:  1
[LoRaWAN] Port:         0
[LoRaWAN] Next uplink in 60s
image image

I will continue with AS923_3 and AS923_4 tomorrow.

@IoTThinks
Copy link
Contributor Author

Once again a missed uplink, this time FCnt = 0.. curious. But besides that, looking all good. Also interesting to see that the NewChannelReq is needed for the 8th channel as AS923 only has two channels by default and the CFList can only fit an additional five.

Can you check whether Chirpstack is imposing any dwell time limitations? The first received downlink is too large given the dwell time limit of 400ms.. so I am interested to hear what you can see on your console.

Oh, and are you also going to test _3 and _4 as you said? :) Please let me know.

I will test _3 and _4 to be complete.
There is fCnt=0 for AS923. May be it is just lost for AS923_2.
ChirpStack seems don't have dwell time set.

This is AS923 in my ChirpStack (8 channels)
You can see the changes of frequencies for different uplinks.
RadioLib does rotate the frequencies but not quite balanced between 8 channels.

Ignore the OTAA as I did not implement RadioLib Persistence to save the DevNonce yet. So ChirpStack complains "DevNonce has already been used".

fCnt=0
image

fCnt=1
image

fCnt=2
image

fCnt=3
image

fCnt=4
image

fCnt=5
image

fCnt=6
image

@IoTThinks
Copy link
Contributor Author

TTS + AS923 (915-928Mhz) => 2 channels only.
TTS should rename the frequency plans for AS923 to be in sync with AS923_2, _3, _4. E.g: AS923 Group 1 (920-923Mhz)
And make Asia 920-923 to be AS923 with 6 extra frequencies.

Here you go

---- Opened the serial port COM5 ----

Setup ... 
Initalise the radio
Setup LoRaWAN session
Join ('login') the LoRaWAN Network
RLB_PRO: Setting up dynamic channels
RLB_PRO: UL:   0 1 923.200 (0 - 5) | DL:   0 1 923.200 (0 - 5)
RLB_PRO: UL:   1 1 923.400 (0 - 5) | DL:   1 1 923.400 (0 - 5)
RLB_PRO: [MAC] 0x03
RLB_PRO: 0000000 20 00 00 80                                     |  ...              
RLB_PRO: LinkADRReq: dataRate = 2, txSteps = 0, chMask = 0x0000, chMaskCntl = 0, nbTrans = 0
RLB_PRO: LinkADRAns: status = 0x07
RLB_PRO: [MAC] 0x04
RLB_PRO: 0000000 07                                              | .                 
RLB_PRO: DutyCycleReq: max duty cycle = 1/2^7
RLB_PRO: [MAC] 0x05
RLB_PRO: 0000000 02 80 de 8c                                     | ....              
RLB_PRO: RXParamSetupReq: rx1DrOffset = 0, rx2DataRate = 2, freq = 923.200012
RLB_PRO: RXParamSetupAns: status = 0x07
RLB_PRO: [MAC] 0x08
RLB_PRO: 0000000 01                                              | .                 
RLB_PRO: RXTimingSetupReq: delay = 1 sec
RLB_PRO: [MAC] 0x09
RLB_PRO: 0000000 35                                              | 5                 
RLB_PRO: TxParamSetupReq: dlDwell = 1, ulDwell = 1, maxEirp = 16 dBm
RLB_PRO: [MAC] 0x0C
RLB_PRO: 0000000 65                                              | e                 
RLB_PRO: ADRParamSetupReq: limitExp = 6, delayExp = 5
RLB_PRO: [MAC] 0x0F
RLB_PRO: 0000000 fa                                              | .                 
RLB_PRO: RejoinParamSetupReq: maxTime = 15, maxCount = 10
RLB_PRO: RejoinParamSetupAns: status = 0x03
RLB_PRO: 
RLB_PRO: PHY: Frequency UL = 923.400 MHz
RLB_PRO: PHY: SF = 10, TX = 16 dBm, BW = 125.000 kHz, CR = 4/5
RLB_PRO: JoinRequest sent (DevNonce = 0) <-- Rx Delay start
RLB_PRO: 
RLB_PRO: PHY: Frequency DL = 923.400 MHz
RLB_PRO: PHY: SF = 10, TX = 16 dBm, BW = 125.000 kHz, CR = 4/5
RLB_PRO: Opening Rx1 window (232 ms timeout)... <-- Rx Delay end 
RLB_PRO: Closing Rx1 window
RLB_PRO: JoinAccept (JoinNonce = 1, previously 0):
RLB_PRO: 0000000 20 01 00 00 13 00 00 e8 77 0d 26 82 05 7b 05 3f |  .......w.&..{.?
RLB_PRO: 0000010 78                                              | x                 
RLB_PRO: LoRaWAN revision: 1.1
RLB_PRO: [MAC] 0x05
RLB_PRO: 0000000 02 80 de 8c                                     | ....              
RLB_PRO: RXParamSetupReq: rx1DrOffset = 0, rx2DataRate = 2, freq = 923.200012
RLB_PRO: RXParamSetupAns: status = 0x07
RLB_PRO: [MAC] 0x08
RLB_PRO: 0000000 05                                              | .                 
RLB_PRO: RXTimingSetupReq: delay = 5 sec
RLB_PRO: Setting up dynamic channels
RLB_PRO: UL:   0 1 923.200 (0 - 5) | DL:   0 1 923.200 (0 - 5)
RLB_PRO: UL:   1 1 923.400 (0 - 5) | DL:   1 1 923.400 (0 - 5)
Ready!

[LoRaWAN] Requesting LinkCheck and DeviceTime
RLB_PRO: 
RLB_PRO: PHY: Frequency UL = 923.400 MHz
RLB_PRO: PHY: SF = 10, TX = 16 dBm, BW = 125.000 kHz, CR = 4/5
RLB_PRO: Uplink MAC payload (3 commands):
RLB_PRO: 0000000 0b 01 02 0d                                     | ....              
RLB_PRO: Uplink (FCntUp = 0) decoded:
RLB_PRO: 0000000 21 00 78 56 fc 8c fb 3f 13 00 00 00 34 12 ba ab | !.xV...?....4...
RLB_PRO: 0000010 80 e8 77 0d 26 84 00 00 d0 75 dd c0 0a 43 90 1c | ..w.&....u...C..
RLB_PRO: 0000020 14 80 fb 3f                                     | ...?              
RLB_PRO: Uplink sent <-- Rx Delay start
RLB_PRO: 
RLB_PRO: PHY: Frequency DL = 923.400 MHz
RLB_PRO: PHY: SF = 10, TX = 16 dBm, BW = 125.000 kHz, CR = 4/5
RLB_PRO: Opening Rx1 window (232 ms timeout)... <-- Rx Delay end 
RLB_PRO: Closing Rx1 window
RLB_PRO: Downlink (NFCntDown = 0) encoded:
RLB_PRO: 0000000 49 00 00 00 00 01 e8 77 0d 26 00 00 00 00 00 13 | I......w.&......
RLB_PRO: 0000010 60 e8 77 0d 26 bb 00 00 61 ca 6c 19 ec 40 40 5d | `.w.&...a.l..@@]
RLB_PRO: 0000020 a5 b5 3b 22 38 09 6b                            | ..;"8.k           
RLB_PRO: [MAC] 0x0B
RLB_PRO: 0000000 01                                              | .                 
RLB_PRO: RekeyConf: server version = 1.1
RLB_PRO: [MAC] 0x0D
RLB_PRO: 0000000 f4 55 8d 53 03                                  | .U.S.             
RLB_PRO: DeviceTimeAns: [user]
RLB_PRO: [MAC] 0x09
RLB_PRO: 0000000 35                                              | 5                 
RLB_PRO: TxParamSetupReq: dlDwell = 1, ulDwell = 1, maxEirp = 16 dBm
RLB_PRO: [MAC] 0x06
RLB_PRO: DevStatusReq
RLB_PRO: DevStatusAns: status = 0x000b
<MAC commands only>
[LoRaWAN] RSSI:         -65.00 dBm
[LoRaWAN] SNR:          11.75 dB
[LoRaWAN] Frequency error:      4327.47 Hz
[LoRaWAN] Event information:
[LoRaWAN] Confirmed:    0
[LoRaWAN] Confirming:   1
[LoRaWAN] Datarate:     2
[LoRaWAN] Frequency:    923.400 MHz
[LoRaWAN] Output power: 16 dBm
[LoRaWAN] Frame count:  0
[LoRaWAN] Port:         0
[LoRaWAN] DeviceTime Unix:      1717736290
[LoRaWAN] DeviceTime second:    1/3
[LoRaWAN] Next uplink in 60s
[LoRaWAN] Requesting LinkCheck and DeviceTime
RLB_PRO: 
RLB_PRO: PHY: Frequency UL = 923.200 MHz
RLB_PRO: PHY: SF = 10, TX = 16 dBm, BW = 125.000 kHz, CR = 4/5
RLB_PRO: Uplink MAC payload (4 commands):
RLB_PRO: 0000000 09 06 00 0b 02 0d                               | ......            
RLB_PRO: Uplink (FCntUp = 1) decoded:
RLB_PRO: 0000000 21 00 78 56 fc 8c fb 3f 13 00 00 00 34 12 ba ab | !.xV...?....4...
RLB_PRO: 0000010 80 e8 77 0d 26 86 01 00 25 1a b4 f4 9b 04 0a 8b | ..w.&...%.......
RLB_PRO: 0000020 66 12 fb 3f 14 80                               | f..?..            
RLB_PRO: Uplink sent <-- Rx Delay start
RLB_PRO: 
RLB_PRO: PHY: Frequency DL = 923.200 MHz
RLB_PRO: PHY: SF = 10, TX = 16 dBm, BW = 125.000 kHz, CR = 4/5
RLB_PRO: Opening Rx1 window (232 ms timeout)... <-- Rx Delay end 
RLB_PRO: Closing Rx1 window
RLB_PRO: Downlink (NFCntDown = 1) encoded:
RLB_PRO: 0000000 49 01 00 00 00 01 e8 77 0d 26 01 00 00 00 00 11 | I......w.&......
RLB_PRO: 0000010 60 e8 77 0d 26 b9 01 00 5e c8 be 60 19 08 92 35 | `.w.&...^..`...5
RLB_PRO: 0000020 22 c5 df ab a6                                  | "....             
RLB_PRO: [MAC] 0x0D
RLB_PRO: 0000000 37 56 8d 53 9c                                  | 7V.S.             
RLB_PRO: DeviceTimeAns: [user]
RLB_PRO: [MAC] 0x02
RLB_PRO: 0000000 1c 01                                           | ..                
RLB_PRO: LinkCheckAns: [user]
<MAC commands only>
[LoRaWAN] RSSI:         -68.00 dBm
[LoRaWAN] SNR:          12.00 dB
[LoRaWAN] Frequency error:      4478.47 Hz
[LoRaWAN] Event information:
[LoRaWAN] Confirmed:    0
[LoRaWAN] Confirming:   1
[LoRaWAN] Datarate:     2
[LoRaWAN] Frequency:    923.200 MHz
[LoRaWAN] Output power: 16 dBm
[LoRaWAN] Frame count:  1
[LoRaWAN] Port:         0
[LoRaWAN] LinkCheck margin:     28
[LoRaWAN] LinkCheck count:      1
[LoRaWAN] DeviceTime Unix:      1717736357
[LoRaWAN] DeviceTime second:    1/156
[LoRaWAN] Next uplink in 60s
RLB_PRO: 
RLB_PRO: PHY: Frequency UL = 923.400 MHz
RLB_PRO: PHY: SF = 10, TX = 16 dBm, BW = 125.000 kHz, CR = 4/5
RLB_PRO: Uplink (FCntUp = 2) decoded:
RLB_PRO: 0000000 21 00 78 56 fc 8c fb 3f 13 00 00 00 34 12 ba ab | !.xV...?....4...
RLB_PRO: 0000010 40 e8 77 0d 26 80 02 00 0a 93 a4 27 f3 0c 00 00 | @.w.&......'....
RLB_PRO: Uplink sent <-- Rx Delay start
RLB_PRO: 
RLB_PRO: PHY: Frequency DL = 923.400 MHz
RLB_PRO: PHY: SF = 10, TX = 16 dBm, BW = 125.000 kHz, CR = 4/5
RLB_PRO: Opening Rx1 window (232 ms timeout)... <-- Rx Delay end 
RLB_PRO: Closing Rx1 window
RLB_PRO: Downlink (NFCntDown = 2) encoded:
RLB_PRO: 0000000 49 00 00 00 00 01 e8 77 0d 26 02 00 00 00 00 0d | I......w.&......
RLB_PRO: 0000010 60 e8 77 0d 26 85 02 00 fb 54 73 b9 46 27 5d 60 | `.w.&....Ts.F']`
RLB_PRO: 0000020 cb                                              | .                 
RLB_PRO: [MAC] 0x03
RLB_PRO: 0000000 51 03 00 01                                     | Q...              
RLB_PRO: LinkADRReq: dataRate = 5, txSteps = 1, chMask = 0x0003, chMaskCntl = 0, nbTrans = 1
RLB_PRO: UL:   0 1 923.200 (0 - 5) | DL:   0 1 923.200 (0 - 5)
RLB_PRO: UL:   1 1 923.400 (0 - 5) | DL:   1 1 923.400 (0 - 5)
RLB_PRO: LinkADRAns: status = 0x07
<MAC commands only>
[LoRaWAN] RSSI:         -69.00 dBm
[LoRaWAN] SNR:          11.25 dB
[LoRaWAN] Frequency error:      4660.92 Hz
[LoRaWAN] Event information:
[LoRaWAN] Confirmed:    101
[LoRaWAN] Confirming:   240
[LoRaWAN] Datarate:     38
[LoRaWAN] Frequency:    923.200 MHz
[LoRaWAN] Output power: 16 dBm
[LoRaWAN] Frame count:  1
[LoRaWAN] Port:         0
[LoRaWAN] Next uplink in 60s
RLB_PRO: 
RLB_PRO: PHY: Frequency UL = 923.400 MHz
RLB_PRO: PHY: SF = 7, TX = 14 dBm, BW = 125.000 kHz, CR = 4/5
RLB_PRO: Uplink MAC payload (1 commands):
RLB_PRO: 0000000 03 07                                           | ..                
RLB_PRO: Uplink (FCntUp = 3) decoded:
RLB_PRO: 0000000 21 00 78 56 fc 8c fb 3f 13 00 00 00 34 12 ba ab | !.xV...?....4...
RLB_PRO: 0000010 40 e8 77 0d 26 82 03 00 8f 62 0a 86 75 33 00 00 | @.w.&....b..u3..
RLB_PRO: 0000020 14 80                                           | ..                
RLB_PRO: Uplink sent <-- Rx Delay start
RLB_PRO: 
RLB_PRO: PHY: Frequency DL = 923.400 MHz
RLB_PRO: PHY: SF = 7, TX = 14 dBm, BW = 125.000 kHz, CR = 4/5
RLB_PRO: Opening Rx1 window (51 ms timeout)... <-- Rx Delay end 
RLB_PRO: Closing Rx1 window
RLB_PRO: PHY: Frequency DL = 923.200 MHz
RLB_PRO: Opening Rx2 window (232 ms timeout)... <-- Rx Delay end 
RLB_PRO: Closing Rx2 window
[LoRaWAN] Next uplink in 60s

image

image

image

image

@StevenCellist
Copy link
Collaborator

RadioLib selects randomly from the available channels - I've analysed logs with hundreds of uplinks and found that it balances out over time and is statistically sound. But for just a handful of uplinks it is very much possible that it's not very balanced :)

@IoTThinks
Copy link
Contributor Author

TTS + AS923_3 (Default channels)
image

image

image

image

image

---- Opened the serial port COM5 ----

Setup ... 
Initalise the radio
Setup LoRaWAN session
Join ('login') the LoRaWAN Network
RLB_PRO: Setting up dynamic channels
RLB_PRO: UL:   0 1 916.600 (0 - 5) | DL:   0 1 916.600 (0 - 5)
RLB_PRO: UL:   1 1 916.800 (0 - 5) | DL:   1 1 916.800 (0 - 5)
RLB_PRO: [MAC] 0x03
RLB_PRO: 0000000 20 00 00 80                                     |  ...              
RLB_PRO: LinkADRReq: dataRate = 2, txSteps = 0, chMask = 0x0000, chMaskCntl = 0, nbTrans = 0
RLB_PRO: LinkADRAns: status = 0x07
RLB_PRO: [MAC] 0x04
RLB_PRO: 0000000 07                                              | .                 
RLB_PRO: DutyCycleReq: max duty cycle = 1/2^7
RLB_PRO: [MAC] 0x05
RLB_PRO: 0000000 02 b0 dc 8b                                     | ....              
RLB_PRO: RXParamSetupReq: rx1DrOffset = 0, rx2DataRate = 2, freq = 916.599976
RLB_PRO: RXParamSetupAns: status = 0x07
RLB_PRO: [MAC] 0x08
RLB_PRO: 0000000 01                                              | .                 
RLB_PRO: RXTimingSetupReq: delay = 1 sec
RLB_PRO: [MAC] 0x09
RLB_PRO: 0000000 35                                              | 5                 
RLB_PRO: TxParamSetupReq: dlDwell = 1, ulDwell = 1, maxEirp = 16 dBm
RLB_PRO: [MAC] 0x0C
RLB_PRO: 0000000 65                                              | e                 
RLB_PRO: ADRParamSetupReq: limitExp = 6, delayExp = 5
RLB_PRO: [MAC] 0x0F
RLB_PRO: 0000000 fa                                              | .                 
RLB_PRO: RejoinParamSetupReq: maxTime = 15, maxCount = 10
RLB_PRO: RejoinParamSetupAns: status = 0x03
RLB_PRO: 
RLB_PRO: PHY: Frequency UL = 916.600 MHz
RLB_PRO: PHY: SF = 10, TX = 16 dBm, BW = 125.000 kHz, CR = 4/5
RLB_PRO: JoinRequest sent (DevNonce = 0) <-- Rx Delay start
RLB_PRO: 
RLB_PRO: PHY: Frequency DL = 916.600 MHz
RLB_PRO: PHY: SF = 10, TX = 16 dBm, BW = 125.000 kHz, CR = 4/5
RLB_PRO: Opening Rx1 window (232 ms timeout)... <-- Rx Delay end 
RLB_PRO: Closing Rx1 window
RLB_PRO: JoinAccept (JoinNonce = 1, previously 0):
RLB_PRO: 0000000 20 01 00 00 13 00 00 57 c8 0d 26 82 05 39 f8 b6 |  ......W..&..9..
RLB_PRO: 0000010 c5                                              | .                 
RLB_PRO: LoRaWAN revision: 1.1
RLB_PRO: [MAC] 0x05
RLB_PRO: 0000000 02 b0 dc 8b                                     | ....              
RLB_PRO: RXParamSetupReq: rx1DrOffset = 0, rx2DataRate = 2, freq = 916.599976
RLB_PRO: RXParamSetupAns: status = 0x07
RLB_PRO: [MAC] 0x08
RLB_PRO: 0000000 05                                              | .                 
RLB_PRO: RXTimingSetupReq: delay = 5 sec
RLB_PRO: Setting up dynamic channels
RLB_PRO: UL:   0 1 916.600 (0 - 5) | DL:   0 1 916.600 (0 - 5)
RLB_PRO: UL:   1 1 916.800 (0 - 5) | DL:   1 1 916.800 (0 - 5)
Ready!

[LoRaWAN] Requesting LinkCheck and DeviceTime
RLB_PRO: 
RLB_PRO: PHY: Frequency UL = 916.600 MHz
RLB_PRO: PHY: SF = 10, TX = 16 dBm, BW = 125.000 kHz, CR = 4/5
RLB_PRO: Uplink MAC payload (3 commands):
RLB_PRO: 0000000 0b 01 02 0d                                     | ....              
RLB_PRO: Uplink (FCntUp = 0) decoded:
RLB_PRO: 0000000 21 00 78 56 fc 8c fb 3f 13 00 00 00 34 12 ba ab | !.xV...?....4...
RLB_PRO: 0000010 80 57 c8 0d 26 84 00 00 36 c3 36 26 0a 7a 66 ab | .W..&...6.6&.zf.
RLB_PRO: 0000020 14 80 fb 3f                                     | ...?              
RLB_PRO: Uplink sent <-- Rx Delay start
RLB_PRO: 
RLB_PRO: PHY: Frequency DL = 916.600 MHz
RLB_PRO: PHY: SF = 10, TX = 16 dBm, BW = 125.000 kHz, CR = 4/5
RLB_PRO: Opening Rx1 window (232 ms timeout)... <-- Rx Delay end 
RLB_PRO: Closing Rx1 window
RLB_PRO: Downlink (NFCntDown = 0) encoded:
RLB_PRO: 0000000 49 00 00 00 00 01 57 c8 0d 26 00 00 00 00 00 13 | I.....W..&......
RLB_PRO: 0000010 60 57 c8 0d 26 bb 00 00 d1 a7 ee 38 05 ed e5 47 | `W..&......8...G
RLB_PRO: 0000020 d3 72 b6 d0 1c 17 21                            | .r....!           
RLB_PRO: [MAC] 0x0B
RLB_PRO: 0000000 01                                              | .                 
RLB_PRO: RekeyConf: server version = 1.1
RLB_PRO: [MAC] 0x0D
RLB_PRO: 0000000 3e 79 8d 53 ac                                  | >y.S.             
RLB_PRO: DeviceTimeAns: [user]
RLB_PRO: [MAC] 0x09
RLB_PRO: 0000000 35                                              | 5                 
RLB_PRO: TxParamSetupReq: dlDwell = 1, ulDwell = 1, maxEirp = 16 dBm
RLB_PRO: [MAC] 0x06
RLB_PRO: DevStatusReq
RLB_PRO: DevStatusAns: status = 0x000c
<MAC commands only>
[LoRaWAN] RSSI:         -65.00 dBm
[LoRaWAN] SNR:          12.00 dB
[LoRaWAN] Frequency error:      4562.35 Hz
[LoRaWAN] Event information:
[LoRaWAN] Confirmed:    0
[LoRaWAN] Confirming:   1
[LoRaWAN] Datarate:     2
[LoRaWAN] Frequency:    916.600 MHz
[LoRaWAN] Output power: 16 dBm
[LoRaWAN] Frame count:  0
[LoRaWAN] Port:         0
[LoRaWAN] DeviceTime Unix:      1717745324
[LoRaWAN] DeviceTime second:    1/172
[LoRaWAN] Next uplink in 60s
[LoRaWAN] Requesting LinkCheck and DeviceTime
RLB_PRO: 
RLB_PRO: PHY: Frequency UL = 916.800 MHz
RLB_PRO: PHY: SF = 10, TX = 16 dBm, BW = 125.000 kHz, CR = 4/5
RLB_PRO: Uplink MAC payload (4 commands):
RLB_PRO: 0000000 09 06 00 0c 02 0d                               | ......            
RLB_PRO: Uplink (FCntUp = 1) decoded:
RLB_PRO: 0000000 21 00 78 56 fc 8c fb 3f 13 00 00 00 34 12 ba ab | !.xV...?....4...
RLB_PRO: 0000010 80 57 c8 0d 26 86 01 00 c5 dd 21 f5 a1 96 0a dc | .W..&.....!.....
RLB_PRO: 0000020 5e 87 fb 3f 14 80                               | ^..?..            
RLB_PRO: Uplink sent <-- Rx Delay start
RLB_PRO: 
RLB_PRO: PHY: Frequency DL = 916.800 MHz
RLB_PRO: PHY: SF = 10, TX = 16 dBm, BW = 125.000 kHz, CR = 4/5
RLB_PRO: Opening Rx1 window (232 ms timeout)... <-- Rx Delay end 
RLB_PRO: Closing Rx1 window
RLB_PRO: Downlink (NFCntDown = 1) encoded:
RLB_PRO: 0000000 49 01 00 00 00 01 57 c8 0d 26 01 00 00 00 00 11 | I.....W..&......
RLB_PRO: 0000010 60 57 c8 0d 26 b9 01 00 a0 3e 39 49 48 25 ca 87 | `W..&....>9IH%..
RLB_PRO: 0000020 b3 a3 fb bd ef                                  | .....             
RLB_PRO: [MAC] 0x0D
RLB_PRO: 0000000 82 79 8d 53 49                                  | .y.SI             
RLB_PRO: DeviceTimeAns: [user]
RLB_PRO: [MAC] 0x02
RLB_PRO: 0000000 1a 01                                           | ..                
RLB_PRO: LinkCheckAns: [user]
<MAC commands only>
[LoRaWAN] RSSI:         -78.00 dBm
[LoRaWAN] SNR:          10.50 dB
[LoRaWAN] Frequency error:      4591.71 Hz
[LoRaWAN] Event information:
[LoRaWAN] Confirmed:    0
[LoRaWAN] Confirming:   1
[LoRaWAN] Datarate:     2
[LoRaWAN] Frequency:    916.800 MHz
[LoRaWAN] Output power: 16 dBm
[LoRaWAN] Frame count:  1
[LoRaWAN] Port:         0
[LoRaWAN] LinkCheck margin:     26
[LoRaWAN] LinkCheck count:      1
[LoRaWAN] DeviceTime Unix:      1717745392
[LoRaWAN] DeviceTime second:    1/73
[LoRaWAN] Next uplink in 60s
RLB_PRO: 
RLB_PRO: PHY: Frequency UL = 916.600 MHz
RLB_PRO: PHY: SF = 10, TX = 16 dBm, BW = 125.000 kHz, CR = 4/5
RLB_PRO: Uplink (FCntUp = 2) decoded:
RLB_PRO: 0000000 21 00 78 56 fc 8c fb 3f 13 00 00 00 34 12 ba ab | !.xV...?....4...
RLB_PRO: 0000010 40 57 c8 0d 26 80 02 00 0a 4a 69 fe f3 0c 00 00 | @W..&....Ji.....
RLB_PRO: Uplink sent <-- Rx Delay start
RLB_PRO: 
RLB_PRO: PHY: Frequency DL = 916.600 MHz
RLB_PRO: PHY: SF = 10, TX = 16 dBm, BW = 125.000 kHz, CR = 4/5
RLB_PRO: Opening Rx1 window (232 ms timeout)... <-- Rx Delay end 
RLB_PRO: Closing Rx1 window
RLB_PRO: Downlink (NFCntDown = 2) encoded:
RLB_PRO: 0000000 49 00 00 00 00 01 57 c8 0d 26 02 00 00 00 00 0d | I.....W..&......
RLB_PRO: 0000010 60 57 c8 0d 26 85 02 00 fd 08 e6 3e 4c 34 2a 4a | `W..&......>L4*J
RLB_PRO: 0000020 c3                                              | .                 
RLB_PRO: [MAC] 0x03
RLB_PRO: 0000000 5f 03 00 01                                     | _...              
RLB_PRO: LinkADRReq: dataRate = 5, txSteps = 15, chMask = 0x0003, chMaskCntl = 0, nbTrans = 1
RLB_PRO: UL:   0 1 916.600 (0 - 5) | DL:   0 1 916.600 (0 - 5)
RLB_PRO: UL:   1 1 916.800 (0 - 5) | DL:   1 1 916.800 (0 - 5)
RLB_PRO: LinkADRAns: status = 0x07
<MAC commands only>
[LoRaWAN] RSSI:         -66.00 dBm
[LoRaWAN] SNR:          11.75 dB
[LoRaWAN] Frequency error:      4654.63 Hz
[LoRaWAN] Event information:
[LoRaWAN] Confirmed:    89
[LoRaWAN] Confirming:   141
[LoRaWAN] Datarate:     8
[LoRaWAN] Frequency:    916.800 MHz
[LoRaWAN] Output power: 16 dBm
[LoRaWAN] Frame count:  1
[LoRaWAN] Port:         0
[LoRaWAN] Next uplink in 60s
RLB_PRO: 
RLB_PRO: PHY: Frequency UL = 916.800 MHz
RLB_PRO: PHY: SF = 7, TX = 16 dBm, BW = 125.000 kHz, CR = 4/5
RLB_PRO: Uplink MAC payload (1 commands):
RLB_PRO: 0000000 03 07                                           | ..                
RLB_PRO: Uplink (FCntUp = 3) decoded:
RLB_PRO: 0000000 21 00 78 56 fc 8c fb 3f 13 00 00 00 34 12 ba ab | !.xV...?....4...
RLB_PRO: 0000010 40 57 c8 0d 26 82 03 00 c2 eb 0a 10 d5 ed 00 00 | @W..&...........
RLB_PRO: 0000020 14 80                                           | ..                
RLB_PRO: Uplink sent <-- Rx Delay start
RLB_PRO: 
RLB_PRO: PHY: Frequency DL = 916.800 MHz
RLB_PRO: PHY: SF = 7, TX = 16 dBm, BW = 125.000 kHz, CR = 4/5
RLB_PRO: Opening Rx1 window (51 ms timeout)... <-- Rx Delay end 
RLB_PRO: Closing Rx1 window
RLB_PRO: PHY: Frequency DL = 916.600 MHz
RLB_PRO: Opening Rx2 window (232 ms timeout)... <-- Rx Delay end 
RLB_PRO: Closing Rx2 window
[LoRaWAN] Next uplink in 60s
RLB_PRO: 
RLB_PRO: PHY: Frequency UL = 916.800 MHz
RLB_PRO: PHY: SF = 7, TX = 16 dBm, BW = 125.000 kHz, CR = 4/5
RLB_PRO: Uplink (FCntUp = 4) decoded:
RLB_PRO: 0000000 21 00 78 56 fc 8c fb 3f 13 00 00 00 34 12 ba ab | !.xV...?....4...
RLB_PRO: 0000010 40 57 c8 0d 26 80 04 00 0a b7 6b c8 f3 0c 00 00 | @W..&.....k.....
RLB_PRO: Uplink sent <-- Rx Delay start
RLB_PRO: 
RLB_PRO: PHY: Frequency DL = 916.800 MHz
RLB_PRO: PHY: SF = 7, TX = 16 dBm, BW = 125.000 kHz, CR = 4/5
RLB_PRO: Opening Rx1 window (51 ms timeout)... <-- Rx Delay end 
RLB_PRO: Closing Rx1 window
RLB_PRO: PHY: Frequency DL = 916.600 MHz
RLB_PRO: Opening Rx2 window (232 ms timeout)... <-- Rx Delay end 
RLB_PRO: Closing Rx2 window
[LoRaWAN] Next uplink in 60s

@IoTThinks
Copy link
Contributor Author

TTS + AS923_4.
image

image

image

image

---- Opened the serial port COM5 ----
Setup ... 
Initalise the radio
Setup LoRaWAN session
Join ('login') the LoRaWAN Network
RLB_PRO: Setting up dynamic channels
RLB_PRO: UL:   0 1 917.300 (0 - 5) | DL:   0 1 917.300 (0 - 5)
RLB_PRO: UL:   1 1 917.500 (0 - 5) | DL:   1 1 917.500 (0 - 5)
RLB_PRO: [MAC] 0x03
RLB_PRO: 0000000 20 00 00 80                                     |  ...              
RLB_PRO: LinkADRReq: dataRate = 2, txSteps = 0, chMask = 0x0000, chMaskCntl = 0, nbTrans = 0
RLB_PRO: LinkADRAns: status = 0x07
RLB_PRO: [MAC] 0x04
RLB_PRO: 0000000 07                                              | .                 
RLB_PRO: DutyCycleReq: max duty cycle = 1/2^7
RLB_PRO: [MAC] 0x05
RLB_PRO: 0000000 02 08 f8 8b                                     | ....              
RLB_PRO: RXParamSetupReq: rx1DrOffset = 0, rx2DataRate = 2, freq = 917.299988
RLB_PRO: RXParamSetupAns: status = 0x07
RLB_PRO: [MAC] 0x08
RLB_PRO: 0000000 01                                              | .                 
RLB_PRO: RXTimingSetupReq: delay = 1 sec
RLB_PRO: [MAC] 0x09
RLB_PRO: 0000000 35                                              | 5                 
RLB_PRO: TxParamSetupReq: dlDwell = 1, ulDwell = 1, maxEirp = 16 dBm
RLB_PRO: [MAC] 0x0C
RLB_PRO: 0000000 65                                              | e                 
RLB_PRO: ADRParamSetupReq: limitExp = 6, delayExp = 5
RLB_PRO: [MAC] 0x0F
RLB_PRO: 0000000 fa                                              | .                 
RLB_PRO: RejoinParamSetupReq: maxTime = 15, maxCount = 10
RLB_PRO: RejoinParamSetupAns: status = 0x03
RLB_PRO: 
RLB_PRO: PHY: Frequency UL = 917.500 MHz
RLB_PRO: PHY: SF = 10, TX = 16 dBm, BW = 125.000 kHz, CR = 4/5
RLB_PRO: JoinRequest sent (DevNonce = 0) <-- Rx Delay start
RLB_PRO: 
RLB_PRO: PHY: Frequency DL = 917.500 MHz
RLB_PRO: PHY: SF = 10, TX = 16 dBm, BW = 125.000 kHz, CR = 4/5
RLB_PRO: Opening Rx1 window (232 ms timeout)... <-- Rx Delay end 
RLB_PRO: Closing Rx1 window
RLB_PRO: JoinAccept (JoinNonce = 1, previously 0):
RLB_PRO: 0000000 20 01 00 00 13 00 00 1c d4 0d 26 82 05 21 03 bf |  .........&..!..
RLB_PRO: 0000010 1a                                              | .                 
RLB_PRO: LoRaWAN revision: 1.1
RLB_PRO: [MAC] 0x05
RLB_PRO: 0000000 02 08 f8 8b                                     | ....              
RLB_PRO: RXParamSetupReq: rx1DrOffset = 0, rx2DataRate = 2, freq = 917.299988
RLB_PRO: RXParamSetupAns: status = 0x07
RLB_PRO: [MAC] 0x08
RLB_PRO: 0000000 05                                              | .                 
RLB_PRO: RXTimingSetupReq: delay = 5 sec
RLB_PRO: Setting up dynamic channels
RLB_PRO: UL:   0 1 917.300 (0 - 5) | DL:   0 1 917.300 (0 - 5)
RLB_PRO: UL:   1 1 917.500 (0 - 5) | DL:   1 1 917.500 (0 - 5)
Ready!

[LoRaWAN] Requesting LinkCheck and DeviceTime
RLB_PRO: 
RLB_PRO: PHY: Frequency UL = 917.500 MHz
RLB_PRO: PHY: SF = 10, TX = 16 dBm, BW = 125.000 kHz, CR = 4/5
RLB_PRO: Uplink MAC payload (3 commands):
RLB_PRO: 0000000 0b 01 02 0d                                     | ....              
RLB_PRO: Uplink (FCntUp = 0) decoded:
RLB_PRO: 0000000 21 00 78 56 fc 8c fb 3f 13 00 00 00 34 12 ba ab | !.xV...?....4...
RLB_PRO: 0000010 80 1c d4 0d 26 84 00 00 91 2a c4 17 0a 66 da 8c | ....&....*...f..
RLB_PRO: 0000020 14 80 fb 3f                                     | ...?              
RLB_PRO: Uplink sent <-- Rx Delay start
RLB_PRO: 
RLB_PRO: PHY: Frequency DL = 917.500 MHz
RLB_PRO: PHY: SF = 10, TX = 16 dBm, BW = 125.000 kHz, CR = 4/5
RLB_PRO: Opening Rx1 window (232 ms timeout)... <-- Rx Delay end 
RLB_PRO: Closing Rx1 window
RLB_PRO: Downlink (NFCntDown = 0) encoded:
RLB_PRO: 0000000 49 00 00 00 00 01 1c d4 0d 26 00 00 00 00 00 13 | I........&......
RLB_PRO: 0000010 60 1c d4 0d 26 bb 00 00 64 06 b5 6d 7a c1 46 7e | `...&...d..mz.F~
RLB_PRO: 0000020 09 0c 91 69 0b 03 da                            | ...i...           
RLB_PRO: [MAC] 0x0B
RLB_PRO: 0000000 01                                              | .                 
RLB_PRO: RekeyConf: server version = 1.1
RLB_PRO: [MAC] 0x0D
RLB_PRO: 0000000 a8 7e 8d 53 e1                                  | .~.S.             
RLB_PRO: DeviceTimeAns: [user]
RLB_PRO: [MAC] 0x09
RLB_PRO: 0000000 35                                              | 5                 
RLB_PRO: TxParamSetupReq: dlDwell = 1, ulDwell = 1, maxEirp = 16 dBm
RLB_PRO: [MAC] 0x06
RLB_PRO: DevStatusReq
RLB_PRO: DevStatusAns: status = 0x000c
<MAC commands only>
[LoRaWAN] RSSI:         -65.00 dBm
[LoRaWAN] SNR:          12.75 dB
[LoRaWAN] Frequency error:      4350.54 Hz
[LoRaWAN] Event information:
[LoRaWAN] Confirmed:    0
[LoRaWAN] Confirming:   1
[LoRaWAN] Datarate:     2
[LoRaWAN] Frequency:    917.500 MHz
[LoRaWAN] Output power: 16 dBm
[LoRaWAN] Frame count:  0
[LoRaWAN] Port:         0
[LoRaWAN] DeviceTime Unix:      1717746710
[LoRaWAN] DeviceTime second:    1/225
[LoRaWAN] Next uplink in 60s
[LoRaWAN] Requesting LinkCheck and DeviceTime
RLB_PRO: 
RLB_PRO: PHY: Frequency UL = 917.500 MHz
RLB_PRO: PHY: SF = 10, TX = 16 dBm, BW = 125.000 kHz, CR = 4/5
RLB_PRO: Uplink MAC payload (4 commands):
RLB_PRO: 0000000 09 06 00 0c 02 0d                               | ......            
RLB_PRO: Uplink (FCntUp = 1) decoded:
RLB_PRO: 0000000 21 00 78 56 fc 8c fb 3f 13 00 00 00 34 12 ba ab | !.xV...?....4...
RLB_PRO: 0000010 80 1c d4 0d 26 86 01 00 4c 6b ab 07 af 84 0a 34 | ....&...Lk.....4
RLB_PRO: 0000020 7b f3 fb 3f 14 80                               | {..?..            
RLB_PRO: Uplink sent <-- Rx Delay start
RLB_PRO: 
RLB_PRO: PHY: Frequency DL = 917.500 MHz
RLB_PRO: PHY: SF = 10, TX = 16 dBm, BW = 125.000 kHz, CR = 4/5
RLB_PRO: Opening Rx1 window (232 ms timeout)... <-- Rx Delay end 
RLB_PRO: Closing Rx1 window
RLB_PRO: Downlink (NFCntDown = 1) encoded:
RLB_PRO: 0000000 49 01 00 00 00 01 1c d4 0d 26 01 00 00 00 00 11 | I........&......
RLB_PRO: 0000010 60 1c d4 0d 26 b9 01 00 5f 83 59 0d b9 e1 9e 71 | `...&..._.Y....q
RLB_PRO: 0000020 92 1b ec bc e8                                  | .....             
RLB_PRO: [MAC] 0x0D
RLB_PRO: 0000000 ec 7e 8d 53 7f                                  | .~.S.             
RLB_PRO: DeviceTimeAns: [user]
RLB_PRO: [MAC] 0x02
RLB_PRO: 0000000 19 01                                           | ..                
RLB_PRO: LinkCheckAns: [user]
<MAC commands only>
[LoRaWAN] RSSI:         -72.00 dBm
[LoRaWAN] SNR:          10.75 dB
[LoRaWAN] Frequency error:      4558.16 Hz
[LoRaWAN] Event information:
[LoRaWAN] Confirmed:    0
[LoRaWAN] Confirming:   1
[LoRaWAN] Datarate:     2
[LoRaWAN] Frequency:    917.500 MHz
[LoRaWAN] Output power: 16 dBm
[LoRaWAN] Frame count:  1
[LoRaWAN] Port:         0
[LoRaWAN] LinkCheck margin:     25
[LoRaWAN] LinkCheck count:      1
[LoRaWAN] DeviceTime Unix:      1717746778
[LoRaWAN] DeviceTime second:    1/127
[LoRaWAN] Next uplink in 60s
RLB_PRO: 
RLB_PRO: PHY: Frequency UL = 917.500 MHz
RLB_PRO: PHY: SF = 10, TX = 16 dBm, BW = 125.000 kHz, CR = 4/5
RLB_PRO: Uplink (FCntUp = 2) decoded:
RLB_PRO: 0000000 21 00 78 56 fc 8c fb 3f 13 00 00 00 34 12 ba ab | !.xV...?....4...
RLB_PRO: 0000010 40 1c d4 0d 26 80 02 00 0a 80 e2 41 f3 0c 00 00 | @...&......A....
RLB_PRO: Uplink sent <-- Rx Delay start
RLB_PRO: 
RLB_PRO: PHY: Frequency DL = 917.500 MHz
RLB_PRO: PHY: SF = 10, TX = 16 dBm, BW = 125.000 kHz, CR = 4/5
RLB_PRO: Opening Rx1 window (232 ms timeout)... <-- Rx Delay end 
RLB_PRO: Closing Rx1 window
RLB_PRO: Downlink (NFCntDown = 2) encoded:
RLB_PRO: 0000000 49 00 00 00 00 01 1c d4 0d 26 02 00 00 00 00 0d | I........&......
RLB_PRO: 0000010 60 1c d4 0d 26 85 02 00 24 d1 02 20 dd c6 a1 f1 | `...&...$.. ....
RLB_PRO: 0000020 25                                              | %                 
RLB_PRO: [MAC] 0x03
RLB_PRO: 0000000 5f 03 00 01                                     | _...              
RLB_PRO: LinkADRReq: dataRate = 5, txSteps = 15, chMask = 0x0003, chMaskCntl = 0, nbTrans = 1
RLB_PRO: UL:   0 1 917.300 (0 - 5) | DL:   0 1 917.300 (0 - 5)
RLB_PRO: UL:   1 1 917.500 (0 - 5) | DL:   1 1 917.500 (0 - 5)
RLB_PRO: LinkADRAns: status = 0x07
<MAC commands only>
[LoRaWAN] RSSI:         -61.00 dBm
[LoRaWAN] SNR:          11.25 dB
[LoRaWAN] Frequency error:      4711.25 Hz
[LoRaWAN] Event information:
[LoRaWAN] Confirmed:    43
[LoRaWAN] Confirming:   196
[LoRaWAN] Datarate:     41
[LoRaWAN] Frequency:    917.500 MHz
[LoRaWAN] Output power: 16 dBm
[LoRaWAN] Frame count:  1
[LoRaWAN] Port:         0
[LoRaWAN] Next uplink in 60s
RLB_PRO: 
RLB_PRO: PHY: Frequency UL = 917.300 MHz
RLB_PRO: PHY: SF = 7, TX = 16 dBm, BW = 125.000 kHz, CR = 4/5
RLB_PRO: Uplink MAC payload (1 commands):
RLB_PRO: 0000000 03 07                                           | ..                
RLB_PRO: Uplink (FCntUp = 3) decoded:
RLB_PRO: 0000000 21 00 78 56 fc 8c fb 3f 13 00 00 00 34 12 ba ab | !.xV...?....4...
RLB_PRO: 0000010 40 1c d4 0d 26 82 03 00 7a 0f 0a 4e a3 16 00 00 | @...&...z..N....
RLB_PRO: 0000020 14 80                                           | ..                
RLB_PRO: Uplink sent <-- Rx Delay start
RLB_PRO: 
RLB_PRO: PHY: Frequency DL = 917.300 MHz
RLB_PRO: PHY: SF = 7, TX = 16 dBm, BW = 125.000 kHz, CR = 4/5
RLB_PRO: Opening Rx1 window (51 ms timeout)... <-- Rx Delay end 
RLB_PRO: Closing Rx1 window
RLB_PRO: PHY: Frequency DL = 917.300 MHz
RLB_PRO: Opening Rx2 window (232 ms timeout)... <-- Rx Delay end 
RLB_PRO: Closing Rx2 window
[LoRaWAN] Next uplink in 60s
RLB_PRO: 
RLB_PRO: PHY: Frequency UL = 917.300 MHz
RLB_PRO: PHY: SF = 7, TX = 16 dBm, BW = 125.000 kHz, CR = 4/5
RLB_PRO: Uplink (FCntUp = 4) decoded:
RLB_PRO: 0000000 21 00 78 56 fc 8c fb 3f 13 00 00 00 34 12 ba ab | !.xV...?....4...
RLB_PRO: 0000010 40 1c d4 0d 26 80 04 00 0a c8 81 67 f3 0c 00 00 | @...&......g....
RLB_PRO: Uplink sent <-- Rx Delay start
RLB_PRO: 
RLB_PRO: PHY: Frequency DL = 917.300 MHz
RLB_PRO: PHY: SF = 7, TX = 16 dBm, BW = 125.000 kHz, CR = 4/5
RLB_PRO: Opening Rx1 window (51 ms timeout)... <-- Rx Delay end 
RLB_PRO: Closing Rx1 window
RLB_PRO: PHY: Frequency DL = 917.300 MHz
RLB_PRO: Opening Rx2 window (232 ms timeout)... <-- Rx Delay end 
RLB_PRO: Closing Rx2 window
[LoRaWAN] Next uplink in 60s

@StevenCellist
Copy link
Collaborator

Perfect! Thank you very very much for this extensive testing and reporting. All looks good to me, and unknowingly you have tested stuff that I wasn't sure was working yet - I've never seen dwell time limitations in the wild but it appears to get processed correctly. Thanks a lot :)

@StevenCellist StevenCellist merged commit 38abf92 into jgromes:master Jun 7, 2024
30 checks passed
@IoTThinks
Copy link
Contributor Author

Yah, thanks a lot for the merge.
For Dwell time, I will test RalidLib and Dwell time for AS923_x.
But it will be another topic.

Thanks again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants