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

FW-877 Heterogeneous radio settings in the Mesh #508

Draft
wants to merge 100 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 53 commits
Commits
Show all changes
100 commits
Select commit Hold shift + click to select a range
6ffee84
Initial commit of code compiling and working and synching but not ful…
minarady1 Mar 10, 2020
92a27e9
wrote radio_set_modulation and radio_local_bootstrap
minarady1 Mar 11, 2020
9035323
some updates
minarady1 Mar 12, 2020
9999fe1
open radio working :)
minarady1 Mar 12, 2020
ff29667
some updates, mainly trying to debug
minarady1 Mar 13, 2020
eebd083
updates
minarady1 Mar 13, 2020
133dc1c
radio at86rf files
minarady1 Mar 13, 2020
984444a
Integrating cc2538rf into the open radio interface
minarady1 Mar 19, 2020
9273ca3
using openradio in openwsn
minarady1 Mar 20, 2020
a6468d7
open radio interface finally working and integrated into openwsn
minarady1 Mar 23, 2020
1669b80
full radio set added to openradio
minarady1 Mar 26, 2020
999f50f
Complete open radio interface for openmote-b tested with 7 modulations.
minarady1 Mar 30, 2020
917665d
Restoring default configuration
minarady1 Mar 30, 2020
64006b5
restoring default config
minarady1 Mar 30, 2020
0de94cb
resorting default configurations and removing unnecessary code used f…
minarady1 Mar 30, 2020
185038e
restoring bsp_radio_tx default code
minarady1 Mar 30, 2020
ecc3bd2
restoring sniffer code
minarady1 Mar 30, 2020
56ed0cf
restoring sniffer code
minarady1 Mar 30, 2020
480f1dc
restoring sniffer code
minarady1 Mar 30, 2020
9226da2
restoring bsp_radio_rx code
minarady1 Mar 30, 2020
6dda3e9
A project for demonstrating the open radio interface on openmote-b:
minarady1 Mar 30, 2020
39a1bdc
Merge branch 'develop_FW-866' of https://github.com/minarady1/openwsn…
minarady1 Mar 30, 2020
f0d59e5
openradio interface cleaning in progress
minarady1 Apr 15, 2020
6bae185
modivided slot 40 for FSK and added slot 41 for ofdm1 mcs3
minarady1 Apr 16, 2020
75b7eb1
introduced slot_template instead of slot duration
minarady1 Apr 16, 2020
d2b9c40
cleaneing openradio interface + adding comments + using slot template…
minarady1 Apr 16, 2020
0166d42
comments+cleaning
minarady1 Apr 16, 2020
aa7237b
Merge branch 'develop' into develop_FW-866
minarady1 Apr 16, 2020
2464d80
minor fixes
minarady1 Apr 16, 2020
f23a799
macpong
minarady1 Apr 16, 2020
4882b35
Merge branch 'develop_FW-866' of https://github.com/minarady1/openwsn…
minarady1 Apr 16, 2020
c9f560e
changing slot templates to struct variables instead of #def constants
minarady1 Apr 17, 2020
e5fdab3
slot_duration struct update
minarady1 Apr 17, 2020
4e484f2
adding few helper functions to handle slot info
minarady1 Apr 17, 2020
74ca322
quick update
minarady1 Apr 17, 2020
48f3080
fixed dynamic slot selection + code formatting
minarady1 Apr 21, 2020
6ecca16
Final fixes to the dynamic slot selection at runtime. This feature no…
minarady1 Apr 22, 2020
49d565f
cleaning up code for bsp, projacts, MAC, IAR project files and .gitig…
minarady1 Apr 23, 2020
a506320
Updated radio drivers for python board + at86rf231 board to be compli…
minarady1 Apr 23, 2020
6a8f446
restoring defaults
minarady1 Apr 23, 2020
5e6ca11
FW-866 fixed slot template timing references as per PR comments
minarady1 Apr 24, 2020
ba85ad8
FW-866 merged board_setSlotType (slotType) and slot_board_vars_t boar…
minarady1 Apr 24, 2020
c861218
FW-866 fixing indentation, variable names for openradio + adjusting 2…
minarady1 Apr 24, 2020
5110952
FW-866 restoring tx/rx common project
minarady1 Apr 24, 2020
5538db7
increased testbed bootload timeout
minarady1 May 6, 2020
0883865
- EBs are transmitted on 3 cells
minarady1 May 8, 2020
72b22ef
modifing addactive slot to use cell radio setting
minarady1 May 14, 2020
3367bd5
EB transmitted on 3 slots with dynamically configured radios and slot…
minarady1 May 14, 2020
465368e
FW-877 EBs transmitting on het. radios successfully
minarady1 Jun 16, 2020
4abc73e
FW-877 radio setting column created for neighbor table. First EB adds…
minarady1 Jun 22, 2020
a6b96db
fw-877 three neighbors register successfully with 3 radios(for one mo…
minarady1 Jun 24, 2020
df696f7
fw-877 different join priority values are used for each radio and dec…
minarady1 Jun 25, 2020
4e89839
fw-877 dummy dagranks used for each radio, neighbor_getjoinproxy is u…
minarady1 Jun 25, 2020
03c3689
fw-877 added cemmradiosetting in debugprint
minarady1 Aug 12, 2020
fb079ab
fw-877 sixtop add/relocate cells progress
minarady1 Aug 18, 2020
6110eeb
fw-877 using neighborKey instead of openaddr in different locations
minarady1 Sep 4, 2020
a5ffc10
fw-877 modifying cjon procedure to depend on neighborKey
minarady1 Sep 4, 2020
9228205
fw-877 including the cellRadioSetting in the 6p addcells request
minarady1 Sep 4, 2020
d3ff4c9
fw-877 integrating cellRadioSetting_t in the schedule
minarady1 Sep 4, 2020
079f0a5
fw-877 undoing the neighborKey struct since it lead to more complicat…
minarady1 Sep 10, 2020
6c88226
fw-877 updating sixtop to specify the cellRadioSetting in the in the …
minarady1 Sep 14, 2020
882c01c
fw-877 updating icmpv6rpl.c to update DIO info in the neighbor table …
minarady1 Sep 14, 2020
35fcc2b
fw-877 temp hack for testing parent selection with different DAGRanks…
minarady1 Sep 14, 2020
6b8a157
fw-877 adding the cellRadioSetting member to ieee154evars
minarady1 Sep 15, 2020
94c0007
fw-877 updating msf housekeeping function and msf helper functions to…
minarady1 Sep 15, 2020
18307b8
fw-877 updating neighbors_updateSequenceNumber and neighbors_resetSeq…
minarady1 Sep 15, 2020
149056a
fw-877 updating schedule interface and helper functions to include th…
minarady1 Sep 15, 2020
3416093
fw-877 updating sixtop to use cellRadioSetting in Clear command and i…
minarady1 Sep 15, 2020
4e57791
fw-877 updating the routing algorithm code to include the radio setti…
minarady1 Sep 15, 2020
2cc1c38
fw-877 updating the radio setting of packets to be forwarded after pa…
minarady1 Sep 15, 2020
a531cab
dummy
minarady1 Sep 15, 2020
2103354
fw-877 updating board timings for cc2538 radio
minarady1 Sep 17, 2020
0aa22f4
fw-877 updating comments for at86rf215 settings
minarady1 Sep 17, 2020
4265dab
fw-877 updating weights for link metric objective function calculatio…
minarady1 Sep 17, 2020
ac84804
fw-877 fixes to the ieee54e layer
minarady1 Sep 17, 2020
26f4633
fw-877 introducing the new link Metric function
minarady1 Sep 17, 2020
a4ada63
fw-877 updating RPL to create 3 DIOs, for the three min. cells, inste…
minarady1 Sep 17, 2020
2886182
fw-877 selective uploading feature
minarady1 Sep 23, 2020
f452684
fw-877 new weights for PHY layer link metric function
minarady1 Sep 23, 2020
a0d112e
fw-877 restoring cjoin timeout
minarady1 Sep 23, 2020
dc4322a
fw-877 extended uinject payload
minarady1 Sep 23, 2020
fe1e99a
fw-877 extended duty cycle stats in MAC layer
minarady1 Sep 23, 2020
969f3d7
fw-877 new schedule helper function schedule_hasNegotiatedCellToNeigh…
minarady1 Sep 23, 2020
35293f6
fw-877 using default radiosetting for sixtop requests if dedicated ce…
minarady1 Sep 23, 2020
a32486c
fw-877 forwarding sub-layer updated to identify parent as combination…
minarady1 Sep 23, 2020
7253599
fw-877 updating parent definition to include radio setting in layer 3
minarady1 Sep 23, 2020
76bd1a9
fw-877 updating openqueue to get and reset queue occupancy stats
minarady1 Sep 23, 2020
9db91b7
fw-877 restoing opendefs g6tisch parameters
minarady1 Oct 7, 2020
6799ad1
fw-877 capturing radio-specific duty cycle measurements in the uinjec…
minarady1 Oct 7, 2020
766fad7
fw-877 capturing radio-specific duty cycle measurements in the mac layer
minarady1 Oct 7, 2020
a6ae140
fw-877 temporary hack to continue adding cells before cell clearing i…
minarady1 Oct 7, 2020
4350c12
fw-877 enhanced join procedure
minarady1 Oct 7, 2020
5f7cfbd
fw-877 ignoring the radio setting while getting the number of backup …
minarady1 Oct 7, 2020
01d6ad8
FW_877
minarady1 Sep 14, 2021
cd8e553
FW-553 simple network relay code.
minarady1 Oct 11, 2021
925e8b8
FW-533 String retrieved over serial and transfered to a payload varia…
minarady1 Oct 11, 2021
e468bef
FW-533 payload is transferred to packet and periodic transmission starts
minarady1 Oct 11, 2021
61a96db
FW-553 tx/rx link established
minarady1 Oct 12, 2021
23ad631
FW-553 implements frame validity check and prevents inverse routing a…
minarady1 Oct 12, 2021
8d3d678
Update 02drv_relay.c
minarady1 Oct 12, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
Debug
settings
*.dep
*.ewd
*.ewt
*.bak
*.sfr
*.o
*.exe
Expand All @@ -24,3 +27,5 @@ settings
/projects/telosb/01bsp_uart/path.txt
/projects/telosb/03oos_macpong/path.txt
/projects/telosb/02drv_opentimers/path.txt
/projects/openmote-b/01bsp_openradio_rx/log.txt
/projects/openmote-b/01bsp_radio_tx/asm.s
2 changes: 1 addition & 1 deletion bootloader/openmote-cc2538/ot_program.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class program_over_testbed(object):
CMD = 'program'

# in seconds, should be larger than the time starting from publishing message until receiving the response
MESSAGE_RESP_TIMEOUT = 30
MESSAGE_RESP_TIMEOUT = 60

def __init__(self, mote, image_path):

Expand Down
40 changes: 35 additions & 5 deletions bsp/boards/board.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,55 @@
#include "toolchain_defs.h"

//=========================== define ==========================================
#define SLOTDURATION_MS board_getSlotDuration()/PORT_TICS_PER_MS

typedef enum {
DO_NOT_KICK_SCHEDULER = 0,
KICK_SCHEDULER = 1,
} kick_scheduler_t;


Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove the additional empty lines here


//=========================== typedef =========================================
typedef struct {
uint16_t slotDuration;

// execution speed related
// also implementation related (e.g. SoC radio or spi-connected radio because of the time to load a packet to/from radio)
uint16_t maxTxDataPrepare;
uint16_t maxRxAckPrepare;
uint16_t maxRxDataPrepare;
uint16_t maxTxAckPrepare;

// radio speed related
// also implementation related (because the time to execute the Tx/Rx command is highly dependent on the radio AND the configuration)
uint16_t delayTx;
uint16_t delayRx;
} slot_board_vars_t; //board specific slot vars

// available slot templates
typedef enum{
SLOT_10ms,
SLOT_20ms_24GHZ,
SLOT_40ms_24GHZ,
SLOT_40ms_FSK_SUBGHZ,
SLOT_40ms_OFDM1MCS0_3_SUBGHZ,
MAX_SLOT_TYPES,
} slotType_t;

//=========================== variables =======================================

//=========================== prototypes ======================================

void board_init(void);
void board_sleep(void);
void board_reset(void);

void board_init(void);
void board_sleep(void);
void board_reset(void);
uint16_t board_getSlotDuration (void);
slot_board_vars_t board_selectSlotTemplate(slotType_t slot_type);
/**
\}
\}
*/

//=========================== private =========================================
void board_init_slot_vars(void);
#endif
36 changes: 35 additions & 1 deletion bsp/boards/iot-lab_A8-M3/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@
#include "nvic.h"
#include "debugpins.h"

//=========================== variable ========================================
//=========================== variables =======================================

slot_board_vars_t slot_board_vars [MAX_SLOT_TYPES];
slotType_t selected_slot_type;

//=========================== private =========================================

Expand All @@ -25,6 +28,8 @@ void GPIO_Config_ALL_AIN(void);
// configure the hard fault exception
void board_enableHardFaultExceptionHandler(void);


Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only one empty line space between codes, please remove the two empty lines here.


//=========================== main ============================================

extern int mote_main(void);
Expand Down Expand Up @@ -96,6 +101,35 @@ void board_init(void){
debugpins_init();
//enable nvic for the radio
NVIC_radio();
board_init_slot_vars();
}


//==== bootstrapping slot info lookup table
void board_init_slot_vars(void){

// 20ms slot
slot_board_vars [SLOT_20ms_24GHZ].slotDuration = 655 ; // ms
slot_board_vars [SLOT_20ms_24GHZ].maxTxDataPrepare = 110 ; // 3355us (not measured)
slot_board_vars [SLOT_20ms_24GHZ].maxRxAckPrepare = 20 ; // 610us (not measured)
slot_board_vars [SLOT_20ms_24GHZ].maxRxDataPrepare = 33 ; // 1000us (not measured)
slot_board_vars [SLOT_20ms_24GHZ].maxTxAckPrepare = 50 ; // 1525us (not measured)
slot_board_vars [SLOT_20ms_24GHZ].delayTx = 18 ; // 549us (not measured)
slot_board_vars [SLOT_20ms_24GHZ].delayRx = 0 ; // 0us (can not measure)
}

// To get the current slotDuration at any time
// used during initialization by sixtop to fire the first sixtop EB
uint16_t board_getSlotDuration (void)
{
return slot_board_vars [selected_slot_type].slotDuration;
}

// Setter/Getter function for slot_board_vars
slot_board_vars_t board_selectSlotTemplate (slotType_t slot_type)
{
selected_slot_type = slot_type;
return slot_board_vars [selected_slot_type];
}

void board_sleep(void) {
Expand Down
17 changes: 0 additions & 17 deletions bsp/boards/iot-lab_A8-M3/board_info.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,23 +50,6 @@ to return the board's description.
#define PORT_PIN_RADIO_RESET_HIGH() //GPIOC->ODR |= 0X0040;// nothing
#define PORT_PIN_RADIO_RESET_LOW() //GPIOC->ODR &= ~0X0040;// nothing

//===== IEEE802154E timing

#define SLOTDURATION 20 // in miliseconds

// time-slot related
#define PORT_TsSlotDuration 655 // 20ms

// execution speed related
#define PORT_maxTxDataPrepare 110 // 3355us (not measured)
#define PORT_maxRxAckPrepare 20 // 610us (not measured)
#define PORT_maxRxDataPrepare 33 // 1000us (not measured)
#define PORT_maxTxAckPrepare 50 // 1525us (not measured)

// radio speed related
#define PORT_delayTx 18 // 549us (not measured)
#define PORT_delayRx 0 // 0us (can not measure)
// radio watchdog

//===== adaptive_sync accuracy

Expand Down
34 changes: 34 additions & 0 deletions bsp/boards/iot-lab_M3/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@
#include "gpio.h"
#include "cryptoengine.h"


//=========================== variables =======================================
slot_board_vars_t slot_board_vars [MAX_SLOT_TYPES];
slotType_t selected_slot_type;

//=========================== main ============================================

extern int mote_main(void);
Expand Down Expand Up @@ -93,6 +98,35 @@ void board_init(void)
//enable nvic for the radio
NVIC_radio();
cryptoengine_init();
board_init_slot_vars();
}


//==== bootstrapping slot info lookup table
void board_init_slot_vars(void){

// 20ms slot
slot_board_vars [SLOT_20ms_24GHZ].slotDuration = 655 ; // ms
slot_board_vars [SLOT_20ms_24GHZ].maxTxDataPrepare = 110 ; // 3355us (not measured)
slot_board_vars [SLOT_20ms_24GHZ].maxRxAckPrepare = 20 ; // 610us (not measured)
slot_board_vars [SLOT_20ms_24GHZ].maxRxDataPrepare = 33 ; // 1000us (not measured)
slot_board_vars [SLOT_20ms_24GHZ].maxTxAckPrepare = 50 ; // 1525us (not measured)
slot_board_vars [SLOT_20ms_24GHZ].delayTx = 18 ; // 549us (not measured)
slot_board_vars [SLOT_20ms_24GHZ].delayRx = 0 ; // 0us (can not measure)
}

// To get the current slotDuration at any time
// used during initialization by sixtop to fire the first sixtop EB
uint16_t board_getSlotDuration (void)
{
return slot_board_vars [selected_slot_type].slotDuration;
}

// Setter/Getter function for slot_board_vars
slot_board_vars_t board_selectSlotTemplate (slotType_t slot_type)
{
selected_slot_type = slot_type;
return slot_board_vars [selected_slot_type];
}

void board_sleep(void) {
Expand Down
17 changes: 0 additions & 17 deletions bsp/boards/iot-lab_M3/board_info.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,23 +49,6 @@ to return the board's description.
#define PORT_PIN_RADIO_RESET_LOW() //GPIOC->ODR &= ~0X0040;// nothing
//#define PORT_PIN_RADIO_RESET_LOW() GPIOC->ODR &= ~(1<<1);

//===== IEEE802154E timing

#define SLOTDURATION 20 // in miliseconds

// time-slot related
#define PORT_TsSlotDuration 655 // 20ms

// execution speed related
#define PORT_maxTxDataPrepare 110 // 3355us (not measured)
#define PORT_maxRxAckPrepare 20 // 610us (not measured)
#define PORT_maxRxDataPrepare 33 // 1000us (not measured)
#define PORT_maxTxAckPrepare 50 // 1525us (not measured)

// radio speed related
#define PORT_delayTx 18 // 549us (not measured)
#define PORT_delayRx 0 // 0us (can not measure)
// radio watchdog

//===== adaptive_sync accuracy

Expand Down
46 changes: 45 additions & 1 deletion bsp/boards/openmote-b-24ghz/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@
#define BSP_BUTTON_BASE ( GPIO_D_BASE )
#define BSP_BUTTON_USER ( GPIO_PIN_5 )

//=========================== variables ============================================
slot_board_vars_t slot_board_vars [MAX_SLOT_TYPES];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add one empty line above

slotType_t selected_slot_type;


Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove one line here

//=========================== prototypes ======================================

void board_timer_init(void);
Expand Down Expand Up @@ -73,11 +78,50 @@ void board_init(void) {
uart_init();
radio_init();
i2c_init();

board_init_slot_vars();
// sensors_init();
cryptoengine_init();
}

//==== bootstrapping slot info lookup table
void board_init_slot_vars(void){
//10ms slot
slot_board_vars [SLOT_10ms].slotDuration = 328 ; // 10ms
slot_board_vars [SLOT_10ms].maxTxDataPrepare = 10 ; // 305us (measured 82us)
slot_board_vars [SLOT_10ms].maxRxAckPrepare = 10 ; // 305us (measured 83us)
slot_board_vars [SLOT_10ms].maxRxDataPrepare = 4 ; // 122us (measured 22us)
slot_board_vars [SLOT_10ms].maxTxAckPrepare = 10 ; // 122us (measured 94us)
#ifdef L2_SECURITY_ACTIVE
slot_board_vars [SLOT_10ms].delayTx = 14 ; // 366us (measured xxxus)
#else
slot_board_vars [SLOT_10ms].delayTx = 12 ; // 366us (measured xxxus)
#endif
slot_board_vars [SLOT_10ms].delayRx = 0 ; // 0us (can not measure)

// 20ms slot
slot_board_vars [SLOT_20ms_24GHZ].slotDuration = 655 ; // 20ms
slot_board_vars [SLOT_20ms_24GHZ].maxTxDataPrepare = 15 ; // 457us (based on measurement)
slot_board_vars [SLOT_20ms_24GHZ].maxRxAckPrepare = 10 ; // 305us (based on measurement)
slot_board_vars [SLOT_20ms_24GHZ].maxRxDataPrepare = 10 ; // 305us (based on measurement)
slot_board_vars [SLOT_20ms_24GHZ].maxTxAckPrepare = 15 ; // 457us (based on measurement)
slot_board_vars [SLOT_20ms_24GHZ].delayTx = 13 ; // 396us (based on measurement)
slot_board_vars [SLOT_20ms_24GHZ].delayRx = 0 ; // 0us (can not measure)
}

// To get the current slotDuration at any time
// used during initialization by sixtop to fire the first sixtop EB
uint16_t board_getSlotDuration (void)
{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you put this { at the end of previous line? Just try to be consistent.

return slot_board_vars [selected_slot_type].slotDuration;
}

// Setter/Getter function for slot_board_vars
slot_board_vars_t board_selectSlotTemplate (slotType_t slot_type)
{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

selected_slot_type = slot_type;
return slot_board_vars [selected_slot_type];
}

void antenna_init(void) {
/* Configure GPIO as output */
GPIOPinTypeGPIOOutput(BSP_ANTENNA_BASE, BSP_ANTENNA_CC2538_24GHZ);
Expand Down
36 changes: 0 additions & 36 deletions bsp/boards/openmote-b-24ghz/board_info.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,42 +58,6 @@
#define PORT_PIN_RADIO_RESET_HIGH() // nothing
#define PORT_PIN_RADIO_RESET_LOW() // nothing

#define SLOTDURATION 20 // in miliseconds

//===== IEEE802154E timing

#if SLOTDURATION==10
// time-slot related
#define PORT_TsSlotDuration 328 // counter counts one extra count, see datasheet
// execution speed related
#define PORT_maxTxDataPrepare 10 // 305us (measured 82us)
#define PORT_maxRxAckPrepare 10 // 305us (measured 83us)
#define PORT_maxRxDataPrepare 4 // 122us (measured 22us)
#define PORT_maxTxAckPrepare 10 // 122us (measured 94us)
// radio speed related
#ifdef L2_SECURITY_ACTIVE
#define PORT_delayTx 14 // 366us (measured xxxus)
#else
#define PORT_delayTx 12 // 366us (measured xxxus)
#endif
#define PORT_delayRx 0 // 0us (can not measure)
// radio watchdog
#endif

#if SLOTDURATION==20
#define PORT_TsSlotDuration 655 // 20ms

// execution speed related
#define PORT_maxTxDataPrepare 15 // 458us (measured 213us)
#define PORT_maxRxAckPrepare 10 // 305us (measured 86us)
#define PORT_maxRxDataPrepare 10 // 305us (measured 88us)
#define PORT_maxTxAckPrepare 15 // 458us (measured 211us)

// radio speed related
#define PORT_delayTx 13 // 397us (measured 388us)
#define PORT_delayRx 0 // 0us (can not measure)
#endif

//===== adaptive_sync accuracy

#define SYNC_ACCURACY 1 // ticks
Expand Down
10 changes: 9 additions & 1 deletion bsp/boards/openmote-b-24ghz/radio.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ typedef struct {

radio_vars_t radio_vars;

// global radio selection, will use RADIOSETTING_24GHZ by default at initialization.
uint8_t selected_radioSetting = RADIOSETTING_24GHZ;
//=========================== prototypes ======================================

void enable_radio_interrupts(void);
Expand Down Expand Up @@ -181,7 +183,13 @@ void radio_reset(void) {

//===== RF admin

void radio_setFrequency(uint8_t frequency, radio_freq_t tx_or_rx) {
void radio_setConfig (radioSetting_t radioSetting){
selected_radioSetting = radioSetting;
//do nothing
}


void radio_setFrequency(uint16_t frequency, radio_freq_t tx_or_rx) {

// change state
radio_vars.state = RADIOSTATE_SETTING_FREQUENCY;
Expand Down
6 changes: 4 additions & 2 deletions bsp/boards/openmote-b-subghz/board_info.h
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,12 @@

#define NUMSENSORS 7

//====== Antenna options ====

//=========================== Antenna options ================================

#define BSP_ANTENNA_BASE GPIO_D_BASE
#define BSP_ANTENNA_CC2538_24GHZ GPIO_PIN_4 //!< PD4 -- 2.4ghz
#define BSP_ANTENNA_AT215_24GHZ GPIO_PIN_3 //!< PD3 -- subghz
#define BSP_ANTENNA_AT215_24GHZ GPIO_PIN_3 //!< PD3 -- subghz
//#define DAGROOT

//=========================== typedef ========================================
Expand Down
Loading