From 1575222e4e9762e88de999fbc3207b1907fe4181 Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Tue, 13 Mar 2018 20:10:46 +0100 Subject: [PATCH 1/5] JN516x SDK 4170 build 1745 does not have vMMAC_SetChannel() function - use only vMMAC_SetChannelAndPower() - remove redundant call in init() --- arch/platform/jn516x/dev/micromac-radio.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/arch/platform/jn516x/dev/micromac-radio.c b/arch/platform/jn516x/dev/micromac-radio.c index c3117c6f8..3ebc13578 100644 --- a/arch/platform/jn516x/dev/micromac-radio.c +++ b/arch/platform/jn516x/dev/micromac-radio.c @@ -278,8 +278,7 @@ init(void) vMMAC_EnableInterrupts(&radio_interrupt_handler); } vMMAC_ConfigureRadio(); - set_channel(current_channel); - set_txpower(current_tx_power); + set_txpower(current_tx_power); /* it sets also the current_channel */ vMMAC_GetMacAddress(&node_long_address); /* Short addresses are disabled by default */ @@ -493,8 +492,7 @@ void set_channel(int c) { current_channel = c; - /* will fine tune TX power as well */ - vMMAC_SetChannel(current_channel); + vMMAC_SetChannelAndPower(current_channel, current_tx_power); } /*---------------------------------------------------------------------------*/ #if !MICROMAC_RADIO_MAC From b20f493e0927db2682d0315644d9f07f4899b265 Mon Sep 17 00:00:00 2001 From: George Oikonomou Date: Tue, 13 Mar 2018 17:38:48 +0000 Subject: [PATCH 2/5] Move BLE example to platform-specific/cc26xx This commit moves the BLE/IPv6 example to the platform-specific directory, since we only support one platform currently. The pull also tidies up the example Makefile a bit: We no longer need to specify the name for project-conf.h so we remove this. We add PLATFORMS_ONLY and BOARDS_ONLY --- examples/ble/ipv6-client/Makefile | 10 ---------- examples/platform-specific/cc26xx/ble-ipv6/Makefile | 11 +++++++++++ .../cc26xx/ble-ipv6}/client.c | 0 .../cc26xx/ble-ipv6}/project-conf.h | 0 tests/02-compile-arm-ports-01/Makefile | 2 +- 5 files changed, 12 insertions(+), 11 deletions(-) delete mode 100644 examples/ble/ipv6-client/Makefile create mode 100644 examples/platform-specific/cc26xx/ble-ipv6/Makefile rename examples/{ble/ipv6-client => platform-specific/cc26xx/ble-ipv6}/client.c (100%) rename examples/{ble/ipv6-client => platform-specific/cc26xx/ble-ipv6}/project-conf.h (100%) diff --git a/examples/ble/ipv6-client/Makefile b/examples/ble/ipv6-client/Makefile deleted file mode 100644 index c8f4f2a41..000000000 --- a/examples/ble/ipv6-client/Makefile +++ /dev/null @@ -1,10 +0,0 @@ -DEFINES+=PROJECT_CONF_H=\"project-conf.h\" -CONTIKI_PROJECT=client - -all: $(CONTIKI_PROJECT) - - -MAKE_MAC = MAKE_MAC_BLE -MAKE_NET = MAKE_NET_IPV6 -CONTIKI = ../../.. -include $(CONTIKI)/Makefile.include \ No newline at end of file diff --git a/examples/platform-specific/cc26xx/ble-ipv6/Makefile b/examples/platform-specific/cc26xx/ble-ipv6/Makefile new file mode 100644 index 000000000..4ba928ad3 --- /dev/null +++ b/examples/platform-specific/cc26xx/ble-ipv6/Makefile @@ -0,0 +1,11 @@ +CONTIKI_PROJECT=client + +all: $(CONTIKI_PROJECT) + +PLATFORMS_ONLY = srf06-cc26xx +BOARDS_ONLY = launchpad/cc2650 sensortag/cc2650 srf06/cc26xx + +MAKE_MAC = MAKE_MAC_BLE +MAKE_NET = MAKE_NET_IPV6 +CONTIKI = ../../../.. +include $(CONTIKI)/Makefile.include \ No newline at end of file diff --git a/examples/ble/ipv6-client/client.c b/examples/platform-specific/cc26xx/ble-ipv6/client.c similarity index 100% rename from examples/ble/ipv6-client/client.c rename to examples/platform-specific/cc26xx/ble-ipv6/client.c diff --git a/examples/ble/ipv6-client/project-conf.h b/examples/platform-specific/cc26xx/ble-ipv6/project-conf.h similarity index 100% rename from examples/ble/ipv6-client/project-conf.h rename to examples/platform-specific/cc26xx/ble-ipv6/project-conf.h diff --git a/tests/02-compile-arm-ports-01/Makefile b/tests/02-compile-arm-ports-01/Makefile index e0369319f..10f3537de 100644 --- a/tests/02-compile-arm-ports-01/Makefile +++ b/tests/02-compile-arm-ports-01/Makefile @@ -11,6 +11,7 @@ platform-specific/cc26xx/cc26xx-web-demo/srf06-cc26xx:BOARD=launchpad/cc2650 \ platform-specific/cc26xx/cc26xx-web-demo/srf06-cc26xx:BOARD=launchpad/cc1310 \ platform-specific/cc26xx/cc26xx-web-demo/srf06-cc26xx:BOARD=launchpad/cc1350 \ platform-specific/cc26xx/very-sleepy-demo/srf06-cc26xx \ +platform-specific/cc26xx/ble-ipv6/srf06-cc26xx:BOARD=sensortag/cc2650 \ rpl-border-router/srf06-cc26xx:BOARD=launchpad/cc2650 \ sensniff/srf06-cc26xx \ sensniff/srf06-cc26xx:BOARD=launchpad/cc1310 \ @@ -29,7 +30,6 @@ dev/leds/srf06-cc26xx:BOARD=launchpad/cc1310 \ dev/leds/srf06-cc26xx:BOARD=launchpad/cc1350 \ dev/leds/srf06-cc26xx:BOARD=launchpad/cc2650 \ 6tisch/etsi-plugtest-2017/srf06-cc26xx:BOARD=launchpad/cc2650 \ -ble/ipv6-client/srf06-cc26xx:BOARD=launchpad/cc2650 \ storage/cfs-coffee/cc2538dk \ sensniff/cc2538dk \ rpl-udp/cc2538dk \ From de975bbabe1e41d4d081aaee6ac955051a0b7293 Mon Sep 17 00:00:00 2001 From: George Oikonomou Date: Tue, 13 Mar 2018 17:39:05 +0000 Subject: [PATCH 3/5] Move BLE readme to the corresponding example dir --- .../platform-specific/cc26xx/ble-ipv6}/README.md | 2 -- 1 file changed, 2 deletions(-) rename {arch/cpu/cc26xx-cc13xx/rf-core => examples/platform-specific/cc26xx/ble-ipv6}/README.md (96%) diff --git a/arch/cpu/cc26xx-cc13xx/rf-core/README.md b/examples/platform-specific/cc26xx/ble-ipv6/README.md similarity index 96% rename from arch/cpu/cc26xx-cc13xx/rf-core/README.md rename to examples/platform-specific/cc26xx/ble-ipv6/README.md index 247626e2d..d72ab752d 100644 --- a/arch/cpu/cc26xx-cc13xx/rf-core/README.md +++ b/examples/platform-specific/cc26xx/ble-ipv6/README.md @@ -37,8 +37,6 @@ The L2CAP LE credit-based flow control support is implemented in `arch/cpu/cc26x Besides implementing rudimentary L2CAP support, this module handles fragmentation of large IPv6 packets. ## Using BLEach -A simple IPv6-over-BLE UDP-client is included under `examples/platform-specific/cc26xx/cc26xx-ble-client-demo`. - Currently, BLEach is only available for the Texas Instruments CC2650 hardware platform. The following sections describe how to configure BLEach for IPv6-over-BLE nodes and border routers. From e2d5e2dfeea32798cad70bf88b6d4338211e4906 Mon Sep 17 00:00:00 2001 From: George Oikonomou Date: Tue, 13 Mar 2018 17:39:37 +0000 Subject: [PATCH 4/5] Add missing includes --- arch/cpu/cc26xx-cc13xx/rf-core/ble-cc2650.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/cpu/cc26xx-cc13xx/rf-core/ble-cc2650.c b/arch/cpu/cc26xx-cc13xx/rf-core/ble-cc2650.c index 6c4d82f8a..6510ac50e 100644 --- a/arch/cpu/cc26xx-cc13xx/rf-core/ble-cc2650.c +++ b/arch/cpu/cc26xx-cc13xx/rf-core/ble-cc2650.c @@ -40,6 +40,9 @@ #include "dev/radio.h" #include "os/dev/ble-hal.h" #include "rf-core/ble-hal/ble-hal-cc26xx.h" + +#include +#include /*---------------------------------------------------------------------------*/ #include "sys/log.h" #define LOG_MODULE "RADIO" From 66106e86dde2270649abda92782f55ca9331f2df Mon Sep 17 00:00:00 2001 From: George Oikonomou Date: Tue, 13 Mar 2018 17:54:17 +0000 Subject: [PATCH 5/5] Add nullnet example test for cc26xx --- tests/02-compile-arm-ports-01/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/02-compile-arm-ports-01/Makefile b/tests/02-compile-arm-ports-01/Makefile index 10f3537de..c78ed1714 100644 --- a/tests/02-compile-arm-ports-01/Makefile +++ b/tests/02-compile-arm-ports-01/Makefile @@ -12,6 +12,7 @@ platform-specific/cc26xx/cc26xx-web-demo/srf06-cc26xx:BOARD=launchpad/cc1310 \ platform-specific/cc26xx/cc26xx-web-demo/srf06-cc26xx:BOARD=launchpad/cc1350 \ platform-specific/cc26xx/very-sleepy-demo/srf06-cc26xx \ platform-specific/cc26xx/ble-ipv6/srf06-cc26xx:BOARD=sensortag/cc2650 \ +nullnet/srf06-cc26xx:BOARD=sensortag/cc2650 \ rpl-border-router/srf06-cc26xx:BOARD=launchpad/cc2650 \ sensniff/srf06-cc26xx \ sensniff/srf06-cc26xx:BOARD=launchpad/cc1310 \