diff --git a/boards.txt b/boards.txt index 15d078d6..51d1f688 100644 --- a/boards.txt +++ b/boards.txt @@ -46,10 +46,10 @@ WisCoreRAK4631Board.build.usb_manufacturer="RAKwireless" WisCoreRAK4631Board.build.usb_product="WisCore RAK4631 Board" WisCoreRAK4631Board.build.extra_flags=-DNRF52840_XXAA -DRAK4631_V2.0+RAK5005-O_V1.0 -Drak4630 -DWISBLOCK_BASE_5005_O {build.flags.usb} WisCoreRAK4631Board.build.flags.feature= -DSUPPORT_LORA -DLORA_IO_SPI_PORT=2 -DSYS_RTC_COUNTER_PORT=2 -DATCMD_CUST_TABLE_SIZE=64 -DWAN_TYPE=0 -DLORA_STACK_VER=0x040407 -DBATTERY_LEVEL_SUPPORT -DBLE_CENTRAL_SUPPORT -DAPP_TIMER_V2 -DAPP_TIMER_V2_RTC1_ENABLED -DBOARD_PCA10056 -DS140 -DCONFIG_GPIO_AS_PINRESET -DFLOAT_ABI_HARD -DNRF52840_XXAA -DNRF_SD_BLE_API_VERSION=6 -DUSER_UART -DUSBD_CDC -DBLE_SUPPORT -DDFU_SUPPORT -DBL_SETTINGS_ACCESS_ONLY -DNRF_DFU_SVCI_ENABLED -DNRF_DFU_TRANSPORT_BLE=1 -DREGION_AS923 -DREGION_AU915 -DREGION_CN470 -DREGION_CN779 -DREGION_EU433 -DREGION_EU868 -DREGION_KR920 -DREGION_IN865 -DREGION_US915 -DREGION_RU864 -DSOFT_SE -DSECURE_ELEMENT_PRE_PROVISIONED -DLORAMAC_CLASSB_ENABLED -DSOFTDEVICE_PRESENT -DSWI_DISABLE0 -D__HEAP_SIZE=7168 -D__STACK_SIZE=7168 -DDEBUG -DSUPPORT_USB -DSUPPORT_BLE -DSUPPORT_NFC -DSUPPORT_SPI -DSUPPORT_AT -DRUI_SDK -WisCoreRAK4631Board.build.flags.lib_path="-L{runtime.platform.path}/cores/nRF5/app" "-L{runtime.platform.path}/cores/nRF5/component/core/mcu/nrf52840" "-L{runtime.platform.path}/cores/nRF5/component/core/mcu/nrf52840/uhal" "-L{runtime.platform.path}/cores/nRF5/external" "-L{runtime.platform.path}/cores/nRF5/component/core/board/{build.series}" "-L{runtime.platform.path}/cores/nRF5/component/udrv/serial" "-L{runtime.platform.path}/cores/nRF5/component/udrv/flash" "-L{runtime.platform.path}/cores/nRF5/component/udrv/timer" "-L{runtime.platform.path}/cores/nRF5/component/service/nvm" "-L{runtime.platform.path}/cores/nRF5/component/udrv/system" "-L{runtime.platform.path}/cores/nRF5/component/udrv/powersave" "-L{runtime.platform.path}/cores/nRF5/component/udrv/wdt" "-L{runtime.platform.path}/cores/nRF5/component/udrv/gpio" "-L{runtime.platform.path}/cores/nRF5/component/udrv/twimst" "-L{runtime.platform.path}/cores/nRF5/component/udrv/delay" "-L{runtime.platform.path}/cores/nRF5/component/udrv/rtc" "-L{runtime.platform.path}/cores/nRF5/component/service/lora" "-L{runtime.platform.path}/cores/nRF5/component/service/runtimeConfig" "-L{runtime.platform.path}/cores/nRF5/component/udrv/delay" "-L{runtime.platform.path}/cores/nRF5/component/udrv/gpio" "-L{runtime.platform.path}/cores/nRF5/component/udrv/rtc" "-L{runtime.platform.path}/cores/nRF5/component/udrv/twimst" "-L{runtime.platform.path}/cores/nRF5/component/udrv/dfu" "-L{runtime.platform.path}/cores/nRF5/component/udrv/pwm" "-L{runtime.platform.path}/cores/nRF5/component/udrv/adc" "-L{runtime.platform.path}/cores/nRF5/component/udrv/pdm" "-L{runtime.platform.path}/cores/nRF5/component/udrv/spimst" "-L{runtime.platform.path}/cores/nRF5/component/udrv/ble" "-L{runtime.platform.path}/cores/nRF5/component/udrv/nfc" "-L{runtime.platform.path}/cores/nRF5/component/service/battery" "-L{runtime.platform.path}/cores/nRF5/component/service/mode" "-L{runtime.platform.path}/cores/nRF5/component/service/debug" "-L{runtime.platform.path}/cores/nRF5/component/rui_v3_api" "-L{runtime.platform.path}/cores/nRF5/component/fund/event_queue" "-L{runtime.platform.path}/cores/nRF5/component/fund/circular_queue" "-L{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/external/nrf_cc310/lib/cortex-m4/hard-float" "-L{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/external/nrf_oberon/lib/cortex-m4/hard-float" "-L{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/nfc/t4t_lib" "-L{runtime.platform.path}/variants/{build.variant}" "-L{runtime.platform.path}/system/{build.variant}" -WisCoreRAK4631Board.build.flags.inc_path="-I{runtime.platform.path}/variants/{build.variant}" "-I{runtime.platform.path}/system/{build.variant}" "-I{runtime.platform.path}/cores/nRF5/app/RAK4631/src" "-I{runtime.platform.path}/cores/nRF5/component/inc" "-I{runtime.platform.path}/cores/nRF5/component/core/mcu/nrf52840" "-I{runtime.platform.path}/cores/nRF5/component/core/mcu/nrf52840/uhal" "-I{runtime.platform.path}/cores/nRF5/component/core/mcu/nrf52840/uhal/serial" "-I{runtime.platform.path}/cores/nRF5/component/core/mcu/none/uhal" "-I{runtime.platform.path}/cores/nRF5/component/core/board/{build.series}" "-I{runtime.platform.path}/cores/nRF5/component/udrv" "-I{runtime.platform.path}/cores/nRF5/component/udrv/serial" "-I{runtime.platform.path}/cores/nRF5/component/udrv/timer" "-I{runtime.platform.path}/cores/nRF5/component/udrv/delay" "-I{runtime.platform.path}/cores/nRF5/component/udrv/spimst" "-I{runtime.platform.path}/cores/nRF5/component/udrv/powersave" "-I{runtime.platform.path}/cores/nRF5/component/udrv/gpio" "-I{runtime.platform.path}/cores/nRF5/component/udrv/rtc" "-I{runtime.platform.path}/cores/nRF5/component/udrv/twimst" "-I{runtime.platform.path}/cores/nRF5/component/udrv/dfu" "-I{runtime.platform.path}/cores/nRF5/component/udrv/pwm" "-I{runtime.platform.path}/cores/nRF5/component/udrv/adc" "-I{runtime.platform.path}/cores/nRF5/component/udrv/system" "-I{runtime.platform.path}/cores/nRF5/component/udrv/ble" "-I{runtime.platform.path}/cores/nRF5/component/udrv/flash" "-I{runtime.platform.path}/cores/nRF5/component/udrv/wdt" "-I{runtime.platform.path}/cores/nRF5/component/udrv/nfc" "-I{runtime.platform.path}/cores/nRF5/component/udrv/pdm" "-I{runtime.platform.path}/cores/nRF5/component/service/lora" "-I{runtime.platform.path}/cores/nRF5/component/service/lora/packages" "-I{runtime.platform.path}/cores/nRF5/component/service/runtimeConfig" "-I{runtime.platform.path}/cores/nRF5/component/service/nvm" "-I{runtime.platform.path}/cores/nRF5/component/service/battery" "-I{runtime.platform.path}/cores/nRF5/component/service/debug" "-I{runtime.platform.path}/cores/nRF5/component/service/mode" "-I{runtime.platform.path}/cores/nRF5/component/service/mode/cli" "-I{runtime.platform.path}/cores/nRF5/component/service/mode/transparent" "-I{runtime.platform.path}/cores/nRF5/component/service/mode/protocol" "-I{runtime.platform.path}/cores/nRF5/component/rui_v3_api" "-I{runtime.platform.path}/cores/nRF5/component/rui_v3_api/avr" "-I{runtime.platform.path}/cores/nRF5/component/fund/event_queue" "-I{runtime.platform.path}/cores/nRF5/component/fund/circular_queue" "-I{runtime.platform.path}/cores/nRF5/external/lora/LoRaMac-node-4.4.7/src/mac" "-I{runtime.platform.path}/cores/nRF5/external/lora/LoRaMac-node-4.4.7/src/mac/region" "-I{runtime.platform.path}/cores/nRF5/external/lora/LoRaMac-node-4.4.7/src/radio" "-I{runtime.platform.path}/cores/nRF5/external/lora/LoRaMac-node-4.4.7/src/system" "-I{runtime.platform.path}/cores/nRF5/external/lora/LoRaMac-node-4.4.7/src/peripherals" "-I{runtime.platform.path}/cores/nRF5/external/lora/LoRaMac-node-4.4.7/src/apps/LoRaMac/common/LmHandler" "-I{runtime.platform.path}/cores/nRF5/external/lora/LoRaMac-node-4.4.7/src/boards" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/log" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/ringbuf" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/log/src" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/memobj" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/mutex" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/softdevice/s140/headers" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/softdevice/s140/headers/nrf52" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/ble/nrf_ble_scan" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/serial" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/queue" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/RUI/Source/nordic/service/wdt" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/modules/nrfx/drivers/include" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/modules/nrfx/hal" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/integration/nrfx/legacy" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/usbd" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/usbd/class/cdc/acm" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/usbd/class/cdc" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/external/utf_converter" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/drivers_nrf/usbd" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/ble/ble_services/ble_dfu" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/bootloader" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/bootloader/ble_dfu" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/bootloader/dfu" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/pwr_mgmt" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/svc" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/mutex" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/RUI/Source/nordic/app" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/integration/nrfx/legacy" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/experimental_section_vars" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/strerror" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/fstorage" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/softdevice/common" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/util/" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/ble/ble_link_ctx_manager" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/atomic/" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/atomic_flags" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/ble/ble_db_discovery" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/ble/nrf_ble_gatt" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/balloc" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/boards" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/ble/peer_manager" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/softdevice/common" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/ble/common" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/ble/ble_services/ble_nus" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/ble/ble_services/ble_nus_c" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/ble/ble_link_ctx_manager" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/ble/ble_advertising" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/atomic_flags" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/timer" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/fds" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/fifo" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/atomic" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/atomic_fifo" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/uart" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/fstorage" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/crc32" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/sha256" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/crypto" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/crypto/backend/cc310" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/crypto/backend/cc310_bl" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/crypto/backend/nrf_sw" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/crypto/backend/mbedtls" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/crypto/backend/oberon" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/crypto/backend/micro_ecc" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/bootloader/dfu" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/ble/nrf_ble_gatt" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/uart/" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/modules/nrfx/mdk" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/RUI/build/nordic/RTE" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/modules/nrfx/hal" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/modules/nrfx/drivers/src/prs" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/balloc" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/delay" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/integration/nrfx" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/bsp" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/external/segger_rtt" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/RUI/Source/nordic/include" "-I{runtime.platform.path}/cores/nRF5/external/micro_ecc" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/strerror" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/boards" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/toolchain/cmsis/include" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/modules/nrfx" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/util" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/external/fprintf" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/external/segger_rtt" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/modules/nrfx/drivers/include" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/util" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/ble/ble_advertising" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/fds" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/button" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/bsp" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/modules/nrfx/drivers/include" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/modules/nrfx/hal/" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/RUI/Source/nordic/service/ble_central" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/ble/ble_db_discovery" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/bootloader" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/pwr_mgmt" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/mutex" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/pwm" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/ble/nrf_ble_gq" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/crypto/backend/optiga" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/crypto/backend/nrf_hw" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/external/mbedtls/include" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/external/mbedtls/include/mbedtls" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/crypto/backend/cifra" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/stack_info" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/sortlist" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/timer" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/cli" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/cli/uart" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/ble/nrf_ble_qwr" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/ble/ble_services/ble_hids" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/ble/ble_services/ble_bas" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/ble/ble_services/ble_dis" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/sensorsim" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/scheduler" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/external/nrf_cc310_bl/include" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/mutex" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/external/nrf_cc310/include" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/nfc/t4t_lib" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/nfc/ndef/generic/message" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/nfc/ndef/text" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/nfc/ndef/uri" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/nfc/ndef/launchapp" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/nfc/ndef/generic/record" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/hardfault" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/modules/nrfx/drivers/src" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/nfc/platform" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/hardfault/nrf52" "-I{runtime.platform.path}/cores/nRF5/external/FatFs/source" "-I{runtime.platform.path}/cores/nRF5/external/spiffs/src" +WisCoreRAK4631Board.build.flags.lib_path="-L{runtime.platform.path}/cores/nRF5/app" "-L{runtime.platform.path}/cores/nRF5/component/core/mcu/nrf52840" "-L{runtime.platform.path}/cores/nRF5/component/core/mcu/nrf52840/uhal" "-L{runtime.platform.path}/cores/nRF5/external" "-L{runtime.platform.path}/cores/nRF5/component/core/board/{build.series}" "-L{runtime.platform.path}/cores/nRF5/component/udrv/serial" "-L{runtime.platform.path}/cores/nRF5/component/udrv/flash" "-L{runtime.platform.path}/cores/nRF5/component/udrv/timer" "-L{runtime.platform.path}/cores/nRF5/component/service/nvm" "-L{runtime.platform.path}/cores/nRF5/component/udrv/system" "-L{runtime.platform.path}/cores/nRF5/component/udrv/powersave" "-L{runtime.platform.path}/cores/nRF5/component/udrv/wdt" "-L{runtime.platform.path}/cores/nRF5/component/udrv/gpio" "-L{runtime.platform.path}/cores/nRF5/component/udrv/twimst" "-L{runtime.platform.path}/cores/nRF5/component/udrv/delay" "-L{runtime.platform.path}/cores/nRF5/component/udrv/rtc" "-L{runtime.platform.path}/cores/nRF5/component/service/lora" "-L{runtime.platform.path}/cores/nRF5/component/udrv/delay" "-L{runtime.platform.path}/cores/nRF5/component/udrv/gpio" "-L{runtime.platform.path}/cores/nRF5/component/udrv/rtc" "-L{runtime.platform.path}/cores/nRF5/component/udrv/twimst" "-L{runtime.platform.path}/cores/nRF5/component/udrv/dfu" "-L{runtime.platform.path}/cores/nRF5/component/udrv/pwm" "-L{runtime.platform.path}/cores/nRF5/component/udrv/adc" "-L{runtime.platform.path}/cores/nRF5/component/udrv/pdm" "-L{runtime.platform.path}/cores/nRF5/component/udrv/spimst" "-L{runtime.platform.path}/cores/nRF5/component/udrv/ble" "-L{runtime.platform.path}/cores/nRF5/component/udrv/nfc" "-L{runtime.platform.path}/cores/nRF5/component/service/battery" "-L{runtime.platform.path}/cores/nRF5/component/service/mode" "-L{runtime.platform.path}/cores/nRF5/component/service/debug" "-L{runtime.platform.path}/cores/nRF5/component/rui_v3_api" "-L{runtime.platform.path}/cores/nRF5/component/fund/event_queue" "-L{runtime.platform.path}/cores/nRF5/component/fund/circular_queue" "-L{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/external/nrf_cc310/lib/cortex-m4/hard-float" "-L{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/external/nrf_oberon/lib/cortex-m4/hard-float" "-L{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/nfc/t4t_lib" "-L{runtime.platform.path}/variants/{build.variant}" "-L{runtime.platform.path}/system/{build.variant}" +WisCoreRAK4631Board.build.flags.inc_path="-I{runtime.platform.path}/variants/{build.variant}" "-I{runtime.platform.path}/system/{build.variant}" "-I{runtime.platform.path}/cores/nRF5/app/RAK4631/src" "-I{runtime.platform.path}/cores/nRF5/component/inc" "-I{runtime.platform.path}/cores/nRF5/component/core/mcu/nrf52840" "-I{runtime.platform.path}/cores/nRF5/component/core/mcu/nrf52840/uhal" "-I{runtime.platform.path}/cores/nRF5/component/core/mcu/nrf52840/uhal/serial" "-I{runtime.platform.path}/cores/nRF5/component/core/mcu/none/uhal" "-I{runtime.platform.path}/cores/nRF5/component/core/board/{build.series}" "-I{runtime.platform.path}/cores/nRF5/component/udrv" "-I{runtime.platform.path}/cores/nRF5/component/udrv/serial" "-I{runtime.platform.path}/cores/nRF5/component/udrv/timer" "-I{runtime.platform.path}/cores/nRF5/component/udrv/delay" "-I{runtime.platform.path}/cores/nRF5/component/udrv/spimst" "-I{runtime.platform.path}/cores/nRF5/component/udrv/powersave" "-I{runtime.platform.path}/cores/nRF5/component/udrv/gpio" "-I{runtime.platform.path}/cores/nRF5/component/udrv/rtc" "-I{runtime.platform.path}/cores/nRF5/component/udrv/twimst" "-I{runtime.platform.path}/cores/nRF5/component/udrv/dfu" "-I{runtime.platform.path}/cores/nRF5/component/udrv/pwm" "-I{runtime.platform.path}/cores/nRF5/component/udrv/adc" "-I{runtime.platform.path}/cores/nRF5/component/udrv/system" "-I{runtime.platform.path}/cores/nRF5/component/udrv/ble" "-I{runtime.platform.path}/cores/nRF5/component/udrv/flash" "-I{runtime.platform.path}/cores/nRF5/component/udrv/wdt" "-I{runtime.platform.path}/cores/nRF5/component/udrv/nfc" "-I{runtime.platform.path}/cores/nRF5/component/udrv/pdm" "-I{runtime.platform.path}/cores/nRF5/component/service/lora" "-I{runtime.platform.path}/cores/nRF5/component/service/lora/packages" "-I{runtime.platform.path}/cores/nRF5/component/service/nvm" "-I{runtime.platform.path}/cores/nRF5/component/service/battery" "-I{runtime.platform.path}/cores/nRF5/component/service/debug" "-I{runtime.platform.path}/cores/nRF5/component/service/mode" "-I{runtime.platform.path}/cores/nRF5/component/service/mode/cli" "-I{runtime.platform.path}/cores/nRF5/component/service/mode/transparent" "-I{runtime.platform.path}/cores/nRF5/component/service/mode/protocol" "-I{runtime.platform.path}/cores/nRF5/component/rui_v3_api" "-I{runtime.platform.path}/cores/nRF5/component/rui_v3_api/avr" "-I{runtime.platform.path}/cores/nRF5/component/fund/event_queue" "-I{runtime.platform.path}/cores/nRF5/component/fund/circular_queue" "-I{runtime.platform.path}/cores/nRF5/external/lora/LoRaMac-node-4.4.7/src/mac" "-I{runtime.platform.path}/cores/nRF5/external/lora/LoRaMac-node-4.4.7/src/mac/region" "-I{runtime.platform.path}/cores/nRF5/external/lora/LoRaMac-node-4.4.7/src/radio" "-I{runtime.platform.path}/cores/nRF5/external/lora/LoRaMac-node-4.4.7/src/system" "-I{runtime.platform.path}/cores/nRF5/external/lora/LoRaMac-node-4.4.7/src/peripherals" "-I{runtime.platform.path}/cores/nRF5/external/lora/LoRaMac-node-4.4.7/src/apps/LoRaMac/common/LmHandler" "-I{runtime.platform.path}/cores/nRF5/external/lora/LoRaMac-node-4.4.7/src/boards" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/log" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/ringbuf" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/log/src" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/memobj" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/mutex" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/softdevice/s140/headers" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/softdevice/s140/headers/nrf52" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/ble/nrf_ble_scan" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/serial" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/queue" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/RUI/Source/nordic/service/wdt" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/modules/nrfx/drivers/include" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/modules/nrfx/hal" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/integration/nrfx/legacy" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/usbd" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/usbd/class/cdc/acm" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/usbd/class/cdc" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/external/utf_converter" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/drivers_nrf/usbd" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/ble/ble_services/ble_dfu" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/bootloader" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/bootloader/ble_dfu" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/bootloader/dfu" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/pwr_mgmt" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/svc" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/mutex" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/RUI/Source/nordic/app" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/integration/nrfx/legacy" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/experimental_section_vars" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/strerror" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/fstorage" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/softdevice/common" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/util/" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/ble/ble_link_ctx_manager" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/atomic/" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/atomic_flags" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/ble/ble_db_discovery" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/ble/nrf_ble_gatt" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/balloc" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/boards" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/ble/peer_manager" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/softdevice/common" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/ble/common" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/ble/ble_services/ble_nus" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/ble/ble_services/ble_nus_c" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/ble/ble_link_ctx_manager" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/ble/ble_advertising" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/atomic_flags" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/timer" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/fds" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/fifo" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/atomic" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/atomic_fifo" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/uart" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/fstorage" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/crc32" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/sha256" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/crypto" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/crypto/backend/cc310" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/crypto/backend/cc310_bl" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/crypto/backend/nrf_sw" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/crypto/backend/mbedtls" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/crypto/backend/oberon" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/crypto/backend/micro_ecc" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/bootloader/dfu" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/ble/nrf_ble_gatt" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/uart/" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/modules/nrfx/mdk" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/RUI/build/nordic/RTE" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/modules/nrfx/hal" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/modules/nrfx/drivers/src/prs" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/balloc" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/delay" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/integration/nrfx" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/bsp" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/external/segger_rtt" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/RUI/Source/nordic/include" "-I{runtime.platform.path}/cores/nRF5/external/micro_ecc" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/strerror" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/boards" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/toolchain/cmsis/include" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/modules/nrfx" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/util" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/external/fprintf" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/external/segger_rtt" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/modules/nrfx/drivers/include" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/util" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/ble/ble_advertising" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/fds" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/button" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/bsp" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/modules/nrfx/drivers/include" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/modules/nrfx/hal/" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/RUI/Source/nordic/service/ble_central" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/ble/ble_db_discovery" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/bootloader" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/pwr_mgmt" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/mutex" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/pwm" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/ble/nrf_ble_gq" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/crypto/backend/optiga" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/crypto/backend/nrf_hw" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/external/mbedtls/include" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/external/mbedtls/include/mbedtls" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/crypto/backend/cifra" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/stack_info" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/sortlist" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/timer" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/cli" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/cli/uart" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/ble/nrf_ble_qwr" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/ble/ble_services/ble_hids" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/ble/ble_services/ble_bas" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/ble/ble_services/ble_dis" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/sensorsim" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/scheduler" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/external/nrf_cc310_bl/include" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/mutex" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/external/nrf_cc310/include" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/nfc/t4t_lib" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/nfc/ndef/generic/message" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/nfc/ndef/text" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/nfc/ndef/uri" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/nfc/ndef/launchapp" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/nfc/ndef/generic/record" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/hardfault" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/modules/nrfx/drivers/src" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/nfc/platform" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/hardfault/nrf52" "-I{runtime.platform.path}/cores/nRF5/external/FatFs/source" "-I{runtime.platform.path}/cores/nRF5/external/spiffs/src" WisCoreRAK4631Board.build.flags.lib=-lboot -luhal -ludrv_serial -ludrv_flash -ludrv_timer -ludrv_system -ludrv_powersave -ludrv_wdt -ludrv_gpio -ludrv_twimst -ludrv_delay -ludrv_rtc -ludrv_delay -ludrv_gpio -ludrv_rtc -ludrv_twimst -ludrv_dfu -ludrv_pwm -ludrv_adc -ludrv_pdm -ludrv_spimst -ludrv_ble -ludrv_raknfc -lrui_v3_api -lnrf_cc310_0.9.13 -loberon_3.0.6 -l:nfc_t4t_lib_gcc.a -WisCoreRAK4631Board.build.flags.inc_path="-I{runtime.platform.path}/variants/{build.variant}" "-I{runtime.platform.path}/system/{build.variant}" "-I{runtime.platform.path}/cores/nRF5/app/RAK4631/src" "-I{runtime.platform.path}/cores/nRF5/component/inc" "-I{runtime.platform.path}/cores/nRF5/component/core/mcu/nrf52840" "-I{runtime.platform.path}/cores/nRF5/component/core/mcu/nrf52840/uhal" "-I{runtime.platform.path}/cores/nRF5/component/core/mcu/nrf52840/uhal/serial" "-I{runtime.platform.path}/cores/nRF5/component/core/mcu/none/uhal" "-I{runtime.platform.path}/cores/nRF5/component/core/board/{build.series}" "-I{runtime.platform.path}/cores/nRF5/component/udrv" "-I{runtime.platform.path}/cores/nRF5/component/udrv/serial" "-I{runtime.platform.path}/cores/nRF5/component/udrv/timer" "-I{runtime.platform.path}/cores/nRF5/component/udrv/delay" "-I{runtime.platform.path}/cores/nRF5/component/udrv/spimst" "-I{runtime.platform.path}/cores/nRF5/component/udrv/powersave" "-I{runtime.platform.path}/cores/nRF5/component/udrv/gpio" "-I{runtime.platform.path}/cores/nRF5/component/udrv/rtc" "-I{runtime.platform.path}/cores/nRF5/component/udrv/twimst" "-I{runtime.platform.path}/cores/nRF5/component/udrv/dfu" "-I{runtime.platform.path}/cores/nRF5/component/udrv/pwm" "-I{runtime.platform.path}/cores/nRF5/component/udrv/adc" "-I{runtime.platform.path}/cores/nRF5/component/udrv/system" "-I{runtime.platform.path}/cores/nRF5/component/udrv/ble" "-I{runtime.platform.path}/cores/nRF5/component/udrv/flash" "-I{runtime.platform.path}/cores/nRF5/component/udrv/wdt" "-I{runtime.platform.path}/cores/nRF5/component/udrv/nfc" "-I{runtime.platform.path}/cores/nRF5/component/udrv/pdm" "-I{runtime.platform.path}/cores/nRF5/component/service/lora" "-I{runtime.platform.path}/cores/nRF5/component/service/lora/packages" "-I{runtime.platform.path}/cores/nRF5/component/service/runtimeConfig" "-I{runtime.platform.path}/cores/nRF5/component/service/nvm" "-I{runtime.platform.path}/cores/nRF5/component/service/battery" "-I{runtime.platform.path}/cores/nRF5/component/service/debug" "-I{runtime.platform.path}/cores/nRF5/component/service/mode" "-I{runtime.platform.path}/cores/nRF5/component/service/mode/cli" "-I{runtime.platform.path}/cores/nRF5/component/service/mode/transparent" "-I{runtime.platform.path}/cores/nRF5/component/service/mode/protocol" "-I{runtime.platform.path}/cores/nRF5/component/rui_v3_api" "-I{runtime.platform.path}/cores/nRF5/component/rui_v3_api/avr" "-I{runtime.platform.path}/cores/nRF5/component/fund/event_queue" "-I{runtime.platform.path}/cores/nRF5/component/fund/circular_queue" "-I{runtime.platform.path}/cores/nRF5/external/lora/LoRaMac-node-4.4.7/src/mac" "-I{runtime.platform.path}/cores/nRF5/external/lora/LoRaMac-node-4.4.7/src/mac/region" "-I{runtime.platform.path}/cores/nRF5/external/lora/LoRaMac-node-4.4.7/src/radio" "-I{runtime.platform.path}/cores/nRF5/external/lora/LoRaMac-node-4.4.7/src/system" "-I{runtime.platform.path}/cores/nRF5/external/lora/LoRaMac-node-4.4.7/src/peripherals" "-I{runtime.platform.path}/cores/nRF5/external/lora/LoRaMac-node-4.4.7/src/apps/LoRaMac/common/LmHandler" "-I{runtime.platform.path}/cores/nRF5/external/lora/LoRaMac-node-4.4.7/src/boards" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/log" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/ringbuf" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/log/src" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/memobj" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/mutex" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/softdevice/s140/headers" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/softdevice/s140/headers/nrf52" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/ble/nrf_ble_scan" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/serial" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/queue" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/RUI/Source/nordic/service/wdt" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/modules/nrfx/drivers/include" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/modules/nrfx/hal" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/integration/nrfx/legacy" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/usbd" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/usbd/class/cdc/acm" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/usbd/class/cdc" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/external/utf_converter" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/drivers_nrf/usbd" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/ble/ble_services/ble_dfu" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/bootloader" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/bootloader/ble_dfu" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/bootloader/dfu" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/pwr_mgmt" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/svc" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/mutex" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/RUI/Source/nordic/app" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/integration/nrfx/legacy" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/experimental_section_vars" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/strerror" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/fstorage" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/softdevice/common" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/util/" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/ble/ble_link_ctx_manager" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/atomic/" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/atomic_flags" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/ble/ble_db_discovery" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/ble/nrf_ble_gatt" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/balloc" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/boards" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/ble/peer_manager" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/softdevice/common" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/ble/common" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/ble/ble_services/ble_nus" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/ble/ble_services/ble_nus_c" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/ble/ble_link_ctx_manager" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/ble/ble_advertising" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/atomic_flags" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/timer" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/fds" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/fifo" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/atomic" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/atomic_fifo" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/uart" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/fstorage" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/crc32" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/sha256" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/crypto" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/crypto/backend/cc310" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/crypto/backend/cc310_bl" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/crypto/backend/nrf_sw" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/crypto/backend/mbedtls" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/crypto/backend/oberon" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/crypto/backend/micro_ecc" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/bootloader/dfu" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/ble/nrf_ble_gatt" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/uart/" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/modules/nrfx/mdk" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/RUI/build/nordic/RTE" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/modules/nrfx/hal" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/modules/nrfx/drivers/src/prs" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/balloc" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/delay" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/integration/nrfx" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/bsp" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/external/segger_rtt" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/RUI/Source/nordic/include" "-I{runtime.platform.path}/cores/nRF5/external/micro_ecc" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/strerror" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/boards" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/toolchain/cmsis/include" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/modules/nrfx" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/util" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/external/fprintf" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/external/segger_rtt" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/modules/nrfx/drivers/include" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/util" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/ble/ble_advertising" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/fds" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/button" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/bsp" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/modules/nrfx/drivers/include" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/modules/nrfx/hal/" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/RUI/Source/nordic/service/ble_central" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/ble/ble_db_discovery" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/bootloader" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/pwr_mgmt" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/mutex" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/pwm" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/ble/nrf_ble_gq" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/crypto/backend/optiga" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/crypto/backend/nrf_hw" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/external/mbedtls/include" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/external/mbedtls/include/mbedtls" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/crypto/backend/cifra" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/stack_info" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/sortlist" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/timer" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/cli" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/cli/uart" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/ble/nrf_ble_qwr" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/ble/ble_services/ble_hids" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/ble/ble_services/ble_bas" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/ble/ble_services/ble_dis" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/sensorsim" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/scheduler" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/external/nrf_cc310_bl/include" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/mutex" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/external/nrf_cc310/include" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/nfc/t4t_lib" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/nfc/ndef/generic/message" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/nfc/ndef/text" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/nfc/ndef/uri" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/nfc/ndef/launchapp" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/nfc/ndef/generic/record" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/hardfault" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/modules/nrfx/drivers/src" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/nfc/platform" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/hardfault/nrf52" "-I{runtime.platform.path}/cores/nRF5/external/FatFs/source" "-I{runtime.platform.path}/cores/nRF5/external/spiffs/src" +WisCoreRAK4631Board.build.flags.inc_path="-I{runtime.platform.path}/variants/{build.variant}" "-I{runtime.platform.path}/system/{build.variant}" "-I{runtime.platform.path}/cores/nRF5/app/RAK4631/src" "-I{runtime.platform.path}/cores/nRF5/component/inc" "-I{runtime.platform.path}/cores/nRF5/component/core/mcu/nrf52840" "-I{runtime.platform.path}/cores/nRF5/component/core/mcu/nrf52840/uhal" "-I{runtime.platform.path}/cores/nRF5/component/core/mcu/nrf52840/uhal/serial" "-I{runtime.platform.path}/cores/nRF5/component/core/mcu/none/uhal" "-I{runtime.platform.path}/cores/nRF5/component/core/board/{build.series}" "-I{runtime.platform.path}/cores/nRF5/component/udrv" "-I{runtime.platform.path}/cores/nRF5/component/udrv/serial" "-I{runtime.platform.path}/cores/nRF5/component/udrv/timer" "-I{runtime.platform.path}/cores/nRF5/component/udrv/delay" "-I{runtime.platform.path}/cores/nRF5/component/udrv/spimst" "-I{runtime.platform.path}/cores/nRF5/component/udrv/powersave" "-I{runtime.platform.path}/cores/nRF5/component/udrv/gpio" "-I{runtime.platform.path}/cores/nRF5/component/udrv/rtc" "-I{runtime.platform.path}/cores/nRF5/component/udrv/twimst" "-I{runtime.platform.path}/cores/nRF5/component/udrv/dfu" "-I{runtime.platform.path}/cores/nRF5/component/udrv/pwm" "-I{runtime.platform.path}/cores/nRF5/component/udrv/adc" "-I{runtime.platform.path}/cores/nRF5/component/udrv/system" "-I{runtime.platform.path}/cores/nRF5/component/udrv/ble" "-I{runtime.platform.path}/cores/nRF5/component/udrv/flash" "-I{runtime.platform.path}/cores/nRF5/component/udrv/wdt" "-I{runtime.platform.path}/cores/nRF5/component/udrv/nfc" "-I{runtime.platform.path}/cores/nRF5/component/udrv/pdm" "-I{runtime.platform.path}/cores/nRF5/component/service/lora" "-I{runtime.platform.path}/cores/nRF5/component/service/lora/packages" "-I{runtime.platform.path}/cores/nRF5/component/service/nvm" "-I{runtime.platform.path}/cores/nRF5/component/service/battery" "-I{runtime.platform.path}/cores/nRF5/component/service/debug" "-I{runtime.platform.path}/cores/nRF5/component/service/mode" "-I{runtime.platform.path}/cores/nRF5/component/service/mode/cli" "-I{runtime.platform.path}/cores/nRF5/component/service/mode/transparent" "-I{runtime.platform.path}/cores/nRF5/component/service/mode/protocol" "-I{runtime.platform.path}/cores/nRF5/component/rui_v3_api" "-I{runtime.platform.path}/cores/nRF5/component/rui_v3_api/avr" "-I{runtime.platform.path}/cores/nRF5/component/fund/event_queue" "-I{runtime.platform.path}/cores/nRF5/component/fund/circular_queue" "-I{runtime.platform.path}/cores/nRF5/external/lora/LoRaMac-node-4.4.7/src/mac" "-I{runtime.platform.path}/cores/nRF5/external/lora/LoRaMac-node-4.4.7/src/mac/region" "-I{runtime.platform.path}/cores/nRF5/external/lora/LoRaMac-node-4.4.7/src/radio" "-I{runtime.platform.path}/cores/nRF5/external/lora/LoRaMac-node-4.4.7/src/system" "-I{runtime.platform.path}/cores/nRF5/external/lora/LoRaMac-node-4.4.7/src/peripherals" "-I{runtime.platform.path}/cores/nRF5/external/lora/LoRaMac-node-4.4.7/src/apps/LoRaMac/common/LmHandler" "-I{runtime.platform.path}/cores/nRF5/external/lora/LoRaMac-node-4.4.7/src/boards" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/log" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/ringbuf" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/log/src" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/memobj" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/mutex" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/softdevice/s140/headers" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/softdevice/s140/headers/nrf52" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/ble/nrf_ble_scan" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/serial" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/queue" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/RUI/Source/nordic/service/wdt" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/modules/nrfx/drivers/include" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/modules/nrfx/hal" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/integration/nrfx/legacy" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/usbd" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/usbd/class/cdc/acm" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/usbd/class/cdc" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/external/utf_converter" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/drivers_nrf/usbd" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/ble/ble_services/ble_dfu" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/bootloader" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/bootloader/ble_dfu" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/bootloader/dfu" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/pwr_mgmt" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/svc" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/mutex" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/RUI/Source/nordic/app" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/integration/nrfx/legacy" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/experimental_section_vars" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/strerror" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/fstorage" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/softdevice/common" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/util/" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/ble/ble_link_ctx_manager" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/atomic/" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/atomic_flags" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/ble/ble_db_discovery" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/ble/nrf_ble_gatt" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/balloc" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/boards" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/ble/peer_manager" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/softdevice/common" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/ble/common" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/ble/ble_services/ble_nus" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/ble/ble_services/ble_nus_c" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/ble/ble_link_ctx_manager" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/ble/ble_advertising" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/atomic_flags" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/timer" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/fds" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/fifo" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/atomic" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/atomic_fifo" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/uart" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/fstorage" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/crc32" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/sha256" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/crypto" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/crypto/backend/cc310" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/crypto/backend/cc310_bl" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/crypto/backend/nrf_sw" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/crypto/backend/mbedtls" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/crypto/backend/oberon" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/crypto/backend/micro_ecc" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/bootloader/dfu" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/ble/nrf_ble_gatt" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/uart/" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/modules/nrfx/mdk" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/RUI/build/nordic/RTE" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/modules/nrfx/hal" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/modules/nrfx/drivers/src/prs" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/balloc" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/delay" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/integration/nrfx" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/bsp" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/external/segger_rtt" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/RUI/Source/nordic/include" "-I{runtime.platform.path}/cores/nRF5/external/micro_ecc" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/strerror" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/boards" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/toolchain/cmsis/include" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/modules/nrfx" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/util" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/external/fprintf" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/external/segger_rtt" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/modules/nrfx/drivers/include" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/util" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/ble/ble_advertising" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/fds" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/button" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/bsp" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/modules/nrfx/drivers/include" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/modules/nrfx/hal/" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/RUI/Source/nordic/service/ble_central" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/ble/ble_db_discovery" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/bootloader" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/pwr_mgmt" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/mutex" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/pwm" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/ble/nrf_ble_gq" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/crypto/backend/optiga" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/crypto/backend/nrf_hw" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/external/mbedtls/include" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/external/mbedtls/include/mbedtls" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/crypto/backend/cifra" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/stack_info" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/sortlist" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/timer" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/cli" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/cli/uart" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/ble/nrf_ble_qwr" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/ble/ble_services/ble_hids" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/ble/ble_services/ble_bas" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/ble/ble_services/ble_dis" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/sensorsim" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/scheduler" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/external/nrf_cc310_bl/include" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/mutex" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/external/nrf_cc310/include" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/nfc/t4t_lib" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/nfc/ndef/generic/message" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/nfc/ndef/text" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/nfc/ndef/uri" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/nfc/ndef/launchapp" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/nfc/ndef/generic/record" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/hardfault" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/modules/nrfx/drivers/src" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/nfc/platform" "-I{runtime.platform.path}/cores/nRF5/external/nRF5_SDK/nRF5_SDK_17.0.2_d674dde/components/libraries/hardfault/nrf52" "-I{runtime.platform.path}/cores/nRF5/external/FatFs/source" "-I{runtime.platform.path}/cores/nRF5/external/spiffs/src" WisCoreRAK4631Board.build.ldscript=flash_nrf52840.ld WisCoreRAK4631Board.build.vid=0x239A WisCoreRAK4631Board.build.pid=0x8029 diff --git a/cores/nRF5/component/rui_v3_api/HardwareSerial.h b/cores/nRF5/component/rui_v3_api/HardwareSerial.h index 2f9bbd38..83550662 100644 --- a/cores/nRF5/component/rui_v3_api/HardwareSerial.h +++ b/cores/nRF5/component/rui_v3_api/HardwareSerial.h @@ -50,9 +50,7 @@ using namespace std; typedef enum { RAK_AT_MODE, ///< AT command mode -#ifdef SUPPOER_BINARY RAK_API_MODE, ///< API mode -#endif #ifdef SUPPORT_LORA #ifdef SUPPORT_PASSTHRU RAK_PASS_MODE, ///< Pass-through mode @@ -357,27 +355,6 @@ class HardwareSerial : public Stream */ virtual void flush(void); - - /**@par Description - * Get the baud rate from the system configure - * - * @par Syntax - * Serial.getBaudrate(); - * @return void - * @par Example - * @verbatim - void setup() { - uint32_t baudrate = Serial.getBaudrate(); - Serial.begin(baudrate); - } - - void loop() { - } - @endverbatim - - */ - virtual uint32_t getBaudrate(void); - /**@}*/ }; diff --git a/cores/nRF5/component/rui_v3_api/RAKLoRa.h b/cores/nRF5/component/rui_v3_api/RAKLoRa.h index ce19c17f..59a32dc1 100755 --- a/cores/nRF5/component/rui_v3_api/RAKLoRa.h +++ b/cores/nRF5/component/rui_v3_api/RAKLoRa.h @@ -642,68 +642,7 @@ class RAKLoraP2P */ bool set(bool enable); }; - class cad - { - public: - /**@par Description - * This api allows the user to get the Channel Activity Detection status - * - * @par Syntax - * api.lora.cad.get(); - * @return Channel Activity Detection status(Type: bool) - * @par Example - * @verbatim - void setup() - { - Serial.begin(115200); - - Serial.printf("Set Node device work mode %s\r\n", api.lorawan.nwm.set(0) ? "Success" : "Fail"); - Serial.printf("Set P2P mode fix Length payload %s\r\n", api.lora.cad.set(true) ? "Success" : "Fail"); - } - - void loop() - { - Serial.printf("P2P mode fix Length payload switch = %s\r\n", api.lora.cad.get()?"true":"false"); - - delay(1000); - } - - @endverbatim - - */ - bool get(); - /**@par Description - * This api allows the user to set the Channel Activity Detection status - * - * @par Syntax - * api.lora.cad.set(); - * @param value Channel Activity Detection status(bool) - * @return bool - * @retval TRUE for setting P2P Channel Activity Detection success - * @retval FALSE for setting P2P Channel Activity Detection failure - * @par Example - * @verbatim - void setup() - { - Serial.begin(115200); - - Serial.printf("Set Node device work mode %s\r\n", api.lorawan.nwm.set(0) ? "Success" : "Fail"); - Serial.printf("Set P2P mode fix Length payload %s\r\n", api.lora.cad.set(true) ? "Success" : "Fail"); - } - - void loop() - { - Serial.printf("P2P mode fix Length payload switch = %s\r\n", api.lora.cad.get()?"true":"false"); - delay(1000); - } - - @endverbatim - - */ - - bool set(bool enable); - }; iqInver iqInver; syncword syncword; rfFrequency rfFrequency; @@ -714,7 +653,6 @@ class RAKLoraP2P preambleLength preambleLength; symbolTimeout symbolTimeout; fixLengthPayload fixLengthPayload; - cad cad; }; diff --git a/cores/nRF5/component/rui_v3_api/RAKLorawan.h b/cores/nRF5/component/rui_v3_api/RAKLorawan.h index 5db9afde..3d1e7faa 100644 --- a/cores/nRF5/component/rui_v3_api/RAKLorawan.h +++ b/cores/nRF5/component/rui_v3_api/RAKLorawan.h @@ -78,32 +78,6 @@ typedef enum RAK_LORA_CLASS_C = 2, ///< The LoRaWan will work in Class C } RAK_LORA_CLASS; -/**@par Description - * The LoRaMac Event Info - */ - -typedef enum RAKLoRaMacEventInfoStatus -{ - RAK_LORAMAC_STATUS_OK = 0, ///Service performed successfully - RAK_LORAMAC_STATUS_ERROR, ///An error occurred during the execution of the service - RAK_LORAMAC_STATUS_TX_TIMEOUT, ///A Tx timeout occurred - RAK_LORAMAC_STATUS_RX1_TIMEOUT, ///An Rx timeout occurred on receive window 1 - RAK_LORAMAC_STATUS_RX2_TIMEOUT, ///An Rx timeout occurred on receive window 2 - RAK_LORAMAC_STATUS_RX1_ERROR, ///An Rx error occurred on receive window 1 - RAK_LORAMAC_STATUS_RX2_ERROR, ///An Rx error occurred on receive window 2 - RAK_LORAMAC_STATUS_JOIN_FAIL, ///An error occurred in the join procedure - RAK_LORAMAC_STATUS_DOWNLINK_REPEATED, ///A frame with an invalid downlink counter was received. The downlink counter of the frame was equal to the local copy of the downlink counter of the node. - RAK_LORAMAC_STATUS_TX_DR_PAYLOAD_SIZE_ERROR, ///The MAC could not retransmit a frame since the MAC decreased the datarate. The payload size is not applicable for the datarate. - RAK_LORAMAC_STATUS_DOWNLINK_TOO_MANY_FRAMES_LOSS, ///The node has lost MAX_FCNT_GAP or more frames. - RAK_LORAMAC_STATUS_ADDRESS_FAIL, ///An address error occurred - RAK_LORAMAC_STATUS_MIC_FAIL, ///Message integrity check failure - RAK_LORAMAC_STATUS_MULTICAST_FAIL, ///Multicast error occurred - RAK_LORAMAC_STATUS_BEACON_LOCKED, ///Beacon locked - RAK_LORAMAC_STATUS_BEACON_LOST, ///Beacon lost - RAK_LORAMAC_STATUS_BEACON_NOT_FOUND, ///Beacon not found -}RAKLoRaMacEventInfoStatus_t; - - /**@par Description * The structure of a multicast group */ @@ -143,12 +117,6 @@ class RAKLorawan * @ingroup Joining_and_Sending * @par Syntax * api.lorawan.join() - * api.lorawan.join(join_start, auto_join, auto_join_period, auto_join_cnt) - * - * @param join_start manually join network: 0 means stop to join network; 1 means start to join network. - * @param auto_join automatically join network: 0 means stop automatically joining network; 1 means start automatically joining network. - * @param auto_join_period the join attempt period. The acceptance values are 7 to 255 (in seconds). - * @param auto_join_cnt the maximum number of join attempts. The acceptance values are 0 to 255 (in seconds). * @return bool * @retval TRUE for success * @retval FALSE for join failure @@ -189,7 +157,6 @@ class RAKLorawan @endverbatim */ bool join(); - bool join(uint8_t join_start, uint8_t auto_join, uint8_t auto_join_period, uint8_t auto_join_cnt); /**@par Description * This api provides the way to send data on a dedicated port number @@ -774,84 +741,6 @@ class RAKLorawan @endverbatim */ bool registerPSendCallback(service_lora_p2p_send_cb_type callback); - /**@par Description - * This API is used to register a callback function, - so that application can be notified when P2P uplink process is done. - * - * @ingroup P2P - * @par Syntax - * api.lorawan.registerPSendCallback(service_lora_p2p_send_cb_type callback) - * @param The callback function - * @return bool - * @retval TRUE for setting callback function success - * @retval FALSE for setting callback function failure - * @par Example - * @verbatim - void recv_cb(rui_lora_p2p_recv_t data) { - Serial.println("Receive something"); - } - - void send_cb(void) { - Serial.println("I send something"); - } - - void cad_cb(bool detect) { - if(detect) - Serial.println("detect Activity"); - else - Serial.println("no Activity"); - - } - - - long startTime; - - void setup() - { - Serial.begin(115200); - - delay(2000); - startTime = millis(); - - Serial.println("P2P Start"); - - Serial.printf("Set Node device work mode %s\r\n", api.lorawan.nwm.set(0) ? "Success" : "Fail"); - Serial.printf("Set P2P mode frequency %s\r\n", api.lorawan.pfreq.set(868000000) ? "Success" : "Fail"); - Serial.printf("Set P2P mode spreading factor %s\r\n", api.lorawan.psf.set(12) ? "Success" : "Fail"); - Serial.printf("Set P2P mode bandwidth %s\r\n", api.lorawan.pbw.set(125) ? "Success" : "Fail"); - Serial.printf("Set P2P mode code rate %s\r\n", api.lorawan.pcr.set(0) ? "Success" : "Fail"); - Serial.printf("Set P2P mode preamble length %s\r\n", api.lorawan.ppl.set(8) ? "Success" : "Fail"); - Serial.printf("Set P2P mode tx power %s\r\n", api.lorawan.ptp.set(22) ? "Success" : "Fail"); - - api.lorawan.registerPRecvCallback(recv_cb); - api.lorawan.registerPSendCallback(send_cb); - api.lorawan.registerPSendCADCallback(cad_cb); - - randomSeed(millis()); - } - - void loop() - { - uint8_t payload[] = "payload"; - - int rxDelay = random(3000, 5000); - - // Receive P2P data every 10 seconds - if(millis() - startTime >= 10*1000) { - Serial.printf("P2P Rx start for %d millisSconds\r\n", rxDelay); - startTime = millis(); - Serial.printf("P2P set Rx mode %s\r\n",api.lorawan.precv(rxDelay) ? "Success" : "Fail"); - delay(rxDelay); - } else { - - Serial.printf("P2P send %s\r\n", api.lorawan.psend(sizeof(payload), payload)? "Success" : "Fail"); - delay(1000); - } - - } - @endverbatim - */ - bool registerPSendCADCallback(service_lora_p2p_send_CAD_cb_type callback); /**@par Description * view or change the LoRAWAN APPEUI and use it to setup the LoRAWAN connection @@ -2793,7 +2682,7 @@ class RAKLorawan void loop() { - Serial.printf("The current beacon time = %lu\r\n", api.lorawan.btime.get()); + Serial.printf("The current beacon time = %l\r\n", api.lorawan.btime.get()); delay(1000); } @endverbatim @@ -3879,11 +3768,9 @@ channel mask * @ingroup P2P * @par Syntax * api.lorawan.psend(length, payload) - * api.lorawan.psend(length, payload,cad_enable) * * @param length the length of the payload * @param payload the data send to the other device - * @param bool Channel Activity Detection enable * @return bool * @retval TRUE for sending data success * @retval FALSE for sending data failure @@ -3908,7 +3795,6 @@ channel mask { uint8_t payload[] = "payload"; Serial.printf("P2P send %s\r\n", api.lorawan.psend(sizeof(payload), payload)? "Success" : "Fail"); - Serial.printf("P2P send %s\r\n", api.lorawan.psend(sizeof(payload), payload,true)? "Success" : "Fail"); delay(5000); } @@ -3916,7 +3802,6 @@ channel mask @endverbatim */ bool psend(uint8_t length, uint8_t *payload); - bool psend(uint8_t length, uint8_t *payload,bool cad_enable); /**@par Description * This api configures P2P mode encryption @@ -3936,8 +3821,8 @@ channel mask * @par Example * @verbatim long startTime; - char * node_encrypt_key = "aaaabbbbccccdddd"; - uint8_t encrypt_buff[16]; + uint8_t node_encrypt_key[8] = {0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08}; + uint8_t encrypt_buff[8]; void setup() { @@ -3954,13 +3839,13 @@ channel mask Serial.printf("Set P2P mode preamble length %s\r\n", api.lorawan.ppl.set(8) ? "Success" : "Fail"); Serial.printf("Set P2P mode tx power %s\r\n", api.lorawan.ptp.set(22) ? "Success" : "Fail"); Serial.printf("Set P2P mode encryption status %s\r\n", api.lorawan.encry.set(1) ? "Success" : "Fail"); - Serial.printf("Set P2P mode encryption Key %s\r\n\r\n", api.lorawan.enckey.set((uint8_t *)node_encrypt_key, 16) ? "Success" : "Fail"); + Serial.printf("Set P2P mode encryption Key %s\r\n\r\n", api.lorawan.enckey.set(node_encrypt_key, 8) ? "Success" : "Fail"); Serial.printf("P2P encryption status = %s\r\n", api.lorawan.encry.get() ? "Enbale" : "Disable"); - api.lorawan.enckey.get(encrypt_buff, 16); + api.lorawan.enckey.get(encrypt_buff, 8); Serial.printf("P2P encryption Key = 0x"); - for (int i = 0 ; i < 16 ; i++) { + for (int i = 0 ; i < 8 ; i++) { Serial.printf("%02X", encrypt_buff[i]); } Serial.println(""); @@ -4005,8 +3890,8 @@ channel mask * @par Example * @verbatim long startTime; - char * node_encrypt_key = "aaaabbbbccccdddd"; - uint8_t encrypt_buff[16]; + uint8_t node_encrypt_key[8] = {0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08}; + uint8_t encrypt_buff[8]; void setup() { @@ -4023,13 +3908,13 @@ channel mask Serial.printf("Set P2P mode preamble length %s\r\n", api.lorawan.ppl.set(8) ? "Success" : "Fail"); Serial.printf("Set P2P mode tx power %s\r\n", api.lorawan.ptp.set(22) ? "Success" : "Fail"); Serial.printf("Set P2P mode encryption status %s\r\n", api.lorawan.encry.set(1) ? "Success" : "Fail"); - Serial.printf("Set P2P mode encryption Key %s\r\n\r\n", api.lorawan.enckey.set((uint8_t *)node_encrypt_key, 16) ? "Success" : "Fail"); + Serial.printf("Set P2P mode encryption Key %s\r\n\r\n", api.lorawan.enckey.set(node_encrypt_key, 8) ? "Success" : "Fail"); Serial.printf("P2P encryption status = %s\r\n", api.lorawan.encry.get() ? "Enbale" : "Disable"); - api.lorawan.enckey.get(encrypt_buff, 16); + api.lorawan.enckey.get(encrypt_buff, 8); Serial.printf("P2P encryption Key = 0x"); - for (int i = 0 ; i < 16 ; i++) { + for (int i = 0 ; i < 8 ; i++) { Serial.printf("%02X", encrypt_buff[i]); } Serial.println(""); @@ -4074,15 +3959,15 @@ channel mask * api.lorawan.enckey.get(buff, len) * * @param buff the buffer to store encryption key - * @param len the length of encryption key(must be 16 bytes) + * @param len the length of encryption key(must be 8 bytes) * @return bool * @retval TRUE for getting encryption key success * @retval FALSE for getting encryption key failure * @par Example * @verbatim long startTime; - char * node_encrypt_key = "aaaabbbbccccdddd"; - uint8_t encrypt_buff[16]; + uint8_t node_encrypt_key[8] = {0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08}; + uint8_t encrypt_buff[8]; void setup() { @@ -4099,13 +3984,13 @@ channel mask Serial.printf("Set P2P mode preamble length %s\r\n", api.lorawan.ppl.set(8) ? "Success" : "Fail"); Serial.printf("Set P2P mode tx power %s\r\n", api.lorawan.ptp.set(22) ? "Success" : "Fail"); Serial.printf("Set P2P mode encryption status %s\r\n", api.lorawan.encry.set(1) ? "Success" : "Fail"); - Serial.printf("Set P2P mode encryption Key %s\r\n\r\n", api.lorawan.enckey.set((uint8_t *)node_encrypt_key, 16) ? "Success" : "Fail"); + Serial.printf("Set P2P mode encryption Key %s\r\n\r\n", api.lorawan.enckey.set(node_encrypt_key, 8) ? "Success" : "Fail"); Serial.printf("P2P encryption status = %s\r\n", api.lorawan.encry.get() ? "Enbale" : "Disable"); - api.lorawan.enckey.get(encrypt_buff, 16); + api.lorawan.enckey.get(encrypt_buff, 8); Serial.printf("P2P encryption Key = 0x"); - for (int i = 0 ; i < 16 ; i++) { + for (int i = 0 ; i < 8 ; i++) { Serial.printf("%02X", encrypt_buff[i]); } Serial.println(""); @@ -4143,15 +4028,15 @@ channel mask * api.lorawan.enckey.set(buff, len) * * @param buff the buffer to set encryption key - * @param len the length of encryption key(must be 16 bytes) + * @param len the length of encryption key(must be 8 bytes) * @return bool * @retval TRUE for setting encryption key success * @retval FALSE for setting encryption failure * @par Example * @verbatim long startTime; - char * node_encrypt_key = "aaaabbbbccccdddd"; - uint8_t encrypt_buff[16]; + uint8_t node_encrypt_key[8] = {0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08}; + uint8_t encrypt_buff[8]; void setup() { @@ -4168,13 +4053,13 @@ channel mask Serial.printf("Set P2P mode preamble length %s\r\n", api.lorawan.ppl.set(8) ? "Success" : "Fail"); Serial.printf("Set P2P mode tx power %s\r\n", api.lorawan.ptp.set(22) ? "Success" : "Fail"); Serial.printf("Set P2P mode encryption status %s\r\n", api.lorawan.encry.set(1) ? "Success" : "Fail"); - Serial.printf("Set P2P mode encryption Key %s\r\n\r\n", api.lorawan.enckey.set((uint8_t *)node_encrypt_key, 16) ? "Success" : "Fail"); + Serial.printf("Set P2P mode encryption Key %s\r\n\r\n", api.lorawan.enckey.set(node_encrypt_key, 8) ? "Success" : "Fail"); Serial.printf("P2P encryption status = %s\r\n", api.lorawan.encry.get() ? "Enbale" : "Disable"); - api.lorawan.enckey.get(encrypt_buff, 16); + api.lorawan.enckey.get(encrypt_buff, 8); Serial.printf("P2P encryption Key = 0x"); - for (int i = 0 ; i < 16 ; i++) { + for (int i = 0 ; i < 8 ; i++) { Serial.printf("%02X", encrypt_buff[i]); } Serial.println(""); @@ -4205,168 +4090,9 @@ channel mask */ bool set(uint8_t *buff, uint32_t len); }; - class enciv - { - public: - /**@par Description - * This api allows to get the IV of P2P mode encryption - * - * @par Syntax - * api.lorawan.enciv.get(buff, len) - * - * @param buff the buffer to store encryption IV - * @param len the length of encryption IV(must be 16 bytes) - * @return bool - * @retval TRUE for getting encryption IV success - * @retval FALSE for getting encryption IV failure - * @par Example - * @verbatim - long startTime; - char * node_encrypt_key = "aaaabbbbccccdddd"; - char * node_encrypt_IV = "ddddccccbbbbaaaa"; - uint8_t encrypt_buff[16]; - - void setup() - { - Serial.begin(115200); - startTime = millis(); - - Serial.println("P2P Start"); - - Serial.printf("Set Node device work mode %s\r\n", api.lorawan.nwm.set(0) ? "Success" : "Fail"); - Serial.printf("Set P2P mode frequency %s\r\n", api.lorawan.pfreq.set(868000000) ? "Success" : "Fail"); - Serial.printf("Set P2P mode spreading factor %s\r\n", api.lorawan.psf.set(12) ? "Success" : "Fail"); - Serial.printf("Set P2P mode bandwidth %s\r\n", api.lorawan.pbw.set(125) ? "Success" : "Fail"); - Serial.printf("Set P2P mode code rate %s\r\n", api.lorawan.pcr.set(0) ? "Success" : "Fail"); - Serial.printf("Set P2P mode preamble length %s\r\n", api.lorawan.ppl.set(8) ? "Success" : "Fail"); - Serial.printf("Set P2P mode tx power %s\r\n", api.lorawan.ptp.set(22) ? "Success" : "Fail"); - Serial.printf("Set P2P mode encryption status %s\r\n", api.lorawan.encry.set(1) ? "Success" : "Fail"); - Serial.printf("Set P2P mode encryption Key %s\r\n\r\n", api.lorawan.enckey.set((uint8_t *)node_encrypt_key, 16) ? "Success" : "Fail"); - Serial.printf("Set P2P mode encryption IV %s\r\n\r\n", api.lorawan.enckey.set((uint8_t *)node_encrypt_IV, 16) ? "Success" : "Fail"); - - Serial.printf("P2P encryption status = %s\r\n", api.lorawan.encry.get() ? "Enbale" : "Disable"); - api.lorawan.enckey.get(encrypt_buff, 16); - Serial.printf("P2P encryption Key = 0x"); - for (int i = 0 ; i < 16 ; i++) { - Serial.printf("%02X", encrypt_buff[i]); - } - Serial.println(""); - api.lorawan.enciv.get(encrypt_buff, 16); - Serial.printf("P2P encryption IV = 0x"); - for (int i = 0 ; i < 16 ; i++) { - Serial.printf("%02X", encrypt_buff[i]); - } - Serial.println(""); - - - randomSeed(millis()); - } - - void loop() - { - uint8_t payload[] = "payload"; - - int rxDelay = random(3000, 5000); - - // Receive P2P data every 10 seconds - if(millis() - startTime >= 10*1000) { - Serial.printf("P2P Rx start for %d millisSconds\r\n", rxDelay); - startTime = millis(); - Serial.printf("P2P set Rx mode %s\r\n",api.lorawan.precv(rxDelay) ? "Success" : "Fail"); - delay(rxDelay); - } else { - - Serial.printf("P2P send %s\r\n", api.lorawan.psend(sizeof(payload), payload)? "Success" : "Fail"); - delay(1000); - } - - } - @endverbatim - */ - - bool get(uint8_t *buff, uint32_t len); - /**@par Description - * This api allows to set the IV of P2P mode encryption - * - * @par Syntax - * api.lorawan.enciv.set(buff, len) - * - * @param buff the buffer to set encryption IV - * @param len the length of encryption IV(must be 16 bytes) - * @return bool - * @retval TRUE for setting encryption IV success - * @retval FALSE for setting encryption failure - * @par Example - * @verbatim - long startTime; - char * node_encrypt_key = "aaaabbbbccccdddd"; - char * node_encrypt_IV = "ddddccccbbbbaaaa"; - uint8_t encrypt_buff[16]; - - void setup() - { - Serial.begin(115200); - startTime = millis(); - - Serial.println("P2P Start"); - - Serial.printf("Set Node device work mode %s\r\n", api.lorawan.nwm.set(0) ? "Success" : "Fail"); - Serial.printf("Set P2P mode frequency %s\r\n", api.lorawan.pfreq.set(868000000) ? "Success" : "Fail"); - Serial.printf("Set P2P mode spreading factor %s\r\n", api.lorawan.psf.set(12) ? "Success" : "Fail"); - Serial.printf("Set P2P mode bandwidth %s\r\n", api.lorawan.pbw.set(125) ? "Success" : "Fail"); - Serial.printf("Set P2P mode code rate %s\r\n", api.lorawan.pcr.set(0) ? "Success" : "Fail"); - Serial.printf("Set P2P mode preamble length %s\r\n", api.lorawan.ppl.set(8) ? "Success" : "Fail"); - Serial.printf("Set P2P mode tx power %s\r\n", api.lorawan.ptp.set(22) ? "Success" : "Fail"); - Serial.printf("Set P2P mode encryption status %s\r\n", api.lorawan.encry.set(1) ? "Success" : "Fail"); - Serial.printf("Set P2P mode encryption Key %s\r\n\r\n", api.lorawan.enckey.set((uint8_t *)node_encrypt_key, 16) ? "Success" : "Fail"); - Serial.printf("Set P2P mode encryption IV %s\r\n\r\n", api.lorawan.enckey.set((uint8_t *)node_encrypt_IV, 16) ? "Success" : "Fail"); - - Serial.printf("P2P encryption status = %s\r\n", api.lorawan.encry.get() ? "Enbale" : "Disable"); - api.lorawan.enckey.get(encrypt_buff, 16); - Serial.printf("P2P encryption Key = 0x"); - for (int i = 0 ; i < 16 ; i++) { - Serial.printf("%02X", encrypt_buff[i]); - } - Serial.println(""); - api.lorawan.enciv.get(encrypt_buff, 16); - Serial.printf("P2P encryption IV = 0x"); - for (int i = 0 ; i < 16 ; i++) { - Serial.printf("%02X", encrypt_buff[i]); - } - Serial.println(""); - - - randomSeed(millis()); - } - - void loop() - { - uint8_t payload[] = "payload"; - - int rxDelay = random(3000, 5000); - - // Receive P2P data every 10 seconds - if(millis() - startTime >= 10*1000) { - Serial.printf("P2P Rx start for %d millisSconds\r\n", rxDelay); - startTime = millis(); - Serial.printf("P2P set Rx mode %s\r\n",api.lorawan.precv(rxDelay) ? "Success" : "Fail"); - delay(rxDelay); - } else { - - Serial.printf("P2P send %s\r\n", api.lorawan.psend(sizeof(payload), payload)? "Success" : "Fail"); - delay(1000); - } - - } - @endverbatim - */ - - bool set(uint8_t *buff, uint32_t len); - }; encry encry; enckey enckey; - enciv enciv; /**@par Description * This api configures the P2P FSK modem bitrate (600b/s-307200b/s) diff --git a/cores/nRF5/component/rui_v3_api/sleep.h b/cores/nRF5/component/rui_v3_api/sleep.h index be236031..27af0415 100644 --- a/cores/nRF5/component/rui_v3_api/sleep.h +++ b/cores/nRF5/component/rui_v3_api/sleep.h @@ -57,38 +57,6 @@ class sleep { void cpu(uint32_t ms_time); void cpu(); -/**@par Description - * This API is used to register a wakeup callback function, users can be notified after waking up. - * @ingroup Powersave - * @par Syntax - * api.system.sleep.registerWakeupCallback(POWER_SAVE_HANDLER callback); - * @param The callback function. - * @return bool - * @retval TRUE add callback function success. - * @retval FALSE add callback function fail. - * @par Example - * @verbatim - void WakeupCallback() - { - Serial.printf("This is Wakeup Callback\r\n"); - } - - void setup() - { - Serial.begin(115200); - if ( api.system.sleep.registerWakeupCallback(WakeupCallback) == false ) - { - Serial.println("Create Wakeup Callback failed."); - } - } - - void loop() - { - api.system.sleep.cpu(1000); - } - @endverbatim - */ - bool registerWakeupCallback(POWER_SAVE_HANDLER callback); #ifdef SUPPORT_LORA void lora(uint32_t ms_time); diff --git a/cores/nRF5/component/service/battery/service_battery.c b/cores/nRF5/component/service/battery/service_battery.c index 11f98ace..461c48b0 100755 --- a/cores/nRF5/component/service/battery/service_battery.c +++ b/cores/nRF5/component/service/battery/service_battery.c @@ -4,7 +4,6 @@ #include "service_battery.h" #include "udrv_adc.h" #include "variant.h" -#include "udrv_serial.h" extern batt_level batt_table[]; @@ -12,18 +11,6 @@ void service_battery_get_batt_level(float *bat_lvl) { uint16_t adc_value; float max, ref_over_gain; -#if defined(rak3172_sip) - UDRV_ADC_RESOLUTION resolution = udrv_adc_get_resolution(); - udrv_adc_set_resolution(UDRV_ADC_RESOLUTION_12BIT); - udrv_adc_read(UDRV_ADC_CHANNEL_VREFINT, &adc_value); - *bat_lvl = (float)adc_value; - *bat_lvl = *bat_lvl / 4095; - *bat_lvl = 1.27 / *bat_lvl; - *bat_lvl = *bat_lvl * 0.974 - 0.065; //calibrate - udrv_adc_set_resolution(resolution); - return ; -#endif - switch (udrv_adc_get_resolution()) { case UDRV_ADC_RESOLUTION_6BIT: { @@ -126,12 +113,7 @@ void service_battery_get_batt_level(float *bat_lvl) { #endif #ifdef RAK11720+RAK5005-O_V1.0 - /* - * RAK5005-O/RAK19007 Divider Resistor: 2.5 / 1.5 - * RAK11722 Divider Resistor: 1.3 / 1.0 - * Calibration: X * 2.02 + 0.21 - */ - *bat_lvl = (ref_over_gain*(((float)adc_value)/max)*(1.3f)/(1.0f)*(2.5f)/(1.5f))*2.02f+0.21f; + *bat_lvl = ((ref_over_gain*(((float)adc_value)/max)*(5.0f))/(3.0f))*(1.3f); #endif #ifdef RAK5010_EVB diff --git a/cores/nRF5/component/service/lora/service_lora.c b/cores/nRF5/component/service/lora/service_lora.c index d2f6f294..63cdc732 100755 --- a/cores/nRF5/component/service/lora/service_lora.c +++ b/cores/nRF5/component/service/lora/service_lora.c @@ -264,16 +264,12 @@ static void McpsConfirm(McpsConfirm_t *mcpsConfirm) service_lora_send_callback(mcpsConfirm->Status); } } - if( mcpsConfirm->McpsRequest == MCPS_CONFIRMED) { if(mcpsConfirm->AckReceived) - udrv_serial_log_printf("+EVT:SEND_CONFIRMED_OK\r\n"); + udrv_serial_log_printf("+EVT:SEND_CONFIRMED_OK\r\n"); else - udrv_serial_log_printf("+EVT:SEND_CONFIRMED_FAILED(%d)\r\n", mcpsConfirm->Status); - } - else { - udrv_serial_log_printf("+EVT:TX_DONE\r\n"); + udrv_serial_log_printf("+EVT:SEND_CONFIRMED_FAILED\r\n"); } service_lora_lptp_send_callback(0); @@ -362,27 +358,6 @@ static void McpsIndication(McpsIndication_t *mcpsIndication) service_lora_delay_send_process(); } - if(service_get_debug_level()) - { - MibRequestConfirm_t mibReq; - LoRaMacStatus_t status; - - mibReq.Type = MIB_NVM_CTXS; - LoRaMacMibGetRequestConfirm(&mibReq); - if ((status = LoRaMacMibGetRequestConfirm(&mibReq)) == LORAMAC_STATUS_OK) - { - udrv_serial_log_printf("Frequency:%u\r\n",mibReq.Param.Contexts->RegionGroup2.Channels[0]); - udrv_serial_log_printf("Rx1Frequency:%u\r\n",mibReq.Param.Contexts->RegionGroup2.Channels[1]); - udrv_serial_log_printf("RxCFrequency:%u\r\n",mibReq.Param.Contexts->MacGroup2.MacParamsDefaults.RxCChannel.Frequency); - udrv_serial_log_printf("RxC Datarate:%u\r\n",mibReq.Param.Contexts->MacGroup2.MacParamsDefaults.RxCChannel.Datarate); - udrv_serial_log_printf("ChannelsDatarate:%u\r\n",mibReq.Param.Contexts->MacGroup1.ChannelsDatarate); - udrv_serial_log_printf("AdrAckCounter:%u\r\n",mibReq.Param.Contexts->MacGroup1.AdrAckCounter); - udrv_serial_log_printf("ChannelsTxPower:%u\r\n",mibReq.Param.Contexts->MacGroup1.ChannelsTxPower); - } - else - udrv_serial_log_printf("LoRaMacMibGetRequestConfirm ERROR\r\n"); - } - } static void MlmeConfirm(MlmeConfirm_t *mlmeConfirm) @@ -473,27 +448,6 @@ static void MlmeConfirm(MlmeConfirm_t *mlmeConfirm) if (service_lora_get_class() != SERVICE_LORA_CLASS_B) { } - if(service_get_debug_level()) - { - MibRequestConfirm_t mibReq; - LoRaMacStatus_t status; - - mibReq.Type = MIB_NVM_CTXS; - LoRaMacMibGetRequestConfirm(&mibReq); - if ((status = LoRaMacMibGetRequestConfirm(&mibReq)) == LORAMAC_STATUS_OK) - { - udrv_serial_log_printf("Frequency:%u\r\n",mibReq.Param.Contexts->RegionGroup2.Channels[0]); - udrv_serial_log_printf("Rx1Frequency:%u\r\n",mibReq.Param.Contexts->RegionGroup2.Channels[1]); - udrv_serial_log_printf("RxCFrequency:%u\r\n",mibReq.Param.Contexts->MacGroup2.MacParamsDefaults.RxCChannel.Frequency); - udrv_serial_log_printf("RxC Datarate:%u\r\n",mibReq.Param.Contexts->MacGroup2.MacParamsDefaults.RxCChannel.Datarate); - udrv_serial_log_printf("ChannelsDatarate:%u\r\n",mibReq.Param.Contexts->MacGroup1.ChannelsDatarate); - udrv_serial_log_printf("AdrAckCounter:%u\r\n",mibReq.Param.Contexts->MacGroup1.AdrAckCounter); - udrv_serial_log_printf("ChannelsTxPower:%u\r\n",mibReq.Param.Contexts->MacGroup1.ChannelsTxPower); - } - else - udrv_serial_log_printf("LoRaMacMibGetRequestConfirm ERROR\r\n"); - } - break; case MLME_DEVICE_TIME: { @@ -1334,7 +1288,7 @@ SERVICE_LORA_BAND service_lora_get_band(void) int32_t service_lora_set_band(SERVICE_LORA_BAND band) { -#if defined(rak3172) || defined(rak3172T) +#ifdef rak3172 /* Only RAK3172 supports hardware high and low frequency detection */ uint8_t hardware_freq = 0; hardware_freq = BoardGetHardwareFreq(); @@ -2113,16 +2067,11 @@ int32_t service_lora_send(uint8_t *buff, uint32_t len, SERVICE_LORA_SEND_INFO in LoRaMacStatus_t status = LoRaMacMlmeRequest(&mlmeReq); } - /* Check payload size first before send */ - status = LoRaMacQueryTxPossible( len , &txInfo ); - if(service_get_debug_level()) - { - udrv_serial_log_printf("QueryTxPossible: %s, UserDataSize %d PossibleDataSize %d AdditionalFOptsSize %d\r\n", MacStatusStrings[status], len, txInfo.MaxPossibleApplicationDataSize, (txInfo.CurrentPossiblePayloadSize - txInfo.MaxPossibleApplicationDataSize)); - } - if( status != LORAMAC_STATUS_OK ) /* if invalid, still send null packet for respond ack and trigger adr mechaniam */ + + if( LoRaMacQueryTxPossible( len , &txInfo ) != LORAMAC_STATUS_OK ) { - //LORA_TEST_DEBUG("status %d CurrentPossiblePayloadSize %d MaxPossibleApplicationDataSize %d", - //status,txInfo.CurrentPossiblePayloadSize,txInfo.MaxPossibleApplicationDataSize); + LORA_TEST_DEBUG("status %d CurrentPossiblePayloadSize %d MaxPossibleApplicationDataSize %d", + status,txInfo.CurrentPossiblePayloadSize,txInfo.MaxPossibleApplicationDataSize); // Send empty frame in order to flush MAC commands mcpsReq.Type = MCPS_UNCONFIRMED; mcpsReq.Req.Unconfirmed.fBuffer = NULL; @@ -2182,27 +2131,6 @@ int32_t service_lora_send(uint8_t *buff, uint32_t len, SERVICE_LORA_SEND_INFO in LORA_TEST_DEBUG("status %d",status); LORA_TEST_DEBUG("DutyCycleWaitTime %d",mcpsReq.ReqReturn.DutyCycleWaitTime); - if(service_get_debug_level()) - { - MibRequestConfirm_t mibReq; - LoRaMacStatus_t status; - - mibReq.Type = MIB_NVM_CTXS; - LoRaMacMibGetRequestConfirm(&mibReq); - if ((status = LoRaMacMibGetRequestConfirm(&mibReq)) == LORAMAC_STATUS_OK) - { - udrv_serial_log_printf("Frequency:%u\r\n",mibReq.Param.Contexts->RegionGroup2.Channels[0]); - udrv_serial_log_printf("Rx1Frequency:%u\r\n",mibReq.Param.Contexts->RegionGroup2.Channels[1]); - udrv_serial_log_printf("RxCFrequency:%u\r\n",mibReq.Param.Contexts->MacGroup2.MacParamsDefaults.RxCChannel.Frequency); - udrv_serial_log_printf("RxC Datarate:%u\r\n",mibReq.Param.Contexts->MacGroup2.MacParamsDefaults.RxCChannel.Datarate); - udrv_serial_log_printf("ChannelsDatarate:%u\r\n",mibReq.Param.Contexts->MacGroup1.ChannelsDatarate); - udrv_serial_log_printf("AdrAckCounter:%u\r\n",mibReq.Param.Contexts->MacGroup1.AdrAckCounter); - udrv_serial_log_printf("ChannelsTxPower:%u\r\n",mibReq.Param.Contexts->MacGroup1.ChannelsTxPower); - } - else - udrv_serial_log_printf("LoRaMacMibGetRequestConfirm ERROR\r\n"); - } - if (status == LORAMAC_STATUS_OK) { if (tx_possible == false) diff --git a/cores/nRF5/component/service/lora/service_lora_lptp.c b/cores/nRF5/component/service/lora/service_lora_lptp.c index 6123e319..fdd5230f 100755 --- a/cores/nRF5/component/service/lora/service_lora_lptp.c +++ b/cores/nRF5/component/service/lora/service_lora_lptp.c @@ -57,7 +57,7 @@ typedef struct { LP_State_st lp_state; -int32_t lora_send_subcontract(void); +void lora_send_subcontract(void); void printf_hex(uint8_t *pdata, uint16_t len) { @@ -100,7 +100,7 @@ void service_lora_lptp_send_callback(int status) } } -int32_t lora_send_subcontract(void) +void lora_send_subcontract(void) { uint32_t data_offset, data_remain_len; uint16_t payload_len; @@ -166,7 +166,7 @@ int32_t lora_send_subcontract(void) } info.retry_valid = false; - return service_lora_send(AppData, AppLen, info, false); + service_lora_send(AppData, AppLen, info, false); // udrv_serial_log_printf("(Send data is: "); // printf_hex(AppData, AppLen); @@ -203,7 +203,9 @@ int32_t service_lora_lptp_send(uint8_t port, bool ack, uint8_t *p_data, uint16_t AppPort = port; - return lora_send_subcontract(); + lora_send_subcontract(); + + return UDRV_RETURN_OK; } #endif diff --git a/cores/nRF5/component/service/lora/service_lora_p2p.c b/cores/nRF5/component/service/lora/service_lora_p2p.c index c3564710..53160182 100755 --- a/cores/nRF5/component/service/lora/service_lora_p2p.c +++ b/cores/nRF5/component/service/lora/service_lora_p2p.c @@ -15,13 +15,12 @@ #include "service_lora_test.h" #include "soft-se/aes.h" #include "board.h" -#include "service_runtimeConfig.h" #ifdef LORA_CHIP_SX1276 // #include "sx1276Regs-LoRa.h" #define REG_LR_SYNCWORD 0x39 #elif defined LORA_CHIP_SX126X - // #include "sx126x/sx126x.h" + // #include "sx126x.h" #define REG_LR_SYNCWORD 0x0740 #elif defined LORA_CHIP_STM32WLE5XX // #include "radio_driver.h" @@ -36,7 +35,6 @@ static rui_lora_p2p_recv_t recv_data_pkg; void radio_set_syncword( uint16_t syncword); void (*service_lora_p2p_send_callback)(void); -void (*service_lora_p2p_send_CAD_callback)(bool); void (*service_lora_p2p_recv_callback)(rui_lora_p2p_recv_t recv_data_pkg); /* Radio events function pointer */ @@ -47,8 +45,7 @@ LORA_P2P_STATUS_ST lora_p2p_status = { .isRadioBusy = false, .isContinue = false, .isContinue_no_exit = false, - .isContinue_compatible_tx = false, - .isCAD = false + .isContinue_compatible_tx = false }; static uint8_t lora_p2p_buf[255]; @@ -68,19 +65,12 @@ static void OnTxDone(void) lora_p2p_status.isRadioBusy = false; LORA_P2P_DEBUG("%s\r\n", __func__); - if (service_get_debug_level()) { - udrv_serial_log_printf("%s\r\n", __func__); - } LORA_TEST_DEBUG("service_lora_p2p_send_callback %08x",service_lora_p2p_send_callback); if ((*service_lora_p2p_send_callback)!=NULL) { (*service_lora_p2p_send_callback)(); } - if (SERVICE_LORA_P2P == service_lora_get_nwm()) - udrv_serial_log_printf("+EVT:TXP2P DONE\r\n"); - else - udrv_serial_log_printf("+EVT:TXFSK DONE\r\n"); udrv_powersave_wake_unlock(); @@ -107,7 +97,6 @@ static void OnRxDone(uint8_t *payload, uint16_t size, int16_t rssi, int8_t snr) { LORA_TEST_DEBUG(); uint8_t outdata[256], cut_length; - memset(outdata,'\0',sizeof(outdata)); if (size % 16) { /* Normal processing will not be executed here */ @@ -130,7 +119,7 @@ static void OnRxDone(uint8_t *payload, uint16_t size, int16_t rssi, int8_t snr) recv_data_pkg.Rssi = rssi; recv_data_pkg.Snr = snr; recv_data_pkg.BufferSize = size; - recv_data_pkg.Buffer = lora_p2p_buf; + recv_data_pkg.Buffer = payload; if((*service_lora_p2p_recv_callback)!=NULL) { @@ -150,9 +139,6 @@ static void OnTxTimeout(void) { lora_p2p_status.isRadioBusy = false; LORA_P2P_DEBUG("%s\r\n", __func__); - if (service_get_debug_level()) { - udrv_serial_log_printf("%s\r\n", __func__); - } } static void OnRxTimeout(void) @@ -209,80 +195,40 @@ static void OnRxError(void) } } -static void OnCadDone(bool channelActivityDetected) -{ - if ((*service_lora_p2p_send_CAD_callback)!=NULL) - { - (*service_lora_p2p_send_CAD_callback)(channelActivityDetected); - } - if(channelActivityDetected == true) - lora_p2p_status.isRadioBusy = false; - lora_p2p_status.isCAD = false; -} - - int32_t service_lora_p2p_config(void) { uint32_t timeOnAir = 0x00FFFFFF; - uint32_t bandwidth, codingrate, Frequency; + uint32_t bandwidth, codingrate; bool rxContinuous = false; - uint8_t Powerdbm, Spreadfact; - uint16_t Preamlen; + uint32_t Frequency = service_nvm_get_freq_from_nvm(); + uint8_t Powerdbm = service_nvm_get_powerdbm_from_nvm(); + uint8_t Spreadfact = service_nvm_get_sf_from_nvm(); + uint16_t Preamlen = service_nvm_get_preamlen_from_nvm(); bool fix_length_payload = service_nvm_get_fix_length_payload_from_nvm(); bool iqinverted = service_nvm_get_iqinverted_from_nvm(); uint32_t symbol_timeout = service_nvm_get_symbol_timeout_from_nvm(); uint32_t deviation = service_nvm_get_fdev_from_nvm(); uint32_t bitrate = service_nvm_get_bitrate_from_nvm(); uint16_t syncword = service_nvm_get_syncword_from_nvm(); - - if (get_useRuntimeConfigP2P()) { - runtimeConfigP2P_t runtimeConfigP2P; - get_runtimeConfigP2P(&runtimeConfigP2P); - - Frequency = runtimeConfigP2P.frequency; - Powerdbm = runtimeConfigP2P.txpower; - Spreadfact = runtimeConfigP2P.spreading_factor; - Preamlen = runtimeConfigP2P.preamble_length; - - if (SERVICE_LORA_P2P == service_lora_get_nwm()) - { - bandwidth = runtimeConfigP2P.bandwidth; - } - else if (SERVICE_LORA_FSK == service_lora_get_nwm()) - { - //Because RadioGetFskBandwidthRegValue( bandwidth << 1 ); - // SX126x badwidth is double sided - bandwidth = (runtimeConfigP2P.fsk_rxbw >> 1); - } - - codingrate = runtimeConfigP2P.coding_rate + 1; + if (SERVICE_LORA_P2P == service_lora_get_nwm()) + { + bandwidth = service_lora_p2p_get_bandwidth(); } - else { - Frequency = service_nvm_get_freq_from_nvm(); - Powerdbm = service_nvm_get_powerdbm_from_nvm(); - Spreadfact = service_nvm_get_sf_from_nvm(); - Preamlen = service_nvm_get_preamlen_from_nvm(); - - if (SERVICE_LORA_P2P == service_lora_get_nwm()) - { - bandwidth = service_lora_p2p_get_bandwidth(); - } - else if (SERVICE_LORA_FSK == service_lora_get_nwm()) - { - //Because RadioGetFskBandwidthRegValue( bandwidth << 1 ); - // SX126x badwidth is double sided - bandwidth = (service_lora_p2p_get_bandwidth() >> 1); - } - - codingrate = service_nvm_get_codingrate_from_nvm() + 1; + else if (SERVICE_LORA_FSK == service_lora_get_nwm()) + { + //Because RadioGetFskBandwidthRegValue( bandwidth << 1 ); + // SX126x badwidth is double sided + bandwidth = (service_lora_p2p_get_bandwidth() >> 1); } + codingrate = service_nvm_get_codingrate_from_nvm() + 1; + if (SERVICE_LORA_P2P == service_lora_get_nwm()) { + if( service_nvm_get_symbol_timeout_from_nvm() == 0) rxContinuous = true; - Radio.SetTxConfig(MODEM_LORA, Powerdbm, 0, bandwidth, Spreadfact, codingrate, Preamlen, fix_length_payload, @@ -316,6 +262,7 @@ int32_t service_lora_p2p_config(void) } Radio.SetChannel(Frequency); + LORA_P2P_DEBUG("Freq %d, SF %d, Bandwidth %d, CodeRate %d, Preamlen %d, TxPower %d\r\n", Frequency, Spreadfact, bandwidth, codingrate, @@ -333,7 +280,6 @@ int32_t service_lora_p2p_init(void) RadioEvents.TxTimeout = OnTxTimeout; RadioEvents.RxTimeout = OnRxTimeout; RadioEvents.RxError = OnRxError; - RadioEvents.CadDone = OnCadDone; Radio.Init(&RadioEvents); @@ -342,7 +288,7 @@ int32_t service_lora_p2p_init(void) return UDRV_RETURN_OK; } -int32_t service_lora_p2p_send(uint8_t *p_data, uint8_t len, bool cad_enable) +int32_t service_lora_p2p_send(uint8_t *p_data, uint8_t len) { if (lora_p2p_status.isRadioBusy == true && lora_p2p_status.isContinue_compatible_tx == false) return -UDRV_BUSY; @@ -356,47 +302,17 @@ int32_t service_lora_p2p_send(uint8_t *p_data, uint8_t len, bool cad_enable) udrv_powersave_wake_lock(); Radio.Standby(); - - lora_p2p_status.isRadioBusy = true; - if(cad_enable == true) - { - //SX126xSetCadParams(0x03,20,10,0x01,0x1); - lora_p2p_status.isCAD = true; - Radio.StartCad(); - while(lora_p2p_status.isCAD == true) - { -#if defined(LORA_CHIP_SX126X) - if(SX126xGetIrqStatus() == 0x0080) - { - RadioOnDioIrq(); - break; - } -#endif - } - - if(lora_p2p_status.isRadioBusy == false) - return -UDRV_BUSY; - } Radio.Send(lora_p2p_buf, len); + lora_p2p_status.isRadioBusy = true; - if (service_get_debug_level()) { - udrv_serial_log_printf("LoRa P2P send data: (%d) ", len); - printf_hex(lora_p2p_buf, len); - udrv_serial_log_printf("\r\n"); - } + // udrv_serial_log_printf("LoRa P2P send data len is %d\r\n", len); + // printf_hex(lora_p2p_buf, len); + // udrv_serial_log_printf("\r\n"); return UDRV_RETURN_OK; } -bool service_lora_p2p_get_radio_stat(void) -{ - if (lora_p2p_status.isRadioBusy || lora_p2p_status.isContinue || lora_p2p_status.isContinue_no_exit || lora_p2p_status.isContinue_compatible_tx) - return true; - else - return false; -} - int32_t service_lora_p2p_recv(uint32_t timeout) { // if ((lora_p2p_status.isRadioBusy == true) && (timeout != 0)) @@ -423,7 +339,6 @@ int32_t service_lora_p2p_recv(uint32_t timeout) if(timeout != 0 && ( lora_p2p_status.isContinue || lora_p2p_status.isContinue_no_exit || lora_p2p_status.isContinue_compatible_tx)) { - udrv_serial_log_printf("P2P_RX_ON already\r\n"); return -UDRV_BUSY; } @@ -485,7 +400,7 @@ int32_t service_lora_p2p_set_freq(uint32_t freq) if ((freq < 150e6) || (freq > 960e6)) return -UDRV_WRONG_ARG; -#if defined(rak3172) || defined(rak3172T) +#ifdef rak3172 /* Only RAK3172 supports hardware high and low frequency detection */ uint8_t hardware_freq = 0; hardware_freq = BoardGetHardwareFreq(); @@ -511,34 +426,6 @@ int32_t service_lora_p2p_set_freq(uint32_t freq) return UDRV_RETURN_OK; } -int32_t service_lora_p2p_check_runtime_freq(uint32_t freq) -{ - if ((freq < 150e6) || (freq > 960e6)) - return -UDRV_WRONG_ARG; - -#if defined(rak3172) || defined(rak3172T) - /* Only RAK3172 supports hardware high and low frequency detection */ - uint8_t hardware_freq = 0; - hardware_freq = BoardGetHardwareFreq(); - if(hardware_freq) - { - if(freq <= 600e6) - { - return -UDRV_WRONG_ARG; - } - } - else - { - if(freq > 600e6) - { - return -UDRV_WRONG_ARG; - } - } -#endif - - return UDRV_RETURN_OK; -} - uint8_t service_lora_p2p_get_sf(void) { return service_nvm_get_sf_from_nvm(); @@ -555,14 +442,6 @@ int32_t service_lora_p2p_set_sf(uint8_t spreadfact) return UDRV_RETURN_OK; } -int32_t service_lora_p2p_check_runtime_sf(uint8_t spreadfact) -{ - if ((spreadfact < 5) || (spreadfact > 12)) - return -UDRV_WRONG_ARG; - - return UDRV_RETURN_OK; -} - uint32_t service_lora_p2p_get_bandwidth(void) { uint32_t bandwidth = service_nvm_get_bandwidth_from_nvm(); @@ -611,39 +490,6 @@ int32_t service_lora_p2p_set_bandwidth(uint32_t bandwidth) return ret; } -int32_t service_lora_p2p_check_runtime_bandwidth(uint32_t bandwidth) -{ - if (SERVICE_LORA_P2P == service_lora_get_nwm()) - { - - if( bandwidth == 125 ) - { - bandwidth = 0; - } - else if( bandwidth == 250 ) - { - bandwidth = 1; - } - else if( bandwidth == 500 ) - { - bandwidth = 2; - } - else if (bandwidth > 9) - { - return -UDRV_WRONG_ARG; - } - } - else if (SERVICE_LORA_FSK == service_lora_get_nwm()) - { - if (bandwidth > 467000 || bandwidth < 4800) - { - return -UDRV_WRONG_ARG; - } - } - - return UDRV_RETURN_OK; -} - uint8_t service_lora_p2p_get_codingrate(void) { return service_nvm_get_codingrate_from_nvm(); @@ -660,14 +506,6 @@ int32_t service_lora_p2p_set_codingrate(uint8_t codingrate) return UDRV_RETURN_OK; } -int32_t service_lora_p2p_check_runtime_codingrate(uint8_t codingrate) -{ - if ((codingrate < 0) || (codingrate > 3)) - return -UDRV_WRONG_ARG; - - return UDRV_RETURN_OK; -} - uint16_t service_lora_p2p_get_preamlen(void) { return service_nvm_get_preamlen_from_nvm(); @@ -684,14 +522,6 @@ int32_t service_lora_p2p_set_preamlen(uint16_t preamlen) return UDRV_RETURN_OK; } -int32_t service_lora_p2p_check_runtime_preamlen(uint16_t preamlen) -{ - if (preamlen < 5) - return -UDRV_WRONG_ARG; - - return UDRV_RETURN_OK; -} - uint8_t service_lora_p2p_get_powerdbm(void) { return service_nvm_get_powerdbm_from_nvm(); @@ -708,14 +538,6 @@ int32_t service_lora_p2p_set_powerdbm(uint8_t powerdbm) return UDRV_RETURN_OK; } -int32_t service_lora_p2p_check_runtime_powerdbm(uint8_t powerdbm) -{ - if ((powerdbm < 5) || (powerdbm > 22)) - return -UDRV_WRONG_ARG; - - return UDRV_RETURN_OK; -} - bool service_lora_p2p_get_crypto_enable(void) { return service_nvm_get_crypt_enable_from_nvm(); @@ -736,34 +558,13 @@ int32_t service_lora_p2p_set_crypto_key(uint8_t *buff, uint32_t len) return service_nvm_set_crypt_key_to_nvm(buff, len); } -int32_t service_lora_p2p_get_crypto_IV(uint8_t *buff, uint32_t len) -{ - return service_nvm_get_crypt_IV_from_nvm(buff, len); -} - -int32_t service_lora_p2p_set_crypto_IV(uint8_t *buff, uint32_t len) -{ - return service_nvm_set_crypt_IV_to_nvm(buff, len); -} - -bool service_lora_p2p_get_CAD(void) -{ - return service_nvm_get_CAD_from_nvm(); -} - -int32_t service_lora_p2p_set_CAD(bool enable) -{ - return service_nvm_set_CAD_to_nvm(enable); -} - - int32_t service_lora_p2p_encrpty(uint8_t *indata, uint16_t inlen,uint8_t *outdata) { uint8_t buf[255]; uint8_t key[16]; uint16_t i; aes_context ctx; - uint8_t iv[16]; + uint8_t iv[16] = {0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55}; uint8_t n_block; uint8_t pad_length; @@ -779,9 +580,8 @@ int32_t service_lora_p2p_encrpty(uint8_t *indata, uint16_t inlen,uint8_t *outdat for (i = 0; i < pad_length; i++) LORA_TEST_DEBUG("%02X", buf[i]); - service_lora_p2p_get_crypto_IV(iv,16); - - service_lora_p2p_get_crypto_key(key, 16); + service_lora_p2p_get_crypto_key(key, 8); + memcpy(&key[8], key, 8); aes_set_key(key, 16, &ctx); crypt_state = aes_cbc_encrypt(buf, outdata, n_block, iv, &ctx); LORA_TEST_DEBUG("crypt_state %d", crypt_state); @@ -796,13 +596,12 @@ int32_t service_lora_p2p_decrpty(uint8_t *indata, uint16_t inlen, uint8_t *outda uint8_t key[16]; uint16_t i; aes_context ctx; - uint8_t iv[16]; + uint8_t iv[16] = {0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55}; uint8_t crypt_state; uint8_t cut_length; - service_lora_p2p_get_crypto_IV(iv,16); - - service_lora_p2p_get_crypto_key(key, 16); + service_lora_p2p_get_crypto_key(key, 8); + memcpy(&key[8], key, 8); aes_set_key(key, 16, &ctx); crypt_state = aes_cbc_decrypt(indata, outdata, inlen / 16, iv, &ctx); @@ -1057,14 +856,6 @@ int32_t service_lora_p2p_register_recv_cb(service_lora_p2p_recv_cb_type callback service_lora_p2p_recv_callback = callback; return UDRV_RETURN_OK; } - -int32_t service_lora_p2p_register_send_CAD_cb(service_lora_p2p_send_CAD_cb_type callback) -{ - service_lora_p2p_send_CAD_callback = callback; - return UDRV_RETURN_OK; -} - - uint32_t service_lora_p2p_get_symbol_timeout(void) { return service_nvm_get_symbol_timeout_from_nvm(); diff --git a/cores/nRF5/component/service/lora/service_lora_p2p.h b/cores/nRF5/component/service/lora/service_lora_p2p.h index d5fde1ad..f3eb70d1 100755 --- a/cores/nRF5/component/service/lora/service_lora_p2p.h +++ b/cores/nRF5/component/service/lora/service_lora_p2p.h @@ -52,8 +52,7 @@ typedef enum #elif defined rak11720 #define LORA_CHIP_SX126X #elif defined rak3172 \ - || defined rak3172-sip \ - || defined rak3172T + || defined rak3172-sip #define LORA_CHIP_STM32WLE5XX #endif @@ -83,7 +82,6 @@ typedef struct { bool isContinue; bool isContinue_no_exit; bool isContinue_compatible_tx; - volatile bool isCAD; }LORA_P2P_STATUS_ST; typedef struct rui_lora_p2p_revc @@ -109,13 +107,12 @@ typedef struct rui_lora_p2p_revc typedef void(*service_lora_p2p_send_cb_type)(void); typedef void(*service_lora_p2p_recv_cb_type)(rui_lora_p2p_recv_t recv_data_pkg); -typedef void(*service_lora_p2p_send_CAD_cb_type)(bool); int32_t service_lora_p2p_init(void); int32_t service_lora_p2p_config(void); -int32_t service_lora_p2p_send(uint8_t *p_data, uint8_t len, bool cad_enable); +int32_t service_lora_p2p_send(uint8_t *p_data, uint8_t len); int32_t service_lora_p2p_recv(uint32_t timeout); @@ -123,38 +120,26 @@ uint32_t service_lora_p2p_get_freq (void);; int32_t service_lora_p2p_set_freq (uint32_t freq); -int32_t service_lora_p2p_check_runtime_freq(uint32_t freq); - uint8_t service_lora_p2p_get_sf (void); int32_t service_lora_p2p_set_sf (uint8_t spreadfact); -int32_t service_lora_p2p_check_runtime_sf(uint8_t spreadfact); - uint32_t service_lora_p2p_get_bandwidth (void); int32_t service_lora_p2p_set_bandwidth (uint32_t bandwidth); -int32_t service_lora_p2p_check_runtime_bandwidth(uint32_t bandwidth); - uint8_t service_lora_p2p_get_codingrate (void); int32_t service_lora_p2p_set_codingrate (uint8_t codingrate); -int32_t service_lora_p2p_check_runtime_codingrate(uint8_t codingrate); - uint16_t service_lora_p2p_get_preamlen (void); int32_t service_lora_p2p_set_preamlen (uint16_t preamlen); -int32_t service_lora_p2p_check_runtime_preamlen(uint16_t preamlen); - uint8_t service_lora_p2p_get_powerdbm (void); int32_t service_lora_p2p_set_powerdbm (uint8_t powerdbm); -int32_t service_lora_p2p_check_runtime_powerdbm(uint8_t powerdbm); - bool service_lora_p2p_get_crypto_enable(void); int32_t service_lora_p2p_set_crypto_enable(bool enable); @@ -163,10 +148,6 @@ int32_t service_lora_p2p_get_crypto_key (uint8_t *buff, uint32_t len); int32_t service_lora_p2p_set_crypto_key (uint8_t *buff, uint32_t len); -int32_t service_lora_p2p_get_crypto_IV (uint8_t *buff, uint32_t len); - -int32_t service_lora_p2p_set_crypto_IV (uint8_t *buff, uint32_t len); - uint32_t service_lora_p2p_get_fdev(void); int32_t service_lora_p2p_set_fdev(uint32_t fdev); @@ -181,8 +162,6 @@ int32_t service_lora_p2p_decrpty(uint8_t *indata,uint16_t inlen ,uint8_t *outdat int32_t service_lora_p2p_register_send_cb(service_lora_p2p_send_cb_type callback); -int32_t service_lora_p2p_register_send_CAD_cb(service_lora_p2p_send_CAD_cb_type callback); - int32_t service_lora_p2p_register_recv_cb(service_lora_p2p_recv_cb_type callback); bool service_lora_p2p_get_public_network(void); @@ -205,13 +184,6 @@ uint16_t service_lora_p2p_get_syncword(void); int32_t service_lora_p2p_set_syncword( uint16_t syncword ); -bool service_lora_p2p_get_CAD(void); - -int32_t service_lora_p2p_set_CAD(bool enable); - -bool service_lora_p2p_get_radio_stat(void); - - #ifdef __cplusplus } #endif diff --git a/cores/nRF5/component/service/mode/cli/atcmd.c b/cores/nRF5/component/service/mode/cli/atcmd.c index e12c0a0b..48decb3c 100755 --- a/cores/nRF5/component/service/mode/cli/atcmd.c +++ b/cores/nRF5/component/service/mode/cli/atcmd.c @@ -1,6 +1,7 @@ #include #include #include +#include #include "variant.h" #include "atcmd.h" @@ -40,7 +41,7 @@ #endif #include "udrv_serial.h" #include "service_mode_cli.h" -#if defined(rak3172) || defined(rak3172T) +#ifdef rak3172 #include "uhal_system.h" #endif #ifdef RAK5010_EVB @@ -133,7 +134,7 @@ at_cmd_info atcmd_info_tbl[] = {ATCMD_HWID, /*14*/ At_GetHwID, 0, "get the string of the hardware id", AT_HWID_PERM}, {ATCMD_ALIAS, /*89*/ At_Alias, 0, "add an alias name to the device", AT_ALIAS_PERM}, {ATCMD_SYSV, /*92*/ At_GetSysVolt, 0, "get the System Voltage", AT_SYSV_PERM}, -#if defined(rak3172) || defined(rak3172T) +#ifdef rak3172 {ATCMD_UID, /*91*/ At_GetUid, 0, "", AT_UID_PERM}, #endif #ifdef SUPPORT_BLE @@ -151,9 +152,7 @@ at_cmd_info atcmd_info_tbl[] = {ATCMD_PWORD, /*11*/ At_Pword, 0, "set the serial port locking password (max 8 char)", AT_PWORD_PERM}, {ATCMD_BAUD, /*12*/ At_Baud, 0, "get or set the serial port baudrate", AT_BAUD_PERM}, {ATCMD_ATM, /*72*/ At_AtCmdMode, 0, "switch to AT command mode", AT_ATM_PERM}, -#ifdef SUPPORT_BINARY {ATCMD_APM, /*73*/ At_ApiMode, 0, "switch to API mode", AT_APM_PERM}, -#endif #ifdef SUPPORT_LORA #ifdef SUPPORT_PASSTHRU {ATCMD_PAM, /*74*/ At_TransparentMode, 0, "enter data transparent transmission mode", ATD_PERM}, @@ -225,9 +224,7 @@ at_cmd_info atcmd_info_tbl[] = {ATCMD_PSEND, /*62*/ At_P2pSend, 0, "send data in P2P mode", AT_PSEND_PERM}, {ATCMD_PRECV, /*63*/ At_P2pRecv, 0, "enter P2P RX mode for a period of time (ms)", AT_PRECV_PERM}, {ATCMD_PCRYPT, /*64*/ At_P2pCrypt, 0, "get or set the encryption status of P2P mode", AT_ENCRY_PERM}, - {ATCMD_PCAD, /*00*/ At_P2pCAD, 0, "get or set the Channel Activity Detection status of P2P mode", AT_PCAD_PERM}, - {ATCMD_PKEY, /*65*/ At_P2pKey, 0, "get or set the encryption key of P2P mode (16 bytes in hex)", AT_ENCKEY_PERM}, - {ATCMD_PIV, /*00*/ At_P2pIV, 0, "get or set the encryption IV of P2P mode (16 bytes in hex)", AT_ENCIV_PERM}, + {ATCMD_PKEY, /*65*/ At_P2pKey, 0, "get or set the encryption key of P2P mode (8 bytes in hex)", AT_ENCKEY_PERM}, {ATCMD_P2P, /*66*/ At_P2p, 0, "get or set all P2P parameters", AT_P2P_PERM}, {ATCMD_PBR, /*67*/ At_Pbr, 0, "get or set the P2P FSK modem bitrate (600-300000 b/s)", AT_PBR_PERM}, {ATCMD_PFDEV, /*68*/ At_Pfdev, 0, "get or set the P2P FSK modem frequency deviation (600-200000 hz)", AT_PFDEV_PERM}, @@ -340,7 +337,6 @@ int At_Parser (SERIAL_PORT port, char *buff, int len) int i, j, help = 0; int nRet = AT_ERROR; int is_write = 0; - char perm[8]={0}; char cmd[MAX_CMD_LEN], operat = 0; //cmd len 32 should be enough stParam param; @@ -457,17 +453,7 @@ int At_Parser (SERIAL_PORT port, char *buff, int len) //followed by the help of all commands: At_CmdList(port, ¶m); } else { - memset(perm,'\0',sizeof(perm)); - if (atcmd_info_tbl[i].permission & ATCMD_PERM_DISABLE) - strcpy(perm,"Disable"); - else if (atcmd_info_tbl[i].permission & ATCMD_PERM_WRITEONCEREAD) - strcpy(perm,"R*"); - else - if (atcmd_info_tbl[i].permission & ATCMD_PERM_READ) - strcpy(perm+strlen(perm),"R"); - if (atcmd_info_tbl[i].permission & ATCMD_PERM_WRITE) - strcpy(perm+strlen(perm),"W"); - atcmd_printf("%s,%s: %s\r\n", atcmd_info_tbl[i].atCmd, perm, atcmd_info_tbl[i].CmdUsage); + atcmd_printf("%s: %s\r\n", atcmd_info_tbl[i].atCmd, atcmd_info_tbl[i].CmdUsage); } nRet = AT_OK; } else { @@ -521,17 +507,7 @@ int At_Parser (SERIAL_PORT port, char *buff, int len) sprintf(cust_atcmd_buff, "%s%s", "ATC+", atcmd_cust_tbl[j].atCmd); if (help) { - memset(perm,'\0',sizeof(perm)); - if (atcmd_cust_tbl[i].permission & ATCMD_PERM_DISABLE) - strcpy(perm,"Disable"); - else if (atcmd_cust_tbl[i].permission & ATCMD_PERM_WRITEONCEREAD) - strcpy(perm,"R*"); - else - if (atcmd_cust_tbl[i].permission & ATCMD_PERM_READ) - strcpy(perm+strlen(perm),"R"); - if (atcmd_cust_tbl[i].permission & ATCMD_PERM_WRITE) - strcpy(perm+strlen(perm),"W"); - atcmd_printf("%s,%s: %s\r\n", cust_atcmd_buff, perm, atcmd_cust_tbl[j].CmdUsage); + atcmd_printf("%s: %s\r\n", cust_atcmd_buff, atcmd_cust_tbl[j].CmdUsage); nRet = AT_OK; } else { if (atcmd_cust_tbl[j].permission & ATCMD_PERM_DISABLE) @@ -717,6 +693,19 @@ uint8_t at_check_digital_uint32_t(const char *p_str, uint32_t *value) return 1; } + for (uint8_t i=0; iargc == 1 && !strcmp(param->argv[0], "?")) { diff --git a/cores/nRF5/component/service/mode/cli/atcmd_general.h b/cores/nRF5/component/service/mode/cli/atcmd_general.h index d2583e34..9da4ee81 100755 --- a/cores/nRF5/component/service/mode/cli/atcmd_general.h +++ b/cores/nRF5/component/service/mode/cli/atcmd_general.h @@ -24,7 +24,7 @@ int At_Alias (SERIAL_PORT port, char *cmd, stParam *param); int At_GetSysVolt (SERIAL_PORT port, char *cmd, stParam *param); int At_Bootver (SERIAL_PORT port, char *cmd, stParam *param); #endif -#if defined(rak3172) || defined(rak3172T) +#ifdef rak3172 int At_GetUid (SERIAL_PORT port, char *cmd, stParam *param); #endif #ifdef SUPPORT_BLE diff --git a/cores/nRF5/component/service/mode/cli/atcmd_general_def.h b/cores/nRF5/component/service/mode/cli/atcmd_general_def.h index d99bb42e..41171e7e 100755 --- a/cores/nRF5/component/service/mode/cli/atcmd_general_def.h +++ b/cores/nRF5/component/service/mode/cli/atcmd_general_def.h @@ -216,7 +216,7 @@ #define ATCMD_HWID "AT+HWID" #define ATCMD_ALIAS "AT+ALIAS" #define ATCMD_SYSV "AT+SYSV" -#if defined(rak3172) || defined(rak3172T) +#ifdef rak3172 #define ATCMD_UID "AT+UID" #endif #ifdef SUPPORT_BLE diff --git a/cores/nRF5/component/service/mode/cli/atcmd_join_send.c b/cores/nRF5/component/service/mode/cli/atcmd_join_send.c index 35e583fa..13966344 100755 --- a/cores/nRF5/component/service/mode/cli/atcmd_join_send.c +++ b/cores/nRF5/component/service/mode/cli/atcmd_join_send.c @@ -209,11 +209,10 @@ int At_CfMode(SERIAL_PORT port, char *cmd, stParam *param) int At_CfStatus(SERIAL_PORT port, char *cmd, stParam *param) { - if (SERVICE_LORAWAN != service_lora_get_nwm()) + if (SERVICE_LORA_P2P == service_lora_get_nwm()) { return AT_MODE_NO_SUPPORT; } - if (param->argc == 1 && !strcmp(param->argv[0], "?")) { atcmd_printf("%s=%u\r\n", cmd, service_lora_get_cfs()); @@ -491,12 +490,6 @@ int At_Lpsend(SERIAL_PORT port, char *cmd, stParam *param) uint16_t lp_port,lp_ack; uint16_t lp_len; uint8_t lp_buffer[1024]; - int32_t ret; - if (SERVICE_LORAWAN != service_lora_get_nwm()) - { - return AT_MODE_NO_SUPPORT; - } - if (param->argc == 1 && !strcmp(param->argv[0], "?")) { return AT_PARAM_ERROR; @@ -544,35 +537,14 @@ int At_Lpsend(SERIAL_PORT port, char *cmd, stParam *param) if (lp_ack > 1) return AT_PARAM_ERROR; - if (lp_port < 1 || lp_port > 223) - { + if (lp_port > 223) return AT_PARAM_ERROR; - } if (0 != at_check_hex_param(param->argv[2], lp_len, lp_buffer)) return AT_PARAM_ERROR; - ret = service_lora_lptp_send(lp_port,lp_ack,lp_buffer,lp_len/2); - if (ret == UDRV_RETURN_OK) - { - return AT_OK; - } - else if (ret == -UDRV_NO_WAN_CONNECTION) - { - return AT_NO_NETWORK_JOINED; - } - else if (ret == -UDRV_BUSY) - { - return AT_BUSY_ERROR; - } - else if(ret == -UDRV_WRONG_ARG ) - { - return AT_PARAM_ERROR; - } - else - { - return AT_ERROR; - } + service_lora_lptp_send(lp_port,lp_ack,lp_buffer,lp_len/2); + return AT_OK; } } #endif diff --git a/cores/nRF5/component/service/mode/cli/atcmd_misc.c b/cores/nRF5/component/service/mode/cli/atcmd_misc.c index 1c5cc26f..4393491c 100755 --- a/cores/nRF5/component/service/mode/cli/atcmd_misc.c +++ b/cores/nRF5/component/service/mode/cli/atcmd_misc.c @@ -12,12 +12,15 @@ #ifndef RUI_BOOTLOADER int At_Factory (SERIAL_PORT port, char *cmd, stParam *param) { if (param->argc == 0) { - uint32_t page_size = 2048; - uint8_t buff[page_size]; + #ifdef rak11720 + uint8_t buff[8192]; + #else + uint8_t buff[4096]; + #endif - udrv_flash_read(MCU_SYS_CONFIG_NVM_ADDR, page_size, buff); - udrv_flash_erase(MCU_FACTORY_DEFAULT_NVM_ADDR, page_size); - udrv_flash_write(MCU_FACTORY_DEFAULT_NVM_ADDR, page_size, buff); + udrv_flash_read(MCU_SYS_CONFIG_NVM_ADDR, udrv_flash_get_page_size(), buff); + udrv_flash_erase(MCU_FACTORY_DEFAULT_NVM_ADDR, udrv_flash_get_page_size()); + udrv_flash_write(MCU_FACTORY_DEFAULT_NVM_ADDR, udrv_flash_get_page_size(), buff); return AT_OK; } else { return AT_PARAM_ERROR; diff --git a/cores/nRF5/component/service/mode/cli/atcmd_multicast.c b/cores/nRF5/component/service/mode/cli/atcmd_multicast.c index 1c0e9653..e172acd6 100755 --- a/cores/nRF5/component/service/mode/cli/atcmd_multicast.c +++ b/cores/nRF5/component/service/mode/cli/atcmd_multicast.c @@ -52,9 +52,7 @@ int At_Addmulc(SERIAL_PORT port, char *cmd, stParam *param) return AT_PARAM_ERROR; if(param->argv[5][0] == '0') { - if (!strcmp(param->argv[5], "0")) - Datarate_u32 = 0; - else if( 0 != at_check_digital_uint32_t( param->argv[5] + 1, &Datarate_u32)) + if( 0 != at_check_digital_uint32_t( param->argv[5] + 1, &Datarate_u32)) return AT_PARAM_ERROR; } else diff --git a/cores/nRF5/component/service/mode/cli/atcmd_nwk_management.c b/cores/nRF5/component/service/mode/cli/atcmd_nwk_management.c index a80a69c4..a68e7459 100755 --- a/cores/nRF5/component/service/mode/cli/atcmd_nwk_management.c +++ b/cores/nRF5/component/service/mode/cli/atcmd_nwk_management.c @@ -150,7 +150,7 @@ int At_DataRate (SERIAL_PORT port, char *cmd, stParam *param) int32_t ret; if (param->argc == 1 && !strcmp(param->argv[0], "?")) { - atcmd_printf("%s=%u\r\n", cmd, service_lora_get_dr()); + atcmd_printf("%s=%u\r\n", cmd, service_nvm_get_dr_from_nvm()); return AT_OK; } else if (param->argc == 1) { uint32_t dr; diff --git a/cores/nRF5/component/service/mode/cli/atcmd_p2p.c b/cores/nRF5/component/service/mode/cli/atcmd_p2p.c index 2e9bd480..fdd7893e 100755 --- a/cores/nRF5/component/service/mode/cli/atcmd_p2p.c +++ b/cores/nRF5/component/service/mode/cli/atcmd_p2p.c @@ -8,7 +8,6 @@ #include "service_lora.h" #include "service_lora_test.h" #include "service_lora_p2p.h" -#include "service_runtimeConfig.h" #include "board.h" static void dump_hex2str(uint8_t *buf, uint8_t len) @@ -32,11 +31,6 @@ int At_NwkWorkMode(SERIAL_PORT port, char *cmd, stParam *param) if (strlen(param->argv[0]) != 1) return AT_PARAM_ERROR; - if (service_lora_p2p_get_radio_stat()) { - atcmd_printf("P2P_RX_ON already, please disable P2P RX before setting.\r\n"); - return AT_BUSY_ERROR; - } - if ((param->argv[0][0] == '0') || (param->argv[0][0] == '1')||(param->argv[0][0] == '2')) { if (service_lora_set_nwm((SERVICE_LORA_WORK_MODE)atoi(param->argv[0])) == UDRV_RETURN_OK) { @@ -81,11 +75,6 @@ int At_P2pFreq(SERIAL_PORT port, char *cmd, stParam *param) if ((frequency < 150e6) || (frequency > 960e6)) return AT_PARAM_ERROR; - if (service_lora_p2p_get_radio_stat()) { - atcmd_printf("P2P_RX_ON already, please disable P2P RX before setting.\r\n"); - return AT_BUSY_ERROR; - } - status = service_lora_p2p_set_freq(frequency); return at_error_code_form_udrv(status); } @@ -117,11 +106,6 @@ int At_P2pSF(SERIAL_PORT port, char *cmd, stParam *param) if ((spreading_factor < 5) || (spreading_factor > 12)) return AT_PARAM_ERROR; - if (service_lora_p2p_get_radio_stat()) { - atcmd_printf("P2P_RX_ON already, please disable P2P RX before setting.\r\n"); - return AT_BUSY_ERROR; - } - if (service_lora_p2p_set_sf((uint8_t)spreading_factor) != UDRV_RETURN_OK) { return AT_ERROR; @@ -156,11 +140,6 @@ int At_P2pBW(SERIAL_PORT port, char *cmd, stParam *param) if (0 != at_check_digital_uint32_t(param->argv[0], &bandwidth)) return AT_PARAM_ERROR; - if (service_lora_p2p_get_radio_stat()) { - atcmd_printf("P2P_RX_ON already, please disable P2P RX before setting.\r\n"); - return AT_BUSY_ERROR; - } - status = service_lora_p2p_set_bandwidth(bandwidth); return at_error_code_form_udrv(status); } @@ -190,11 +169,6 @@ int At_P2pCR(SERIAL_PORT port, char *cmd, stParam *param) if (0 != at_check_digital_uint32_t(param->argv[0], &coding_rate)) return AT_PARAM_ERROR; - if (service_lora_p2p_get_radio_stat()) { - atcmd_printf("P2P_RX_ON already, please disable P2P RX before setting.\r\n"); - return AT_BUSY_ERROR; - } - status = service_lora_p2p_set_codingrate((uint8_t)coding_rate) ; return at_error_code_form_udrv(status); @@ -230,11 +204,6 @@ int At_P2pPL(SERIAL_PORT port, char *cmd, stParam *param) if(preamble_length > 65535) return AT_PARAM_ERROR; - if (service_lora_p2p_get_radio_stat()) { - atcmd_printf("P2P_RX_ON already, please disable P2P RX before setting.\r\n"); - return AT_BUSY_ERROR; - } - if (service_lora_p2p_set_preamlen((uint16_t)preamble_length) != UDRV_RETURN_OK) { return AT_ERROR; @@ -270,11 +239,6 @@ int At_P2pTP(SERIAL_PORT port, char *cmd, stParam *param) if ((txpower < 5) || (txpower > 22)) return AT_PARAM_ERROR; - if (service_lora_p2p_get_radio_stat()) { - atcmd_printf("P2P_RX_ON already, please disable P2P RX before setting.\r\n"); - return AT_BUSY_ERROR; - } - if (service_lora_p2p_set_powerdbm((uint8_t)txpower) != UDRV_RETURN_OK) { return AT_ERROR; @@ -310,8 +274,8 @@ int At_P2pSend(SERIAL_PORT port, char *cmd, stParam *param) if (0 != at_check_hex_param(param->argv[0], datalen, lora_data)) return AT_PARAM_ERROR; - bool cad_enable = service_lora_p2p_get_CAD(); - if (-UDRV_BUSY == service_lora_p2p_send(lora_data, datalen / 2, cad_enable)) + + if (-UDRV_BUSY == service_lora_p2p_send(lora_data, datalen / 2)) return AT_BUSY_ERROR; return AT_OK; @@ -331,15 +295,7 @@ int At_P2pRecv(SERIAL_PORT port, char *cmd, stParam *param) return AT_MODE_NO_SUPPORT; } - if (param->argc == 1 && !strcmp(param->argv[0], "?")) - { - if (service_lora_p2p_get_radio_stat()) - atcmd_printf("P2P_RX_ON\r\n"); - else - atcmd_printf("P2P_RX_OFF\r\n"); - return AT_OK; - } - else if (param->argc == 1) + if (param->argc == 1) { uint32_t timeout; @@ -381,11 +337,6 @@ int At_P2pCrypt(SERIAL_PORT port, char *cmd, stParam *param) if (crypto_enable > 1) return AT_PARAM_ERROR; - if (service_lora_p2p_get_radio_stat()) { - atcmd_printf("P2P_RX_ON already, please disable P2P RX before setting.\r\n"); - return AT_BUSY_ERROR; - } - if (service_lora_p2p_set_crypto_enable((bool)crypto_enable) != UDRV_RETURN_OK) { return AT_ERROR; @@ -399,43 +350,6 @@ int At_P2pCrypt(SERIAL_PORT port, char *cmd, stParam *param) } } - -int At_P2pCAD(SERIAL_PORT port, char *cmd, stParam *param) -{ - if (SERVICE_LORAWAN == service_lora_get_nwm()) - { - return AT_MODE_NO_SUPPORT; - } - - if (param->argc == 1 && !strcmp(param->argv[0], "?")) - { - atcmd_printf("%s=%u\r\n", cmd, service_lora_p2p_get_CAD()); - return AT_OK; - } - else if (param->argc == 1) - { - uint32_t crypto_enable; - - if (0 != at_check_digital_uint32_t(param->argv[0], &crypto_enable)) - return AT_PARAM_ERROR; - - if (crypto_enable > 1) - return AT_PARAM_ERROR; - - if (service_lora_p2p_set_CAD((bool)crypto_enable) != UDRV_RETURN_OK) - { - return AT_ERROR; - } - - return AT_OK; - } - else - { - return AT_PARAM_ERROR; - } -} - - int At_P2pKey(SERIAL_PORT port, char *cmd, stParam *param) { if (SERVICE_LORAWAN == service_lora_get_nwm()) @@ -445,81 +359,28 @@ int At_P2pKey(SERIAL_PORT port, char *cmd, stParam *param) if (param->argc == 1 && !strcmp(param->argv[0], "?")) { - uint8_t rbuff[17]; - memset(rbuff,'\0',sizeof(rbuff)); - if (service_lora_p2p_get_crypto_key(rbuff, 16) != UDRV_RETURN_OK) + uint8_t rbuff[8]; + if (service_lora_p2p_get_crypto_key(rbuff, 8) != UDRV_RETURN_OK) { return AT_ERROR; } - //atcmd_printf("%s=%s\r\n", cmd,rbuff); atcmd_printf("%s=", cmd); - dump_hex2str(rbuff, 16); + dump_hex2str(rbuff, 8); return AT_OK; } else if (param->argc == 1) { uint32_t datalen; - uint8_t crypt_key[16]; - datalen = strlen(param->argv[0]); - if (datalen != 32) - return AT_PARAM_ERROR; - - if (0 != at_check_hex_param(param->argv[0], 32, crypt_key)) - return AT_PARAM_ERROR; - - if (service_lora_p2p_get_radio_stat()) { - atcmd_printf("P2P_RX_ON already, please disable P2P RX before setting.\r\n"); - return AT_BUSY_ERROR; - } - - if (service_lora_p2p_set_crypto_key(crypt_key, 16) != UDRV_RETURN_OK) - return AT_ERROR; - - return AT_OK; - } - else - { - return AT_PARAM_ERROR; - } -} + uint8_t crypt_key[8]; -int At_P2pIV (SERIAL_PORT port, char *cmd, stParam *param) -{ - if (SERVICE_LORAWAN == service_lora_get_nwm()) - { - return AT_MODE_NO_SUPPORT; - } - - if (param->argc == 1 && !strcmp(param->argv[0], "?")) - { - uint8_t rbuff[17]; - memset(rbuff,'\0',sizeof(rbuff)); - if (service_lora_p2p_get_crypto_IV(rbuff, 16) != UDRV_RETURN_OK) - { - return AT_ERROR; - } - //atcmd_printf("%s=%s\r\n", cmd,rbuff); - atcmd_printf("%s=", cmd); - dump_hex2str(rbuff, 16); - return AT_OK; - } - else if (param->argc == 1) - { - uint32_t datalen; - uint8_t crypt_iv[16]; datalen = strlen(param->argv[0]); - if (datalen != 32) + if (datalen != 16) return AT_PARAM_ERROR; - if (0 != at_check_hex_param(param->argv[0], 32, crypt_iv)) + if (0 != at_check_hex_param(param->argv[0], 16, crypt_key)) return AT_PARAM_ERROR; - if (service_lora_p2p_get_radio_stat()) { - atcmd_printf("P2P_RX_ON already, please disable P2P RX before setting.\r\n"); - return AT_BUSY_ERROR; - } - - if (service_lora_p2p_set_crypto_IV(crypt_iv, 16) != UDRV_RETURN_OK) + if (service_lora_p2p_set_crypto_key(crypt_key, 8) != UDRV_RETURN_OK) return AT_ERROR; return AT_OK; @@ -530,7 +391,6 @@ int At_P2pIV (SERIAL_PORT port, char *cmd, stParam *param) } } - int At_P2p(SERIAL_PORT port, char *cmd, stParam *param) { if (SERVICE_LORAWAN == service_lora_get_nwm()) @@ -540,36 +400,21 @@ int At_P2p(SERIAL_PORT port, char *cmd, stParam *param) if (param->argc == 1 && !strcmp(param->argv[0], "?")) { - if (get_useRuntimeConfigP2P()) - { - runtimeConfigP2P_t runtimeConfigP2P; - get_runtimeConfigP2P(&runtimeConfigP2P); - atcmd_printf("%s=", cmd); - atcmd_printf("%u:", runtimeConfigP2P.frequency); - atcmd_printf("%u:", runtimeConfigP2P.spreading_factor); - atcmd_printf("%u:", runtimeConfigP2P.bandwidth); - atcmd_printf("%u:", runtimeConfigP2P.coding_rate); - atcmd_printf("%u:", runtimeConfigP2P.preamble_length); - atcmd_printf("%u\r\n", runtimeConfigP2P.txpower); - } - else - { - atcmd_printf("%s=", cmd); - atcmd_printf("%u:", service_lora_p2p_get_freq()); - atcmd_printf("%u:", service_lora_p2p_get_sf()); - atcmd_printf("%u:", service_lora_p2p_get_bandwidth()); - atcmd_printf("%u:", service_lora_p2p_get_codingrate()); - atcmd_printf("%u:", service_lora_p2p_get_preamlen()); - atcmd_printf("%u\r\n",service_lora_p2p_get_powerdbm()); - } + atcmd_printf("%s=", cmd); + atcmd_printf("%u:", service_lora_p2p_get_freq()); + atcmd_printf("%u:", service_lora_p2p_get_sf()); + atcmd_printf("%u:", service_lora_p2p_get_bandwidth()); + atcmd_printf("%u:", service_lora_p2p_get_codingrate()); + atcmd_printf("%u:", service_lora_p2p_get_preamlen()); + atcmd_printf("%u\r\n",service_lora_p2p_get_powerdbm()); return AT_OK; } - else if (param->argc == 6 || (param->argc == 7 && !strcmp(param->argv[6],"0"))) + else if (param->argc == 6) { uint32_t frequency,spreading_factor,bandwidth,coding_rate,preamble_length,txpower; uint32_t o_frequency,o_spreading_factor,o_bandwidth,o_coding_rate,o_preamble_length,o_txpower; uint8_t udrv_code; - + // Preserve current p2p parameters o_frequency = service_lora_p2p_get_freq(); o_spreading_factor = service_lora_p2p_get_sf(); @@ -592,26 +437,6 @@ int At_P2p(SERIAL_PORT port, char *cmd, stParam *param) if (0 != at_check_digital_uint32_t(param->argv[5], &txpower)) return AT_PARAM_ERROR; - if ((frequency < 150e6) || (frequency > 960e6)) - return AT_PARAM_ERROR; - - if ( spreading_factor < 5 || spreading_factor > 12) - return AT_PARAM_ERROR; - - if (coding_rate > 3) - return AT_PARAM_ERROR; - - if(preamble_length< 5 || preamble_length > 65535) - return AT_PARAM_ERROR; - - if (txpower < 5 || txpower > 22) - return AT_PARAM_ERROR; - - if (service_lora_p2p_get_radio_stat()) { - atcmd_printf("P2P_RX_ON already, please disable P2P RX before setting.\r\n"); - return AT_BUSY_ERROR; - } - // Check and save parameters udrv_code = service_lora_p2p_set_freq(frequency); if( udrv_code != UDRV_RETURN_OK) @@ -631,8 +456,6 @@ int At_P2p(SERIAL_PORT port, char *cmd, stParam *param) udrv_code = service_lora_p2p_set_powerdbm((uint8_t)txpower); if( udrv_code != UDRV_RETURN_OK) goto STEP_ATP2P_CHECK_ERROR_CODE; - - set_useRuntimeConfigP2P(false); return AT_OK; STEP_ATP2P_CHECK_ERROR_CODE: @@ -645,121 +468,8 @@ int At_P2p(SERIAL_PORT port, char *cmd, stParam *param) service_lora_p2p_set_powerdbm((uint8_t)o_txpower); //Check and return error code return at_error_code_form_udrv(udrv_code); - } - else if (param->argc == 7 && !strcmp(param->argv[6],"1")) { //for runtime setting - uint32_t frequency,spreading_factor,bandwidth,coding_rate,preamble_length,txpower; - uint32_t o_frequency,o_spreading_factor,o_bandwidth,o_coding_rate,o_preamble_length,o_txpower; - uint8_t udrv_code; - bool o_useRuntimeConfig = get_useRuntimeConfigP2P(); - runtimeConfigP2P_t runtimeConfigP2P; - - // Preserve current p2p parameters - if (o_useRuntimeConfig) { - get_runtimeConfigP2P(&runtimeConfigP2P); - o_frequency = runtimeConfigP2P.frequency; - o_spreading_factor = runtimeConfigP2P.spreading_factor; - if (SERVICE_LORA_P2P == service_lora_get_nwm()) { - o_bandwidth = runtimeConfigP2P.bandwidth; - } - else if (SERVICE_LORA_FSK == service_lora_get_nwm()) { - o_bandwidth = runtimeConfigP2P.fsk_rxbw; - } - o_coding_rate = runtimeConfigP2P.coding_rate; - o_preamble_length = runtimeConfigP2P.preamble_length; - o_txpower = runtimeConfigP2P.txpower; - } - else { - o_frequency = service_lora_p2p_get_freq(); - o_spreading_factor = service_lora_p2p_get_sf(); - o_bandwidth = service_lora_p2p_get_bandwidth(); - o_coding_rate = service_lora_p2p_get_codingrate(); - o_preamble_length = service_lora_p2p_get_preamlen(); - o_txpower = service_lora_p2p_get_powerdbm(); - } - - // Exchange parameters - if (0 != at_check_digital_uint32_t(param->argv[0], &frequency)) - return AT_PARAM_ERROR; - if (0 != at_check_digital_uint32_t(param->argv[1], &spreading_factor)) - return AT_PARAM_ERROR; - if (0 != at_check_digital_uint32_t(param->argv[2], &bandwidth)) - return AT_PARAM_ERROR; - if (0 != at_check_digital_uint32_t(param->argv[3], &coding_rate)) - return AT_PARAM_ERROR; - if (0 != at_check_digital_uint32_t(param->argv[4], &preamble_length)) - return AT_PARAM_ERROR; - if (0 != at_check_digital_uint32_t(param->argv[5], &txpower)) - return AT_PARAM_ERROR; - - if (service_lora_p2p_get_radio_stat()) { - atcmd_printf("P2P_RX_ON already, please disable P2P RX before setting.\r\n"); - return AT_BUSY_ERROR; - } - - // Compatible old SPEC for bandwidth - if (SERVICE_LORA_P2P == service_lora_get_nwm()) { - if( bandwidth == 125 ) { - bandwidth = 0; - } - else if( bandwidth == 250 ) { - bandwidth = 1; - } - else if( bandwidth == 500 ) { - bandwidth = 2; - } - } - - // Check parameters - udrv_code = service_lora_p2p_check_runtime_freq(frequency); - if( udrv_code != UDRV_RETURN_OK) - goto STEP_ATP2P2_CHECK_ERROR_CODE; - udrv_code = service_lora_p2p_check_runtime_sf((uint8_t)spreading_factor); - if( udrv_code != UDRV_RETURN_OK) - goto STEP_ATP2P2_CHECK_ERROR_CODE; - udrv_code = service_lora_p2p_check_runtime_bandwidth(bandwidth); - if( udrv_code != UDRV_RETURN_OK) - goto STEP_ATP2P2_CHECK_ERROR_CODE; - udrv_code = service_lora_p2p_check_runtime_codingrate((uint8_t)coding_rate); - if( udrv_code != UDRV_RETURN_OK) - goto STEP_ATP2P2_CHECK_ERROR_CODE; - udrv_code = service_lora_p2p_check_runtime_preamlen((uint16_t)preamble_length); - if( udrv_code != UDRV_RETURN_OK) - goto STEP_ATP2P2_CHECK_ERROR_CODE; - udrv_code = service_lora_p2p_check_runtime_powerdbm((uint8_t)txpower); - if( udrv_code != UDRV_RETURN_OK) - goto STEP_ATP2P2_CHECK_ERROR_CODE; - - runtimeConfigP2P.frequency = frequency; - runtimeConfigP2P.spreading_factor = (uint8_t)spreading_factor; - if (SERVICE_LORA_P2P == service_lora_get_nwm()) { - runtimeConfigP2P.bandwidth = bandwidth; - } - else if (SERVICE_LORA_FSK == service_lora_get_nwm()) { - runtimeConfigP2P.fsk_rxbw = bandwidth; - } - runtimeConfigP2P.coding_rate = (uint8_t)coding_rate; - runtimeConfigP2P.preamble_length = (uint16_t)preamble_length; - runtimeConfigP2P.txpower = (uint8_t)txpower; - - set_runtimeConfigP2P(&runtimeConfigP2P); - set_useRuntimeConfigP2P(true); - service_lora_p2p_config(); - return AT_OK; - - STEP_ATP2P2_CHECK_ERROR_CODE: - //Restore the previous parameters - if (!o_useRuntimeConfig) { - service_lora_p2p_set_freq(o_frequency); - service_lora_p2p_set_sf((uint8_t)o_spreading_factor); - service_lora_p2p_set_bandwidth(o_bandwidth); - service_lora_p2p_set_codingrate((uint8_t)o_coding_rate); - service_lora_p2p_set_preamlen((uint16_t)o_preamble_length); - service_lora_p2p_set_powerdbm((uint8_t)o_txpower); - } - //Check and return error code - return at_error_code_form_udrv(udrv_code); - } - else { + }else + { return AT_PARAM_ERROR; } } @@ -788,12 +498,7 @@ int At_Pbr(SERIAL_PORT port, char *cmd, stParam *param) { return AT_PARAM_ERROR; } - - if (service_lora_p2p_get_radio_stat()) { - atcmd_printf("P2P_RX_ON already, please disable P2P RX before setting.\r\n"); - return AT_BUSY_ERROR; - } - + if (service_lora_p2p_set_bitrate(bitrate) != UDRV_RETURN_OK) { return AT_ERROR; @@ -829,11 +534,6 @@ int At_Pfdev(SERIAL_PORT port, char *cmd, stParam *param) if( fdev < 600 || fdev > 200000) return AT_PARAM_ERROR; - if (service_lora_p2p_get_radio_stat()) { - atcmd_printf("P2P_RX_ON already, please disable P2P RX before setting.\r\n"); - return AT_BUSY_ERROR; - } - if (service_lora_p2p_set_fdev(fdev) != UDRV_RETURN_OK) { return AT_ERROR; @@ -873,11 +573,6 @@ int At_iqInver(SERIAL_PORT port, char *cmd, stParam *param) else return AT_PARAM_ERROR; - if (service_lora_p2p_get_radio_stat()) { - atcmd_printf("P2P_RX_ON already, please disable P2P RX before setting.\r\n"); - return AT_BUSY_ERROR; - } - int32_t ret = service_lora_p2p_set_iqinverted(iqinverted); return at_error_code_form_udrv(ret); } @@ -903,11 +598,6 @@ int At_syncword(SERIAL_PORT port, char *cmd, stParam *param) if (0 != at_check_hex_uint16(param->argv[0], &syncword)) return AT_PARAM_ERROR; - if (service_lora_p2p_get_radio_stat()) { - atcmd_printf("P2P_RX_ON already, please disable P2P RX before setting.\r\n"); - return AT_BUSY_ERROR; - } - int32_t ret = service_lora_p2p_set_syncword(syncword); return at_error_code_form_udrv(ret); } @@ -933,11 +623,6 @@ int At_rfFrequency(SERIAL_PORT port, char *cmd, stParam *param) if (0 != at_check_digital_uint32_t(param->argv[0], &frequency)) return AT_PARAM_ERROR; - if (service_lora_p2p_get_radio_stat()) { - atcmd_printf("P2P_RX_ON already, please disable P2P RX before setting.\r\n"); - return AT_BUSY_ERROR; - } - int32_t ret = service_lora_p2p_set_freq(frequency); return at_error_code_form_udrv(ret); } @@ -966,11 +651,6 @@ int At_txOutputPower(SERIAL_PORT port, char *cmd, stParam *param) if (txpower < 5 || txpower > 22) return AT_PARAM_ERROR; - if (service_lora_p2p_get_radio_stat()) { - atcmd_printf("P2P_RX_ON already, please disable P2P RX before setting.\r\n"); - return AT_BUSY_ERROR; - } - int32_t ret = service_lora_p2p_set_powerdbm((uint8_t)txpower); return at_error_code_form_udrv(ret); @@ -998,11 +678,6 @@ int At_bandwidth(SERIAL_PORT port, char *cmd, stParam *param) if (0 != at_check_digital_uint32_t(param->argv[0], &bandwidth)) return AT_PARAM_ERROR; - if (service_lora_p2p_get_radio_stat()) { - atcmd_printf("P2P_RX_ON already, please disable P2P RX before setting.\r\n"); - return AT_BUSY_ERROR; - } - int32_t ret = service_lora_p2p_set_bandwidth(bandwidth); return at_error_code_form_udrv(ret); } @@ -1031,11 +706,6 @@ int At_speradingFactor(SERIAL_PORT port, char *cmd, stParam *param) if ( spreading_factor < 5 || spreading_factor > 12) return AT_PARAM_ERROR; - if (service_lora_p2p_get_radio_stat()) { - atcmd_printf("P2P_RX_ON already, please disable P2P RX before setting.\r\n"); - return AT_BUSY_ERROR; - } - int32_t ret = service_lora_p2p_set_sf((uint8_t)spreading_factor); return at_error_code_form_udrv(ret); } @@ -1064,11 +734,6 @@ int At_codingrate(SERIAL_PORT port, char *cmd, stParam *param) if (coding_rate > 3) return AT_PARAM_ERROR; - if (service_lora_p2p_get_radio_stat()) { - atcmd_printf("P2P_RX_ON already, please disable P2P RX before setting.\r\n"); - return AT_BUSY_ERROR; - } - int32_t ret = service_lora_p2p_set_codingrate((uint8_t)coding_rate) ; return at_error_code_form_udrv(ret); } @@ -1097,11 +762,6 @@ int At_preambleLength(SERIAL_PORT port, char *cmd, stParam *param) if(preamble_length< 5 || preamble_length > 65535) return AT_PARAM_ERROR; - if (service_lora_p2p_get_radio_stat()) { - atcmd_printf("P2P_RX_ON already, please disable P2P RX before setting.\r\n"); - return AT_BUSY_ERROR; - } - int32_t ret = service_lora_p2p_set_preamlen((uint16_t)preamble_length); return at_error_code_form_udrv(ret); } @@ -1130,11 +790,6 @@ int At_symbolTimeout(SERIAL_PORT port, char *cmd, stParam *param) if(symbolTimeout > SYMBTIMEOUT_MAX) return AT_PARAM_ERROR; - if (service_lora_p2p_get_radio_stat()) { - atcmd_printf("P2P_RX_ON already, please disable P2P RX before setting.\r\n"); - return AT_BUSY_ERROR; - } - int32_t ret = service_lora_p2p_set_symbol_timeout((uint16_t)symbolTimeout); return at_error_code_form_udrv(ret); } @@ -1168,11 +823,6 @@ int At_fixLengthPayload(SERIAL_PORT port, char *cmd, stParam *param) else return AT_PARAM_ERROR; - if (service_lora_p2p_get_radio_stat()) { - atcmd_printf("P2P_RX_ON already, please disable P2P RX before setting.\r\n"); - return AT_BUSY_ERROR; - } - int32_t ret = service_lora_p2p_set_fix_length_payload(fixLengthPayloadOn); return at_error_code_form_udrv(ret); } diff --git a/cores/nRF5/component/service/mode/cli/atcmd_p2p.h b/cores/nRF5/component/service/mode/cli/atcmd_p2p.h index 263ba304..f44a3691 100755 --- a/cores/nRF5/component/service/mode/cli/atcmd_p2p.h +++ b/cores/nRF5/component/service/mode/cli/atcmd_p2p.h @@ -22,12 +22,8 @@ int At_P2pRecv (SERIAL_PORT port, char *cmd, stParam *param); int At_P2pCrypt (SERIAL_PORT port, char *cmd, stParam *param); -int At_P2pCAD (SERIAL_PORT port, char *cmd, stParam *param); - int At_P2pKey (SERIAL_PORT port, char *cmd, stParam *param); -int At_P2pIV (SERIAL_PORT port, char *cmd, stParam *param); - int At_P2p(SERIAL_PORT port, char *cmd, stParam *param); int At_Pbr(SERIAL_PORT port, char *cmd, stParam *param); diff --git a/cores/nRF5/component/service/mode/cli/atcmd_p2p_def.h b/cores/nRF5/component/service/mode/cli/atcmd_p2p_def.h index 635ac381..2cfc765d 100755 --- a/cores/nRF5/component/service/mode/cli/atcmd_p2p_def.h +++ b/cores/nRF5/component/service/mode/cli/atcmd_p2p_def.h @@ -102,7 +102,6 @@ * | Command | Input parameter | Return value | Return code | * |:------------------:|:------------------:|:------------------------------------------------------------------|:------------------:| * | AT+PRECV? | -- | AT+PRECV: enter P2P RX mode for a period of time (ms) | OK | - * | AT+PRECV=? | -- | P2P_RX_OFF or P2P_RX_ON | OK | * | AT+PRECV= | | -- | OK | * | Example
AT+PRECV=| 5000 | -- | OK | * @@ -138,17 +137,16 @@ * |:------------------:|:------------------:|:------------------------------------------------------------------|:------------------:| * | AT+P2P? | -- | AT+P2P: get or set all P2P parameters | OK | * | AT+P2P=? | -- | \,\,\,\,\,\ | OK | - * | AT+P2P= | \,\,\,\,\,\,\ | | OK | - * | Example
AT+P2P= | 868500000,12,0,0,10,22
868500000,8,250,2,24,20:1 | -- | OK | - * | Example
AT+P2P=?| -- | 868000000,7,0,0,8,14 | OK | + * | AT+P2P= | \,\,\,\,\,\ | | OK | + * | Example
AT+P2P= | 868500000,12,125,0,65535,20 | -- | OK | + * | Example
AT+P2P=?| -- | 868000000,7,125,0,8,14 | OK | * * Freq: 150000000-960000000
* SF: 6,7,8,9,10,11,12
* Bandwidth: 0 = 125,1 = 250,2 = 500,3 = 7.8,4 = 10.4,5 = 15.63,6 = 20.83,7 = 31.25,8 = 41.67,9 = 62.5
* CR: 0 = 4/5, 1 = 4/6, 2 = 4/7, 3 = 4/8
- * Preamble Length: 5-65535
+ * Preamble Length: 2-65535
* TX Power = 5-22
- * Runtime Setting = 0-1. Optional. When Runtime Setting is 1, the configure will not store in Flash memory.
* * @subsection ATCMD_p2p_13 AT+PBR: get or set the P2P FSK modem bitrate (600b/s-300000b/s) * @@ -296,44 +294,16 @@ * * @subsection ATCMD_p2p_26 AT+ENCKEY: P2P encryption key * - * This command allows the user to get or set the encryption key of P2P mode (16 bytes in hex) + * This command allows the user to get or set the encryption key of P2P mode (8 bytes in hex) * * | Command | Input parameter | Return value | Return code | * |:------------------:|:------------------:|:------------------------------------------------------------------|:------------------:| - * | AT+ENCKEY? | -- | AT+ENCKEY: get or set the encryption key of P2P mode (16 bytes in hex) | OK | - * | AT+ENCKEY=? | -- | \<16 hex\> | OK | - * | AT+ENCKEY=\ |\<16 hex\> | -- | OK | + * | AT+ENCKEY? | -- | AT+ENCKEY: get or set the encryption key of P2P mode (8 bytes in hex) | OK | + * | AT+ENCKEY=? | -- | \<8 hex\> | OK | + * | AT+ENCKEY=\ |\<8 hex\> | -- | OK | * | Example
AT+ENCKEY= | 0011223344556677 | -- | OK | * | Example
AT+ENCKEY=? | -- | 0011223344556677 | OK | * - * - * @subsection ATCMD_p2p_27 AT+CRYPIV: P2P encryption IV - * - * This command allows the user to get or set the encryption IV of P2P mode (16 bytes in hex) - * - * | Command | Input parameter | Return value | Return code | - * |:------------------:|:------------------:|:------------------------------------------------------------------|:------------------:| - * | AT+CRYPIV? | -- | AT+CRYPIV: get or set the encryption key of P2P mode (16 bytes in hex) | OK | - * | AT+CRYPIV=? | -- | \<16 hex\> | OK | - * | AT+CRYPIV=\ |\<16 hex\> | -- | OK | - * | Example
AT+CRYPIV= | 0011223344556677 | -- | OK | - * | Example
AT+CRYPIV=? | -- | 0011223344556677 | OK | - * - * - * @subsection ATCMD_p2p_28 AT+CAD: P2P Channel Activity Detection - * - * This command allows the user to get or set the Channel Activity Detection of P2P mode - * - * | Command | Input parameter | Return value | Return code | - * |:------------------:|:------------------:|:------------------------------------------------------------------|:------------------:| - * | AT+CAD? | -- | AT+CAD: get or set the Channel Activity Detection of P2P mode ( 1 = on, 0 = off) | OK | - * | AT+CAD=? | -- | \<0 or 1\> | OK | - * | AT+CAD=\ |\<16 hex\> | -- | OK | - * | Example
AT+CAD= |\<0 or 1\> | -- | OK | - * | Example
AT+CAD=? | -- | 0 | OK | - * - * - * */ #endif @@ -342,22 +312,20 @@ #define _ATCMD_P2P_DEF_H_ //### following AT CMD, has doc ### -#define ATCMD_NWM "AT+NWM" -#define ATCMD_PFREQ "AT+PFREQ" -#define ATCMD_PSF "AT+PSF" -#define ATCMD_PBW "AT+PBW" -#define ATCMD_PCR "AT+PCR" -#define ATCMD_PPL "AT+PPL" -#define ATCMD_PTP "AT+PTP" -#define ATCMD_PSEND "AT+PSEND" -#define ATCMD_PRECV "AT+PRECV" -#define ATCMD_PCRYPT "AT+ENCRY" -#define ATCMD_PCAD "AT+CAD" -#define ATCMD_PKEY "AT+ENCKEY" -#define ATCMD_PIV "AT+CRYPIV" -#define ATCMD_P2P "AT+P2P" -#define ATCMD_PBR "AT+PBR" -#define ATCMD_PFDEV "AT+PFDEV" +#define ATCMD_NWM "AT+NWM" +#define ATCMD_PFREQ "AT+PFREQ" +#define ATCMD_PSF "AT+PSF" +#define ATCMD_PBW "AT+PBW" +#define ATCMD_PCR "AT+PCR" +#define ATCMD_PPL "AT+PPL" +#define ATCMD_PTP "AT+PTP" +#define ATCMD_PSEND "AT+PSEND" +#define ATCMD_PRECV "AT+PRECV" +#define ATCMD_PCRYPT "AT+ENCRY" +#define ATCMD_PKEY "AT+ENCKEY" +#define ATCMD_P2P "AT+P2P" +#define ATCMD_PBR "AT+PBR" +#define ATCMD_PFDEV "AT+PFDEV" #define ATCMD_IQINVER "AT+IQINVER" #define ATCMD_SYNCWORD "AT+SYNCWORD" #define ATCMD_RFFREQUENCY "AT+RFFREQUENCY" diff --git a/cores/nRF5/component/service/mode/cli/atcmd_permission.h b/cores/nRF5/component/service/mode/cli/atcmd_permission.h index 4013e824..146ba2ca 100755 --- a/cores/nRF5/component/service/mode/cli/atcmd_permission.h +++ b/cores/nRF5/component/service/mode/cli/atcmd_permission.h @@ -335,25 +335,17 @@ #endif #ifndef AT_PRECV_PERM -#define AT_PRECV_PERM ATCMD_PERM_READ | ATCMD_PERM_WRITE +#define AT_PRECV_PERM ATCMD_PERM_WRITE #endif #ifndef AT_ENCRY_PERM #define AT_ENCRY_PERM ATCMD_PERM_READ | ATCMD_PERM_WRITE #endif -#ifndef AT_PCAD_PERM -#define AT_PCAD_PERM ATCMD_PERM_READ | ATCMD_PERM_WRITE -#endif - #ifndef AT_ENCKEY_PERM #define AT_ENCKEY_PERM ATCMD_PERM_READ | ATCMD_PERM_WRITE #endif -#ifndef AT_ENCIV_PERM -#define AT_ENCIV_PERM ATCMD_PERM_READ | ATCMD_PERM_WRITE -#endif - #ifndef AT_P2P_PERM #define AT_P2P_PERM ATCMD_PERM_READ | ATCMD_PERM_WRITE #endif diff --git a/cores/nRF5/component/service/mode/cli/atcmd_serial_port.c b/cores/nRF5/component/service/mode/cli/atcmd_serial_port.c index 9797c085..ed2eba0e 100755 --- a/cores/nRF5/component/service/mode/cli/atcmd_serial_port.c +++ b/cores/nRF5/component/service/mode/cli/atcmd_serial_port.c @@ -120,13 +120,11 @@ int At_AtCmdMode(SERIAL_PORT port, char *cmd, stParam *param) } #endif #endif -#ifdef SUPPORT_BINARY case SERVICE_MODE_TYPE_PROTOCOL: { service_mode_proto_deinit(port); break; } -#endif default: { break; @@ -142,7 +140,7 @@ int At_AtCmdMode(SERIAL_PORT port, char *cmd, stParam *param) return AT_PARAM_ERROR; } } -#ifdef SUPPORT_BINARY + int At_ApiMode(SERIAL_PORT port, char *cmd, stParam *param) { int32_t ret; @@ -188,7 +186,7 @@ int At_ApiMode(SERIAL_PORT port, char *cmd, stParam *param) return AT_PARAM_ERROR; } } -#endif + #ifdef SUPPORT_PASSTHRU int At_TransparentMode(SERIAL_PORT port, char *cmd, stParam *param) { @@ -250,13 +248,11 @@ int At_TransparentMode(SERIAL_PORT port, char *cmd, stParam *param) service_mode_cli_deinit(port); break; } -#ifdef SUPPORT_BINARY case SERVICE_MODE_TYPE_PROTOCOL: { service_mode_proto_deinit(port); break; } -#endif default: { break; diff --git a/cores/nRF5/component/service/mode/cli/atcmd_sleep_def.h b/cores/nRF5/component/service/mode/cli/atcmd_sleep_def.h index 9cfac37e..ef8229e6 100755 --- a/cores/nRF5/component/service/mode/cli/atcmd_sleep_def.h +++ b/cores/nRF5/component/service/mode/cli/atcmd_sleep_def.h @@ -23,22 +23,8 @@ * | Command | Input parameter | Return value | Return code | * |:------------------:|:------------------:|:------------------------------------------------------------------|:------------------:| * | AT+LPM? | -- | AT+LPM: get or set the low power mode
0 = off
1 = on | OK | - * | AT+LPM=? | -- | \ | OK | * | AT+LPM=\ | 0 or 1 | | OK / AT_PARAM_ERROR| * | Example
AT+LPM= | 1 | -- | OK | - * | Example
AT+LPM=?| | 1 | OK | - * - * @subsection ATCMD_sleep_3 AT+LPMLVL: the sleep level for low power mode - * - * This command provides a way to setting sleep level for low power mode to support STM32 STOP Mode. - * - * | Command | Input parameter | Return value | Return code | - * |:---------------------:|:------------------:|:--------------------------------------------------------------------------------------------|:------------------:| - * | AT+LPMLVL? | -- | AT+LPMLVL: get or set the sleep level for low power mode
1 = STOP1 Mode
2 = STOP2 Mode| OK | - * | AT+LPMLVL=? | -- | 1 or 2 | OK | - * | AT+LPMLVL=\ | 1 or 2 | -- | OK / AT_PARAM_ERROR| - * | Example
AT+LPMLVL= | 1 | -- | OK | - * | Example
AT+LPMLVL=?| | 1 | OK | * */ diff --git a/cores/nRF5/component/service/mode/cli/atcmd_supplement.c b/cores/nRF5/component/service/mode/cli/atcmd_supplement.c index ae930dc4..6eceab68 100755 --- a/cores/nRF5/component/service/mode/cli/atcmd_supplement.c +++ b/cores/nRF5/component/service/mode/cli/atcmd_supplement.c @@ -54,7 +54,7 @@ int At_Mask(SERIAL_PORT port, char *cmd, stParam *param) } else if( band == SERVICE_LORA_CN470 ) { - if( mask_param > 0x800 ) + if( mask_param > 0x800 && mask_param != 0x10ff) return AT_PARAM_ERROR; } diff --git a/cores/nRF5/component/service/mode/protocol/service_mode_proto.c b/cores/nRF5/component/service/mode/protocol/service_mode_proto.c index 0767da30..05de71dd 100644 --- a/cores/nRF5/component/service/mode/protocol/service_mode_proto.c +++ b/cores/nRF5/component/service/mode/protocol/service_mode_proto.c @@ -289,7 +289,7 @@ void service_mode_proto_recv(SERIAL_PORT port, uint8_t ch) { proto_wake_unlock_all(port); } } -#ifdef SUPPORT_BINARY + void service_mode_proto_send(SERIAL_PORT port, uint8_t flag, uint8_t frame_type, uint8_t *payload, uint16_t length, SERVICE_MODE_PROTOCOL_HANDLER response_handler) { proto_packet_header header; proto_packet_tailer tailer; @@ -341,7 +341,6 @@ void service_mode_proto_send(SERIAL_PORT port, uint8_t flag, uint8_t frame_type, udrv_serial_write(port, payload, length); udrv_serial_write(port, &tailer, sizeof(tailer)); } -#endif int32_t service_mode_proto_register(uint8_t frame_type, SERVICE_MODE_PROTOCOL_HANDLER request_handler) { if (proto_upper_layer_table[frame_type].request_handler == NULL) { diff --git a/cores/nRF5/component/service/mode/protocol/service_mode_proto_builtin_handler.c b/cores/nRF5/component/service/mode/protocol/service_mode_proto_builtin_handler.c index 0b3a3d72..623e43f1 100644 --- a/cores/nRF5/component/service/mode/protocol/service_mode_proto_builtin_handler.c +++ b/cores/nRF5/component/service/mode/protocol/service_mode_proto_builtin_handler.c @@ -97,7 +97,6 @@ void service_mode_proto_atcmd_request_handler (SERIAL_PORT port, uint8_t *payloa #else ret = service_nvm_set_default_config_to_nvm(); #endif - service_nvm_set_cfg_to_nvm(); if (ret == UDRV_RETURN_OK) { nRet = AT_OK; @@ -530,13 +529,11 @@ void service_mode_proto_atcmd_request_handler (SERIAL_PORT port, uint8_t *payloa } #endif #endif -#ifdef SUPPORT_BINARY case SERVICE_MODE_TYPE_PROTOCOL: { service_mode_proto_deinit(port); break; } -#endif default: { break; @@ -551,7 +548,6 @@ void service_mode_proto_atcmd_request_handler (SERIAL_PORT port, uint8_t *payloa } break; } -#ifdef SUPPORT_BINARY case SERVICE_MODE_PROTO_ATCMD_APM: { if (flag & PROTO_ATCMD_FLAG_WR_OR_EXE) { @@ -600,7 +596,6 @@ void service_mode_proto_atcmd_request_handler (SERIAL_PORT port, uint8_t *payloa } break; } -#endif #ifdef SUPPORT_LORA #ifdef SUPPORT_PASSTHRU case SERVICE_MODE_PROTO_ATCMD_PAM: @@ -631,13 +626,11 @@ void service_mode_proto_atcmd_request_handler (SERIAL_PORT port, uint8_t *payloa service_mode_cli_deinit(port); break; } -#ifdef SUPPORT_BINARY case SERVICE_MODE_TYPE_PROTOCOL: { service_mode_proto_deinit(port); break; } -#endif default: { break; @@ -2585,8 +2578,8 @@ void service_mode_proto_atcmd_request_handler (SERIAL_PORT port, uint8_t *payloa nRet = AT_PARAM_ERROR; goto out; } - bool cad_enable = service_lora_p2p_get_CAD(); - if (service_lora_p2p_send(arg, payload_len,cad_enable) == UDRV_RETURN_OK) { + + if (service_lora_p2p_send(arg, payload_len) == UDRV_RETURN_OK) { nRet = AT_OK; } else { nRet = AT_ERROR; @@ -2675,20 +2668,20 @@ void service_mode_proto_atcmd_request_handler (SERIAL_PORT port, uint8_t *payloa nRet = AT_PARAM_ERROR; goto out; } - if (service_lora_p2p_set_crypto_key(arg, 16) == UDRV_RETURN_OK) { + if (service_lora_p2p_set_crypto_key(arg, 8) == UDRV_RETURN_OK) { nRet = AT_OK; } else { nRet = AT_ERROR; } } else { - uint8_t rbuff[16]; - if (service_lora_p2p_get_crypto_key(rbuff, 16) != UDRV_RETURN_OK) { + uint8_t rbuff[8]; + if (service_lora_p2p_get_crypto_key(rbuff, 8) != UDRV_RETURN_OK) { nRet = AT_ERROR; goto out; } memset(buff, 0, 256); - reply_len = 16; - memcpy(buff+sizeof(header), rbuff, 16); + reply_len = 8; + memcpy(buff+sizeof(header), rbuff, 8); header.length = __builtin_bswap16(reply_len); header.flag = PROTO_ATCMD_FLAG_RESPONSE; header.atcmd_id = atcmd_id; diff --git a/cores/nRF5/component/service/mode/service_mode.h b/cores/nRF5/component/service/mode/service_mode.h index 91c39d31..7e95e31f 100644 --- a/cores/nRF5/component/service/mode/service_mode.h +++ b/cores/nRF5/component/service/mode/service_mode.h @@ -19,9 +19,7 @@ extern "C" { typedef enum _SERVICE_MODE_TYPE { SERVICE_MODE_TYPE_CLI, -#ifdef SUPPORT_BINARY SERVICE_MODE_TYPE_PROTOCOL, -#endif #ifdef SUPPORT_LORA #ifdef SUPPORT_PASSTHRU SERVICE_MODE_TYPE_TRANSPARENT, diff --git a/cores/nRF5/component/service/nvm/service_nvm.c b/cores/nRF5/component/service/nvm/service_nvm.c index b868a28c..cf4d8e6d 100755 --- a/cores/nRF5/component/service/nvm/service_nvm.c +++ b/cores/nRF5/component/service/nvm/service_nvm.c @@ -50,7 +50,7 @@ int32_t service_nvm_set_default_config_to_nvm(void) { if( factory_default.magic_num == RUI_CFG_MAGIC_NUM && factory_default.version_code == RUI_CFG_VERSION_CODE ) { //If data recovery from legacy version successfully, store new default data to flash - //udrv_flash_write(SERVICE_NVM_FACTORY_DEFAULT_NVM_ADDR, sizeof(PRE_rui_cfg_t), (uint8_t *)&factory_default); + udrv_flash_write(SERVICE_NVM_FACTORY_DEFAULT_NVM_ADDR, sizeof(PRE_rui_cfg_t), (uint8_t *)&factory_default); factory_default_exist = true; } } @@ -60,8 +60,7 @@ int32_t service_nvm_set_default_config_to_nvm(void) { if( factory_default_exist ) { memcpy(&g_rui_cfg_t,&factory_default,sizeof(PRE_rui_cfg_t)); - return UDRV_RETURN_OK; - //return udrv_flash_write(SERVICE_NVM_RUI_CONFIG_NVM_ADDR, sizeof(PRE_rui_cfg_t), (uint8_t *)&g_rui_cfg_t); + return udrv_flash_write(SERVICE_NVM_RUI_CONFIG_NVM_ADDR, sizeof(PRE_rui_cfg_t), (uint8_t *)&g_rui_cfg_t); } g_rui_cfg_t.magic_num = RUI_CFG_MAGIC_NUM; g_rui_cfg_t.version_code = RUI_CFG_VERSION_CODE; @@ -130,7 +129,7 @@ int32_t service_nvm_set_default_config_to_nvm(void) { g_rui_cfg_t.lora_work_mode = SERVICE_LORAWAN; /* lorawan configuration */ - #if defined(rak3172) || defined(rak3172T) + #ifdef rak3172 /* Only RAK3172 supports hardware high and low frequency detection */ uint8_t hardware_freq = 0; hardware_freq = BoardGetHardwareFreq(); @@ -171,7 +170,7 @@ int32_t service_nvm_set_default_config_to_nvm(void) { memset(g_rui_cfg_t.g_lora_cfg_t.McSession_group,0x00,4*sizeof(McSession_t)); /* lora p2p configuration */ -#if defined(rak3172) || defined(rak3172T) +#ifdef rak3172 /* Only RAK3172 supports hardware high and low frequency detection */ hardware_freq = BoardGetHardwareFreq(); if(hardware_freq) @@ -199,9 +198,6 @@ int32_t service_nvm_set_default_config_to_nvm(void) { g_rui_cfg_t.g_rui_cfg_ex.syncword = LORA_MAC_PRIVATE_SYNCWORD; g_rui_cfg_t.g_rui_cfg_ex.fix_length_payload = false; memset(g_rui_cfg_t.g_lora_p2p_cfg_t.crypt_key, 0x00, sizeof(g_rui_cfg_t.g_lora_p2p_cfg_t.crypt_key)); - memset(g_rui_cfg_t.g_rui_cfg_ex.crypt_key16, 0x00, sizeof(g_rui_cfg_t.g_rui_cfg_ex.crypt_key16)); - memset(g_rui_cfg_t.g_rui_cfg_ex.crypt_IV, 0x00, sizeof(g_rui_cfg_t.g_rui_cfg_ex.crypt_IV)); - g_rui_cfg_t.g_rui_cfg_ex.CAD = 0; #endif if(sizeof(g_rui_cfg_t.firmware_ver) > strlen(sw_version)) { @@ -226,10 +222,8 @@ int32_t service_nvm_set_default_config_to_nvm(void) { } else memcpy(g_rui_cfg_t.cli_ver,cli_version,32); - - - //return udrv_flash_write(SERVICE_NVM_RUI_CONFIG_NVM_ADDR, sizeof(PRE_rui_cfg_t), (uint8_t *)&g_rui_cfg_t); - return UDRV_RETURN_OK; + + return udrv_flash_write(SERVICE_NVM_RUI_CONFIG_NVM_ADDR, sizeof(PRE_rui_cfg_t), (uint8_t *)&g_rui_cfg_t); } void service_nvm_init_config(void) { @@ -237,17 +231,11 @@ void service_nvm_init_config(void) { //Try to recovery legacy user data service_nvm_data_recovery_from_legacy(SERVICE_NVM_RUI_CONFIG_NVM_ADDR,&g_rui_cfg_t); if( g_rui_cfg_t.magic_num == RUI_CFG_MAGIC_NUM && g_rui_cfg_t.version_code == RUI_CFG_VERSION_CODE) - { - //udrv_flash_write(SERVICE_NVM_RUI_CONFIG_NVM_ADDR, sizeof(PRE_rui_cfg_t), (uint8_t *)&g_rui_cfg_t); - return UDRV_RETURN_OK; - } + udrv_flash_write(SERVICE_NVM_RUI_CONFIG_NVM_ADDR, sizeof(PRE_rui_cfg_t), (uint8_t *)&g_rui_cfg_t); else service_nvm_set_default_config_to_nvm(); } -int32_t service_nvm_set_cfg_to_nvm() -{ - return udrv_flash_write(SERVICE_NVM_RUI_CONFIG_NVM_ADDR, sizeof(PRE_rui_cfg_t), (uint8_t *)&g_rui_cfg_t); -} + /***********************************************************/ /* RUI Mode */ /***********************************************************/ @@ -257,6 +245,8 @@ SERVICE_MODE_TYPE service_nvm_get_mode_type_from_nvm(SERIAL_PORT port) { } int32_t service_nvm_set_mode_type_to_nvm(SERIAL_PORT port, SERVICE_MODE_TYPE mode_type) { + if (mode_type == g_rui_cfg_t.mode_type[port]) + return UDRV_RETURN_OK; g_rui_cfg_t.mode_type[port] = mode_type; return udrv_flash_write(SERVICE_NVM_RUI_CONFIG_NVM_ADDR, sizeof(PRE_rui_cfg_t), (uint8_t *)&g_rui_cfg_t); @@ -276,6 +266,8 @@ int32_t service_nvm_set_serial_passwd_to_nvm(uint8_t *passwd, uint32_t len) { if (len > 8) { return -UDRV_WRONG_ARG; } + if (memcmp(g_rui_cfg_t.serial_passwd,passwd,len) == 0) + return UDRV_RETURN_OK; memset(g_rui_cfg_t.serial_passwd, 0, sizeof(g_rui_cfg_t.serial_passwd)); memcpy(g_rui_cfg_t.serial_passwd, passwd, len); @@ -287,6 +279,8 @@ uint32_t service_nvm_get_auto_sleep_time_from_nvm(void) { } int32_t service_nvm_set_auto_sleep_time_to_nvm(uint32_t time) { + if (g_rui_cfg_t.auto_sleep_time == time) + return UDRV_RETURN_OK; g_rui_cfg_t.auto_sleep_time = time; return udrv_flash_write(SERVICE_NVM_RUI_CONFIG_NVM_ADDR, sizeof(PRE_rui_cfg_t), (uint8_t *)&g_rui_cfg_t); @@ -297,6 +291,8 @@ uint8_t service_nvm_get_auto_sleep_level_from_nvm(void) { } uint8_t service_nvm_set_auto_sleep_level_to_nvm(uint32_t level) { + if (g_rui_cfg_t.g_rui_cfg_ex.auto_sleep_level == level) + return UDRV_RETURN_OK; g_rui_cfg_t.g_rui_cfg_ex.auto_sleep_level = level; return udrv_flash_write(SERVICE_NVM_RUI_CONFIG_NVM_ADDR, sizeof(PRE_rui_cfg_t), (uint8_t *)&g_rui_cfg_t); } @@ -321,6 +317,8 @@ int32_t service_nvm_set_firmware_ver_to_nvm(uint8_t *buff, uint32_t len) { return -UDRV_WRONG_ARG; } } + if(memcmp(g_rui_cfg_t.firmware_ver,buff,len) == 0) + return UDRV_RETURN_OK; memset(g_rui_cfg_t.firmware_ver, 0 , sizeof(g_rui_cfg_t.firmware_ver)); memcpy(g_rui_cfg_t.firmware_ver, buff, len); @@ -345,6 +343,8 @@ int32_t service_nvm_set_hwmodel_to_nvm(uint8_t *buff, uint32_t len) { return -UDRV_WRONG_ARG; } } + if(memcmp(g_rui_cfg_t.hwmodel,buff,len) == 0) + return UDRV_RETURN_OK; memset(g_rui_cfg_t.hwmodel, 0 , sizeof(g_rui_cfg_t.hwmodel)); memcpy(g_rui_cfg_t.hwmodel, buff, len); @@ -369,6 +369,8 @@ int32_t service_nvm_set_cli_ver_to_nvm(uint8_t *buff, uint32_t len) { return -UDRV_WRONG_ARG; } } + if(memcmp(g_rui_cfg_t.cli_ver,buff,len) == 0) + return UDRV_RETURN_OK; memset(g_rui_cfg_t.cli_ver, 0 , sizeof(g_rui_cfg_t.cli_ver)); memcpy(g_rui_cfg_t.cli_ver, buff, len); @@ -412,6 +414,8 @@ uint32_t service_nvm_get_delta_sec_from_nvm (void) { } int32_t service_nvm_set_delta_sec_to_nvm (uint32_t sec) { + if(g_rui_cfg_t.g_rtc_delta_t.seconds == sec) + return UDRV_RETURN_OK; g_rui_cfg_t.g_rtc_delta_t.seconds = sec; return udrv_flash_write(SERVICE_NVM_RUI_CONFIG_NVM_ADDR, sizeof(PRE_rui_cfg_t), (uint8_t *)&g_rui_cfg_t); @@ -422,6 +426,8 @@ uint32_t service_nvm_get_delta_subsec_from_nvm (void) { } int32_t service_nvm_set_delta_subsec_to_nvm (uint32_t subsec) { + if(g_rui_cfg_t.g_rtc_delta_t.subseconds == subsec) + return UDRV_RETURN_OK; g_rui_cfg_t.g_rtc_delta_t.subseconds = subsec; return udrv_flash_write(SERVICE_NVM_RUI_CONFIG_NVM_ADDR, sizeof(PRE_rui_cfg_t), (uint8_t *)&g_rui_cfg_t); @@ -432,6 +438,8 @@ SERIAL_WLOCK_STATE service_nvm_get_lock_status_from_nvm(SERIAL_PORT Port) { } int32_t service_nvm_set_lock_status_to_nvm(SERIAL_PORT Port, SERIAL_WLOCK_STATE wlock_state) { + if(g_rui_cfg_t.serial_lock_status[Port] == wlock_state) + return UDRV_RETURN_OK; g_rui_cfg_t.serial_lock_status[Port] = wlock_state; return udrv_flash_write(SERVICE_NVM_RUI_CONFIG_NVM_ADDR, sizeof(PRE_rui_cfg_t), (uint8_t *)&g_rui_cfg_t); @@ -442,6 +450,8 @@ uint32_t service_nvm_get_baudrate_from_nvm(void) { } int32_t service_nvm_set_baudrate_to_nvm(uint32_t baudrate) { + if(g_rui_cfg_t.baudrate == baudrate) + return UDRV_RETURN_OK; g_rui_cfg_t.baudrate = baudrate; return udrv_flash_write(SERVICE_NVM_RUI_CONFIG_NVM_ADDR, sizeof(PRE_rui_cfg_t), (uint8_t *)&g_rui_cfg_t); } @@ -468,6 +478,8 @@ int32_t service_nvm_set_atcmd_alias_to_nvm(uint8_t *buff, uint32_t len) { return -UDRV_WRONG_ARG; } } + if(memcmp(g_rui_cfg_t.alias,buff,len) == 0) + return UDRV_RETURN_OK; memcpy(g_rui_cfg_t.alias, buff, len); return udrv_flash_write(SERVICE_NVM_RUI_CONFIG_NVM_ADDR, sizeof(PRE_rui_cfg_t), (uint8_t *)&g_rui_cfg_t); @@ -491,6 +503,8 @@ int32_t service_nvm_set_sn_to_nvm (uint8_t *buff, uint32_t len) { if (len != 18) { memset(g_rui_cfg_t.sn, 0 , 18); } + if(memcmp(g_rui_cfg_t.sn,buff,len) == 0) + return UDRV_RETURN_OK; memcpy(g_rui_cfg_t.sn, buff, len); return udrv_flash_write(SERVICE_NVM_RUI_CONFIG_NVM_ADDR, sizeof(PRE_rui_cfg_t), (uint8_t *)&g_rui_cfg_t); @@ -501,6 +515,8 @@ uint8_t service_nvm_get_atcmd_echo_from_nvm(void) { } int32_t service_nvm_set_atcmd_echo_to_nvm(uint8_t atcmd_echo) { + if(g_rui_cfg_t.atcmd_echo == atcmd_echo) + return UDRV_RETURN_OK; g_rui_cfg_t.atcmd_echo = atcmd_echo; return udrv_flash_write(SERVICE_NVM_RUI_CONFIG_NVM_ADDR, sizeof(PRE_rui_cfg_t), (uint8_t *)&g_rui_cfg_t); @@ -508,6 +524,8 @@ int32_t service_nvm_set_atcmd_echo_to_nvm(uint8_t atcmd_echo) { uint32_t service_nvm_set_debug_level_to_nvm(uint8_t level) { + if(g_rui_cfg_t.debug_level == level) + return UDRV_RETURN_OK; g_rui_cfg_t.debug_level = level; return udrv_flash_write(SERVICE_NVM_RUI_CONFIG_NVM_ADDR, sizeof(PRE_rui_cfg_t), (uint8_t *)&g_rui_cfg_t); @@ -535,6 +553,8 @@ uint8_t service_nvm_set_ble_mac_to_nvm(uint8_t *buff, uint32_t len) return -UDRV_WRONG_ARG; } } + if(memcmp(g_rui_cfg_t.g_ble_cfg_t.mac,buff,sizeof(g_rui_cfg_t.g_ble_cfg_t.mac)) == 0) + return UDRV_RETURN_OK; memcpy(g_rui_cfg_t.g_ble_cfg_t.mac,buff,sizeof(g_rui_cfg_t.g_ble_cfg_t.mac)); return udrv_flash_write(SERVICE_NVM_RUI_CONFIG_NVM_ADDR, sizeof(PRE_rui_cfg_t), (uint8_t *)&g_rui_cfg_t); } @@ -558,6 +578,8 @@ SERVICE_LORA_BAND service_nvm_get_band_from_nvm (void) { } int32_t service_nvm_set_band_to_nvm (SERVICE_LORA_BAND band) { + if(g_rui_cfg_t.g_lora_cfg_t.region == band) + return UDRV_RETURN_OK; g_rui_cfg_t.g_lora_cfg_t.region = band; return udrv_flash_write(SERVICE_NVM_RUI_CONFIG_NVM_ADDR, sizeof(PRE_rui_cfg_t), (uint8_t *)&g_rui_cfg_t); @@ -572,6 +594,8 @@ int32_t service_nvm_get_mask_from_nvm (uint16_t *mask) { } int32_t service_nvm_set_mask_to_nvm (uint16_t *mask) { + if(memcmp(g_rui_cfg_t.g_lora_cfg_t.ch_mask,mask,sizeof(g_rui_cfg_t.g_lora_cfg_t.ch_mask)) == 0) + return UDRV_RETURN_OK; memcpy(g_rui_cfg_t.g_lora_cfg_t.ch_mask, mask, sizeof(g_rui_cfg_t.g_lora_cfg_t.ch_mask)); return udrv_flash_write(SERVICE_NVM_RUI_CONFIG_NVM_ADDR, sizeof(PRE_rui_cfg_t), (uint8_t *)&g_rui_cfg_t); @@ -592,6 +616,8 @@ int32_t service_nvm_set_app_eui_to_nvm (uint8_t *buff, uint32_t len) { if (len != 8) { return -UDRV_WRONG_ARG; } + if(memcmp(g_rui_cfg_t.g_lora_cfg_t.app_eui,buff,len) == 0) + return UDRV_RETURN_OK; memcpy(g_rui_cfg_t.g_lora_cfg_t.app_eui, buff, 8); return udrv_flash_write(SERVICE_NVM_RUI_CONFIG_NVM_ADDR, sizeof(PRE_rui_cfg_t), (uint8_t *)&g_rui_cfg_t); @@ -611,6 +637,8 @@ int32_t service_nvm_set_app_key_to_nvm (uint8_t *buff, uint32_t len) { if (len != 16) { return -UDRV_WRONG_ARG; } + if(memcmp(g_rui_cfg_t.g_lora_cfg_t.app_key,buff,len) == 0) + return UDRV_RETURN_OK; memcpy(g_rui_cfg_t.g_lora_cfg_t.app_key, buff, 16); return udrv_flash_write(SERVICE_NVM_RUI_CONFIG_NVM_ADDR, sizeof(PRE_rui_cfg_t), (uint8_t *)&g_rui_cfg_t); @@ -630,6 +658,8 @@ int32_t service_nvm_set_app_skey_to_nvm (uint8_t *buff, uint32_t len) { if (len != 16) { return -UDRV_WRONG_ARG; } + if(memcmp(g_rui_cfg_t.g_lora_cfg_t.app_skey,buff,len) == 0) + return UDRV_RETURN_OK; memcpy(g_rui_cfg_t.g_lora_cfg_t.app_skey, buff, 16); return udrv_flash_write(SERVICE_NVM_RUI_CONFIG_NVM_ADDR, sizeof(PRE_rui_cfg_t), (uint8_t *)&g_rui_cfg_t); @@ -649,6 +679,8 @@ int32_t service_nvm_set_dev_addr_to_nvm (uint8_t *buff, uint32_t len) { if (len != 4) { return -UDRV_WRONG_ARG; } + if(memcmp(g_rui_cfg_t.g_lora_cfg_t.dev_addr,buff,len) == 0) + return UDRV_RETURN_OK; memcpy(g_rui_cfg_t.g_lora_cfg_t.dev_addr, buff, 4); return udrv_flash_write(SERVICE_NVM_RUI_CONFIG_NVM_ADDR, sizeof(PRE_rui_cfg_t), (uint8_t *)&g_rui_cfg_t); @@ -668,6 +700,8 @@ int32_t service_nvm_set_dev_eui_to_nvm (uint8_t *buff, uint32_t len) { if (len != 8) { return -UDRV_WRONG_ARG; } + if(memcmp(g_rui_cfg_t.g_lora_cfg_t.dev_eui,buff,len) == 0) + return UDRV_RETURN_OK; memcpy(g_rui_cfg_t.g_lora_cfg_t.dev_eui, buff, 8); return udrv_flash_write(SERVICE_NVM_RUI_CONFIG_NVM_ADDR, sizeof(PRE_rui_cfg_t), (uint8_t *)&g_rui_cfg_t); @@ -687,6 +721,8 @@ int32_t service_nvm_set_net_id_to_nvm (uint8_t *buff, uint32_t len) { if (len != 4) { return -UDRV_WRONG_ARG; } + if(memcmp(g_rui_cfg_t.g_lora_cfg_t.nwk_id,buff,len) == 0) + return UDRV_RETURN_OK; memcpy(g_rui_cfg_t.g_lora_cfg_t.nwk_id, buff, 4); return udrv_flash_write(SERVICE_NVM_RUI_CONFIG_NVM_ADDR, sizeof(PRE_rui_cfg_t), (uint8_t *)&g_rui_cfg_t); @@ -706,6 +742,8 @@ int32_t service_nvm_set_nwk_skey_to_nvm (uint8_t *buff, uint32_t len) { if (len != 16) { return -UDRV_WRONG_ARG; } + if(memcmp(g_rui_cfg_t.g_lora_cfg_t.nwk_skey,buff,len) == 0) + return UDRV_RETURN_OK; memcpy(g_rui_cfg_t.g_lora_cfg_t.nwk_skey, buff, 16); return udrv_flash_write(SERVICE_NVM_RUI_CONFIG_NVM_ADDR, sizeof(PRE_rui_cfg_t), (uint8_t *)&g_rui_cfg_t); @@ -716,6 +754,8 @@ uint8_t service_nvm_get_retry_from_nvm (void) { } int32_t service_nvm_set_retry_to_nvm (uint8_t retry) { + if(g_rui_cfg_t.g_lora_cfg_t.retry == retry) + return UDRV_RETURN_OK; g_rui_cfg_t.g_lora_cfg_t.retry = retry; return udrv_flash_write(SERVICE_NVM_RUI_CONFIG_NVM_ADDR, sizeof(PRE_rui_cfg_t), (uint8_t *)&g_rui_cfg_t); @@ -726,6 +766,8 @@ SERVICE_LORA_CONFIRM_MODE service_nvm_get_cfm_from_nvm (void) { } int32_t service_nvm_set_cfm_to_nvm (SERVICE_LORA_CONFIRM_MODE cfm) { + if(g_rui_cfg_t.g_lora_cfg_t.confirm == cfm) + return UDRV_RETURN_OK; g_rui_cfg_t.g_lora_cfg_t.confirm = cfm; return udrv_flash_write(SERVICE_NVM_RUI_CONFIG_NVM_ADDR, sizeof(PRE_rui_cfg_t), (uint8_t *)&g_rui_cfg_t); @@ -736,6 +778,8 @@ SERVICE_LORA_WORK_MODE service_nvm_get_nwm_from_nvm (void) { } int32_t service_nvm_set_nwm_to_nvm (SERVICE_LORA_WORK_MODE nwm) { + if(g_rui_cfg_t.lora_work_mode == nwm) + return UDRV_RETURN_OK; g_rui_cfg_t.lora_work_mode = nwm; return udrv_flash_write(SERVICE_NVM_RUI_CONFIG_NVM_ADDR, sizeof(PRE_rui_cfg_t), (uint8_t *)&g_rui_cfg_t); @@ -746,6 +790,8 @@ SERVICE_LORA_JOIN_MODE service_nvm_get_njm_from_nvm (void) { } int32_t service_nvm_set_njm_to_nvm (SERVICE_LORA_JOIN_MODE njm) { + if(g_rui_cfg_t.g_lora_cfg_t.join_mode == njm) + return UDRV_RETURN_OK; g_rui_cfg_t.g_lora_cfg_t.join_mode = njm; return udrv_flash_write(SERVICE_NVM_RUI_CONFIG_NVM_ADDR, sizeof(PRE_rui_cfg_t), (uint8_t *)&g_rui_cfg_t); @@ -756,6 +802,8 @@ bool service_nvm_get_adr_from_nvm (void) { } int32_t service_nvm_set_adr_to_nvm (bool adr) { + if(g_rui_cfg_t.g_lora_cfg_t.adr == adr) + return UDRV_RETURN_OK; g_rui_cfg_t.g_lora_cfg_t.adr = adr; return udrv_flash_write(SERVICE_NVM_RUI_CONFIG_NVM_ADDR, sizeof(PRE_rui_cfg_t), (uint8_t *)&g_rui_cfg_t); @@ -766,6 +814,8 @@ SERVICE_LORA_CLASS service_nvm_get_class_from_nvm (void) { } int32_t service_nvm_set_class_to_nvm (SERVICE_LORA_CLASS device_class) { + if(g_rui_cfg_t.g_lora_cfg_t.device_class == device_class) + return UDRV_RETURN_OK; g_rui_cfg_t.g_lora_cfg_t.device_class = device_class; return udrv_flash_write(SERVICE_NVM_RUI_CONFIG_NVM_ADDR, sizeof(PRE_rui_cfg_t), (uint8_t *)&g_rui_cfg_t); @@ -776,6 +826,8 @@ SERVICE_LORA_DATA_RATE service_nvm_get_dr_from_nvm (void) { } int32_t service_nvm_set_dr_to_nvm (SERVICE_LORA_DATA_RATE dr) { + if(g_rui_cfg_t.g_lora_cfg_t.dr == dr) + return UDRV_RETURN_OK; g_rui_cfg_t.g_lora_cfg_t.dr = dr; return udrv_flash_write(SERVICE_NVM_RUI_CONFIG_NVM_ADDR, sizeof(PRE_rui_cfg_t), (uint8_t *)&g_rui_cfg_t); @@ -786,6 +838,8 @@ SERVICE_LORA_DATA_RATE service_nvm_get_rx2dr_from_nvm (void) { } int32_t service_nvm_set_rx2dr_to_nvm (SERVICE_LORA_DATA_RATE dr) { + if(g_rui_cfg_t.g_lora_cfg_t.rx2dr == dr) + return UDRV_RETURN_OK; g_rui_cfg_t.g_lora_cfg_t.rx2dr = dr; return udrv_flash_write(SERVICE_NVM_RUI_CONFIG_NVM_ADDR, sizeof(PRE_rui_cfg_t), (uint8_t *)&g_rui_cfg_t); @@ -797,6 +851,8 @@ uint32_t service_nvm_get_jn1dl_from_nvm (void) { } int32_t service_nvm_set_jn1dl_to_nvm (uint32_t jn1dl) { + if(g_rui_cfg_t.g_lora_cfg_t.jn1dl == jn1dl) + return UDRV_RETURN_OK; g_rui_cfg_t.g_lora_cfg_t.jn1dl = jn1dl; return udrv_flash_write(SERVICE_NVM_RUI_CONFIG_NVM_ADDR, sizeof(PRE_rui_cfg_t), (uint8_t *)&g_rui_cfg_t); @@ -807,6 +863,8 @@ uint32_t service_nvm_get_jn2dl_from_nvm (void) { } int32_t service_nvm_set_jn2dl_to_nvm (uint32_t jn2dl) { + if(g_rui_cfg_t.g_lora_cfg_t.jn2dl == jn2dl) + return UDRV_RETURN_OK; g_rui_cfg_t.g_lora_cfg_t.jn2dl = jn2dl; return udrv_flash_write(SERVICE_NVM_RUI_CONFIG_NVM_ADDR, sizeof(PRE_rui_cfg_t), (uint8_t *)&g_rui_cfg_t); @@ -814,6 +872,8 @@ int32_t service_nvm_set_jn2dl_to_nvm (uint32_t jn2dl) { uint32_t service_nvm_set_rx2fq_to_nvm(uint32_t freq) { + if(g_rui_cfg_t.g_lora_cfg_t.rx2fq == freq) + return UDRV_RETURN_OK; g_rui_cfg_t.g_lora_cfg_t.rx2fq = freq; return udrv_flash_write(SERVICE_NVM_RUI_CONFIG_NVM_ADDR, sizeof(PRE_rui_cfg_t), (uint8_t *)&g_rui_cfg_t); @@ -829,6 +889,8 @@ bool service_nvm_get_pub_nwk_mode_from_nvm (void) { } int32_t service_nvm_set_pub_nwk_mode_to_nvm (bool pnm) { + if(g_rui_cfg_t.g_lora_cfg_t.pub_nwk_mode == pnm) + return UDRV_RETURN_OK; g_rui_cfg_t.g_lora_cfg_t.pub_nwk_mode = pnm; return udrv_flash_write(SERVICE_NVM_RUI_CONFIG_NVM_ADDR, sizeof(PRE_rui_cfg_t), (uint8_t *)&g_rui_cfg_t); @@ -839,6 +901,8 @@ uint32_t service_nvm_get_rx1dl_from_nvm (void) { } int32_t service_nvm_set_rx1dl_to_nvm (uint32_t rx1dl) { + if(g_rui_cfg_t.g_lora_cfg_t.rx1dl == rx1dl) + return UDRV_RETURN_OK; g_rui_cfg_t.g_lora_cfg_t.rx1dl = rx1dl; return udrv_flash_write(SERVICE_NVM_RUI_CONFIG_NVM_ADDR, sizeof(PRE_rui_cfg_t), (uint8_t *)&g_rui_cfg_t); @@ -849,6 +913,8 @@ uint32_t service_nvm_get_rx2dl_from_nvm (void) { } int32_t service_nvm_set_rx2dl_to_nvm (uint32_t rx2dl) { + if(g_rui_cfg_t.g_lora_cfg_t.rx2dl == rx2dl) + return UDRV_RETURN_OK; g_rui_cfg_t.g_lora_cfg_t.rx2dl = rx2dl; return udrv_flash_write(SERVICE_NVM_RUI_CONFIG_NVM_ADDR, sizeof(PRE_rui_cfg_t), (uint8_t *)&g_rui_cfg_t); @@ -859,6 +925,8 @@ uint8_t service_nvm_get_txpower_from_nvm (void) { } int32_t service_nvm_set_txpower_to_nvm (uint8_t txp) { + if(g_rui_cfg_t.g_lora_cfg_t.tx_power == txp) + return UDRV_RETURN_OK; g_rui_cfg_t.g_lora_cfg_t.tx_power = txp; return udrv_flash_write(SERVICE_NVM_RUI_CONFIG_NVM_ADDR, sizeof(PRE_rui_cfg_t), (uint8_t *)&g_rui_cfg_t); @@ -869,6 +937,8 @@ uint8_t service_nvm_get_linkcheck_from_nvm (void) { } int32_t service_nvm_set_linkcheck_to_nvm (uint8_t mode) { + if(g_rui_cfg_t.g_lora_cfg_t.linkcheck_mode == mode) + return UDRV_RETURN_OK; g_rui_cfg_t.g_lora_cfg_t.linkcheck_mode = mode; return udrv_flash_write(SERVICE_NVM_RUI_CONFIG_NVM_ADDR, sizeof(PRE_rui_cfg_t), (uint8_t *)&g_rui_cfg_t); @@ -879,6 +949,8 @@ uint8_t service_nvm_get_ping_slot_periodicity_from_nvm() { } int32_t service_nvm_set_ping_slot_periodicity_to_nvm(uint8_t periodicity) { + if(g_rui_cfg_t.g_lora_cfg_t.ping_slot_periodicity == periodicity) + return UDRV_RETURN_OK; g_rui_cfg_t.g_lora_cfg_t.ping_slot_periodicity = periodicity; return udrv_flash_write(SERVICE_NVM_RUI_CONFIG_NVM_ADDR, sizeof(PRE_rui_cfg_t), (uint8_t *)&g_rui_cfg_t); @@ -889,6 +961,8 @@ bool service_nvm_get_join_start_from_nvm(void) { } int32_t service_nvm_set_join_start_to_nvm(bool join_start) { + if(g_rui_cfg_t.g_lora_cfg_t.join_start == join_start) + return UDRV_RETURN_OK; g_rui_cfg_t.g_lora_cfg_t.join_start = join_start; return udrv_flash_write(SERVICE_NVM_RUI_CONFIG_NVM_ADDR, sizeof(PRE_rui_cfg_t), (uint8_t *)&g_rui_cfg_t); @@ -899,6 +973,8 @@ bool service_nvm_get_auto_join_from_nvm(void) { } int32_t service_nvm_set_auto_join_to_nvm(bool auto_join) { + if(g_rui_cfg_t.g_lora_cfg_t.auto_join == auto_join) + return UDRV_RETURN_OK; g_rui_cfg_t.g_lora_cfg_t.auto_join = auto_join; return udrv_flash_write(SERVICE_NVM_RUI_CONFIG_NVM_ADDR, sizeof(PRE_rui_cfg_t), (uint8_t *)&g_rui_cfg_t); @@ -909,6 +985,8 @@ uint32_t service_nvm_get_auto_join_period_from_nvm(void) { } int32_t service_nvm_set_auto_join_period_to_nvm(uint32_t auto_join_period) { + if(g_rui_cfg_t.g_lora_cfg_t.auto_join_period == auto_join_period) + return UDRV_RETURN_OK; g_rui_cfg_t.g_lora_cfg_t.auto_join_period = auto_join_period; return udrv_flash_write(SERVICE_NVM_RUI_CONFIG_NVM_ADDR, sizeof(PRE_rui_cfg_t), (uint8_t *)&g_rui_cfg_t); @@ -919,6 +997,8 @@ uint32_t service_nvm_get_auto_join_max_cnt_from_nvm(void) { } int32_t service_nvm_set_auto_join_max_cnt_to_nvm(uint32_t auto_join_max_cnt) { + if(g_rui_cfg_t.g_lora_cfg_t.auto_join_max_cnt == auto_join_max_cnt) + return UDRV_RETURN_OK; g_rui_cfg_t.g_lora_cfg_t.auto_join_max_cnt = auto_join_max_cnt; return udrv_flash_write(SERVICE_NVM_RUI_CONFIG_NVM_ADDR, sizeof(PRE_rui_cfg_t), (uint8_t *)&g_rui_cfg_t); @@ -929,6 +1009,8 @@ uint32_t service_nvm_get_freq_from_nvm (void) { } int32_t service_nvm_set_freq_to_nvm (uint32_t freq) { + if(g_rui_cfg_t.g_lora_p2p_cfg_t.Frequency == freq) + return UDRV_RETURN_OK; g_rui_cfg_t.g_lora_p2p_cfg_t.Frequency = freq; return udrv_flash_write(SERVICE_NVM_RUI_CONFIG_NVM_ADDR, sizeof(PRE_rui_cfg_t), (uint8_t *)&g_rui_cfg_t); @@ -939,6 +1021,8 @@ uint8_t service_nvm_get_sf_from_nvm (void) { } int32_t service_nvm_set_sf_to_nvm (uint8_t spreadfact) { + if(g_rui_cfg_t.g_lora_p2p_cfg_t.Spreadfact == spreadfact) + return UDRV_RETURN_OK; g_rui_cfg_t.g_lora_p2p_cfg_t.Spreadfact = spreadfact; return udrv_flash_write(SERVICE_NVM_RUI_CONFIG_NVM_ADDR, sizeof(PRE_rui_cfg_t), (uint8_t *)&g_rui_cfg_t); @@ -959,10 +1043,14 @@ int32_t service_nvm_set_bandwidth_to_nvm (uint32_t bandwidth) { if( g_rui_cfg_t.lora_work_mode == 0) { + if(g_rui_cfg_t.g_lora_p2p_cfg_t.Bandwidth == bandwidth) + return UDRV_RETURN_OK; g_rui_cfg_t.g_lora_p2p_cfg_t.Bandwidth = bandwidth; } else if ( g_rui_cfg_t.lora_work_mode == 2) { + if(g_rui_cfg_t.g_lora_p2p_cfg_t.fsk_rxbw == bandwidth) + return UDRV_RETURN_OK; g_rui_cfg_t.g_lora_p2p_cfg_t.fsk_rxbw = bandwidth; } @@ -974,6 +1062,8 @@ uint8_t service_nvm_get_codingrate_from_nvm (void) { } int32_t service_nvm_set_codingrate_to_nvm (uint8_t codingrate) { + if(g_rui_cfg_t.g_lora_p2p_cfg_t.Codingrate == codingrate) + return UDRV_RETURN_OK; g_rui_cfg_t.g_lora_p2p_cfg_t.Codingrate = codingrate; return udrv_flash_write(SERVICE_NVM_RUI_CONFIG_NVM_ADDR, sizeof(PRE_rui_cfg_t), (uint8_t *)&g_rui_cfg_t); @@ -984,6 +1074,8 @@ uint16_t service_nvm_get_preamlen_from_nvm (void) { } int32_t service_nvm_set_preamlen_to_nvm (uint16_t preamlen) { + if(g_rui_cfg_t.g_lora_p2p_cfg_t.Preamlen == preamlen) + return UDRV_RETURN_OK; g_rui_cfg_t.g_lora_p2p_cfg_t.Preamlen = preamlen; return udrv_flash_write(SERVICE_NVM_RUI_CONFIG_NVM_ADDR, sizeof(PRE_rui_cfg_t), (uint8_t *)&g_rui_cfg_t); @@ -994,6 +1086,8 @@ uint8_t service_nvm_get_powerdbm_from_nvm (void) { } int32_t service_nvm_set_powerdbm_to_nvm (uint8_t powerdbm) { + if(g_rui_cfg_t.g_lora_p2p_cfg_t.Powerdbm == powerdbm) + return UDRV_RETURN_OK; g_rui_cfg_t.g_lora_p2p_cfg_t.Powerdbm = powerdbm; return udrv_flash_write(SERVICE_NVM_RUI_CONFIG_NVM_ADDR, sizeof(PRE_rui_cfg_t), (uint8_t *)&g_rui_cfg_t); @@ -1004,54 +1098,41 @@ bool service_nvm_get_crypt_enable_from_nvm (void) { } int32_t service_nvm_set_crypt_enable_to_nvm (bool crypt_enable) { + if(g_rui_cfg_t.g_lora_p2p_cfg_t.crypt_enable == crypt_enable) + return UDRV_RETURN_OK; g_rui_cfg_t.g_lora_p2p_cfg_t.crypt_enable = crypt_enable; return udrv_flash_write(SERVICE_NVM_RUI_CONFIG_NVM_ADDR, sizeof(PRE_rui_cfg_t), (uint8_t *)&g_rui_cfg_t); } int32_t service_nvm_get_crypt_key_from_nvm (uint8_t *buff, uint32_t len) { - if (len < 16) { + if (len < 8) { return -UDRV_BUFF_OVERFLOW; } - memcpy(buff, g_rui_cfg_t.g_rui_cfg_ex.crypt_key16, 16); + memcpy(buff, g_rui_cfg_t.g_lora_p2p_cfg_t.crypt_key, 8); return UDRV_RETURN_OK; } int32_t service_nvm_set_crypt_key_to_nvm (uint8_t *buff, uint32_t len) { - if (len != 16) { + if (len != 8) { return -UDRV_WRONG_ARG; } - memcpy(g_rui_cfg_t.g_rui_cfg_ex.crypt_key16, buff, 16); - return udrv_flash_write(SERVICE_NVM_RUI_CONFIG_NVM_ADDR, sizeof(PRE_rui_cfg_t), (uint8_t *)&g_rui_cfg_t); -} - - -int32_t service_nvm_get_crypt_IV_from_nvm (uint8_t *buff, uint32_t len) { - if (len < 16) { - return -UDRV_BUFF_OVERFLOW; - } - - memcpy(buff, g_rui_cfg_t.g_rui_cfg_ex.crypt_IV, 16); - - return UDRV_RETURN_OK; -} + if(memcmp(g_rui_cfg_t.g_lora_p2p_cfg_t.crypt_key,buff,len) == 0) + return UDRV_RETURN_OK; + memcpy(g_rui_cfg_t.g_lora_p2p_cfg_t.crypt_key, buff, 8); -int32_t service_nvm_set_crypt_IV_to_nvm (uint8_t *buff, uint32_t len) { - if (len != 16) { - return -UDRV_WRONG_ARG; - } - memcpy(g_rui_cfg_t.g_rui_cfg_ex.crypt_IV, buff, 16); return udrv_flash_write(SERVICE_NVM_RUI_CONFIG_NVM_ADDR, sizeof(PRE_rui_cfg_t), (uint8_t *)&g_rui_cfg_t); } - McSession_t *service_nvm_get_multicast_from_nvm(void) { return g_rui_cfg_t.g_lora_cfg_t.McSession_group; } int32_t service_nvm_set_multicast_to_nvm(McSession_t *McSession) { + if(memcmp(g_rui_cfg_t.g_lora_cfg_t.McSession_group,McSession,4*sizeof(McSession_t)) == 0) + return UDRV_RETURN_OK; memcpy(g_rui_cfg_t.g_lora_cfg_t.McSession_group, McSession ,4*sizeof(McSession_t)); return udrv_flash_write(SERVICE_NVM_RUI_CONFIG_NVM_ADDR, sizeof(PRE_rui_cfg_t), (uint8_t *)&g_rui_cfg_t); @@ -1063,6 +1144,8 @@ uint8_t service_nvm_get_tp_port_from_nvm(SERIAL_PORT port) { int32_t service_nvm_set_tp_port_to_nvm(SERIAL_PORT port, uint8_t tp_port) { if (tp_port >= 1 && tp_port <= 223) { + if(g_rui_cfg_t.g_lora_cfg_t.tp_port[port] == tp_port) + return UDRV_RETURN_OK; g_rui_cfg_t.g_lora_cfg_t.tp_port[port] = tp_port; } else { return -UDRV_WRONG_ARG; @@ -1078,6 +1161,8 @@ uint32_t service_nvm_get_chs_from_nvm(void) uint32_t service_nvm_set_chs_to_nvm(uint32_t frequency) { + if(g_rui_cfg_t.g_lora_cfg_t.chs == frequency) + return UDRV_RETURN_OK; g_rui_cfg_t.g_lora_cfg_t.chs = frequency; return udrv_flash_write(SERVICE_NVM_RUI_CONFIG_NVM_ADDR, sizeof(PRE_rui_cfg_t), (uint8_t *)&g_rui_cfg_t); @@ -1086,6 +1171,8 @@ uint32_t service_nvm_set_chs_to_nvm(uint32_t frequency) uint32_t service_nvm_set_fdev_to_nvm(uint32_t fdev) { + if(g_rui_cfg_t.g_lora_p2p_cfg_t.deviation == fdev) + return UDRV_RETURN_OK; g_rui_cfg_t.g_lora_p2p_cfg_t.deviation = fdev; return udrv_flash_write(SERVICE_NVM_RUI_CONFIG_NVM_ADDR, sizeof(PRE_rui_cfg_t), (uint8_t *)&g_rui_cfg_t); @@ -1093,6 +1180,8 @@ uint32_t service_nvm_set_fdev_to_nvm(uint32_t fdev) uint32_t service_nvm_set_bitrate_to_nvm(uint32_t bitrate) { + if(g_rui_cfg_t.g_lora_p2p_cfg_t.bitrate == bitrate) + return UDRV_RETURN_OK; g_rui_cfg_t.g_lora_p2p_cfg_t.bitrate = bitrate; return udrv_flash_write(SERVICE_NVM_RUI_CONFIG_NVM_ADDR, sizeof(PRE_rui_cfg_t), (uint8_t *)&g_rui_cfg_t); @@ -1110,6 +1199,8 @@ uint32_t service_nvm_get_fdev_from_nvm(void) uint32_t service_nvm_set_dcs_to_nvm(uint8_t dutycycle) { + if(g_rui_cfg_t.g_lora_cfg_t.DutycycleEnable == dutycycle) + return UDRV_RETURN_OK; g_rui_cfg_t.g_lora_cfg_t.DutycycleEnable = dutycycle; return udrv_flash_write(SERVICE_NVM_RUI_CONFIG_NVM_ADDR, sizeof(PRE_rui_cfg_t), (uint8_t *)&g_rui_cfg_t); @@ -1127,6 +1218,8 @@ bool service_nvm_get_iqinverted_from_nvm(void) int32_t service_nvm_set_iqinverted_to_nvm(bool iqinverted) { + if(g_rui_cfg_t.g_rui_cfg_ex.iqinverted == iqinverted) + return UDRV_RETURN_OK; g_rui_cfg_t.g_rui_cfg_ex.iqinverted = iqinverted; return udrv_flash_write(SERVICE_NVM_RUI_CONFIG_NVM_ADDR, sizeof(PRE_rui_cfg_t), (uint8_t *)&g_rui_cfg_t); @@ -1139,6 +1232,8 @@ uint32_t service_nvm_get_symbol_timeout_from_nvm(void) int32_t service_nvm_set_symbol_timeout_to_nvm(uint32_t symbol_timeout) { + if(g_rui_cfg_t.g_rui_cfg_ex.symbol_timeout == symbol_timeout) + return UDRV_RETURN_OK; g_rui_cfg_t.g_rui_cfg_ex.symbol_timeout = symbol_timeout; return udrv_flash_write(SERVICE_NVM_RUI_CONFIG_NVM_ADDR, sizeof(PRE_rui_cfg_t), (uint8_t *)&g_rui_cfg_t); @@ -1151,6 +1246,8 @@ bool service_nvm_get_fix_length_payload_from_nvm(void) int32_t service_nvm_set_fix_length_payload_to_nvm(bool enable) { + if(g_rui_cfg_t.g_rui_cfg_ex.fix_length_payload == enable) + return UDRV_RETURN_OK; g_rui_cfg_t.g_rui_cfg_ex.fix_length_payload = enable; return udrv_flash_write(SERVICE_NVM_RUI_CONFIG_NVM_ADDR, sizeof(PRE_rui_cfg_t), (uint8_t *)&g_rui_cfg_t); } @@ -1162,6 +1259,8 @@ uint16_t service_nvm_get_syncword_from_nvm(void) int32_t service_nvm_set_syncword_to_nvm( uint16_t syncword) { + if(g_rui_cfg_t.g_rui_cfg_ex.syncword == syncword) + return UDRV_RETURN_OK; g_rui_cfg_t.g_rui_cfg_ex.syncword = syncword; return udrv_flash_write(SERVICE_NVM_RUI_CONFIG_NVM_ADDR, sizeof(PRE_rui_cfg_t), (uint8_t *)&g_rui_cfg_t); } @@ -1173,6 +1272,8 @@ int32_t service_nvm_get_lbt_from_nvm() int32_t service_nvm_set_lbt_to_nvm(uint8_t enable) { + if(g_rui_cfg_t.g_rui_cfg_ex.lbt_enable == enable) + return UDRV_RETURN_OK; g_rui_cfg_t.g_rui_cfg_ex.lbt_enable = enable; return udrv_flash_write(SERVICE_NVM_RUI_CONFIG_NVM_ADDR, sizeof(PRE_rui_cfg_t), (uint8_t *)&g_rui_cfg_t); } @@ -1184,6 +1285,8 @@ int16_t service_nvm_get_lbt_rssi_from_nvm() int32_t service_nvm_set_lbt_rssi_to_nvm(int16_t rssi) { + if(g_rui_cfg_t.g_rui_cfg_ex.lbt_rssi == rssi) + return UDRV_RETURN_OK; g_rui_cfg_t.g_rui_cfg_ex.lbt_rssi = rssi; return udrv_flash_write(SERVICE_NVM_RUI_CONFIG_NVM_ADDR, sizeof(PRE_rui_cfg_t), (uint8_t *)&g_rui_cfg_t); } @@ -1195,21 +1298,12 @@ uint32_t service_nvm_get_lbt_scantime_from_nvm() int32_t service_nvm_set_lbt_scantime_to_nvm(uint32_t time) { + if(g_rui_cfg_t.g_rui_cfg_ex.lbt_scantime == time) + return UDRV_RETURN_OK; g_rui_cfg_t.g_rui_cfg_ex.lbt_scantime = time; return udrv_flash_write(SERVICE_NVM_RUI_CONFIG_NVM_ADDR, sizeof(PRE_rui_cfg_t), (uint8_t *)&g_rui_cfg_t); } -int32_t service_nvm_get_CAD_from_nvm() -{ - return g_rui_cfg_t.g_rui_cfg_ex.CAD; -} - -int32_t service_nvm_set_CAD_to_nvm(uint8_t enable) -{ - g_rui_cfg_t.g_rui_cfg_ex.CAD = enable; - return udrv_flash_write(SERVICE_NVM_RUI_CONFIG_NVM_ADDR, sizeof(PRE_rui_cfg_t), (uint8_t *)&g_rui_cfg_t); -} - #endif @@ -1223,7 +1317,7 @@ static void service_nvm_data_recovery_from_legacy(uint32_t data_flash_addr, PRE_ udrv_flash_read(data_flash_addr, sizeof(data_legacy), data_legacy ); if( rui_cfg_cur->magic_num == RUI_CFG_MAGIC_NUM ) version_code = rui_cfg_cur->version_code; - #if defined(rak3172) || defined(rak3172T) || defined(rak3172_sip) || defined(rak4630) || defined(rak11720) //V99 V87 V85 only support 3172 / 3172-sip / 4630 + #if defined(rak3172) || defined(rak3172_sip) || defined(rak4630) || defined(rak11720) //V99 V87 V85 only support 3172 / 3172-sip / 4630 //Check legacy version v99 if( *((uint32_t*)(data_legacy + ELEM_OFS_V99_magic)) == 0xEDD1E) { @@ -1249,11 +1343,11 @@ static void service_nvm_data_recovery_from_legacy(uint32_t data_flash_addr, PRE_ //The historical version could not be determined return; } - #if defined(rak3172) || defined(rak3172T) || defined(rak3172_sip) || defined(rak4630) || defined(rak11720) //V87 and V85 , V99 only support 3172/3172-sip/4630 + #if defined(rak3172) || defined(rak3172_sip) || defined(rak4630) || defined(rak11720) //V87 and V85 , V99 only support 3172/3172-sip/4630 else if( version_code == RUI_VERSION_CODE_V85 ) { - #ifdef SUPPORT_LORA memcpy(&rui_cfg_cur->lora_work_mode, DATA_ADDR(ELEM_OFS_V85_lora_work_mode), sizeof(rui_cfg_cur->lora_work_mode) ); + #ifdef SUPPORT_LORA memcpy(&rui_cfg_cur->g_lora_p2p_cfg_t, DATA_ADDR(ELEM_OFS_V85_g_lora_p2p_cfg_t), sizeof(rui_cfg_cur->g_lora_p2p_cfg_t) ); #endif #ifdef SUPPORT_BLE @@ -1276,8 +1370,8 @@ static void service_nvm_data_recovery_from_legacy(uint32_t data_flash_addr, PRE_ } else if( version_code == RUI_VERSION_CODE_V87 ) { - #ifdef SUPPORT_LORA memcpy(&rui_cfg_cur->lora_work_mode, DATA_ADDR(ELEM_OFS_V87_lora_work_mode), sizeof(rui_cfg_cur->lora_work_mode) ); + #ifdef SUPPORT_LORA memcpy(&rui_cfg_cur->g_lora_p2p_cfg_t, DATA_ADDR(ELEM_OFS_V87_g_lora_p2p_cfg_t), sizeof(rui_cfg_cur->g_lora_p2p_cfg_t) ); #endif #ifdef SUPPORT_BLE @@ -1299,8 +1393,8 @@ static void service_nvm_data_recovery_from_legacy(uint32_t data_flash_addr, PRE_ } else if( version_code == RUI_VERSION_CODE_V99 ) { - #ifdef SUPPORT_LORA memcpy(&rui_cfg_cur->lora_work_mode, DATA_ADDR(ELEM_OFS_V99_lora_work_mode), sizeof(rui_cfg_cur->lora_work_mode) ); + #ifdef SUPPORT_LORA memcpy(&rui_cfg_cur->g_lora_p2p_cfg_t, DATA_ADDR(ELEM_OFS_V99_g_lora_p2p_cfg_t), sizeof(rui_cfg_cur->g_lora_p2p_cfg_t) ); #endif #ifdef SUPPORT_BLE @@ -1320,12 +1414,10 @@ static void service_nvm_data_recovery_from_legacy(uint32_t data_flash_addr, PRE_ memcpy(rui_cfg_cur->alias, DATA_ADDR(ELEM_OFS_V99_alias), sizeof(rui_cfg_cur->alias) ); service_nvm_data_add_to_legacy(rui_cfg_cur); } - #endif else if( version_code == RUI_VERSION_CODE_LATEST ) { memcpy(rui_cfg_cur, data_legacy, sizeof(PRE_rui_cfg_t) ); //add new config -#ifdef SUPPORT_LORA if(*(uint8_t*)&rui_cfg_cur->g_rui_cfg_ex.iqinverted == 0xFF) rui_cfg_cur->g_rui_cfg_ex.iqinverted = false; if(rui_cfg_cur->g_rui_cfg_ex.symbol_timeout > SYMBTIMEOUT_MAX) @@ -1337,7 +1429,6 @@ static void service_nvm_data_recovery_from_legacy(uint32_t data_flash_addr, PRE_ } if(*(uint8_t*)&rui_cfg_cur->g_rui_cfg_ex.fix_length_payload == 0xFF) rui_cfg_cur->g_rui_cfg_ex.fix_length_payload = false; -#endif if(*(uint8_t*)&rui_cfg_cur->debug_level == 0xFF) rui_cfg_cur->debug_level = 0; @@ -1358,32 +1449,16 @@ static void service_nvm_data_recovery_from_legacy(uint32_t data_flash_addr, PRE_ memset(rui_cfg_cur->cli_ver,'\0',sizeof(rui_cfg_cur->cli_ver)); memcpy(rui_cfg_cur->cli_ver,cli_version,strlen(cli_version)); } -#ifdef SUPPORT_LORA if(*(uint8_t*)&rui_cfg_cur->g_rui_cfg_ex.lbt_enable == 0xFF) rui_cfg_cur->g_rui_cfg_ex.lbt_enable = 0; if(*(uint8_t*)&rui_cfg_cur->g_rui_cfg_ex.lbt_rssi == 0xFF) rui_cfg_cur->g_rui_cfg_ex.lbt_rssi = -80; if(*(uint8_t*)&rui_cfg_cur->g_rui_cfg_ex.lbt_scantime == 0xFF) rui_cfg_cur->g_rui_cfg_ex.lbt_scantime = 5; -#endif if(*(uint8_t*)&rui_cfg_cur->g_rui_cfg_ex.auto_sleep_level == 0xFF) rui_cfg_cur->g_rui_cfg_ex.auto_sleep_level = 1; -#ifdef SUPPORT_LORA - if(*(uint32_t*)&rui_cfg_cur->g_rui_cfg_ex.crypt_key16 == 0xFF000000) //flash alignment - { - memset(rui_cfg_cur->g_rui_cfg_ex.crypt_key16,0,sizeof(rui_cfg_cur->g_rui_cfg_ex.crypt_key16)); - memcpy(rui_cfg_cur->g_rui_cfg_ex.crypt_key16,rui_cfg_cur->g_lora_p2p_cfg_t.crypt_key,sizeof(rui_cfg_cur->g_lora_p2p_cfg_t.crypt_key)); - } - if(*(uint8_t*)&rui_cfg_cur->g_rui_cfg_ex.crypt_IV == 0xFF) - { - memset(rui_cfg_cur->g_rui_cfg_ex.crypt_IV,0,sizeof(rui_cfg_cur->g_rui_cfg_ex.crypt_IV)); - } - if(*(uint8_t*)&rui_cfg_cur->g_rui_cfg_ex.CAD == 0xFF) - { - rui_cfg_cur->g_rui_cfg_ex.CAD = 0; - } -#endif } + #endif else { //The historical version could not be determined @@ -1416,10 +1491,5 @@ void service_nvm_data_add_to_legacy(PRE_rui_cfg_t *rui_cfg_cur) rui_cfg_cur->g_rui_cfg_ex.lbt_scantime = 5; rui_cfg_cur->g_rui_cfg_ex.auto_sleep_level = 1; #endif -#ifdef SUPPORT_LORA - memset(rui_cfg_cur->g_rui_cfg_ex.crypt_key16,0,sizeof(rui_cfg_cur->g_rui_cfg_ex.crypt_key16)); - memset(rui_cfg_cur->g_rui_cfg_ex.crypt_IV,0,sizeof(rui_cfg_cur->g_rui_cfg_ex.crypt_IV)); - rui_cfg_cur->g_rui_cfg_ex.CAD =0; -#endif } diff --git a/cores/nRF5/component/service/nvm/service_nvm.h b/cores/nRF5/component/service/nvm/service_nvm.h index 8262432f..6da2cff8 100644 --- a/cores/nRF5/component/service/nvm/service_nvm.h +++ b/cores/nRF5/component/service/nvm/service_nvm.h @@ -135,11 +135,6 @@ typedef struct { uint32_t lbt_scantime; #endif uint8_t auto_sleep_level; -#ifdef SUPPORT_LORA - uint8_t crypt_key16[16]; - uint8_t crypt_IV[16]; - uint8_t CAD; -#endif }rui_cfg_t_ex; //add new config here in sequence typedef struct { @@ -175,7 +170,6 @@ void service_nvm_init_config(void); int32_t service_nvm_set_default_config_to_nvm(void); -int32_t service_nvm_set_cfg_to_nvm(void); /***********************************************************/ /* RUI Mode */ /***********************************************************/ @@ -400,10 +394,6 @@ int32_t service_nvm_get_crypt_key_from_nvm (uint8_t *buff, uint32_t len); int32_t service_nvm_set_crypt_key_to_nvm (uint8_t *buff, uint32_t len); -int32_t service_nvm_get_crypt_IV_from_nvm (uint8_t *buff, uint32_t len); - -int32_t service_nvm_set_crypt_IV_to_nvm (uint8_t *buff, uint32_t len); - McSession_t *service_nvm_get_multicast_from_nvm(void); int32_t service_nvm_set_multicast_to_nvm(McSession_t *McSession); @@ -468,11 +458,6 @@ uint32_t service_nvm_get_lbt_scantime_from_nvm(); int32_t service_nvm_set_lbt_scantime_to_nvm(uint32_t time); -int32_t service_nvm_get_CAD_from_nvm(void); - -int32_t service_nvm_set_CAD_to_nvm(uint8_t enable); - - #endif #endif diff --git a/cores/nRF5/component/service/runtimeConfig/service_runtimeConfig.c b/cores/nRF5/component/service/runtimeConfig/service_runtimeConfig.c deleted file mode 100644 index 5dce6065..00000000 --- a/cores/nRF5/component/service/runtimeConfig/service_runtimeConfig.c +++ /dev/null @@ -1,32 +0,0 @@ -#include -#include -#include "service_runtimeConfig.h" - -#ifdef SUPPORT_LORA -static bool useRuntimeConfigP2P = false; -static runtimeConfigP2P_t gRutimeConfigP2P; - -bool get_useRuntimeConfigP2P(void) -{ - return useRuntimeConfigP2P; -} - -void set_useRuntimeConfigP2P(bool useRuntimeConfig) -{ - useRuntimeConfigP2P = useRuntimeConfig; - return; -} - -bool get_runtimeConfigP2P(runtimeConfigP2P_t *configP2P) -{ - memcpy(configP2P, &gRutimeConfigP2P, sizeof(runtimeConfigP2P_t)); - return true; -} - -bool set_runtimeConfigP2P(runtimeConfigP2P_t *configP2P) -{ - memcpy(&gRutimeConfigP2P, configP2P, sizeof(runtimeConfigP2P_t)); - return true; -} -#endif - diff --git a/cores/nRF5/component/service/runtimeConfig/service_runtimeConfig.h b/cores/nRF5/component/service/runtimeConfig/service_runtimeConfig.h deleted file mode 100644 index 98605536..00000000 --- a/cores/nRF5/component/service/runtimeConfig/service_runtimeConfig.h +++ /dev/null @@ -1,39 +0,0 @@ -/** - * @file service_runtimeConfig.h - * @brief Provide runtime config setting. - * @author Rakwireless - * @version 0.0.0 - * @date 2023.03 - */ - -#ifndef __SERVICE_RUNTIMECONFIG_H__ -#define __SERVICE_RUNTIMECONFIG_H__ - -#ifdef __cplusplus -extern "C" { -#endif - - -#ifdef SUPPORT_LORA -typedef struct runtimeConfigP2P_s { - uint32_t frequency; - uint8_t spreading_factor; - uint32_t bandwidth; - uint32_t fsk_rxbw; - uint8_t coding_rate; - uint16_t preamble_length; - uint8_t txpower; -} runtimeConfigP2P_t; - -bool get_useRuntimeConfigP2P(void); -void set_useRuntimeConfigP2P(bool useRuntimeConfig); -bool get_runtimeConfigP2P(runtimeConfigP2P_t *configP2P); -bool set_runtimeConfigP2P(runtimeConfigP2P_t *configP2P); -#endif - - -#ifdef __cplusplus -} -#endif - -#endif // __SERVICE_RUNTIMECONFIG_H__ diff --git a/cores/nRF5/component/udrv/adc/udrv_adc.h b/cores/nRF5/component/udrv/adc/udrv_adc.h index a426bf1e..c4ee5cf9 100644 --- a/cores/nRF5/component/udrv/adc/udrv_adc.h +++ b/cores/nRF5/component/udrv/adc/udrv_adc.h @@ -39,12 +39,6 @@ typedef enum{ #endif } UDRV_ADC_MODE; -typedef enum { - UDRV_ADC_CHANNEL_TEMPSENSOR = 253, - UDRV_ADC_CHANNEL_VREFINT = 254, - UDRV_ADC_CHANNEL_VBAT = 255, -} UDRV_ADC_CHANNEL; - /** * Set ADC resolutions. * @param resolution The resolution to be set diff --git a/cores/nRF5/component/udrv/powersave/udrv_powersave.h b/cores/nRF5/component/udrv/powersave/udrv_powersave.h index 2cdcab8b..51b455cf 100644 --- a/cores/nRF5/component/udrv/powersave/udrv_powersave.h +++ b/cores/nRF5/component/udrv/powersave/udrv_powersave.h @@ -28,7 +28,7 @@ void udrv_clock_on (void); void udrv_clock_off (void); void udrv_register_sleep_callback(POWER_SAVE_HANDLER handler); void udrv_deregister_sleep_callback(POWER_SAVE_HANDLER handler); -int32_t udrv_register_wakeup_callback(POWER_SAVE_HANDLER handler); +void udrv_register_wakeup_callback(POWER_SAVE_HANDLER handler); void udrv_deregister_wakeup_callback(POWER_SAVE_HANDLER handler); void udrv_set_min_wakeup_time(uint32_t ms_time); diff --git a/cores/nRF5/component/udrv/system/udrv_system.h b/cores/nRF5/component/udrv/system/udrv_system.h index 40c59a94..0c5deda3 100644 --- a/cores/nRF5/component/udrv/system/udrv_system.h +++ b/cores/nRF5/component/udrv/system/udrv_system.h @@ -13,7 +13,7 @@ extern "C" { #define SEED_LENGTH 4 #endif -#define EVENT_QUEUE_SIZE (128) +#define EVENT_QUEUE_SIZE (32) #define EVENT_DATA_SIZE (8)//(sizeof(udrv_system_event_t)) /** diff --git a/cores/nRF5/external/lora/LoRaMac-node-4.4.7/src/mac/LoRaMac.c b/cores/nRF5/external/lora/LoRaMac-node-4.4.7/src/mac/LoRaMac.c index c8134df6..f55002eb 100644 --- a/cores/nRF5/external/lora/LoRaMac-node-4.4.7/src/mac/LoRaMac.c +++ b/cores/nRF5/external/lora/LoRaMac-node-4.4.7/src/mac/LoRaMac.c @@ -9731,7 +9731,7 @@ unsigned long udrv_get_microsecond(void); #define SEED_LENGTH 4 -#define EVENT_QUEUE_SIZE (128) +#define EVENT_QUEUE_SIZE (32) #define EVENT_DATA_SIZE (8) diff --git a/cores/nRF5/external/lora/LoRaMac-node-4.4.7/src/mac/LoRaMacClassB.c b/cores/nRF5/external/lora/LoRaMac-node-4.4.7/src/mac/LoRaMacClassB.c index dd50de22..2364edea 100644 --- a/cores/nRF5/external/lora/LoRaMac-node-4.4.7/src/mac/LoRaMacClassB.c +++ b/cores/nRF5/external/lora/LoRaMac-node-4.4.7/src/mac/LoRaMacClassB.c @@ -9816,7 +9816,7 @@ unsigned long udrv_get_microsecond(void); #define SEED_LENGTH 4 -#define EVENT_QUEUE_SIZE (128) +#define EVENT_QUEUE_SIZE (32) #define EVENT_DATA_SIZE (8) diff --git a/cores/nRF5/external/lora/LoRaMac-node-4.4.7/src/mac/region/RegionAU915.c b/cores/nRF5/external/lora/LoRaMac-node-4.4.7/src/mac/region/RegionAU915.c index 1f16839e..fad7cb13 100644 --- a/cores/nRF5/external/lora/LoRaMac-node-4.4.7/src/mac/region/RegionAU915.c +++ b/cores/nRF5/external/lora/LoRaMac-node-4.4.7/src/mac/region/RegionAU915.c @@ -8770,13 +8770,13 @@ _Bool } case PHY_RX_DR: { - + if( verify->DatarateParams.UplinkDwellTime == 0 ) { return RegionCommonValueInRange( verify->DatarateParams.Datarate, 8, 13 ); } - + else { - + return RegionCommonValueInRange( verify->DatarateParams.Datarate, 2, 13 ); } } case PHY_DEF_TX_POWER: diff --git a/cores/nRF5/external/lora/LoRaMac-node-4.4.7/src/radio/sx126x/radio.c b/cores/nRF5/external/lora/LoRaMac-node-4.4.7/src/radio/sx126x/radio.c index f67e6ac7..a9972588 100644 --- a/cores/nRF5/external/lora/LoRaMac-node-4.4.7/src/radio/sx126x/radio.c +++ b/cores/nRF5/external/lora/LoRaMac-node-4.4.7/src/radio/sx126x/radio.c @@ -4655,7 +4655,7 @@ unsigned long udrv_get_microsecond(void); #define SEED_LENGTH 4 -#define EVENT_QUEUE_SIZE (128) +#define EVENT_QUEUE_SIZE (32) #define EVENT_DATA_SIZE (8) diff --git a/libraries/RUI_V3_examples/examples/Application_Scenario/BLE/Environment_Detect/Environment_Detect.ino b/libraries/RUI_V3_examples/examples/Application_Scenario/BLE/Environment_Detect/Environment_Detect.ino index 45bd60dd..7043ce6c 100644 --- a/libraries/RUI_V3_examples/examples/Application_Scenario/BLE/Environment_Detect/Environment_Detect.ino +++ b/libraries/RUI_V3_examples/examples/Application_Scenario/BLE/Environment_Detect/Environment_Detect.ino @@ -62,7 +62,6 @@ void cccd_callback(uint16_t chars_uuid, uint8_t * cccd_value) void setup() { Serial.begin(115200); - delay(2000); Serial.println("RAKwireless Environment Detect Example"); Serial.println("------------------------------------------------------"); diff --git a/libraries/RUI_V3_examples/examples/Application_Scenario/LoRa/Smart_Farm/Smart_Farm.ino b/libraries/RUI_V3_examples/examples/Application_Scenario/LoRa/Smart_Farm/Smart_Farm.ino index a4c6c112..744e6194 100644 --- a/libraries/RUI_V3_examples/examples/Application_Scenario/LoRa/Smart_Farm/Smart_Farm.ino +++ b/libraries/RUI_V3_examples/examples/Application_Scenario/LoRa/Smart_Farm/Smart_Farm.ino @@ -63,7 +63,6 @@ void sendCallback(int32_t status) void setup() { Serial.begin(115200, RAK_AT_MODE); - delay(2000); Serial.println("RAKwireless Smart Farm Example"); Serial.println("------------------------------------------------------"); diff --git a/libraries/RUI_V3_examples/examples/Example/Arduino_Advance_IO/Arduino_Advance_IO.ino b/libraries/RUI_V3_examples/examples/Example/Arduino_Advance_IO/Arduino_Advance_IO.ino index 9d050117..862a96ce 100644 --- a/libraries/RUI_V3_examples/examples/Example/Arduino_Advance_IO/Arduino_Advance_IO.ino +++ b/libraries/RUI_V3_examples/examples/Example/Arduino_Advance_IO/Arduino_Advance_IO.ino @@ -22,7 +22,6 @@ void setup() { // initialize serial communication at 115200 bits per second Serial.begin(115200); - delay(2000); Serial.println("RAKwireless Arduino Advance IO Example"); Serial.println("------------------------------------------------------"); diff --git a/libraries/RUI_V3_examples/examples/Example/Arduino_Analog/Arduino_Analog.ino b/libraries/RUI_V3_examples/examples/Example/Arduino_Analog/Arduino_Analog.ino index 3ebf4185..2be5f4a5 100644 --- a/libraries/RUI_V3_examples/examples/Example/Arduino_Analog/Arduino_Analog.ino +++ b/libraries/RUI_V3_examples/examples/Example/Arduino_Analog/Arduino_Analog.ino @@ -13,7 +13,6 @@ void setup() { // initialize serial communication at 115200 bits per second Serial.begin(115200); - delay(2000); Serial.println("RAKwireless Arduino Analog Example"); Serial.println("------------------------------------------------------"); diff --git a/libraries/RUI_V3_examples/examples/Example/Arduino_Bit_And_Byte/Arduino_Bit_And_Byte.ino b/libraries/RUI_V3_examples/examples/Example/Arduino_Bit_And_Byte/Arduino_Bit_And_Byte.ino index d253086e..67eb4c37 100644 --- a/libraries/RUI_V3_examples/examples/Example/Arduino_Bit_And_Byte/Arduino_Bit_And_Byte.ino +++ b/libraries/RUI_V3_examples/examples/Example/Arduino_Bit_And_Byte/Arduino_Bit_And_Byte.ino @@ -99,7 +99,6 @@ void setup() { // initialize serial communication at 115200 bits per second Serial.begin(115200); - delay(2000); Serial.println("RAKwireless Arduino Bit and Byte Example"); Serial.println("------------------------------------------------------"); diff --git a/libraries/RUI_V3_examples/examples/Example/Arduino_Characters/Arduino_Characters.ino b/libraries/RUI_V3_examples/examples/Example/Arduino_Characters/Arduino_Characters.ino index a4d68d57..f166a1bc 100644 --- a/libraries/RUI_V3_examples/examples/Example/Arduino_Characters/Arduino_Characters.ino +++ b/libraries/RUI_V3_examples/examples/Example/Arduino_Characters/Arduino_Characters.ino @@ -105,7 +105,6 @@ void setup() { // initialize serial communcation at 115200 bits per second Serial.begin(115200); - delay(2000); Serial.println("RAKwireless Arduino Characters Example"); Serial.println("------------------------------------------------------"); diff --git a/libraries/RUI_V3_examples/examples/Example/Arduino_Digital/Arduino_Digital.ino b/libraries/RUI_V3_examples/examples/Example/Arduino_Digital/Arduino_Digital.ino index 7e0ba395..ba0e3824 100644 --- a/libraries/RUI_V3_examples/examples/Example/Arduino_Digital/Arduino_Digital.ino +++ b/libraries/RUI_V3_examples/examples/Example/Arduino_Digital/Arduino_Digital.ino @@ -16,7 +16,6 @@ void setup() { // initialize serial communication at 115200 bits per second Serial.begin(115200); - delay(2000); Serial.println("RAKwireless Arduino Digital Example"); Serial.println("------------------------------------------------------"); diff --git a/libraries/RUI_V3_examples/examples/Example/Arduino_Interrupt/Arduino_Interrupt.ino b/libraries/RUI_V3_examples/examples/Example/Arduino_Interrupt/Arduino_Interrupt.ino index 01455536..e51a62e3 100644 --- a/libraries/RUI_V3_examples/examples/Example/Arduino_Interrupt/Arduino_Interrupt.ino +++ b/libraries/RUI_V3_examples/examples/Example/Arduino_Interrupt/Arduino_Interrupt.ino @@ -32,7 +32,6 @@ void setup() { // initialize serial communcation at 115200 bits per second Serial.begin(115200); - delay(2000); Serial.println("RAKwireless Arduino Interrupt Example"); Serial.println("------------------------------------------------------"); diff --git a/libraries/RUI_V3_examples/examples/Example/Arduino_Led_Breathing/Arduino_Led_Breathing.ino b/libraries/RUI_V3_examples/examples/Example/Arduino_Led_Breathing/Arduino_Led_Breathing.ino index 96beff34..ebee1a2d 100644 --- a/libraries/RUI_V3_examples/examples/Example/Arduino_Led_Breathing/Arduino_Led_Breathing.ino +++ b/libraries/RUI_V3_examples/examples/Example/Arduino_Led_Breathing/Arduino_Led_Breathing.ino @@ -26,7 +26,6 @@ void setup() { //initialize serial communcation at 115200 bits per second Serial.begin(115200); - delay(2000); Serial.println("RAKwireless Arduino LED Breathing Example"); Serial.println("------------------------------------------------------"); diff --git a/libraries/RUI_V3_examples/examples/Example/Arduino_Random/Arduino_Random.ino b/libraries/RUI_V3_examples/examples/Example/Arduino_Random/Arduino_Random.ino index e0f7bff6..de9c3ef0 100755 --- a/libraries/RUI_V3_examples/examples/Example/Arduino_Random/Arduino_Random.ino +++ b/libraries/RUI_V3_examples/examples/Example/Arduino_Random/Arduino_Random.ino @@ -12,7 +12,6 @@ void setup() { // initialize serial communication at 115200 bits per second Serial.begin(115200); - delay(2000); Serial.println("RAKwireless Arduino Random Example"); Serial.println("------------------------------------------------------"); // initializes the pseudo-random number generator diff --git a/libraries/RUI_V3_examples/examples/Example/Arduino_Serial/Arduino_Serial.ino b/libraries/RUI_V3_examples/examples/Example/Arduino_Serial/Arduino_Serial.ino index 1ce66ae8..4c685d2a 100644 --- a/libraries/RUI_V3_examples/examples/Example/Arduino_Serial/Arduino_Serial.ino +++ b/libraries/RUI_V3_examples/examples/Example/Arduino_Serial/Arduino_Serial.ino @@ -5,35 +5,34 @@ ***/ void setup() -{ - // initialize serial communication at 115200 bits per second, and use the AT mode - Serial.begin(115200, RAK_AT_MODE); - // initialize serial communication at 115200 bits per second, and use the custom mode - Serial1.begin(115200, RAK_CUSTOM_MODE); - delay(2000); - - Serial.println("RAKwireless Arduino Serial Example"); - Serial.println("------------------------------------------------------"); - Serial1.print("Current time out: "); - Serial1.println(Serial.getTimeout()); // get Serial timeout - Serial1.println("Set Timeout to 5000"); - Serial1.setTimeout(5000); // set the Serial timeout to 5 seconds - Serial1.print("Current time out: "); - Serial1.println(Serial.getTimeout()); // get Serial timeout after changed +{ + // initialize serial communication at 115200 bits per second, and use the AT mode + Serial.begin(115200, RAK_AT_MODE); + // initialize serial communication at 115200 bits per second, and use the custom mode + Serial1.begin(115200, RAK_CUSTOM_MODE); + Serial.println("RAKwireless Arduino Serial Example"); + Serial.println("------------------------------------------------------"); + delay(3000); + Serial1.print("Current time out: "); + Serial1.println(Serial.getTimeout()); // get Serial timeout + Serial1.println("Set Timeout to 5000"); + Serial1.setTimeout(5000); // set the Serial timeout to 5 seconds + Serial1.print("Current time out: "); + Serial1.println(Serial.getTimeout()); // get Serial timeout after changed } void loop() { - String returnString = " "; - // reply only when receive data on Serial port - Serial1.println("Please type any words in 5 seconds"); - returnString = Serial1.readStringUntil('\r'); // Read the string until the end of enter - if (returnString == " ") - Serial1.println("read nothing"); - else { - Serial1.print("Typed: "); - Serial1.println(returnString); //Show the string you typed - } - Serial1.println(""); - delay(1000); + String returnString = " "; + // reply only when receive data on Serial port + Serial1.println("Please type any words in 5 seconds"); + returnString = Serial1.readStringUntil('\r'); // Read the string until the end of enter + if (returnString == " ") + Serial1.println("read nothing"); + else { + Serial1.print("Typed: "); + Serial1.println(returnString); //Show the string you typed + } + Serial1.println(""); + delay(1000); } diff --git a/libraries/RUI_V3_examples/examples/Example/Arduino_Time/Arduino_Time.ino b/libraries/RUI_V3_examples/examples/Example/Arduino_Time/Arduino_Time.ino index 7bd2ac2f..d52f8ea4 100644 --- a/libraries/RUI_V3_examples/examples/Example/Arduino_Time/Arduino_Time.ino +++ b/libraries/RUI_V3_examples/examples/Example/Arduino_Time/Arduino_Time.ino @@ -8,7 +8,6 @@ void setup() { // initialize serial communication at 115200 bits per second Serial.begin(115200); - delay(2000); Serial.println("RAKwireless Arduino Time Example"); Serial.println("------------------------------------------------------"); diff --git a/libraries/RUI_V3_examples/examples/Example/BLE_Beacon/BLE_Beacon.ino b/libraries/RUI_V3_examples/examples/Example/BLE_Beacon/BLE_Beacon.ino index 8633de51..f63aef1f 100644 --- a/libraries/RUI_V3_examples/examples/Example/BLE_Beacon/BLE_Beacon.ino +++ b/libraries/RUI_V3_examples/examples/Example/BLE_Beacon/BLE_Beacon.ino @@ -8,8 +8,6 @@ int i; void setup() { Serial.begin(115200); - delay(2000); - Serial.println("RAKwireless BLE Beacon Example"); Serial.println("------------------------------------------------------"); diff --git a/libraries/RUI_V3_examples/examples/Example/BLE_Beacon_Custom_Payload/BLE_Beacon_Custom_Payload.ino b/libraries/RUI_V3_examples/examples/Example/BLE_Beacon_Custom_Payload/BLE_Beacon_Custom_Payload.ino index 1b524363..6431382b 100644 --- a/libraries/RUI_V3_examples/examples/Example/BLE_Beacon_Custom_Payload/BLE_Beacon_Custom_Payload.ino +++ b/libraries/RUI_V3_examples/examples/Example/BLE_Beacon_Custom_Payload/BLE_Beacon_Custom_Payload.ino @@ -36,7 +36,6 @@ uint8_t cus_adv_url[] ={ void setup() { Serial.begin(115200); - delay(2000); Serial.println("RAKwireless BLE Beacon Customize Payload Example"); Serial.println("------------------------------------------------------"); diff --git a/libraries/RUI_V3_examples/examples/Example/BLE_Configuration/BLE_Configuration.ino b/libraries/RUI_V3_examples/examples/Example/BLE_Configuration/BLE_Configuration.ino index 12445606..2dbc7d42 100644 --- a/libraries/RUI_V3_examples/examples/Example/BLE_Configuration/BLE_Configuration.ino +++ b/libraries/RUI_V3_examples/examples/Example/BLE_Configuration/BLE_Configuration.ino @@ -9,7 +9,6 @@ void setup() { bool ret; Serial.begin(115200); - delay(2000); Serial.println("RAKwireless BLE Configuration Example"); Serial.println("------------------------------------------------------"); diff --git a/libraries/RUI_V3_examples/examples/Example/BLE_Custom_Service/BLE_Custom_Service.ino b/libraries/RUI_V3_examples/examples/Example/BLE_Custom_Service/BLE_Custom_Service.ino index 2dec2138..7f02ca92 100644 --- a/libraries/RUI_V3_examples/examples/Example/BLE_Custom_Service/BLE_Custom_Service.ino +++ b/libraries/RUI_V3_examples/examples/Example/BLE_Custom_Service/BLE_Custom_Service.ino @@ -63,7 +63,6 @@ void setup() 0x80, 0x5f, 0x9b, 0x34, 0xfb}; Serial.begin(115200); - delay(2000); Serial.println("RAKwireless BLE Custom Services Example"); Serial.println("------------------------------------------------------"); diff --git a/libraries/RUI_V3_examples/examples/Example/BLE_Scanner/BLE_Scanner.ino b/libraries/RUI_V3_examples/examples/Example/BLE_Scanner/BLE_Scanner.ino index 544ff397..a6f358dd 100644 --- a/libraries/RUI_V3_examples/examples/Example/BLE_Scanner/BLE_Scanner.ino +++ b/libraries/RUI_V3_examples/examples/Example/BLE_Scanner/BLE_Scanner.ino @@ -60,8 +60,6 @@ void scan_callback(int8_t rssi_value, uint8_t * device_mac, void setup() { bool ret; - Serial.begin(115200); - delay(2000); Serial.println("RAKwireless BLE Scanner Example"); Serial.println("------------------------------------------------------"); diff --git a/libraries/RUI_V3_examples/examples/Example/BLE_Uart/BLE_Uart.ino b/libraries/RUI_V3_examples/examples/Example/BLE_Uart/BLE_Uart.ino index 5ebd06f4..5e607fe5 100644 --- a/libraries/RUI_V3_examples/examples/Example/BLE_Uart/BLE_Uart.ino +++ b/libraries/RUI_V3_examples/examples/Example/BLE_Uart/BLE_Uart.ino @@ -11,7 +11,6 @@ void setup() //If you want to read and write data through BLE API operations, you need to set BLE Serial (Serail6) to Custom Mode Serial6.begin(115200, RAK_CUSTOM_MODE); // RAK_CUSTOM_MODE, RAK_AT_MODE Serial.begin(115200); - delay(2000); Serial.println("RAKwireless BLE UART Example"); Serial.println("------------------------------------------------------"); diff --git a/libraries/RUI_V3_examples/examples/Example/LoRaWan_ABP/LoRaWan_ABP.ino b/libraries/RUI_V3_examples/examples/Example/LoRaWan_ABP/LoRaWan_ABP.ino index 354ed1fe..3c4268f6 100644 --- a/libraries/RUI_V3_examples/examples/Example/LoRaWan_ABP/LoRaWan_ABP.ino +++ b/libraries/RUI_V3_examples/examples/Example/LoRaWan_ABP/LoRaWan_ABP.ino @@ -37,30 +37,9 @@ void recvCallback(SERVICE_LORA_RECEIVE_T * data) } } -/************************************* - * enum type for LoRa Event - RAK_LORAMAC_STATUS_OK = 0, - RAK_LORAMAC_STATUS_ERROR, - RAK_LORAMAC_STATUS_TX_TIMEOUT, - RAK_LORAMAC_STATUS_RX1_TIMEOUT, - RAK_LORAMAC_STATUS_RX2_TIMEOUT, - RAK_LORAMAC_STATUS_RX1_ERROR, - RAK_LORAMAC_STATUS_RX2_ERROR, - RAK_LORAMAC_STATUS_JOIN_FAIL, - RAK_LORAMAC_STATUS_DOWNLINK_REPEATED, - RAK_LORAMAC_STATUS_TX_DR_PAYLOAD_SIZE_ERROR, - RAK_LORAMAC_STATUS_DOWNLINK_TOO_MANY_FRAMES_LOSS, - RAK_LORAMAC_STATUS_ADDRESS_FAIL, - RAK_LORAMAC_STATUS_MIC_FAIL, - RAK_LORAMAC_STATUS_MULTICAST_FAIL, - RAK_LORAMAC_STATUS_BEACON_LOCKED, - RAK_LORAMAC_STATUS_BEACON_LOST, - RAK_LORAMAC_STATUS_BEACON_NOT_FOUND, - *************************************/ - void sendCallback(int32_t status) { - if (status == RAK_LORAMAC_STATUS_OK) { + if (status == 0) { Serial.println("Successfully sent"); } else { Serial.println("Sending failed"); @@ -70,7 +49,6 @@ void sendCallback(int32_t status) void setup() { Serial.begin(115200, RAK_AT_MODE); - delay(2000); Serial.println("RAKwireless LoRaWan ABP Example"); Serial.println("------------------------------------------------------"); @@ -89,11 +67,6 @@ void setup() // ABP Network Session Key uint8_t node_nwk_skey[16] = ABP_NWKSKEY; - if (!api.lorawan.njm.set(RAK_LORA_ABP)) // Set the network join mode to ABP - { - Serial.printf("LoRaWan ABP - set network join mode is incorrect! \r\n"); - return; - } if (!api.lorawan.daddr.set(node_dev_addr, 4)) { Serial.printf("LoRaWan ABP - set device addr is incorrect! \r\n"); return; @@ -114,6 +87,11 @@ void setup() Serial.printf("LoRaWan ABP - set device class is incorrect! \r\n"); return; } + if (!api.lorawan.njm.set(RAK_LORA_ABP)) // Set the network join mode to ABP + { + Serial.printf("LoRaWan ABP - set network join mode is incorrect! \r\n"); + return; + } if (!api.lorawan.adr.set(true)) { Serial.printf("LoRaWan ABP - set adaptive data rate is incorrect! \r\n"); diff --git a/libraries/RUI_V3_examples/examples/Example/LoRaWan_Class_B/LoRaWan_Class_B.ino b/libraries/RUI_V3_examples/examples/Example/LoRaWan_Class_B/LoRaWan_Class_B.ino index ea28d7cf..ed7b99eb 100644 --- a/libraries/RUI_V3_examples/examples/Example/LoRaWan_Class_B/LoRaWan_Class_B.ino +++ b/libraries/RUI_V3_examples/examples/Example/LoRaWan_Class_B/LoRaWan_Class_B.ino @@ -42,30 +42,9 @@ void joinCallback(int32_t status) Serial.printf("Join status: %d\r\n", status); } -/************************************* - * enum type for LoRa Event - RAK_LORAMAC_STATUS_OK = 0, - RAK_LORAMAC_STATUS_ERROR, - RAK_LORAMAC_STATUS_TX_TIMEOUT, - RAK_LORAMAC_STATUS_RX1_TIMEOUT, - RAK_LORAMAC_STATUS_RX2_TIMEOUT, - RAK_LORAMAC_STATUS_RX1_ERROR, - RAK_LORAMAC_STATUS_RX2_ERROR, - RAK_LORAMAC_STATUS_JOIN_FAIL, - RAK_LORAMAC_STATUS_DOWNLINK_REPEATED, - RAK_LORAMAC_STATUS_TX_DR_PAYLOAD_SIZE_ERROR, - RAK_LORAMAC_STATUS_DOWNLINK_TOO_MANY_FRAMES_LOSS, - RAK_LORAMAC_STATUS_ADDRESS_FAIL, - RAK_LORAMAC_STATUS_MIC_FAIL, - RAK_LORAMAC_STATUS_MULTICAST_FAIL, - RAK_LORAMAC_STATUS_BEACON_LOCKED, - RAK_LORAMAC_STATUS_BEACON_LOST, - RAK_LORAMAC_STATUS_BEACON_NOT_FOUND, - *************************************/ - void sendCallback(int32_t status) { - if (status == RAK_LORAMAC_STATUS_OK) { + if (status == 0) { Serial.println("Successfully sent"); } else { Serial.println("Sending failed"); @@ -75,7 +54,6 @@ void sendCallback(int32_t status) void setup() { Serial.begin(115200, RAK_AT_MODE); - delay(2000); Serial.println("RAKwireless LoRaWan OTAA Example"); Serial.println("------------------------------------------------------"); diff --git a/libraries/RUI_V3_examples/examples/Example/LoRaWan_Info/LoRaWan_Info.ino b/libraries/RUI_V3_examples/examples/Example/LoRaWan_Info/LoRaWan_Info.ino index 21f81930..47789796 100644 --- a/libraries/RUI_V3_examples/examples/Example/LoRaWan_Info/LoRaWan_Info.ino +++ b/libraries/RUI_V3_examples/examples/Example/LoRaWan_Info/LoRaWan_Info.ino @@ -43,30 +43,9 @@ void joinCallback(int32_t status) Serial.printf("Join status: %d\r\n", status); } -/************************************* - * enum type for LoRa Event - RAK_LORAMAC_STATUS_OK = 0, - RAK_LORAMAC_STATUS_ERROR, - RAK_LORAMAC_STATUS_TX_TIMEOUT, - RAK_LORAMAC_STATUS_RX1_TIMEOUT, - RAK_LORAMAC_STATUS_RX2_TIMEOUT, - RAK_LORAMAC_STATUS_RX1_ERROR, - RAK_LORAMAC_STATUS_RX2_ERROR, - RAK_LORAMAC_STATUS_JOIN_FAIL, - RAK_LORAMAC_STATUS_DOWNLINK_REPEATED, - RAK_LORAMAC_STATUS_TX_DR_PAYLOAD_SIZE_ERROR, - RAK_LORAMAC_STATUS_DOWNLINK_TOO_MANY_FRAMES_LOSS, - RAK_LORAMAC_STATUS_ADDRESS_FAIL, - RAK_LORAMAC_STATUS_MIC_FAIL, - RAK_LORAMAC_STATUS_MULTICAST_FAIL, - RAK_LORAMAC_STATUS_BEACON_LOCKED, - RAK_LORAMAC_STATUS_BEACON_LOST, - RAK_LORAMAC_STATUS_BEACON_NOT_FOUND, - *************************************/ - void sendCallback(int32_t status) { - if (status == RAK_LORAMAC_STATUS_OK) { + if (status == 0) { Serial.println("Successfully sent"); } else { Serial.println("Sending failed"); @@ -76,7 +55,6 @@ void sendCallback(int32_t status) void setup() { Serial.begin(115200, RAK_AT_MODE); - delay(2000); Serial.println("RAKwireless LoRaWan OTAA Example"); Serial.println("------------------------------------------------------"); diff --git a/libraries/RUI_V3_examples/examples/Example/LoRaWan_Multicast/LoRaWan_Multicast.ino b/libraries/RUI_V3_examples/examples/Example/LoRaWan_Multicast/LoRaWan_Multicast.ino index f5b216ec..6bfd09eb 100644 --- a/libraries/RUI_V3_examples/examples/Example/LoRaWan_Multicast/LoRaWan_Multicast.ino +++ b/libraries/RUI_V3_examples/examples/Example/LoRaWan_Multicast/LoRaWan_Multicast.ino @@ -5,7 +5,6 @@ bool ret; void setup() { Serial.begin(115200); - delay(2000); Serial.println("RAKwireless LoRaWan Multicast Example"); Serial.println("------------------------------------------------------"); diff --git a/libraries/RUI_V3_examples/examples/Example/LoRaWan_OTAA/LoRaWan_OTAA.ino b/libraries/RUI_V3_examples/examples/Example/LoRaWan_OTAA/LoRaWan_OTAA.ino index 92c2c99f..5a01e7e4 100644 --- a/libraries/RUI_V3_examples/examples/Example/LoRaWan_OTAA/LoRaWan_OTAA.ino +++ b/libraries/RUI_V3_examples/examples/Example/LoRaWan_OTAA/LoRaWan_OTAA.ino @@ -42,30 +42,9 @@ void joinCallback(int32_t status) Serial.printf("Join status: %d\r\n", status); } -/************************************* - * enum type for LoRa Event - RAK_LORAMAC_STATUS_OK = 0, - RAK_LORAMAC_STATUS_ERROR, - RAK_LORAMAC_STATUS_TX_TIMEOUT, - RAK_LORAMAC_STATUS_RX1_TIMEOUT, - RAK_LORAMAC_STATUS_RX2_TIMEOUT, - RAK_LORAMAC_STATUS_RX1_ERROR, - RAK_LORAMAC_STATUS_RX2_ERROR, - RAK_LORAMAC_STATUS_JOIN_FAIL, - RAK_LORAMAC_STATUS_DOWNLINK_REPEATED, - RAK_LORAMAC_STATUS_TX_DR_PAYLOAD_SIZE_ERROR, - RAK_LORAMAC_STATUS_DOWNLINK_TOO_MANY_FRAMES_LOSS, - RAK_LORAMAC_STATUS_ADDRESS_FAIL, - RAK_LORAMAC_STATUS_MIC_FAIL, - RAK_LORAMAC_STATUS_MULTICAST_FAIL, - RAK_LORAMAC_STATUS_BEACON_LOCKED, - RAK_LORAMAC_STATUS_BEACON_LOST, - RAK_LORAMAC_STATUS_BEACON_NOT_FOUND, - *************************************/ - void sendCallback(int32_t status) { - if (status == RAK_LORAMAC_STATUS_OK) { + if (status == 0) { Serial.println("Successfully sent"); } else { Serial.println("Sending failed"); @@ -75,7 +54,6 @@ void sendCallback(int32_t status) void setup() { Serial.begin(115200, RAK_AT_MODE); - delay(2000); Serial.println("RAKwireless LoRaWan OTAA Example"); Serial.println("------------------------------------------------------"); diff --git a/libraries/RUI_V3_examples/examples/Example/NFC_APP_Record/NFC_APP_Record.ino b/libraries/RUI_V3_examples/examples/Example/NFC_APP_Record/NFC_APP_Record.ino index 7b6a941e..86b4ba86 100644 --- a/libraries/RUI_V3_examples/examples/Example/NFC_APP_Record/NFC_APP_Record.ino +++ b/libraries/RUI_V3_examples/examples/Example/NFC_APP_Record/NFC_APP_Record.ino @@ -32,7 +32,6 @@ void setup() 'e', 'n', 'd', 'i', 'n', 'g' }; Serial.begin(115200); - delay(2000); #ifdef SUPPORT_NFC api.nfc.init(true, false, nfc_t4t_callback); // NFC tag init diff --git a/libraries/RUI_V3_examples/examples/Example/NFC_AT_Command/NFC_AT_Command.ino b/libraries/RUI_V3_examples/examples/Example/NFC_AT_Command/NFC_AT_Command.ino index 03f038f6..339fd28d 100644 --- a/libraries/RUI_V3_examples/examples/Example/NFC_AT_Command/NFC_AT_Command.ino +++ b/libraries/RUI_V3_examples/examples/Example/NFC_AT_Command/NFC_AT_Command.ino @@ -34,8 +34,7 @@ static void nfc_t4t_callback(void *p_context, RAK_NFC_T4T_EVENT event, void setup() { - Serial.begin(115200); - delay(2000); + delay(3000); Serial.println("Example Start"); /*set LED pin to OUTPUT */ pinMode(LED_GREEN, OUTPUT); @@ -44,6 +43,7 @@ void setup() static const uint8_t language[] = { 'e', 'n' }; // the language of the NFC tag (2 Bytes) static const uint8_t payload[] = { 'N', 'F', 'C', ' ', 'D', 'e', 'f', 'a', 'u', 'l', 't' }; // the payload of NFC tag (MAX: 244 bytes) + Serial.begin(115200); #ifdef SUPPORT_NFC api.nfc.init(true, true, nfc_t4t_callback); // NFC tag init diff --git a/libraries/RUI_V3_examples/examples/Example/NFC_TXT_Record/NFC_TXT_Record.ino b/libraries/RUI_V3_examples/examples/Example/NFC_TXT_Record/NFC_TXT_Record.ino index 73c6537b..ef1b5ab2 100644 --- a/libraries/RUI_V3_examples/examples/Example/NFC_TXT_Record/NFC_TXT_Record.ino +++ b/libraries/RUI_V3_examples/examples/Example/NFC_TXT_Record/NFC_TXT_Record.ino @@ -34,8 +34,7 @@ static void nfc_t4t_callback(void *p_context, RAK_NFC_T4T_EVENT event, void setup() { - Serial.begin(115200); - delay(2000); + delay(3000); Serial.println("Example Start"); /*set LED pin to OUTPUT */ pinMode(LED_GREEN, OUTPUT); @@ -44,6 +43,7 @@ void setup() static const uint8_t language[] = { 'e', 'n' }; // the language of the NFC tag (2 Bytes) static const uint8_t payload[] = { 'H', 'e', 'l', 'l', 'o', ' ', 'N', 'F', 'C', 'H', 'e', 'l', 'l', 'o', ' ', 'N', 'F', 'C', 'H', 'e', 'l', 'l', 'o', ' ', 'N', 'F', 'C' }; // the payload of NFC tag (MAX: 244 bytes) + Serial.begin(115200); #ifdef SUPPORT_NFC api.nfc.init(true, false, nfc_t4t_callback); // NFC tag init diff --git a/libraries/RUI_V3_examples/examples/Example/NFC_URI_Record/NFC_URI_Record.ino b/libraries/RUI_V3_examples/examples/Example/NFC_URI_Record/NFC_URI_Record.ino index 85a2c0e9..983cbb00 100644 --- a/libraries/RUI_V3_examples/examples/Example/NFC_URI_Record/NFC_URI_Record.ino +++ b/libraries/RUI_V3_examples/examples/Example/NFC_URI_Record/NFC_URI_Record.ino @@ -27,8 +27,6 @@ static void nfc_t4t_callback(void *p_context, RAK_NFC_T4T_EVENT event, void setup() { - Serial.begin(115200); - delay(2000); /*set LED pin to OUTPUT */ pinMode(LED_GREEN, OUTPUT); @@ -36,6 +34,7 @@ void setup() { 'r', 'a', 'k', 'w', 'i', 'r', 'e', 'l', 'e', 's', 's', '.', 'c', 'o', 'm' }; + Serial.begin(115200); #ifdef SUPPORT_NFC api.nfc.init(false, false, nfc_t4t_callback); // NFC tag init diff --git a/libraries/RUI_V3_examples/examples/Example/RAK3401/RAK3401.ino b/libraries/RUI_V3_examples/examples/Example/RAK3401/RAK3401.ino index 7db2bc1c..f18d25fd 100644 --- a/libraries/RUI_V3_examples/examples/Example/RAK3401/RAK3401.ino +++ b/libraries/RUI_V3_examples/examples/Example/RAK3401/RAK3401.ino @@ -1,18 +1,9 @@ -extern const char *sw_version; - void setup() { - uint32_t baudrate = Serial.getBaudrate(); - Serial.begin(baudrate); - Serial.println("RAKwireless RAK3401"); + Serial.begin(115200); + Serial.println("RAKwireless RAK3401 Example"); Serial.println("------------------------------------------------------"); - Serial.printf("Version: %s\r\n", sw_version); - - // Start BLE UART advertisement for 30 seconds - Serial6.begin(115200, RAK_AT_MODE); - api.ble.settings.blemode(RAK_BLE_UART_MODE); - api.ble.uart.start(30); } void loop() diff --git a/libraries/RUI_V3_examples/examples/Example/RAK4631/RAK4631.ino b/libraries/RUI_V3_examples/examples/Example/RAK4631/RAK4631.ino index 8a86af74..b2af1e4c 100755 --- a/libraries/RUI_V3_examples/examples/Example/RAK4631/RAK4631.ino +++ b/libraries/RUI_V3_examples/examples/Example/RAK4631/RAK4631.ino @@ -1,13 +1,9 @@ -extern const char *sw_version; - void setup() { - uint32_t baudrate = Serial.getBaudrate(); - Serial.begin(baudrate); - Serial.println("RAKwireless RAK4631"); + Serial.begin(115200); + Serial.println("RAKwireless RAK4631 Example"); Serial.println("------------------------------------------------------"); - Serial.printf("Version: %s\r\n", sw_version); // Start BLE UART advertisement for 30 seconds Serial6.begin(115200, RAK_AT_MODE); diff --git a/libraries/RUI_V3_examples/examples/Example/RAK5010/RAK5010.ino b/libraries/RUI_V3_examples/examples/Example/RAK5010/RAK5010.ino index 3dafd20a..67619c43 100644 --- a/libraries/RUI_V3_examples/examples/Example/RAK5010/RAK5010.ino +++ b/libraries/RUI_V3_examples/examples/Example/RAK5010/RAK5010.ino @@ -1,6 +1,4 @@ -extern const char *sw_version; - #ifndef rak5010 #error "Please select WisTrio Cellular RAK5010 Board and compile again" #endif @@ -46,23 +44,16 @@ int get_sensor(SERIAL_PORT port, char *cmd, stParam * param) void setup() { - uint32_t baudrate = Serial.getBaudrate(); - Serial.begin(baudrate); + Serial.begin(115200); - Serial.println("RAKwireless RAK5010"); + Serial.println("RAKwireless RAK5010 Example"); Serial.println("------------------------------------------------------"); - Serial.printf("Version: %s\r\n", sw_version); // begin for I2C Wire.begin(); api.system.atMode.add("SENSOR", "This get sensor data.", "SENSOR", get_sensor); - - // Start BLE UART advertisement for 30 seconds - Serial6.begin(115200, RAK_AT_MODE); - api.ble.settings.blemode(RAK_BLE_UART_MODE); - api.ble.uart.start(30); } void loop() diff --git a/libraries/RUI_V3_examples/examples/Example/System_ATCMD_Permission/System_ATCMD_Permission.ino b/libraries/RUI_V3_examples/examples/Example/System_ATCMD_Permission/System_ATCMD_Permission.ino index e507d73d..f1c55741 100644 --- a/libraries/RUI_V3_examples/examples/Example/System_ATCMD_Permission/System_ATCMD_Permission.ino +++ b/libraries/RUI_V3_examples/examples/Example/System_ATCMD_Permission/System_ATCMD_Permission.ino @@ -29,7 +29,6 @@ CHANGE_ATCMD_PERM("AT+ALIAS", RAK_ATCMD_PERM_READ | RAK_ATCMD_PERM_WRITE); void setup() { Serial.begin(115200); - delay(2000); Serial.println("RAKwireless AT Command Permission Example"); Serial.println("------------------------------------------------------"); } diff --git a/libraries/RUI_V3_examples/examples/Example/System_Custom_ATCMD/System_Custom_ATCMD.ino b/libraries/RUI_V3_examples/examples/Example/System_Custom_ATCMD/System_Custom_ATCMD.ino index 60e357bb..adb77fca 100644 --- a/libraries/RUI_V3_examples/examples/Example/System_Custom_ATCMD/System_Custom_ATCMD.ino +++ b/libraries/RUI_V3_examples/examples/Example/System_Custom_ATCMD/System_Custom_ATCMD.ino @@ -36,7 +36,6 @@ int led_handle(SERIAL_PORT port, char *cmd, stParam * param) void setup() { Serial.begin(115200); - delay(2000); Serial.println("RAKwireless Custom ATCMD Example"); Serial.println("------------------------------------------------------"); api.system.atMode.add("LED", "This controls both green and blue LEDs.", diff --git a/libraries/RUI_V3_examples/examples/Example/System_General/System_General.ino b/libraries/RUI_V3_examples/examples/Example/System_General/System_General.ino index 70a9d6b2..ffdd9462 100644 --- a/libraries/RUI_V3_examples/examples/Example/System_General/System_General.ino +++ b/libraries/RUI_V3_examples/examples/Example/System_General/System_General.ino @@ -7,7 +7,6 @@ int i; void setup() { Serial.begin(115200); - delay(2000); Serial.println("RAKwireless System General Example"); Serial.println("------------------------------------------------------"); api.system.restoreDefault(); diff --git a/libraries/RUI_V3_examples/examples/Example/System_Multitasking/System_Multitasking.ino b/libraries/RUI_V3_examples/examples/Example/System_Multitasking/System_Multitasking.ino new file mode 100644 index 00000000..da36c111 --- /dev/null +++ b/libraries/RUI_V3_examples/examples/Example/System_Multitasking/System_Multitasking.ino @@ -0,0 +1,252 @@ +/*** + * This example shows multitasking in RUI3 with RAK1904, RAK1910 and LoRaWan join. +***/ +//Lorawan + +#define TEST_BAND (RAK_REGION_US915) + +#define TEST_DEVEUI {0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08} + +#define TEST_APPEUI {0x0E, 0x0D, 0x0D, 0x01, 0x0E, 0x01, 0x02, 0x0E} + +#define TEST_APPKEY {0x2B, 0x7E, 0x15, 0x16, 0x28, 0xAE, 0xD2, 0xA6, 0xAB, 0xF7, 0x15, 0x88, 0x09, 0xCF, 0x4F, 0x3C} +//1904 + +#include + +#include + +#include +Adafruit_LIS3DH lis = Adafruit_LIS3DH();// I2C +//1910 + +#include +TinyGPS gps; +String tmp_data = ""; +int direction_S_N = 0; //0--S, 1--N +int direction_E_W = 0; //0--E, 1--W +void direction_parse(String tmp) +{ + if (tmp.indexOf(",E,") != -1) + { + direction_E_W = 0; + } + else + { + direction_E_W = 1; + } + + if (tmp.indexOf(",S,") != -1) + { + direction_S_N = 0; + } + else + { + direction_S_N = 1; + } +} + +void new_thread1(void) //1904 +{ + while (1) { + delay(2000); + lis.read(); // get X Y and Z data at once + + /* Or....get a new sensor event, normalized */ + sensors_event_t event; + lis.getEvent(&event); + /* Display the results (acceleration is measured in m/s^2) */ + Serial.print("X: "); Serial.print(event.acceleration.x); + Serial.print(" Y: "); Serial.print(event.acceleration.y); + Serial.print(" Z: "); Serial.print(event.acceleration.z); + Serial.println(" m/s^2 "); + Serial.println(); + } +} + +void new_thread2(void)//13007 +{ + while (1) { + digitalWrite(WB_IO4, LOW); + delay(1000); + digitalWrite(WB_IO4, HIGH); + delay(1000); + } +} + +void new_thread3(void)//lorawan +{ + while (api.lorawan.njs.get() == 0) + { + Serial.print("Waiting for Lorawan join..."); + api.lorawan.join(); + delay(10000); + } + while (1) { + uint8_t payload[] = "Thread"; + + if (api.lorawan.send(sizeof(payload), payload, 129, true, 1)) { + Serial.println("Send Success"); + } else { + Serial.println("Send fail"); + } + delay(4000); + } +} + +void new_thread4(void)//log +{ + while (1) { + udrv_serial_log_printf("This is new thread #4 fired every 4s! (%lu)\r\n", millis()); + delay(4000); + } +} + +void setup() +{ + Serial.begin(115200); + Serial.println("RAKwireless System Multitasking Example"); + Serial.println("------------------------------------------------------"); + time_t timeout = millis(); + Serial.begin(115200); + while (!Serial) + { + if ((millis() - timeout) < 5000) + { + delay(100); + } + else + { + break; + } + } + + //1904 + while (!Serial) delay(10); // will pause Zero, Leonardo, etc until serial console opens + Serial.println("LIS3DH test!"); + if (! lis.begin(0x18)) { // change this to 0x19 for alternative i2c address + Serial.println("Couldnt start"); + while (1) yield(); + } + Serial.println("LIS3DH found!"); + // lis.setRange(LIS3DH_RANGE_4_G); // 2, 4, 8 or 16 G! + Serial.print("Range = "); Serial.print(2 << lis.getRange()); + Serial.println("G"); + // lis.setDataRate(LIS3DH_DATARATE_50_HZ); + Serial.print("Data rate set to: "); + switch (lis.getDataRate()) { + case LIS3DH_DATARATE_1_HZ: Serial.println("1 Hz"); break; + case LIS3DH_DATARATE_10_HZ: Serial.println("10 Hz"); break; + case LIS3DH_DATARATE_25_HZ: Serial.println("25 Hz"); break; + case LIS3DH_DATARATE_50_HZ: Serial.println("50 Hz"); break; + case LIS3DH_DATARATE_100_HZ: Serial.println("100 Hz"); break; + case LIS3DH_DATARATE_200_HZ: Serial.println("200 Hz"); break; + case LIS3DH_DATARATE_400_HZ: Serial.println("400 Hz"); break; + case LIS3DH_DATARATE_POWERDOWN: Serial.println("Powered Down"); break; + case LIS3DH_DATARATE_LOWPOWER_5KHZ: Serial.println("5 Khz Low Power"); break; + case LIS3DH_DATARATE_LOWPOWER_1K6HZ: Serial.println("16 Khz Low Power"); break; + } + // 13007 + pinMode(WB_IO2, OUTPUT); + digitalWrite(WB_IO2, HIGH); + pinMode(WB_IO4, OUTPUT); + //1910 + Serial1.begin(9600); + while (!Serial1); + Serial.println("GPS uart init ok!"); + //Lorawan + uint8_t node_device_eui[8] = TEST_DEVEUI; + uint8_t node_app_eui[8] = TEST_APPEUI; + uint8_t node_app_key[16] = TEST_APPKEY; + + api.lorawan.appeui.set(node_app_eui, 8); + api.lorawan.appkey.set(node_app_key, 16); + api.lorawan.deui.set(node_device_eui, 8); + api.lorawan.band.set(TEST_BAND); + api.lorawan.njm.set(1); + api.lorawan.join(); + + if (api.system.scheduler.task.create("new thread #1", new_thread1) == true) { + Serial.printf("Thread #1 is successfully created.\r\n"); + } else { + Serial.printf("Thread #1 can't be created.\r\n"); + } + if (api.system.scheduler.task.create("new thread #2", new_thread2) == true) { + Serial.printf("Thread #2 is successfully created.\r\n"); + } else { + Serial.printf("Thread #2 can't be created.\r\n"); + } + if (api.system.scheduler.task.create("new thread #3", new_thread3) == true) { + Serial.printf("Thread #3 is successfully created.\r\n"); + } else { + Serial.printf("Thread #3 can't be created.\r\n"); + } + if (api.system.scheduler.task.create("new thread #4", new_thread3) == true) { + Serial.printf("Thread #4 is successfully created.\r\n"); + } else { + Serial.printf("Thread #4 can't be created.\r\n"); + } +} + +void loop()//1910 +{ + bool newData = false; + unsigned long chars; + unsigned short sentences, failed; + + // For one second we parse GPS data and report some key values + for (unsigned long start = millis(); millis() - start < 1000;) + { + while (Serial1.available()) + { + char c = Serial1.read(); + tmp_data += c; + if (gps.encode(c)) + newData = true; + } + } + direction_parse(tmp_data); + tmp_data = ""; + + if (newData) + { + float flat, flon; + unsigned long age; + gps.f_get_position(&flat, &flon, &age); + if(direction_S_N == 0) + { + Serial.print("(S):"); + } + else + { + Serial.print("(N):"); + } + Serial.print("LAT="); + Serial.print(flat == TinyGPS::GPS_INVALID_F_ANGLE ? 0.0 : flat, 6); + if(direction_E_W == 0) + { + Serial.print(" (E):"); + } + else + { + Serial.print(" (W):"); + } + Serial.print("LON="); + Serial.print(flon == TinyGPS::GPS_INVALID_F_ANGLE ? 0.0 : flon, 6); + Serial.print(" SAT="); + Serial.print(gps.satellites() == TinyGPS::GPS_INVALID_SATELLITES ? 0 : gps.satellites()); + Serial.print(" PREC="); + Serial.print(gps.hdop() == TinyGPS::GPS_INVALID_HDOP ? 0 : gps.hdop()); + } + + gps.stats(&chars, &sentences, &failed); + Serial.print(" CHARS="); + Serial.print(chars); + Serial.print(" SENTENCES="); + Serial.print(sentences); + Serial.print(" CSUM ERR="); + Serial.println(failed); + if (chars == 0) + Serial.println(" No characters received from GPS: check wiring "); + delay(1000); +} diff --git a/libraries/RUI_V3_examples/examples/Example/System_Powersave/System_Powersave.ino b/libraries/RUI_V3_examples/examples/Example/System_Powersave/System_Powersave.ino index dfcf9a48..d0f23f5a 100644 --- a/libraries/RUI_V3_examples/examples/Example/System_Powersave/System_Powersave.ino +++ b/libraries/RUI_V3_examples/examples/Example/System_Powersave/System_Powersave.ino @@ -2,15 +2,9 @@ * This example shows powersave function. ***/ -void WakeupCallback() -{ - Serial.printf("This is Wakeup Callback\r\n"); -} - void setup() { Serial.begin(115200); - delay(2000); Serial.println("RAKwireless System Powersave Example"); Serial.println("------------------------------------------------------"); @@ -21,11 +15,6 @@ void setup() #warning Please set the right pin refer to the documentation api.system.sleep.setup(RUI_WAKEUP_FALLING_EDGE, 0xFF); #endif - - if ( api.system.sleep.registerWakeupCallback(WakeupCallback) == false ) - { - Serial.println("Create Wakeup Callback failed."); - } } void loop() diff --git a/libraries/RUI_V3_examples/examples/Example/System_Serial_Lock/System_Serial_Lock.ino b/libraries/RUI_V3_examples/examples/Example/System_Serial_Lock/System_Serial_Lock.ino index abcec9c5..9d0e6134 100644 --- a/libraries/RUI_V3_examples/examples/Example/System_Serial_Lock/System_Serial_Lock.ino +++ b/libraries/RUI_V3_examples/examples/Example/System_Serial_Lock/System_Serial_Lock.ino @@ -8,8 +8,7 @@ bool locked; void setup() { Serial.begin(115200, RAK_AT_MODE); - /* Wait 2s for USB to be plugged in, or the log messages will be gone */ - delay(2000); + /* Wait 5s for USB to be plugged in, or the log messages will be gone */ Serial.println("RAKwireless System Serial Lock Example"); Serial.println("------------------------------------------------------"); diff --git a/libraries/RUI_V3_examples/examples/Example/System_Timer/System_Timer.ino b/libraries/RUI_V3_examples/examples/Example/System_Timer/System_Timer.ino index 62587f13..5fe0ec55 100644 --- a/libraries/RUI_V3_examples/examples/Example/System_Timer/System_Timer.ino +++ b/libraries/RUI_V3_examples/examples/Example/System_Timer/System_Timer.ino @@ -12,7 +12,6 @@ void handler(void *data) void setup() { Serial.begin(115200); - delay(2000); Serial.println("RAKwireless System Timer Example"); Serial.println("------------------------------------------------------"); diff --git a/libraries/RUI_V3_examples/library.properties b/libraries/RUI_V3_examples/library.properties index aa6f4e1c..60da84fc 100644 --- a/libraries/RUI_V3_examples/library.properties +++ b/libraries/RUI_V3_examples/library.properties @@ -6,4 +6,4 @@ paragraph= category=Communication url= architectures=* -version=1.2.3 +version=1.2.1 diff --git a/platform.txt b/platform.txt index 6eb1bdbc..90530f67 100644 --- a/platform.txt +++ b/platform.txt @@ -37,7 +37,7 @@ compiler.c.flags=-mcpu={build.mcu} -mthumb -c -g {compiler.warning_flags} {build compiler.c.elf.cmd=arm-none-eabi-gcc compiler.c.elf.flags={compiler.optimization_flag} -Wl,--gc-sections -save-temps compiler.S.cmd=arm-none-eabi-gcc -compiler.S.flags=-c -g -x assembler-with-cpp {compiler.warning_flags} +compiler.S.flags=-c -g -x assembler-with-cpp compiler.cpp.cmd=arm-none-eabi-g++ compiler.cpp.flags=-mcpu={build.mcu} -mthumb -c -g {compiler.warning_flags} {build.float_flags} -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -MMD compiler.ar.cmd=arm-none-eabi-ar @@ -163,4 +163,4 @@ tools.bootburn.erase.params.verbose= tools.bootburn.erase.params.quiet= tools.bootburn.erase.pattern= -version=4.0.6 +version=4.0.2 diff --git a/system/WisCore_RAK3401_Board/libboot.a b/system/WisCore_RAK3401_Board/libboot.a index b0286410..43d5a3bb 100644 Binary files a/system/WisCore_RAK3401_Board/libboot.a and b/system/WisCore_RAK3401_Board/libboot.a differ diff --git a/system/WisCore_RAK3401_Board/librui_v3_api.a b/system/WisCore_RAK3401_Board/librui_v3_api.a index 03dc8582..62deb160 100644 Binary files a/system/WisCore_RAK3401_Board/librui_v3_api.a and b/system/WisCore_RAK3401_Board/librui_v3_api.a differ diff --git a/system/WisCore_RAK3401_Board/libudrv_adc.a b/system/WisCore_RAK3401_Board/libudrv_adc.a index 11ac817d..fa591b3a 100644 Binary files a/system/WisCore_RAK3401_Board/libudrv_adc.a and b/system/WisCore_RAK3401_Board/libudrv_adc.a differ diff --git a/system/WisCore_RAK3401_Board/libudrv_ble.a b/system/WisCore_RAK3401_Board/libudrv_ble.a index 1a70ce52..0e855de3 100644 Binary files a/system/WisCore_RAK3401_Board/libudrv_ble.a and b/system/WisCore_RAK3401_Board/libudrv_ble.a differ diff --git a/system/WisCore_RAK3401_Board/libudrv_delay.a b/system/WisCore_RAK3401_Board/libudrv_delay.a index c2c90a98..520943c4 100644 Binary files a/system/WisCore_RAK3401_Board/libudrv_delay.a and b/system/WisCore_RAK3401_Board/libudrv_delay.a differ diff --git a/system/WisCore_RAK3401_Board/libudrv_dfu.a b/system/WisCore_RAK3401_Board/libudrv_dfu.a index ed436628..e52f4427 100644 Binary files a/system/WisCore_RAK3401_Board/libudrv_dfu.a and b/system/WisCore_RAK3401_Board/libudrv_dfu.a differ diff --git a/system/WisCore_RAK3401_Board/libudrv_flash.a b/system/WisCore_RAK3401_Board/libudrv_flash.a index 812df42f..5fed2859 100644 Binary files a/system/WisCore_RAK3401_Board/libudrv_flash.a and b/system/WisCore_RAK3401_Board/libudrv_flash.a differ diff --git a/system/WisCore_RAK3401_Board/libudrv_gpio.a b/system/WisCore_RAK3401_Board/libudrv_gpio.a index 4af4be65..beb27431 100644 Binary files a/system/WisCore_RAK3401_Board/libudrv_gpio.a and b/system/WisCore_RAK3401_Board/libudrv_gpio.a differ diff --git a/system/WisCore_RAK3401_Board/libudrv_pdm.a b/system/WisCore_RAK3401_Board/libudrv_pdm.a index 5a6c2cb9..d771747c 100644 Binary files a/system/WisCore_RAK3401_Board/libudrv_pdm.a and b/system/WisCore_RAK3401_Board/libudrv_pdm.a differ diff --git a/system/WisCore_RAK3401_Board/libudrv_powersave.a b/system/WisCore_RAK3401_Board/libudrv_powersave.a index 26921162..f918c5b1 100644 Binary files a/system/WisCore_RAK3401_Board/libudrv_powersave.a and b/system/WisCore_RAK3401_Board/libudrv_powersave.a differ diff --git a/system/WisCore_RAK3401_Board/libudrv_pwm.a b/system/WisCore_RAK3401_Board/libudrv_pwm.a index b3b9fa37..392fa213 100644 Binary files a/system/WisCore_RAK3401_Board/libudrv_pwm.a and b/system/WisCore_RAK3401_Board/libudrv_pwm.a differ diff --git a/system/WisCore_RAK3401_Board/libudrv_raknfc.a b/system/WisCore_RAK3401_Board/libudrv_raknfc.a index 71d7458b..077cb137 100644 Binary files a/system/WisCore_RAK3401_Board/libudrv_raknfc.a and b/system/WisCore_RAK3401_Board/libudrv_raknfc.a differ diff --git a/system/WisCore_RAK3401_Board/libudrv_rtc.a b/system/WisCore_RAK3401_Board/libudrv_rtc.a index 7b501ed6..e558ff4d 100644 Binary files a/system/WisCore_RAK3401_Board/libudrv_rtc.a and b/system/WisCore_RAK3401_Board/libudrv_rtc.a differ diff --git a/system/WisCore_RAK3401_Board/libudrv_serial.a b/system/WisCore_RAK3401_Board/libudrv_serial.a index 10f84aea..efa227fe 100644 Binary files a/system/WisCore_RAK3401_Board/libudrv_serial.a and b/system/WisCore_RAK3401_Board/libudrv_serial.a differ diff --git a/system/WisCore_RAK3401_Board/libudrv_spimst.a b/system/WisCore_RAK3401_Board/libudrv_spimst.a index 571d51ac..a0815287 100644 Binary files a/system/WisCore_RAK3401_Board/libudrv_spimst.a and b/system/WisCore_RAK3401_Board/libudrv_spimst.a differ diff --git a/system/WisCore_RAK3401_Board/libudrv_system.a b/system/WisCore_RAK3401_Board/libudrv_system.a index bde17dd2..f770a317 100644 Binary files a/system/WisCore_RAK3401_Board/libudrv_system.a and b/system/WisCore_RAK3401_Board/libudrv_system.a differ diff --git a/system/WisCore_RAK3401_Board/libudrv_timer.a b/system/WisCore_RAK3401_Board/libudrv_timer.a index b51e6d4e..44465bee 100644 Binary files a/system/WisCore_RAK3401_Board/libudrv_timer.a and b/system/WisCore_RAK3401_Board/libudrv_timer.a differ diff --git a/system/WisCore_RAK3401_Board/libudrv_twimst.a b/system/WisCore_RAK3401_Board/libudrv_twimst.a index 6c1c0f5e..98576db0 100644 Binary files a/system/WisCore_RAK3401_Board/libudrv_twimst.a and b/system/WisCore_RAK3401_Board/libudrv_twimst.a differ diff --git a/system/WisCore_RAK3401_Board/libudrv_wdt.a b/system/WisCore_RAK3401_Board/libudrv_wdt.a index d37109b5..2237573e 100644 Binary files a/system/WisCore_RAK3401_Board/libudrv_wdt.a and b/system/WisCore_RAK3401_Board/libudrv_wdt.a differ diff --git a/system/WisCore_RAK3401_Board/libuhal.a b/system/WisCore_RAK3401_Board/libuhal.a index eca7de3e..784f5ad3 100644 Binary files a/system/WisCore_RAK3401_Board/libuhal.a and b/system/WisCore_RAK3401_Board/libuhal.a differ diff --git a/system/WisCore_RAK4631_Board/libboot.a b/system/WisCore_RAK4631_Board/libboot.a index 02b3093d..0cda474d 100644 Binary files a/system/WisCore_RAK4631_Board/libboot.a and b/system/WisCore_RAK4631_Board/libboot.a differ diff --git a/system/WisCore_RAK4631_Board/librui_v3_api.a b/system/WisCore_RAK4631_Board/librui_v3_api.a index a64dac71..50a14527 100644 Binary files a/system/WisCore_RAK4631_Board/librui_v3_api.a and b/system/WisCore_RAK4631_Board/librui_v3_api.a differ diff --git a/system/WisCore_RAK4631_Board/libudrv_adc.a b/system/WisCore_RAK4631_Board/libudrv_adc.a index a82bffb7..b70de583 100644 Binary files a/system/WisCore_RAK4631_Board/libudrv_adc.a and b/system/WisCore_RAK4631_Board/libudrv_adc.a differ diff --git a/system/WisCore_RAK4631_Board/libudrv_ble.a b/system/WisCore_RAK4631_Board/libudrv_ble.a index 608953ce..fe674329 100644 Binary files a/system/WisCore_RAK4631_Board/libudrv_ble.a and b/system/WisCore_RAK4631_Board/libudrv_ble.a differ diff --git a/system/WisCore_RAK4631_Board/libudrv_delay.a b/system/WisCore_RAK4631_Board/libudrv_delay.a index ab6f1a85..6c7389d2 100644 Binary files a/system/WisCore_RAK4631_Board/libudrv_delay.a and b/system/WisCore_RAK4631_Board/libudrv_delay.a differ diff --git a/system/WisCore_RAK4631_Board/libudrv_dfu.a b/system/WisCore_RAK4631_Board/libudrv_dfu.a index f6c78b98..e733e056 100644 Binary files a/system/WisCore_RAK4631_Board/libudrv_dfu.a and b/system/WisCore_RAK4631_Board/libudrv_dfu.a differ diff --git a/system/WisCore_RAK4631_Board/libudrv_flash.a b/system/WisCore_RAK4631_Board/libudrv_flash.a index 4fb5109d..18c85cab 100644 Binary files a/system/WisCore_RAK4631_Board/libudrv_flash.a and b/system/WisCore_RAK4631_Board/libudrv_flash.a differ diff --git a/system/WisCore_RAK4631_Board/libudrv_gpio.a b/system/WisCore_RAK4631_Board/libudrv_gpio.a index 11d0ab4c..e07127b8 100644 Binary files a/system/WisCore_RAK4631_Board/libudrv_gpio.a and b/system/WisCore_RAK4631_Board/libudrv_gpio.a differ diff --git a/system/WisCore_RAK4631_Board/libudrv_pdm.a b/system/WisCore_RAK4631_Board/libudrv_pdm.a index 62c0867a..217e7783 100644 Binary files a/system/WisCore_RAK4631_Board/libudrv_pdm.a and b/system/WisCore_RAK4631_Board/libudrv_pdm.a differ diff --git a/system/WisCore_RAK4631_Board/libudrv_powersave.a b/system/WisCore_RAK4631_Board/libudrv_powersave.a index e6d55540..fe73b37d 100644 Binary files a/system/WisCore_RAK4631_Board/libudrv_powersave.a and b/system/WisCore_RAK4631_Board/libudrv_powersave.a differ diff --git a/system/WisCore_RAK4631_Board/libudrv_pwm.a b/system/WisCore_RAK4631_Board/libudrv_pwm.a index a7ec100b..bc7cf630 100644 Binary files a/system/WisCore_RAK4631_Board/libudrv_pwm.a and b/system/WisCore_RAK4631_Board/libudrv_pwm.a differ diff --git a/system/WisCore_RAK4631_Board/libudrv_raknfc.a b/system/WisCore_RAK4631_Board/libudrv_raknfc.a index 2a2273af..da053506 100644 Binary files a/system/WisCore_RAK4631_Board/libudrv_raknfc.a and b/system/WisCore_RAK4631_Board/libudrv_raknfc.a differ diff --git a/system/WisCore_RAK4631_Board/libudrv_rtc.a b/system/WisCore_RAK4631_Board/libudrv_rtc.a index 752cef52..4d10767f 100644 Binary files a/system/WisCore_RAK4631_Board/libudrv_rtc.a and b/system/WisCore_RAK4631_Board/libudrv_rtc.a differ diff --git a/system/WisCore_RAK4631_Board/libudrv_serial.a b/system/WisCore_RAK4631_Board/libudrv_serial.a index c7cf6ba8..f4906566 100644 Binary files a/system/WisCore_RAK4631_Board/libudrv_serial.a and b/system/WisCore_RAK4631_Board/libudrv_serial.a differ diff --git a/system/WisCore_RAK4631_Board/libudrv_spimst.a b/system/WisCore_RAK4631_Board/libudrv_spimst.a index 5e8a17f7..dc3370df 100644 Binary files a/system/WisCore_RAK4631_Board/libudrv_spimst.a and b/system/WisCore_RAK4631_Board/libudrv_spimst.a differ diff --git a/system/WisCore_RAK4631_Board/libudrv_system.a b/system/WisCore_RAK4631_Board/libudrv_system.a index 14be5760..e2646168 100644 Binary files a/system/WisCore_RAK4631_Board/libudrv_system.a and b/system/WisCore_RAK4631_Board/libudrv_system.a differ diff --git a/system/WisCore_RAK4631_Board/libudrv_timer.a b/system/WisCore_RAK4631_Board/libudrv_timer.a index baec1a59..9d544bb7 100644 Binary files a/system/WisCore_RAK4631_Board/libudrv_timer.a and b/system/WisCore_RAK4631_Board/libudrv_timer.a differ diff --git a/system/WisCore_RAK4631_Board/libudrv_twimst.a b/system/WisCore_RAK4631_Board/libudrv_twimst.a index db05791d..3c948da5 100644 Binary files a/system/WisCore_RAK4631_Board/libudrv_twimst.a and b/system/WisCore_RAK4631_Board/libudrv_twimst.a differ diff --git a/system/WisCore_RAK4631_Board/libudrv_wdt.a b/system/WisCore_RAK4631_Board/libudrv_wdt.a index 8ec25f4d..402d5e0c 100644 Binary files a/system/WisCore_RAK4631_Board/libudrv_wdt.a and b/system/WisCore_RAK4631_Board/libudrv_wdt.a differ diff --git a/system/WisCore_RAK4631_Board/libuhal.a b/system/WisCore_RAK4631_Board/libuhal.a index cf5c8181..df30a70f 100644 Binary files a/system/WisCore_RAK4631_Board/libuhal.a and b/system/WisCore_RAK4631_Board/libuhal.a differ diff --git a/system/WisTrio_RAK5010_Board/libboot.a b/system/WisTrio_RAK5010_Board/libboot.a index 600987ac..40087253 100644 Binary files a/system/WisTrio_RAK5010_Board/libboot.a and b/system/WisTrio_RAK5010_Board/libboot.a differ diff --git a/system/WisTrio_RAK5010_Board/librui_v3_api.a b/system/WisTrio_RAK5010_Board/librui_v3_api.a index 7a48d345..6069d9c6 100644 Binary files a/system/WisTrio_RAK5010_Board/librui_v3_api.a and b/system/WisTrio_RAK5010_Board/librui_v3_api.a differ diff --git a/system/WisTrio_RAK5010_Board/libudrv_adc.a b/system/WisTrio_RAK5010_Board/libudrv_adc.a index 3e71a0ae..942a55c8 100644 Binary files a/system/WisTrio_RAK5010_Board/libudrv_adc.a and b/system/WisTrio_RAK5010_Board/libudrv_adc.a differ diff --git a/system/WisTrio_RAK5010_Board/libudrv_ble.a b/system/WisTrio_RAK5010_Board/libudrv_ble.a index c05d5a09..65369469 100644 Binary files a/system/WisTrio_RAK5010_Board/libudrv_ble.a and b/system/WisTrio_RAK5010_Board/libudrv_ble.a differ diff --git a/system/WisTrio_RAK5010_Board/libudrv_delay.a b/system/WisTrio_RAK5010_Board/libudrv_delay.a index 433b1cb0..9d77f9af 100644 Binary files a/system/WisTrio_RAK5010_Board/libudrv_delay.a and b/system/WisTrio_RAK5010_Board/libudrv_delay.a differ diff --git a/system/WisTrio_RAK5010_Board/libudrv_dfu.a b/system/WisTrio_RAK5010_Board/libudrv_dfu.a index 68d608bd..8a6c9dd5 100644 Binary files a/system/WisTrio_RAK5010_Board/libudrv_dfu.a and b/system/WisTrio_RAK5010_Board/libudrv_dfu.a differ diff --git a/system/WisTrio_RAK5010_Board/libudrv_flash.a b/system/WisTrio_RAK5010_Board/libudrv_flash.a index 6c64ee45..2c1b88a1 100644 Binary files a/system/WisTrio_RAK5010_Board/libudrv_flash.a and b/system/WisTrio_RAK5010_Board/libudrv_flash.a differ diff --git a/system/WisTrio_RAK5010_Board/libudrv_gpio.a b/system/WisTrio_RAK5010_Board/libudrv_gpio.a index 05140ebe..9e48aeb4 100644 Binary files a/system/WisTrio_RAK5010_Board/libudrv_gpio.a and b/system/WisTrio_RAK5010_Board/libudrv_gpio.a differ diff --git a/system/WisTrio_RAK5010_Board/libudrv_pdm.a b/system/WisTrio_RAK5010_Board/libudrv_pdm.a index ff69c5ea..c633f8ab 100644 Binary files a/system/WisTrio_RAK5010_Board/libudrv_pdm.a and b/system/WisTrio_RAK5010_Board/libudrv_pdm.a differ diff --git a/system/WisTrio_RAK5010_Board/libudrv_powersave.a b/system/WisTrio_RAK5010_Board/libudrv_powersave.a index 0f1129bd..8fcdacfb 100644 Binary files a/system/WisTrio_RAK5010_Board/libudrv_powersave.a and b/system/WisTrio_RAK5010_Board/libudrv_powersave.a differ diff --git a/system/WisTrio_RAK5010_Board/libudrv_pwm.a b/system/WisTrio_RAK5010_Board/libudrv_pwm.a index 58098706..e7fd3a27 100644 Binary files a/system/WisTrio_RAK5010_Board/libudrv_pwm.a and b/system/WisTrio_RAK5010_Board/libudrv_pwm.a differ diff --git a/system/WisTrio_RAK5010_Board/libudrv_rtc.a b/system/WisTrio_RAK5010_Board/libudrv_rtc.a index beef4f7f..b883bd7e 100644 Binary files a/system/WisTrio_RAK5010_Board/libudrv_rtc.a and b/system/WisTrio_RAK5010_Board/libudrv_rtc.a differ diff --git a/system/WisTrio_RAK5010_Board/libudrv_serial.a b/system/WisTrio_RAK5010_Board/libudrv_serial.a index 7961adff..ef64db4c 100644 Binary files a/system/WisTrio_RAK5010_Board/libudrv_serial.a and b/system/WisTrio_RAK5010_Board/libudrv_serial.a differ diff --git a/system/WisTrio_RAK5010_Board/libudrv_system.a b/system/WisTrio_RAK5010_Board/libudrv_system.a index 5699b6c3..7a9ec179 100644 Binary files a/system/WisTrio_RAK5010_Board/libudrv_system.a and b/system/WisTrio_RAK5010_Board/libudrv_system.a differ diff --git a/system/WisTrio_RAK5010_Board/libudrv_timer.a b/system/WisTrio_RAK5010_Board/libudrv_timer.a index fc245698..59604c9c 100644 Binary files a/system/WisTrio_RAK5010_Board/libudrv_timer.a and b/system/WisTrio_RAK5010_Board/libudrv_timer.a differ diff --git a/system/WisTrio_RAK5010_Board/libudrv_twimst.a b/system/WisTrio_RAK5010_Board/libudrv_twimst.a index c1e5c9cf..1161b361 100644 Binary files a/system/WisTrio_RAK5010_Board/libudrv_twimst.a and b/system/WisTrio_RAK5010_Board/libudrv_twimst.a differ diff --git a/system/WisTrio_RAK5010_Board/libudrv_wdt.a b/system/WisTrio_RAK5010_Board/libudrv_wdt.a index 60a4f6c6..32442e4f 100644 Binary files a/system/WisTrio_RAK5010_Board/libudrv_wdt.a and b/system/WisTrio_RAK5010_Board/libudrv_wdt.a differ diff --git a/system/WisTrio_RAK5010_Board/libuhal.a b/system/WisTrio_RAK5010_Board/libuhal.a index 6158a73e..877ee75c 100644 Binary files a/system/WisTrio_RAK5010_Board/libuhal.a and b/system/WisTrio_RAK5010_Board/libuhal.a differ diff --git a/variants/WisCore_RAK3401_Board/rui_inner_main.c b/variants/WisCore_RAK3401_Board/rui_inner_main.c index eed5cb15..14cb35a5 100755 --- a/variants/WisCore_RAK3401_Board/rui_inner_main.c +++ b/variants/WisCore_RAK3401_Board/rui_inner_main.c @@ -126,13 +126,11 @@ void rui_event_handler_func(void *data, uint16_t size) { /* escape now immediately */ switch (mode) { -#ifdef SUPPORT_BINARY case SERVICE_MODE_TYPE_PROTOCOL: { service_mode_proto_deinit(port); break; } -#endif default: { break; @@ -159,13 +157,11 @@ void rui_event_handler_func(void *data, uint16_t size) { } break; } -#ifdef SUPPORT_BINARY case SERVICE_MODE_TYPE_PROTOCOL: { service_mode_proto_recv(SERIAL_UART1, Buf[0]); break; } -#endif default: { break; @@ -188,13 +184,11 @@ void rui_event_handler_func(void *data, uint16_t size) { } break; } -#ifdef SUPPORT_BINARY case SERVICE_MODE_TYPE_PROTOCOL: { service_mode_proto_recv(SERIAL_UART0, Buf[0]); break; } -#endif default: { break; @@ -222,13 +216,11 @@ void rui_event_handler_func(void *data, uint16_t size) { } break; } -#ifdef SUPPORT_BINARY case SERVICE_MODE_TYPE_PROTOCOL: { service_mode_proto_recv(SERIAL_USB0, Buf[0]); break; } -#endif default: { break; @@ -257,13 +249,11 @@ void rui_event_handler_func(void *data, uint16_t size) { } break; } -#ifdef SUPPORT_BINARY case SERVICE_MODE_TYPE_PROTOCOL: { service_mode_proto_recv(SERIAL_BLE0, Buf[0]); break; } -#endif default: { break; @@ -374,13 +364,11 @@ void rui_init(void) service_mode_cli_init((SERIAL_PORT)i); } } -#ifdef SUPPORT_BINARY for (int i = 0 ; i < SERIAL_MAX ; i++) { if (service_nvm_get_mode_type_from_nvm((SERIAL_PORT)i) == SERVICE_MODE_TYPE_PROTOCOL) { service_mode_proto_init((SERIAL_PORT)i); } } -#endif #ifdef SUPPORT_WDT is_custom_wdt = false; diff --git a/variants/WisCore_RAK3401_Board/version.c b/variants/WisCore_RAK3401_Board/version.c index 24eab048..d538587e 100644 --- a/variants/WisCore_RAK3401_Board/version.c +++ b/variants/WisCore_RAK3401_Board/version.c @@ -1,11 +1,11 @@ -#define FW_REVISION "RUI_4.0.6_RAK3401" +#define FW_REVISION "RUI_4.0.2_RAK3401" #define MODEL_ID "rak3400" #define CHIP_ID "nrf52840" -#define BUILD_DATE "20230809" -#define BUILD_TIME "123548" -#define REPO_INFO "9dd1b862:4a56cd9e:7e366cab:98e243f2:4643f944:7e86595c:580d5b87:c6af41dc:c3bbaa2e:0c6afff1:6a3d6842:b9d39ab6:d5c6e88d:a29aaa6e:da54579d:d1e75214:1365fb0c:714946eb:7fc5c8db:d0dfa912" -#define CLI_REVISION "1.5.11" -#define API_REVISION "3.2.7" +#define BUILD_DATE "20230831" +#define BUILD_TIME "101425" +#define REPO_INFO "0a7f555f:53a181da:431cb7ef:40aa6db6:d74cbb50:45914d43:f43a68c0:8cb9ba74:c65bfb8d:6a3d6842:b9d39ab6:d5c6e88d:a29aaa6e:da54579d:d1e75214:1365fb0c:714946eb:602e71c7:c089af6d" +#define CLI_REVISION "1.5.9" +#define API_REVISION "3.2.4" const char *sw_version = {FW_REVISION}; const char *model_id = {MODEL_ID}; const char *chip_id = {CHIP_ID}; diff --git a/variants/WisCore_RAK4631_Board/rui_inner_main.c b/variants/WisCore_RAK4631_Board/rui_inner_main.c index 263df004..2370896f 100755 --- a/variants/WisCore_RAK4631_Board/rui_inner_main.c +++ b/variants/WisCore_RAK4631_Board/rui_inner_main.c @@ -142,13 +142,11 @@ void rui_event_handler_func(void *data, uint16_t size) { } #endif #endif -#ifdef SUPPORT_BINARY case SERVICE_MODE_TYPE_PROTOCOL: { service_mode_proto_deinit(port); break; } -#endif default: { break; @@ -184,13 +182,11 @@ void rui_event_handler_func(void *data, uint16_t size) { } #endif #endif -#ifdef SUPPORT_BINARY case SERVICE_MODE_TYPE_PROTOCOL: { service_mode_proto_recv(SERIAL_UART1, Buf[0]); break; } -#endif default: { break; @@ -222,13 +218,11 @@ void rui_event_handler_func(void *data, uint16_t size) { } #endif #endif -#ifdef SUPPORT_BINARY case SERVICE_MODE_TYPE_PROTOCOL: { service_mode_proto_recv(SERIAL_UART0, Buf[0]); break; } -#endif default: { break; @@ -265,13 +259,11 @@ void rui_event_handler_func(void *data, uint16_t size) { } #endif #endif -#ifdef SUPPORT_BINARY case SERVICE_MODE_TYPE_PROTOCOL: { service_mode_proto_recv(SERIAL_USB0, Buf[0]); break; } -#endif default: { break; @@ -309,13 +301,11 @@ void rui_event_handler_func(void *data, uint16_t size) { } #endif #endif -#ifdef SUPPORT_BINARY case SERVICE_MODE_TYPE_PROTOCOL: { service_mode_proto_recv(SERIAL_BLE0, Buf[0]); break; } -#endif default: { break; @@ -473,13 +463,11 @@ void rui_init(void) } #endif #endif -#ifdef SUPPORT_BINARY for (int i = 0 ; i < SERIAL_MAX ; i++) { if (service_nvm_get_mode_type_from_nvm((SERIAL_PORT)i) == SERVICE_MODE_TYPE_PROTOCOL) { service_mode_proto_init((SERIAL_PORT)i); } } -#endif #ifdef SUPPORT_WDT is_custom_wdt = false; @@ -535,9 +523,7 @@ void main(void) #ifndef SUPPORT_MULTITASK //user init -NRF_LOG_INFO("rui_setup"); rui_setup(); -NRF_LOG_INFO("rui_setup done"); #ifdef SUPPORT_WDT if(!is_custom_wdt) { udrv_wdt_init(UDRV_WDT_FEED_PERIOD); @@ -545,6 +531,7 @@ NRF_LOG_INFO("rui_setup done"); } #endif #endif + #ifdef TOGGLE_LED_PER_SEC udrv_gpio_set_dir(BLUE_LED, GPIO_DIR_OUT); if (udrv_system_timer_create(SYSTIMER_LED, OnTimerEvent, HTMR_PERIODIC) == UDRV_RETURN_OK) diff --git a/variants/WisCore_RAK4631_Board/version.c b/variants/WisCore_RAK4631_Board/version.c index c92f6e78..8ce8d2ca 100644 --- a/variants/WisCore_RAK4631_Board/version.c +++ b/variants/WisCore_RAK4631_Board/version.c @@ -1,11 +1,11 @@ -#define FW_REVISION "RUI_4.0.6_RAK4631" +#define FW_REVISION "RUI_4.0.2_RAK4631" #define MODEL_ID "rak4630" #define CHIP_ID "nrf52840" -#define BUILD_DATE "20230809" -#define BUILD_TIME "123805" -#define REPO_INFO "9dd1b862:4a56cd9e:7e366cab:98e243f2:4643f944:7e86595c:580d5b87:c6af41dc:c3bbaa2e:0c6afff1:6a3d6842:b9d39ab6:d5c6e88d:a29aaa6e:da54579d:d1e75214:1365fb0c:714946eb:7fc5c8db:d0dfa912" -#define CLI_REVISION "1.5.11" -#define API_REVISION "3.2.7" +#define BUILD_DATE "20230831" +#define BUILD_TIME "101653" +#define REPO_INFO "0a7f555f:53a181da:431cb7ef:40aa6db6:d74cbb50:45914d43:f43a68c0:8cb9ba74:c65bfb8d:6a3d6842:b9d39ab6:d5c6e88d:a29aaa6e:da54579d:d1e75214:1365fb0c:714946eb:602e71c7:c089af6d" +#define CLI_REVISION "1.5.9" +#define API_REVISION "3.2.4" const char *sw_version = {FW_REVISION}; const char *model_id = {MODEL_ID}; const char *chip_id = {CHIP_ID}; diff --git a/variants/WisTrio_RAK5010_Board/rui_inner_main.c b/variants/WisTrio_RAK5010_Board/rui_inner_main.c index e7f49cfe..2e2fd1e8 100644 --- a/variants/WisTrio_RAK5010_Board/rui_inner_main.c +++ b/variants/WisTrio_RAK5010_Board/rui_inner_main.c @@ -148,13 +148,11 @@ void rui_event_handler_func(void *data, uint16_t size) { } #endif #endif -#ifdef SUPPORT_BINARY case SERVICE_MODE_TYPE_PROTOCOL: { service_mode_proto_deinit(port); break; } -#endif default: { break; @@ -212,13 +210,11 @@ void rui_event_handler_func(void *data, uint16_t size) { } #endif #endif -#ifdef SUPPORT_BINARY case SERVICE_MODE_TYPE_PROTOCOL: { service_mode_proto_recv(SERIAL_UART1, Buf[0]); break; } -#endif default: { break; @@ -295,13 +291,11 @@ void rui_event_handler_func(void *data, uint16_t size) { } #endif #endif -#ifdef SUPPORT_BINARY case SERVICE_MODE_TYPE_PROTOCOL: { service_mode_proto_recv(SERIAL_UART0, Buf[0]); break; } -#endif default: { break; @@ -349,13 +343,11 @@ void rui_event_handler_func(void *data, uint16_t size) { } #endif #endif -#ifdef SUPPORT_BINARY case SERVICE_MODE_TYPE_PROTOCOL: { service_mode_proto_recv(SERIAL_USB0, Buf[0]); break; } -#endif default: { break; @@ -393,13 +385,11 @@ void rui_event_handler_func(void *data, uint16_t size) { } #endif #endif -#ifdef SUPPORT_BINARY case SERVICE_MODE_TYPE_PROTOCOL: { service_mode_proto_recv(SERIAL_BLE0, Buf[0]); break; } -#endif default: { break; @@ -564,13 +554,11 @@ void rui_init(void) } #endif #endif -#ifdef SUPPORT_BINARY for (int i = 0 ; i < SERIAL_MAX ; i++) { if (service_nvm_get_mode_type_from_nvm((SERIAL_PORT)i) == SERVICE_MODE_TYPE_PROTOCOL) { service_mode_proto_init((SERIAL_PORT)i); } } -#endif #ifdef SUPPORT_WDT is_custom_wdt = false; diff --git a/variants/WisTrio_RAK5010_Board/version.c b/variants/WisTrio_RAK5010_Board/version.c index 576ff82b..7b26cd4c 100644 --- a/variants/WisTrio_RAK5010_Board/version.c +++ b/variants/WisTrio_RAK5010_Board/version.c @@ -1,11 +1,11 @@ -#define FW_REVISION "RUI_4.0.6_RAK5010" +#define FW_REVISION "RUI_4.0.2_RAK5010" #define MODEL_ID "rak5010" #define CHIP_ID "nrf52840" -#define BUILD_DATE "20230809" -#define BUILD_TIME "123331" -#define REPO_INFO "9dd1b862:4a56cd9e:7e366cab:98e243f2:4643f944:7e86595c:580d5b87:c6af41dc:c3bbaa2e:0c6afff1:6a3d6842:b9d39ab6:d5c6e88d:a29aaa6e:da54579d:d1e75214:1365fb0c:714946eb:7fc5c8db:d0dfa912" -#define CLI_REVISION "1.5.11" -#define API_REVISION "3.2.7" +#define BUILD_DATE "20230831" +#define BUILD_TIME "101153" +#define REPO_INFO "0a7f555f:53a181da:431cb7ef:40aa6db6:d74cbb50:45914d43:f43a68c0:8cb9ba74:c65bfb8d:6a3d6842:b9d39ab6:d5c6e88d:a29aaa6e:da54579d:d1e75214:1365fb0c:714946eb:602e71c7:c089af6d" +#define CLI_REVISION "1.5.9" +#define API_REVISION "3.2.4" const char *sw_version = {FW_REVISION}; const char *model_id = {MODEL_ID}; const char *chip_id = {CHIP_ID};