Hello,
There's a problem with xDot's getNextTxMs() function.
Causes irrecoverable issue in sleep_wake_XXX() and join_network() functions.
Here's how to replicate the problem:
- Download current Dot-Examples (14.6.2017)
- Change network to public
- Upload code
- Do not have a base station within reach
- After some futile join tries xDot will get stuck and cannot ever recover because to this getNextTxMs() returns always <2 value, even if base station is in reach
Very serious problem. Please confirm and provide fix.
This is what will happen:
[ERROR] Failed to join network
[ERROR] failed to join network -4:Join Error
[INFO] waiting 1 s until next free channel
[INFO] attempt 1201 to join network
[ERROR] Failed to join network
[ERROR] failed to join network -4:Join Error
[INFO] waiting 1 s until next free channel
[INFO] attempt 1202 to join network
[ERROR] Failed to join network
[ERROR] failed to join network -4:Join Error
[INFO] waiting 1 s until next free channel
[INFO] attempt 1203 to join network
[ERROR] Failed to join network
[ERROR] failed to join network -4:Join Error
[INFO] waiting 1 s until next free channel
[INFO] attempt 1204 to join network
[ERROR] Failed to join network
[ERROR] failed to join network -4:Join Error
[INFO] waiting 1 s until next free channel
[INFO] attempt 1205 to join network
[ERROR] Failed to join network
[ERROR] failed to join network -4:Join Error
[INFO] waiting 1 s until next free channel
[INFO] attempt 1206 to join network
[ERROR] Failed to join network
[ERROR] failed to join network -4:Join Error
[INFO] waiting 1 s until next free channel
[INFO] attempt 1207 to join network
[ERROR] Failed to join network
[ERROR] failed to join network -4:Join Error
[INFO] waiting 1 s until next free channel
[INFO] attempt 1208 to join network
[ERROR] Failed to join network
[ERROR] failed to join network -4:Join Error
.... forever
Settings (Default, except public network):
[TRACE] Add Channel 0 : 868100000 : 50 16
[TRACE] Add Channel 1 : 868300000 : 60 16
[TRACE] Add Channel 2 : 868500000 : 50 16
[TRACE] Add Channel 3 : 0 : 00 16
[TRACE] Add Channel 4 : 0 : 00 16
[TRACE] Add Channel 5 : 0 : 00 16
[TRACE] Add Channel 6 : 0 : 00 16
[TRACE] Add Channel 7 : 0 : 00 16
[TRACE] Add Channel 8 : 0 : 00 16
[TRACE] Add Channel 9 : 0 : 00 16
[TRACE] Add Channel 10 : 0 : 00 16
[TRACE] Add Channel 11 : 0 : 00 16
[TRACE] Add Channel 12 : 0 : 00 16
[TRACE] Add Channel 13 : 0 : 00 16
[TRACE] Add Channel 14 : 0 : 00 16
[TRACE] Add Channel 15 : 0 : 00 16
[INFO] Set radio to Public Mode
[INFO] mDot Ready
[INFO] mbed-os library version: 139
[INFO] defaulting Dot configuration
[INFO] changing network name from "" to "MultiTech"
[INFO] changing network passphrase from "" to "MultiTech"
[INFO] changing public network from off to on
[INFO] Set radio to Public Mode
[INFO] Initialize datarates...
[INFO] Initialize channels...
[INFO] changing link check count from 0 to 3
[INFO] changing link check threshold from 0 to 5
[INFO] saving configuration
[INFO] =====================
[INFO] general configuration
[INFO] =====================
[INFO] version ------------------ 2.0.17-1-mbed139
[INFO] device ID/EUI ------------ 00800000040001d1
[INFO] frequency band ----------- EU868
[INFO] public network ----------- on
[INFO] =========================
[INFO] credentials configuration
[INFO] =========================
[INFO] device class ------------- A
[INFO] network join mode -------- OTA
[INFO] network name ------------- MultiTech
[INFO] network phrase ----------- MultiTech
[INFO] network EUI -------------- 6c4eef66f47986a6
[INFO] network KEY -------------- 1f33a170a5f1fda0ab697aae2b95916b
[INFO] ========================
[INFO] communication parameters
[INFO] ========================
[INFO] acks --------------------- off, 0 attempts
[INFO] TX datarate -------------- DR0
[INFO] TX power ----------------- 11 dBm
[INFO] atnenna gain ------------- 3 dBm
[INFO] attempt 1 to join network
Hello, There's a problem with xDot's getNextTxMs() function. Causes irrecoverable issue in sleep_wake_XXX() and join_network() functions.
Here's how to replicate the problem:
Very serious problem. Please confirm and provide fix.
This is what will happen:
Settings (Default, except public network):