From d03c27fa850d2955523c5720fa57149d6dde8e79 Mon Sep 17 00:00:00 2001 From: Jaeden Amero Date: Tue, 6 Jul 2021 14:24:50 +0100 Subject: [PATCH] icetea: Remove icetea TEST_APPS icetea was intended to be deprecated in Mbed 6. icetea is no longer maintained. Remove icetea-specific TEST_APPS from Mbed OS. --- TEST_APPS/__init__.py | 16 - TEST_APPS/device/exampleapp/main.cpp | 68 - .../device/nanostack_mac_tester/README.md | 88 - .../device/nanostack_mac_tester/main.cpp | 156 -- .../device/nanostack_mac_tester/mbed_app.json | 16 - .../source/mac_commands.cpp | 1654 ----------------- .../source/mac_commands.h | 65 - .../source/mac_tester_util.cpp | 124 -- .../source/mac_tester_util.h | 30 - TEST_APPS/device/nfcapp/NFCCommands.cpp | 289 --- TEST_APPS/device/nfcapp/NFCCommands.h | 112 -- TEST_APPS/device/nfcapp/NFCProcessCtrl.cpp | 207 --- TEST_APPS/device/nfcapp/NFCProcessCtrl.h | 88 - TEST_APPS/device/nfcapp/NFCProcessEEPROM.cpp | 146 -- TEST_APPS/device/nfcapp/NFCProcessEEPROM.h | 62 - TEST_APPS/device/nfcapp/NFCTestShim.cpp | 408 ---- TEST_APPS/device/nfcapp/NFCTestShim.h | 111 -- TEST_APPS/device/nfcapp/SmartPoster.cpp | 247 --- TEST_APPS/device/nfcapp/SmartPoster.h | 138 -- TEST_APPS/device/nfcapp/main.cpp | 157 -- TEST_APPS/device/nfcapp/mbed_app.json | 28 - TEST_APPS/device/nfcapp/uart.cpp | 46 - TEST_APPS/icetea_plugins/__init__.py | 16 - TEST_APPS/icetea_plugins/ip_test_parsers.py | 159 -- TEST_APPS/icetea_plugins/nfc_test_parsers.py | 139 -- TEST_APPS/icetea_plugins/plugins_to_load.py | 24 - TEST_APPS/readme.md | 101 - TEST_APPS/testcases/README.md | 14 - TEST_APPS/testcases/__init__.py | 16 - TEST_APPS/testcases/example/README.md | 22 - TEST_APPS/testcases/example/__init__.py | 16 - TEST_APPS/testcases/example/test_cmdline.py | 52 - .../testcases/nanostack_mac_tester/ED_scan.py | 139 -- .../testcases/nanostack_mac_tester/README.md | 298 --- .../nanostack_mac_tester/__init__.py | 17 - .../address_read_and_write.py | 82 - .../create_and_join_PAN.py | 107 -- .../nanostack_mac_tester/send_data.py | 89 - .../send_data_indirect.py | 134 -- .../send_large_payloads.py | 107 -- .../testcases/nanostack_mac_tester/template | 65 - TEST_APPS/testcases/nfc/README.md | 336 ---- TEST_APPS/testcases/nfc/__init__.py | 16 - .../testcases/nfc/img/creamscone-mobile.png | Bin 35996 -> 0 bytes TEST_APPS/testcases/nfc/img/inter-op-view.png | Bin 28534 -> 0 bytes .../testcases/nfc/img/simple-overview.png | Bin 38235 -> 0 bytes TEST_APPS/testcases/nfc/mobileapi.md | 94 - TEST_APPS/testcases/nfc/nfc_clf_wrapper.py | 98 - TEST_APPS/testcases/nfc/nfc_cli_helper.py | 80 - TEST_APPS/testcases/nfc/nfc_messages.py | 89 - TEST_APPS/testcases/nfc/test_nfc.py | 259 --- TEST_APPS/testcases/nfc/test_self.py | 256 --- 52 files changed, 7081 deletions(-) delete mode 100644 TEST_APPS/__init__.py delete mode 100644 TEST_APPS/device/exampleapp/main.cpp delete mode 100644 TEST_APPS/device/nanostack_mac_tester/README.md delete mode 100644 TEST_APPS/device/nanostack_mac_tester/main.cpp delete mode 100644 TEST_APPS/device/nanostack_mac_tester/mbed_app.json delete mode 100644 TEST_APPS/device/nanostack_mac_tester/source/mac_commands.cpp delete mode 100644 TEST_APPS/device/nanostack_mac_tester/source/mac_commands.h delete mode 100644 TEST_APPS/device/nanostack_mac_tester/source/mac_tester_util.cpp delete mode 100644 TEST_APPS/device/nanostack_mac_tester/source/mac_tester_util.h delete mode 100644 TEST_APPS/device/nfcapp/NFCCommands.cpp delete mode 100644 TEST_APPS/device/nfcapp/NFCCommands.h delete mode 100644 TEST_APPS/device/nfcapp/NFCProcessCtrl.cpp delete mode 100644 TEST_APPS/device/nfcapp/NFCProcessCtrl.h delete mode 100644 TEST_APPS/device/nfcapp/NFCProcessEEPROM.cpp delete mode 100644 TEST_APPS/device/nfcapp/NFCProcessEEPROM.h delete mode 100644 TEST_APPS/device/nfcapp/NFCTestShim.cpp delete mode 100644 TEST_APPS/device/nfcapp/NFCTestShim.h delete mode 100644 TEST_APPS/device/nfcapp/SmartPoster.cpp delete mode 100644 TEST_APPS/device/nfcapp/SmartPoster.h delete mode 100644 TEST_APPS/device/nfcapp/main.cpp delete mode 100644 TEST_APPS/device/nfcapp/mbed_app.json delete mode 100644 TEST_APPS/device/nfcapp/uart.cpp delete mode 100644 TEST_APPS/icetea_plugins/__init__.py delete mode 100644 TEST_APPS/icetea_plugins/ip_test_parsers.py delete mode 100644 TEST_APPS/icetea_plugins/nfc_test_parsers.py delete mode 100644 TEST_APPS/icetea_plugins/plugins_to_load.py delete mode 100644 TEST_APPS/readme.md delete mode 100644 TEST_APPS/testcases/README.md delete mode 100644 TEST_APPS/testcases/__init__.py delete mode 100644 TEST_APPS/testcases/example/README.md delete mode 100644 TEST_APPS/testcases/example/__init__.py delete mode 100644 TEST_APPS/testcases/example/test_cmdline.py delete mode 100644 TEST_APPS/testcases/nanostack_mac_tester/ED_scan.py delete mode 100644 TEST_APPS/testcases/nanostack_mac_tester/README.md delete mode 100644 TEST_APPS/testcases/nanostack_mac_tester/__init__.py delete mode 100644 TEST_APPS/testcases/nanostack_mac_tester/address_read_and_write.py delete mode 100644 TEST_APPS/testcases/nanostack_mac_tester/create_and_join_PAN.py delete mode 100644 TEST_APPS/testcases/nanostack_mac_tester/send_data.py delete mode 100644 TEST_APPS/testcases/nanostack_mac_tester/send_data_indirect.py delete mode 100644 TEST_APPS/testcases/nanostack_mac_tester/send_large_payloads.py delete mode 100644 TEST_APPS/testcases/nanostack_mac_tester/template delete mode 100644 TEST_APPS/testcases/nfc/README.md delete mode 100644 TEST_APPS/testcases/nfc/__init__.py delete mode 100644 TEST_APPS/testcases/nfc/img/creamscone-mobile.png delete mode 100644 TEST_APPS/testcases/nfc/img/inter-op-view.png delete mode 100644 TEST_APPS/testcases/nfc/img/simple-overview.png delete mode 100644 TEST_APPS/testcases/nfc/mobileapi.md delete mode 100644 TEST_APPS/testcases/nfc/nfc_clf_wrapper.py delete mode 100644 TEST_APPS/testcases/nfc/nfc_cli_helper.py delete mode 100644 TEST_APPS/testcases/nfc/nfc_messages.py delete mode 100644 TEST_APPS/testcases/nfc/test_nfc.py delete mode 100644 TEST_APPS/testcases/nfc/test_self.py diff --git a/TEST_APPS/__init__.py b/TEST_APPS/__init__.py deleted file mode 100644 index 11867b5685ac..000000000000 --- a/TEST_APPS/__init__.py +++ /dev/null @@ -1,16 +0,0 @@ -""" -Copyright (c) 2020 ARM Limited -SPDX-License-Identifier: Apache-2.0 - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -""" diff --git a/TEST_APPS/device/exampleapp/main.cpp b/TEST_APPS/device/exampleapp/main.cpp deleted file mode 100644 index 99987036cd5c..000000000000 --- a/TEST_APPS/device/exampleapp/main.cpp +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright (c) 2018 ARM Limited. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * Licensed under the Apache License, Version 2.0 (the License); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an AS IS BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#include -#include -#include "mbed.h" -#include "mbed-client-cli/ns_cmdline.h" - -#ifndef ICETEA_EXAMPLE_ENABLED -#error [NOT_SUPPORTED] Skipping example application. -#endif -/** - * Macros for setting console flow control. - */ -#define CONSOLE_FLOWCONTROL_RTS 1 -#define CONSOLE_FLOWCONTROL_CTS 2 -#define CONSOLE_FLOWCONTROL_RTSCTS 3 -#define mbed_console_concat_(x) CONSOLE_FLOWCONTROL_##x -#define mbed_console_concat(x) mbed_console_concat_(x) -#define CONSOLE_FLOWCONTROL mbed_console_concat(MBED_CONF_TARGET_CONSOLE_UART_FLOW_CONTROL) - -#define SERIAL_CONSOLE_BAUD_RATE 115200 - -void cmd_ready_cb(int retcode) -{ - cmd_next(retcode); -} - -void wrap_printf(const char *f, va_list a) -{ - vprintf(f, a); -} - -int main() -{ - cmd_init(&wrap_printf); - - int c; - while ((c = getchar()) != EOF) { - cmd_char_input(c); - } - return 0; -} - -FileHandle *mbed::mbed_override_console(int) -{ - static BufferedSerial console(STDIO_UART_TX, STDIO_UART_RX, SERIAL_CONSOLE_BAUD_RATE); -#if CONSOLE_FLOWCONTROL == CONSOLE_FLOWCONTROL_RTS - console.set_flow_control(SerialBase::RTS, STDIO_UART_RTS, NC); -#elif CONSOLE_FLOWCONTROL == CONSOLE_FLOWCONTROL_CTS - console.set_flow_control(SerialBase::CTS, NC, STDIO_UART_CTS); -#elif CONSOLE_FLOWCONTROL == CONSOLE_FLOWCONTROL_RTSCTS - console.set_flow_control(SerialBase::RTSCTS, STDIO_UART_RTS, STDIO_UART_CTS); -#endif - return &console; -} diff --git a/TEST_APPS/device/nanostack_mac_tester/README.md b/TEST_APPS/device/nanostack_mac_tester/README.md deleted file mode 100644 index 0a42a2d2f89d..000000000000 --- a/TEST_APPS/device/nanostack_mac_tester/README.md +++ /dev/null @@ -1,88 +0,0 @@ -# Nanostack MAC test application - -You can use this application to test the Nanostack RF driver implementations that follow the [Nanostack RF driver porting instructions](https://os.mbed.com/docs/v5.6/reference/contributing-connectivity.html#porting-new-rf-driver-for-6lowpan-stack). The application has a command-line interface that is used to send commands to Nanostack's MAC layer, for example starting PANs, scanning or sending data. The provided tests do not test performance or stability and only indirectly test RF functionalities. - -## Table of contents - -* [Prerequisites](#prerequisites) -* [Setting up the application](#setting-up-the-application) -* [Application usage](#application-usage) - * [Interactive mode](#interactive-mode) - * [Automated mode](#automated-mode) - * [Testcases](#testcases) - * [Considerations](#considerations) - -## Prerequisites - -* [Mbed CLI](https://github.com/ARMmbed/mbed-cli). -* Mbed OS target board with build in radio, OR RF shield with Mbed OS driver - -## Setting up the application - -### Add your RF driver - -When using RF shield, you need to configure it to be a default RF driver and instruct Mbed OS that RF driver is present. For example, configuring Atmel RF driver to provide default driver: - -``` - "target_overrides": { - "*": { - "target.device_has_add": ["802_15_4_RF_PHY"], - "atmel-rf.provide-default": true -``` - -### Checking platform support - -Check that your choice of platform is supported by your choice of toolchain: - -``` -mbed compile --supported -``` - -**Note:** Targets are often abbreviated from the full model names. In the case of `FRDM-K64F` the target is `K64F`. - -## Run tests - -You can use this application in interactive or automated mode. - -### Interactive mode - -To set the application to interactive mode: - -1. Build the application. -``` -mbed test --compile --icetea -t TOOLCHAIN -m TARGET_PLATFORM -DICETEA_MAC_TESTER_ENABLED --test-config NANOSTACK_MAC_TESTER -n address_read_and_write,send_data,send_data_indirect,send_large_payloads,create_and_join_PAN,ED_scan -``` -2. Connect your board and copy the compiled application binary from the `BUILD/tests/TARGET_PLATFORM/TOOLCHAIN/TEST_APPS/device/nanostack_mac_tester/` folder to the board. -3. Wait for the device to flash the binary. -4. Open a serial connection with a program such as PuTTY, screen or minicom. The default baudrate is 115200. -5. Press the reset button on the board. The Arm Mbed logo and trace appears in the terminal window. - -If the driver registration and SW MAC creation was successful, the application is ready to receive commands. - -To start off, type `help` to list all commands available and furthermore `help ` to print detailed information about a specific command. - -### Automated mode - -``` -mbed test --clean --compile --run --icetea -t TOOLCHAIN -m TARGET_PLATFORM -DICETEA_MAC_TESTER_ENABLED --test-config NANOSTACK_MAC_TESTER -n address_read_and_write,send_data,send_data_indirect,send_large_payloads,create_and_join_PAN,ED_scan -``` - -Many of the provided testcases have a `self.channel` variable in the `setUp()` function for setting the RF channel. The default channel is 11. If you wish to run a test on another channel, you will need to change it manually in TEST_APPS/testcases/nanostack_mac_tester/. - -Some testcases also use a secondary channel for transmitting and will use the next higher channel for that purpose. If the given channel is 26, the secondary channel will default to 25. - -### Test cases - -The automated test set runs the following testcases included in the repository under `TEST_APPS/testcases/nanostack_mac_tester/`. -* Create and join PAN -* Direct data transmission(Transmission between two devices) -* Indirect data transmission(Transmission between two devices with one device acting as intermediary) -* ED scan(Energy Density scanning) -* Address read and write -* Large data transmission - -### Considerations - -* Devices need to be power cycled if they are unresponsive to test framework commands even after resetting. -* Devices can be enclosed in an RF isolation box to improve the consistency of test results. -* Some boards and radio modules come with a PCB trace antenna, instead of an SMD antenna, and need to be spaced further apart to decrease interference. \ No newline at end of file diff --git a/TEST_APPS/device/nanostack_mac_tester/main.cpp b/TEST_APPS/device/nanostack_mac_tester/main.cpp deleted file mode 100644 index ee97dd495598..000000000000 --- a/TEST_APPS/device/nanostack_mac_tester/main.cpp +++ /dev/null @@ -1,156 +0,0 @@ -/* - * Copyright (c) 2017, Arm Limited and affiliates. - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#include "mbed.h" -#include "rtos.h" -#include "sw_mac.h" -#include "ns_hal_init.h" -#define MBED_CMDLINE_MAX_LINE_LENGTH 250 -#include "ns_cmdline.h" - -#include "mac_commands.h" - -#define HEAP_FOR_MAC_TESTER_SIZE 10000 -#define RX_BUFFER_SIZE 512 - -#define ATMEL 1 -#define MCR20 2 -#define OTHER 3 - -#define TRACE_GROUP "Main" -#include "mbed-trace/mbed_trace.h" - -#include "NanostackRfPhy.h" - -#if !DEVICE_802_15_4_PHY -#error [NOT_SUPPORTED] No 802.15.4 RF driver found for this target -#endif - -#ifndef ICETEA_MAC_TESTER_ENABLED -#error [NOT_SUPPORTED] Skipping Nanostack MAC tester application. -#endif - -extern mac_api_s *mac_interface; -UnbufferedSerial pc(CONSOLE_TX, CONSOLE_RX); -osThreadId_t main_thread; -static CircularBuffer rx_buffer; -static uint8_t ns_heap[HEAP_FOR_MAC_TESTER_SIZE]; - -static void app_heap_error_handler(heap_fail_t event) -{ - tr_error("Heap error (%d), app_heap_error_handler()", event); - switch (event) { - case NS_DYN_MEM_NULL_FREE: - case NS_DYN_MEM_DOUBLE_FREE: - case NS_DYN_MEM_ALLOCATE_SIZE_NOT_VALID: - case NS_DYN_MEM_POINTER_NOT_VALID: - case NS_DYN_MEM_HEAP_SECTOR_CORRUPTED: - case NS_DYN_MEM_HEAP_SECTOR_UNITIALIZED: - break; - default: - break; - } - while (1); -} - -static void rx_interrupt(void) -{ - uint8_t c; - pc.read(&c, 1); - rx_buffer.push(c); - if (main_thread != NULL) { - osThreadFlagsSet(main_thread, 1); - } -} - -static void handle_rx_data(void) -{ - bool exit = false; - uint8_t data; - - while (1) { - exit = !rx_buffer.pop(data); - if (exit) { - break; - } - cmd_char_input(data); - } -} - - -static int mac_prepare(void) -{ - NanostackRfPhy &rf_phy = NanostackRfPhy::get_default_instance(); - int8_t rf_driver_id = rf_phy.rf_register(); - uint8_t rf_eui64[8]; - - if (rf_driver_id < 0) { - tr_error("Failed to register RF driver."); - return -1; - } - rf_phy.get_mac_address(rf_eui64); - mac_description_storage_size_t mac_description; - mac_description.device_decription_table_size = DEVICE_DESCRIPTOR_TABLE_SIZE; /** MAC Device description list size */ - mac_description.key_description_table_size = KEY_DESCRIPTOR_TABLE_SIZE; /** MAC Key description list size */ - mac_description.key_lookup_size = LOOKUP_DESCRIPTOR_TABLE_SIZE; /** Key description key lookup list size */ - mac_description.key_usage_size = USAGE_DESCRIPTOR_TABLE_SIZE; /** Key description key usage list size */ - tr_info("Registered RF driver with id: %hhu, EUI64: %s", rf_driver_id, mbed_trace_array(rf_eui64, 8)); - mac_interface = ns_sw_mac_create(rf_driver_id, &mac_description); - if (!mac_interface) { - tr_error("Failed to create SW MAC."); - return -2; - } - - return mac_interface->mac_initialize(mac_interface, mac_data_confirm_handler, - mac_data_indication_handler, mac_purge_confirm_handler, mac_mlme_confirm_handler, - mac_mlme_indication_handler, rf_driver_id); -} - -static void cmd_ready_cb(int retcode) -{ - cmd_next(retcode); -} - -static void trace_printer(const char *str) -{ - printf("%s\n", str); - cmd_output(); - fflush(stdout); -} - -int main(void) -{ - main_thread = ThisThread::get_id(); - pc.baud(MBED_CONF_PLATFORM_STDIO_BAUD_RATE); - pc.attach(rx_interrupt); - ns_hal_init(ns_heap, HEAP_FOR_MAC_TESTER_SIZE, app_heap_error_handler, NULL); - mbed_trace_init(); - mbed_trace_print_function_set(trace_printer); - cmd_init(&default_cmd_response_out); - cmd_set_ready_cb(cmd_ready_cb); - mac_commands_init(); - - if (mac_prepare() != 0) { - return -1; - } - tr_info("Created driver & SW MAC"); - - while (true) { - ThisThread::flags_wait_any(1); - handle_rx_data(); - } - return 0; -} diff --git a/TEST_APPS/device/nanostack_mac_tester/mbed_app.json b/TEST_APPS/device/nanostack_mac_tester/mbed_app.json deleted file mode 100644 index d86bfd2dc722..000000000000 --- a/TEST_APPS/device/nanostack_mac_tester/mbed_app.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "macros": ["MBED_TRACE_LINE_LENGTH=200", "OS_TASKCNT=4", "OS_IDLESTKSIZE=32"], - "target_overrides": { - "*": { - "nanostack.configuration": "lowpan_host", - "platform.stdio-convert-newlines": true, - "platform.stdio-baud-rate": 115200, - "mbed-mesh-api.heap-size": 6000, - "nanostack-hal.event_loop_thread_stack_size": 2000, - "mbed-trace.enable": true, - "nsapi.default-stack": "LWIP", - "target.device_has_add": ["802_15_4_PHY"], - "atmel-rf.provide-default": true - } - } -} diff --git a/TEST_APPS/device/nanostack_mac_tester/source/mac_commands.cpp b/TEST_APPS/device/nanostack_mac_tester/source/mac_commands.cpp deleted file mode 100644 index 08117b7482a0..000000000000 --- a/TEST_APPS/device/nanostack_mac_tester/source/mac_commands.cpp +++ /dev/null @@ -1,1654 +0,0 @@ -/* - * Copyright (c) 2017, Arm Limited and affiliates. - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#include "mac_commands.h" - -//Need to disable filtering until mac_filter_api.h in mbed-os is updated -#define DISABLE_FILTERING - -#define TRACE_GROUP "MAC" - -#define MAN_MAC_START "start --- Starts a PAN\n"\ - " --pan_id PAN id in hex, default: 0x1234\n"\ - " --logical_channel Operated logical channel, default: 11 (0-26)\n"\ - " --channel_page Operated channel page, default: 0 (0-2)\n"\ - " --start_time Time at which to start sending beacons\n"\ - " default: 0\n"\ - " --beacon_order How often are beacons transmitted\n"\ - " default: 15 (0-15, 15 = never)\n"\ - " --super_frame_order Length of the superframe's active portion\n"\ - " if beacon_order is 15, this option is ignored\n"\ - " default: 15 (0-15)\n"\ - " --pan_coordinator Is this device the PAN coordinator?\n"\ - " default: true\n"\ - " --battery_life_extension Disable beaconing device periodically\n"\ - " to save power? default: false\n"\ - " --coord_realignment If true, coordinator realignment command\n"\ - " is sent prior to changing\n"\ - " the superframe configuration default: false\n" - -#define MAN_MAC_SCAN "scan --- Perform a scan\n"\ - " --scan_type What type of scan to perform, 0=ED, 1=active\n"\ - " 2=passive, 3=orphan, default: 1\n"\ - " --channel_page_enum default: 0 (0-10)\n"\ - " --channel_mask Bitmap of the channels on which to perform\n"\ - " the scan, lower 27-bits are used\n"\ - " bit 0 corresponds to channel 0 and so forth\n"\ - " default: 0x07FFF800 (channels 11-26)\n"\ - " --scan_duration How long to spend in each channel,\n"\ - " aBaseSuperFrameDuration * (2^n + 1) symbols\n"\ - " default: 5 (0-14)\n"\ - " --channel_page The channel page on which to perform the scan\n"\ - " default: 0 (0-31)\n"\ - MAN_MAC_SECURITY - -#define MAN_MAC_DATA "data --- Send arbitrary data\n"\ - " --src_addr_mode Source addressing mode, 0=no address, 1=reserved\n"\ - " 2=16-bit address, 3=64-bit address\n"\ - " default: 3 (0-3)\n"\ - " --dst_addr_mode Destination addressing mode, same as above\n"\ - " default: 3 (0-3)\n"\ - " --dst_pan_id Destination PAN id in hex\n"\ - " default: 0x1234 (0x0-0xFFFF)\n"\ - " --dst_addr Destination address, default: 00:00:00:...\n"\ - " --msdu_length Length of the data to send, default: 0 (0-255)\n"\ - " --msdu Data to transmit, default: \n"\ - " --msdu_handle Handle of this MSDU, default: 0 (0-255)\n"\ - " --tx_ack_req Is ack required for this transmission?\n"\ - " default: true\n"\ - " --indirect_tx Transmit indirectly? default: false\n"\ - " --pending_bit Specifies whether more fragments (higher layer)\n"\ - " are to be sent, default: false\n"\ - " --wait_for_confirm Should we block further commands until we have\n"\ - " received a data confirmation, default: true\n"\ - MAN_MAC_SECURITY - -#define MAN_MAC_POLL "poll --- Poll the coordinator for data\n"\ - " --coord_addr_mode Coordinator addressing mode, 2=16-bit address\n"\ - " 3=64-bit address, default: 3 (2-3)\n"\ - " --coord_pan_id Coordinator PAN id in hex\n"\ - " default: 0x1234 (0x0-0xFFFF)\n"\ - " --coord_address Coordinator address, default 00:00:00:...\n"\ - MAN_MAC_SECURITY - -#define MAN_MAC_PURGE "purge --- Remove a transmission from the queue\n"\ - " --msdu_handle Handle of the MSDU to be removed\n"\ - " default: 0 (0-255)\n"\ - -#define MAN_MAC_SET "mlme-set --- Set a specified PIB attribute\n"\ - " --attr ID of the attribute to set in hex (0x0-0xFF)\n"\ - " --attr_index <0-255> Index of the attribute, default: 0 (0-255)\n"\ - " --value_ascii Specify the set value as an ASCII string\n"\ - " --value_bytes Value as a string of bytes\n"\ - " --value_uint8/16/32 Value as a uint8, uint16, or uint32\n"\ - " Max value for uint32 is the max value for int32\n"\ - " --value_size Size of the value in bytes (0-255)\n" - -#define MAN_MAC_GET "mlme-get --- Get a specified PIB attribute\n"\ - " --attr ID of the attribute we want to get in hex (0x0-0xFF)\n"\ - " --attr_index Index of the attribute, default: 0 (0-255)\n" - -#define MAN_MAC_RESET "mlme-reset --- Reset the MAC sublayer\n"\ - " --set_default_pib When set to true, PIB attributes are set to\n"\ - " their default values\n"\ - " If set to false, PIB attributes retain\n"\ - " their values, default: true\n" - -#define MAN_MAC_ADDR "addr --- Configure 16/64-bit MAC addresses\n"\ - " having no options will display the addresses\n"\ - " --16-bit 16-bit MAC address in hex (0x0-0xFFFF)\n"\ - " --64-bit 64-bit MAC address\n" - -#define MAN_MAC_SECURITY " --security_level 0=no security, 1=MIC32, 2=MIC64, 3=MIC128,\n"\ - " 4=ENC, 5=ENC+MIC32, 6=ENC+MIC64, 7=ENC+MIC128\n"\ - " default: 0\n"\ - " --key_id_mode 0=implicit, 1=default key source\n"\ - " 2=2-byte key source\n"\ - " 3=8-byte key source, default: 0 (0-3)\n"\ - " --key_index Which key to use, default: 0 (0-255)\n"\ - " --key_source The originator of the key to be used\n" - -#define MAN_MAC_KEY "key --- Configure or add key descriptors\n"\ - "config --- Configure parameters for key descriptor\n"\ - " --key Actual security key, 16 bytes\n"\ - " default: C0:C1:C2:...:CF\n"\ - " --key_id_lookup_list_entries Amount of entries in the key's lookup\n"\ - " --key_device_list_entries ...device...\n"\ - " --key_usage_list_entries and usage list, default: 2 (0-255)\n"\ - " --lookup_index Which entry of the lookup list\n"\ - " are we accessing? default: 0 (0-255)\n"\ - " --lookup_data The lookup data for this key\n"\ - " length is 9 bytes regardless of\n"\ - " the next option\n"\ - " --lookup_data_size How large is the lookup data? (0-1)\n"\ - " 0=5 bytes, 1=9 bytes\n"\ - " --device_list_index Which entry of the device list\n"\ - " are we accessing, default: 0 (0-255)\n"\ - " --device_descriptor_handle Which entry in our neighbour table\n"\ - " do we want to use this key with\n"\ - " default: 0 (0-255)\n"\ - " --unique_device Is the device unique to the key?\n"\ - " --blacklisted Is the device blacklisted?\n"\ - " --usage_list_index Which entry of the usage list\n"\ - " are we accessing, default: 0 (0-255)\n"\ - " --frame_type What type of frame do we want to\n"\ - " use this key with? (0-3)\n"\ - " 0=beacon, 1=data, 2=ACK, 3=command\n"\ - " --command_frame_identifier Type of the command frame (1-9)\n"\ - " 1=association request\n"\ - " 2=association response\n"\ - " 3=disassociation notification\n"\ - " 4=data request\n"\ - " 5=PAN id conflict notification\n"\ - " 6=orphan notification\n"\ - " 7=beacon request\n"\ - " 8=coordinator realigment\n"\ - " 9=GTS request\n"\ - "add --- Add the key into the key descriptor table\n"\ - " --index Index in the key table (0-255)\n" - -#define MAN_MAC_ADD_NEIGHBOUR "add-neigh --- Add an entry to the neighbour table\n"\ - " --frame_ctr Frame counter for this neighbour\n"\ - " --mac16 16-bit MAC address in hex (0x0-0xFFFF)\n"\ - " --mac64 64-bit MAC address\n"\ - " --pan_id PAN id (0x0-0xFFFF)\n"\ - " --index Index in the neighbour table (0-255)\n" - -#define MAN_MAC_FILTER "filter --- Configure MAC layer filtering\n"\ - "start --- Start a generic filter in blacklist, whitelist or fixed mode\n"\ - " --mode Set the filtering mode, values: allow|block|fixed\n"\ - " --lqi_m LQI multiplier (fixed mode only)\n"\ - " --dbm_m dBm multiplier (fixed mode only)\n"\ - "add --- Add a filter by manually supplying values, or using a preset mode\n"\ - " --lqi_m LQI multiplier\n"\ - " --lqi_add Value added to the LQI\n"\ - " --dbm_m dBm multiplier\n"\ - " --dbm_add Value added to the dBm\n"\ - " --mode Filtering mode, values: allow|block|fixed\n"\ - " --short 16-bit address in hex to filter (0x0-0xFFFF)\n"\ - " --long 64-bit address as bytes to filter\n"\ - "remove --- Remove a filter\n"\ - " --short 16-bit address to remove from filter (0x0-0xFFFF)\n"\ - " --long 64-bit address to remove from filter\n"\ - "clear --- Clear all filters excluding the default one\n"\ - "stop --- Stop filtering completely\n"\ - -#define MAN_MAC_CONFIG_STATUS "config-status --- Configure expected status codes\n"\ - " having no options will display configured statuses\n"\ - " default: 0 (MLME_SUCCESS) for all\n"\ - " --data_conf MCPS-DATA.confirm (0-255)\n"\ - " --data_ind MCPS-DATA.indication (0-255)\n"\ - " --get MLME-GET.confirm (0-255)\n"\ - " --scan MLME-SCAN.confirm (0-255)\n"\ - " --poll MLME-POLL.confirm (0-255)\n"\ - " --purge MCPS-PURGE.confirm (0-255)\n"\ - " --comm_status MLME-COMM-STATUS.indication (0-255)\n"\ - " --list List all statuses\n"\ - " --reset Reset all statuses to default values\n" - -#define MAN_MAC_FIND_BEACON "find-beacon --- Search for a PAN in the\n"\ - " results of the last scan\n"\ - " --data Beacon data transmitted in the beacon\n" - -#define MAN_MAC_WAIT "wait --- Wait for data sent directly for a\n"\ - " specified amount of milliseconds\n"\ - " --timeout Milliseconds to wait, default: 1000\n" - -#define MAN_MAC_ED_ANALYZE "analyze-ed Channel to analyze (11-26)\n"\ - " --above Check if the ED value is above a given value\n"\ - " --below Check if the ED value is below a given value\n" - -#define MAN_RESET "reset --- Reset MCPS and MLME structures to default values\n" - -#define MAN_SILENT "silent-mode --- When enabled, doesn't print extended information\n"\ - " of MCPS/MLME primitives\n" - -mac_api_s *mac_interface = NULL; -static bool wait_for_confirm = true; -static bool silent_mode = false; -static volatile unsigned int data_count = 0; - -static mlme_start_t start_req = { - 0x1234, /*PANId*/ - 11, /*LogicalChannel*/ - 0, /*ChannelPage*/ - 0, /*StartTime*/ - 15, /*BeaconOrder*/ - 15, /*SuperframeOrder*/ - true, /*PANCoordinator*/ - false, /*BatteryLifeExtension*/ - false, /*CoordRealignment*/ -}; - -static mlme_scan_t scan_req = { - MAC_ACTIVE_SCAN, /*ScanType*/ - { - CHANNEL_PAGE_0, /*channel_page (enum)*/ - 0x07FFF800 /*channel_mask*/ - }, - 5, /*ScanDuration*/ - 0, /*ChannelPage*/ - { - 0, /*SecurityLevel*/ - 0, /*KeyIdMode*/ - 0, /*KeyIndex*/ - {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} /*Keysource*/ - } -}; - -static mcps_data_req_t data_req = { - 3, /*SrcAddrMode*/ - 3, /*DstAddrMode*/ - 0x1234, /*DstPANId*/ - {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /*DstAddr*/ - 0, /*msduLength*/ - NULL, /*msdu*/ - 0, /*msduHandle*/ - true, /*TxAckReq*/ - false, /*IndirectTx*/ - false, /*PendingBit*/ - false, /*SeqNumSuppressed*/ - false, /*PanIdSuppressed*/ - { - 0, /*SecurityLevel*/ - 0, /*KeyIdMode*/ - 0, /*KeyIndex*/ - {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} /*Keysource*/ - } -}; - -static mlme_poll_t poll_req = { - 3, /*CoordAddrMode*/ - 0x1234, /*CoordPANId*/ - {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /*CoordAddress*/ - { - 0, /*SecurityLevel*/ - 0, /*KeyIdMode*/ - 0, /*KeyIndex*/ - {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} /*Keysource*/ - } -}; - -static mcps_purge_t purge_req = { - 0 /*msduHandle*/ -}; - -static mlme_set_t set_req = { - (mlme_attr_t)0x39, /*attr*/ - 0, /*attr_index*/ - NULL, /*value_pointer*/ - 0 /*value_size*/ -}; - -static mlme_get_t get_req = { - (mlme_attr_t)0x39, /*attr*/ - 0 /*attr_index*/ -}; - -static mlme_reset_t reset_req = { - true /*SetDefaultPIB*/ -}; - -static mlme_key_id_lookup_descriptor_t lookup_descriptors[LOOKUP_DESCRIPTOR_TABLE_SIZE]; -static mlme_key_device_descriptor_t device_descriptors[DEVICE_DESCRIPTOR_TABLE_SIZE]; -static mlme_key_usage_descriptor_t usage_descriptors[USAGE_DESCRIPTOR_TABLE_SIZE]; -static mlme_key_descriptor_entry_t key_descriptor = { - lookup_descriptors, /*KeyIdLookupList*/ - LOOKUP_DESCRIPTOR_TABLE_SIZE, /*KeyIdLookupListEntries*/ - device_descriptors, /*KeyDeviceList*/ - DEVICE_DESCRIPTOR_TABLE_SIZE, /*KeyDeviceListEntries*/ - usage_descriptors, /*KeyUsageList*/ - USAGE_DESCRIPTOR_TABLE_SIZE, /*KeyUsageListEntries*/ - {0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF} /*Key*/ -}; - -struct status_list_t { - uint8_t data_conf; - uint8_t get_conf; - uint8_t scan_conf; - uint8_t poll_conf; - uint8_t purge_conf; - uint8_t comm_status_ind; - uint8_t data_ind_len; - uint8_t *data_ind; -}; - -static struct status_list_t expected_statuses = { - MLME_SUCCESS, - MLME_SUCCESS, - MLME_SUCCESS, - MLME_SUCCESS, - MLME_SUCCESS, - MLME_SUCCESS, - 0, - NULL -}; - -struct beacon_list_t { - size_t count; - char *beacons[MLME_MAC_RES_SIZE_MAX]; - uint8_t beacon_lengths[MLME_MAC_RES_SIZE_MAX]; -}; - -static struct beacon_list_t received_beacons = {}; - -struct ed_scan_result_list_t { - uint8_t count; - uint8_t channel[MLME_MAC_RES_SIZE_MAX]; - uint8_t ED_values[MLME_MAC_RES_SIZE_MAX]; -}; - -static struct ed_scan_result_list_t last_ed_results; - -static void print_security(const mlme_security_t *key) -{ - if (key->SecurityLevel > 0) { - cmd_printf("Key.SecurityLevel: %u\n", key->SecurityLevel); - cmd_printf("Key.KeyIdMode: %u\n", key->KeyIdMode); - cmd_printf("Key.KeyIndex: %hhu\n", key->KeyIndex); - cmd_printf("Key.Keysource %s\n", trace_array(key->Keysource, 8)); - } -} - -static void print_PAN_descriptor(const mlme_pan_descriptor_t *desc) -{ - cmd_printf("PANDescriptor.CoordAddrMode: %u\n", desc->CoordAddrMode); - cmd_printf("PANDescriptor.CoordPANId: 0x%04X\n", desc->CoordPANId); - cmd_printf("PANDescriptor.CoordAddress: %s\n", trace_array(desc->CoordAddress, 8)); - cmd_printf("PANDescriptor.LogicalChannel: %hhu\n", desc->LogicalChannel); - cmd_printf("PANDescriptor.ChannelPage: %hhu\n", desc->ChannelPage); - cmd_printf("PANDescriptor.SuperframeSpec: %02x:%02x\n", desc->SuperframeSpec[0], desc->SuperframeSpec[1]); - cmd_printf("PANDescriptor.GTSPermit: %s\n", desc->GTSPermit ? "true" : "false"); - cmd_printf("PANDescriptor.LinkQuality: %hhu\n", desc->LinkQuality); - cmd_printf("PANDescriptor.Timestamp: %lu\n", desc->Timestamp); - cmd_printf("PANDescriptor.SecurityFailure: %hhu\n", desc->SecurityFailure); - print_security(&desc->Key); -} - -static int handle_security_args(int argc, char *argv[], mlme_security_t *key) -{ - char *str; - int32_t val; - - if (cmd_parameter_int(argc, argv, "--security_level", &val)) { - if (val >= 0 && val <= 7) { - key->SecurityLevel = val; - } else { - return CMDLINE_RETCODE_INVALID_PARAMETERS; - } - } - if (cmd_parameter_int(argc, argv, "--key_id_mode", &val)) { - if (val >= 0 && val <= 3) { - key->KeyIdMode = val; - } else { - return CMDLINE_RETCODE_INVALID_PARAMETERS; - } - } - if (cmd_parameter_int(argc, argv, "--key_index", &val)) { - if (val >= 0 && val <= 255) { - key->KeyIndex = val; - } else { - return CMDLINE_RETCODE_INVALID_PARAMETERS; - } - } - if (cmd_parameter_val(argc, argv, "--key_source", &str)) { - if (strlen(str) == 2 * 8 + 7) { - if (string_to_bytes(str, key->Keysource, 8) != 0) { - return CMDLINE_RETCODE_INVALID_PARAMETERS; - } - } else { - return CMDLINE_RETCODE_INVALID_PARAMETERS; - } - } - return CMDLINE_RETCODE_SUCCESS; -} - -static void add_beacon(const uint8_t *beacon, uint8_t len) -{ - if (received_beacons.count >= MLME_MAC_RES_SIZE_MAX) { - tr_warn("List of received beacons is full. Discarding %s <%.*s>", trace_array(beacon, len), len, beacon); - return; - } - unsigned int cur_beacon = received_beacons.count; - received_beacons.beacon_lengths[cur_beacon] = len; - received_beacons.beacons[cur_beacon] = (char *)ns_dyn_mem_temporary_alloc(len <= 75 ? 75 : len); - if (len != 0) { - std::memcpy(received_beacons.beacons[cur_beacon], beacon, len); - } - ++received_beacons.count; -} - -static void clear_beacons(void) -{ - for (unsigned int i = 0; i < received_beacons.count; ++i) { - ns_dyn_mem_free(received_beacons.beacons[i]); - received_beacons.beacons[i] = NULL; - received_beacons.beacon_lengths[i] = 0; - } - received_beacons.count = 0; -} - -void mac_commands_init(void) -{ - cmd_add("start", mac_start_command, "Start a PAN", MAN_MAC_START); - cmd_add("scan", mac_scan_command, "Perform a scan", MAN_MAC_SCAN); - cmd_add("data", mac_data_command, "Send data", MAN_MAC_DATA); - cmd_add("poll", mac_poll_command, "Poll for data", MAN_MAC_POLL); - cmd_add("purge", mac_purge_command, "Purge data from the transmission queue", MAN_MAC_PURGE); - cmd_add("mlme-set", mac_set_command, "Writes a given value to the PIB attribute", MAN_MAC_SET); - cmd_add("mlme-get", mac_get_command, "Gets the value of a given PIB attribute", MAN_MAC_GET); - cmd_add("mlme-reset", mac_reset_command, "Resets the MAC sublayer to default values", MAN_MAC_RESET); - cmd_add("addr", mac_address_command, "Configure MAC addresses", MAN_MAC_ADDR); - cmd_add("key", mac_key_command, "Configure or add security keys", MAN_MAC_KEY); - cmd_add("add-neigh", mac_add_neighbour_command, "Add a device to the neighbour table", MAN_MAC_ADD_NEIGHBOUR); - cmd_add("filter", mac_filter_command, "Add or remove filters based on MAC addresses", MAN_MAC_FILTER); - cmd_add("config-status", mac_config_status_command, "Set expected return statuses for confirmations and indications", MAN_MAC_CONFIG_STATUS); - cmd_add("find-beacon", mac_find_beacon_command, "Find a PAN by beacon data", MAN_MAC_FIND_BEACON); - cmd_add("wait", mac_wait_command, "Wait for data", MAN_MAC_WAIT); - cmd_add("analyze-ed", mac_analyze_ed_command, "Analyze the results of the last ED scan", MAN_MAC_ED_ANALYZE); - cmd_add("reset", reset_command, "Reset MCPS/MLME structures to default values", MAN_RESET); - cmd_add("silent-mode", silent_mode_command, "Stop printing fields of MCPS/MLME structures", MAN_SILENT); -} - -void mac_data_confirm_handler(const mac_api_t *api, const mcps_data_conf_t *data) -{ - cmd_printf("MCPS-DATA.confirm\n"); - if (!silent_mode) { - cmd_printf("msduHandle: %hhu\n", data->msduHandle); - cmd_printf("status: %hhu (%s)\n", data->status, mlme_status_string(data->status)); - cmd_printf("timestamp: %lu\n", data->timestamp); - cmd_printf("cca_retries:%hhu\n", data->cca_retries); - cmd_printf("tx_retries: %hhu\n", data->tx_retries); - } - if (data->status == expected_statuses.data_conf) { - cmd_ready(CMDLINE_RETCODE_SUCCESS); - } else { - cmd_printf("CMD failed, status: %hhu (%s)\n", data->status, mlme_status_string(data->status)); - cmd_ready(CMDLINE_RETCODE_FAIL); - } -} - -void mac_data_indication_handler(const mac_api_t *api, const mcps_data_ind_t *data) -{ - cmd_printf("MCPS-DATA.indication\n"); - if (!silent_mode) { - cmd_printf("SrcAddrMode: %u\n", data->SrcAddrMode); - cmd_printf("SrcPANId: 0x%04X\n", data->SrcPANId); - cmd_printf("SrcAddr: %s\n", trace_array(data->SrcAddr, 8)); - cmd_printf("DstAddrMode: %u\n", data->DstAddrMode); - cmd_printf("DstPANId: 0x%04X\n", data->DstPANId); - cmd_printf("DstAddr: %s\n", trace_array(data->DstAddr, 8)); - cmd_printf("mpduLinkQuality:%hhu\n", data->mpduLinkQuality); - cmd_printf("signal_dbm: %hhi\n", data->signal_dbm); - cmd_printf("timestamp: %lu\n", data->timestamp); - cmd_printf("DSN: %hhi\n", data->DSN); - print_security(&data->Key); - cmd_printf("msduLength %hu\n", data->msduLength); - cmd_printf("msdu_ptr: %s <%.*s>\n", trace_array(data->msdu_ptr, data->msduLength), data->msduLength, data->msdu_ptr); - } - if (data->msdu_ptr && expected_statuses.data_ind) { - if (data->msduLength != expected_statuses.data_ind_len) { - cmd_printf("Bad recv length %d != %d!\n", data->msduLength, expected_statuses.data_ind_len); - return; - } - if (strncmp((const char *)data->msdu_ptr, (const char *)expected_statuses.data_ind, expected_statuses.data_ind_len) == 0) { - ++data_count; - cmd_printf("Data count %d\n", data_count); - } else { - cmd_printf("Received unexpected data!\n"); - } - } -} - -void mac_purge_confirm_handler(const mac_api_t *api, mcps_purge_conf_t *data) -{ - cmd_printf("MCPS-PURGE.confirm\n"); - if (!silent_mode) { - cmd_printf("msduHandle: %hhu\n", data->msduHandle); - cmd_printf("status: %hhu (%s)\n", data->status, mlme_status_string(data->status)); - } - if (data->status == expected_statuses.purge_conf) { - cmd_ready(CMDLINE_RETCODE_SUCCESS); - } else { - cmd_printf("CMD failed, status: %hhu (%s)\n", data->status, mlme_status_string(data->status)); - cmd_ready(CMDLINE_RETCODE_FAIL); - } -} - -void mac_mlme_confirm_handler(const mac_api_t *api, mlme_primitive id, const void *data) -{ - switch (id) { - case MLME_ASSOCIATE: { - break; - } - case MLME_DISASSOCIATE: { - break; - } - case MLME_GET: { - mlme_get_conf_t *get_data = (mlme_get_conf_t *)data; - cmd_printf("MLME-GET.confirm\n"); - if (!silent_mode) { - cmd_printf("status: %hhu (%s)\n", get_data->status, mlme_status_string(get_data->status)); - cmd_printf("attr: %hhu\n", get_data->attr); - cmd_printf("attr_index: %hhu\n", get_data->attr_index); - cmd_printf("value_pointer: %s\n", trace_array((uint8_t *)get_data->value_pointer, get_data->value_size)); - cmd_printf("value_size: %hhu\n", get_data->value_size); - } - if (get_data->status == expected_statuses.get_conf) { - cmd_ready(CMDLINE_RETCODE_SUCCESS); - } else { - cmd_printf("CMD failed, status: %hhu (%s)\n", get_data->status, mlme_status_string(get_data->status)); - cmd_ready(CMDLINE_RETCODE_FAIL); - } - break; - } - case MLME_GTS: { - break; - } - case MLME_RESET: { - break; - } - case MLME_RX_ENABLE: { - break; - } - case MLME_SCAN: { - mlme_scan_conf_t *scan_data = (mlme_scan_conf_t *)data; - cmd_printf("MLME-SCAN.confirm\n"); - if (!silent_mode) { - cmd_printf("status: %hhu (%s)\n", scan_data->status, mlme_status_string(scan_data->status)); - cmd_printf("ScanType: %u\n", scan_data->ScanType); - cmd_printf("ChannelPage: %hhu\n", scan_data->ChannelPage); - cmd_printf("UnscannedChannels: 0x%08lX\n", scan_data->UnscannedChannels.channel_mask[0]); - cmd_printf("ResultListSize: %hhu\n", scan_data->ResultListSize); - } - for (unsigned int i = 0; i < scan_data->ResultListSize; ++i) { - if (scan_data->ScanType == MAC_ED_SCAN_TYPE) { - cmd_printf("Channel %d ED value: %hhu\n", channel_from_mask(scan_req.ScanChannels.channel_mask[0], i), scan_data->ED_values[i]); - memcpy(last_ed_results.ED_values, scan_data->ED_values, scan_data->ResultListSize); - last_ed_results.count = scan_data->ResultListSize; - for (int i = 0; i < scan_data->ResultListSize; ++i) { - last_ed_results.channel[i] = channel_from_mask(scan_req.ScanChannels.channel_mask[0], i); - } - } else if (scan_data->ScanType == MAC_PASSIVE_SCAN) { - print_PAN_descriptor(scan_data->PAN_values[i]); - } - } - if (scan_data->status == expected_statuses.scan_conf || scan_data->status == MLME_LIMIT_REACHED) { - cmd_ready(CMDLINE_RETCODE_SUCCESS); - } else { - cmd_printf("CMD failed, status: %hhu (%s)\n", scan_data->status, mlme_status_string(scan_data->status)); - cmd_ready(CMDLINE_RETCODE_FAIL); - } - break; - } - case MLME_SET: { - break; - } - case MLME_START: { - break; - } - case MLME_POLL: { - mlme_poll_conf_t *poll_data = (mlme_poll_conf_t *)data; - cmd_printf("MLME-POLL.confirm\n"); - if (!silent_mode) { - cmd_printf("status: %hhu (%s)\n", poll_data->status, mlme_status_string(poll_data->status)); - cmd_printf("expected status: %hhu (%s)\n", expected_statuses.poll_conf, mlme_status_string(expected_statuses.poll_conf)); - cmd_printf("data_count %u\n", data_count); - } - if (expected_statuses.poll_conf == MLME_SUCCESS) { - if (data_count == 1 && poll_data->status == MLME_SUCCESS) { - cmd_ready(CMDLINE_RETCODE_SUCCESS); - } else { - cmd_printf("CMD failed, data_count = %u, status:%hhu\n", data_count, poll_data->status); - cmd_ready(CMDLINE_RETCODE_FAIL); - } - } else if (expected_statuses.poll_conf == poll_data->status) { - cmd_ready(CMDLINE_RETCODE_SUCCESS); - } else { - cmd_printf("CMD failed, data_count = %u, status:%hhu, expected ret:%hhu\n", data_count, poll_data->status, expected_statuses.poll_conf); - cmd_ready(CMDLINE_RETCODE_FAIL); - } - break; - } - default: { - cmd_ready(CMDLINE_RETCODE_COMMAND_NOT_IMPLEMENTED); - cmd_printf("CMD failed, not implemented\n"); - break; - } - } -} - -void mac_mlme_indication_handler(const mac_api_t *api, mlme_primitive id, const void *data) -{ - switch (id) { - case MLME_ASSOCIATE: { - break; - } - case MLME_DISASSOCIATE: { - break; - } - case MLME_BEACON_NOTIFY: { - const mlme_beacon_ind_t *beacon_ind = (mlme_beacon_ind_t *)data; - cmd_printf("MLME-BEACON-NOTIFY.indication\n"); - if (!silent_mode) { - cmd_printf("BSN: %hhu\n", beacon_ind->BSN); - print_PAN_descriptor(&beacon_ind->PANDescriptor); - cmd_printf("PendAddrSpec.short_address_count %u\n", beacon_ind->PendAddrSpec.short_address_count); - cmd_printf("PendAddrSpec.extended_address_count %u\n", beacon_ind->PendAddrSpec.extended_address_count); - cmd_printf("AddrList %s\n", trace_array(beacon_ind->AddrList, beacon_ind->PendAddrSpec.short_address_count * 2 + - beacon_ind->PendAddrSpec.extended_address_count * 8)); - cmd_printf("beacon_data_length %hu\n", beacon_ind->beacon_data_length); - cmd_printf("beacon_data %s\n", trace_array(beacon_ind->beacon_data, beacon_ind->beacon_data_length)); - } - add_beacon(beacon_ind->beacon_data, beacon_ind->beacon_data_length); - break; - } - case MLME_GTS: { - break; - } - case MLME_ORPHAN: { - break; - } - case MLME_COMM_STATUS: { - cmd_printf("MLME-COMM-STATUS.indication\n"); - const mlme_comm_status_t *comm_status_ind_data = (mlme_comm_status_t *)data; - if (!silent_mode) { - cmd_printf("PANId: 0x%04X\n", comm_status_ind_data->PANId); - cmd_printf("SrcAddrMode: %u\n", comm_status_ind_data->SrcAddrMode); - cmd_printf("SrcAddr: %s\n", trace_array(comm_status_ind_data->SrcAddr, 8)); - cmd_printf("DstAddrMode: %u\n", comm_status_ind_data->DstAddrMode); - cmd_printf("DstAddr: %s\n", trace_array(comm_status_ind_data->DstAddr, 8)); - cmd_printf("status: %hhu (%s)\n", comm_status_ind_data->status, mlme_status_string(comm_status_ind_data->status)); - print_security(&comm_status_ind_data->Key); - } - break; - } - case MLME_SYNC_LOSS: { - break; - } - default: - break; - } -} - -int mac_start_command(int argc, char *argv[]) -{ - char *str; - int32_t val; - bool boolean; - - cmd_printf("MLME-START.request\n"); - if (cmd_parameter_val(argc, argv, "--pan_id", &str)) { - uint32_t pan_id = strtoul(str, NULL, 16); - if (pan_id <= 0xFFFF) { - start_req.PANId = pan_id; - } else { - return CMDLINE_RETCODE_INVALID_PARAMETERS; - } - } - if (cmd_parameter_int(argc, argv, "--logical_channel", &val)) { - if (val >= 0 && val <= 26) { - start_req.LogicalChannel = val; - } else { - return CMDLINE_RETCODE_INVALID_PARAMETERS; - } - } - if (cmd_parameter_int(argc, argv, "--channel_page", &val)) { - if (val >= 0 && val <= 2) { - start_req.ChannelPage = val; - } else { - return CMDLINE_RETCODE_INVALID_PARAMETERS; - } - } - if (cmd_parameter_int(argc, argv, "--start_time", &val)) { - start_req.StartTime = val; - } - if (cmd_parameter_int(argc, argv, "--beacon_order", &val)) { - if (val >= 0 && val <= 15) { - start_req.BeaconOrder = val; - } else { - return CMDLINE_RETCODE_INVALID_PARAMETERS; - } - } - if (cmd_parameter_int(argc, argv, "--super_frame_order", &val)) { - if (val >= 0 && val <= 15) { - start_req.SuperframeOrder = val; - } else { - return CMDLINE_RETCODE_INVALID_PARAMETERS; - } - } - if (cmd_parameter_bool(argc, argv, "--pan_coordinator", &boolean)) { - start_req.PANCoordinator = boolean; - } - if (cmd_parameter_bool(argc, argv, "--battery_life_extension", &boolean)) { - start_req.BatteryLifeExtension = boolean; - } - if (cmd_parameter_bool(argc, argv, "--coord_realignment", &boolean)) { - start_req.CoordRealignment = boolean; - } - mac_interface->mlme_req(mac_interface, MLME_START, &start_req); - return CMDLINE_RETCODE_SUCCESS; -} - -int mac_scan_command(int argc, char *argv[]) -{ - char *str; - int32_t val; - - cmd_printf("MLME-SCAN.request\n"); - if (cmd_parameter_int(argc, argv, "--scan_type", &val)) { - if (val >= 0 && val <= 3) { - scan_req.ScanType = (mac_scan_type_t)val; - } else { - return CMDLINE_RETCODE_INVALID_PARAMETERS; - } - } - if (cmd_parameter_int(argc, argv, "--channel_page_enum", &val)) { - if (val >= 0 && val <= 10) { - scan_req.ScanChannels.channel_page = (channel_page_e)val; - } else { - return CMDLINE_RETCODE_INVALID_PARAMETERS; - } - } - if (cmd_parameter_val(argc, argv, "--channel_mask", &str)) { - scan_req.ScanChannels.channel_mask[0] = strtoul(str, NULL, 16); - } - if (cmd_parameter_int(argc, argv, "--scan_duration", &val)) { - if (val >= 0 && val <= 14) { - scan_req.ScanDuration = val; - } else { - return CMDLINE_RETCODE_INVALID_PARAMETERS; - } - } - if (cmd_parameter_int(argc, argv, "--channel_page", &val)) { - if (val >= 0 && val <= 2) { - scan_req.ChannelPage = val; - } else { - return CMDLINE_RETCODE_INVALID_PARAMETERS; - } - } - if (handle_security_args(argc, argv, &scan_req.Key) != CMDLINE_RETCODE_SUCCESS) { - return CMDLINE_RETCODE_INVALID_PARAMETERS; - } - clear_beacons(); - mac_interface->mlme_req(mac_interface, MLME_SCAN, &scan_req); - return CMDLINE_RETCODE_EXCUTING_CONTINUE; -} - -int mac_data_command(int argc, char *argv[]) -{ - char *str; - int32_t val; - bool boolean; - - cmd_printf("MCPS-DATA.request\n"); - if (cmd_parameter_int(argc, argv, "--src_addr_mode", &val)) { - if (val == 0 || val == 2 || val == 3) { - data_req.SrcAddrMode = val; - } else { - return CMDLINE_RETCODE_INVALID_PARAMETERS; - } - } - if (cmd_parameter_int(argc, argv, "--dst_addr_mode", &val)) { - if (val == 0 || val == 2 || val == 3) { - data_req.DstAddrMode = val; - } else { - return CMDLINE_RETCODE_INVALID_PARAMETERS; - } - } - if (cmd_parameter_val(argc, argv, "--dst_pan_id", &str)) { - uint32_t pan_id = strtoul(str, NULL, 16); - if (pan_id <= 0xFFFF) { - data_req.DstPANId = pan_id; - } else { - return CMDLINE_RETCODE_INVALID_PARAMETERS; - } - } - if (cmd_parameter_val(argc, argv, "--dst_addr", &str)) { - int len = (data_req.DstAddrMode == 2 ? 2 : 8); - if (string_to_bytes(str, data_req.DstAddr, len) != 0) { - return CMDLINE_RETCODE_INVALID_PARAMETERS; - } - } - if (cmd_parameter_int(argc, argv, "--msdu_length", &val)) { - data_req.msduLength = val; - } - if (cmd_parameter_val(argc, argv, "--msdu", &str)) { - ns_dyn_mem_free(data_req.msdu); - if (strlen(str) != data_req.msduLength) { - return CMDLINE_RETCODE_INVALID_PARAMETERS; - } - data_req.msdu = (uint8_t *)ns_dyn_mem_temporary_alloc(data_req.msduLength); - if (data_req.msdu == NULL) { - tr_error("Failed to allocate memory for the msdu"); - return CMDLINE_RETCODE_FAIL; - } - std::memcpy(data_req.msdu, str, data_req.msduLength); - } - if (cmd_parameter_int(argc, argv, "--msdu_handle", &val)) { - if (val >= 0 && val <= 255) { - data_req.msduHandle = val; - } - } - if (cmd_parameter_bool(argc, argv, "--tx_ack_req", &boolean)) { - data_req.TxAckReq = boolean; - } - if (cmd_parameter_bool(argc, argv, "--indirect_tx", &boolean)) { - data_req.InDirectTx = boolean; - } - if (cmd_parameter_bool(argc, argv, "--pending_bit", &boolean)) { - data_req.PendingBit = boolean; - } - if (cmd_parameter_bool(argc, argv, "--wait_for_confirm", &boolean)) { - wait_for_confirm = boolean; - } - if (handle_security_args(argc, argv, &data_req.Key) != CMDLINE_RETCODE_SUCCESS) { - return CMDLINE_RETCODE_INVALID_PARAMETERS; - } - mac_interface->mcps_data_req(mac_interface, &data_req); - if (wait_for_confirm) { - return CMDLINE_RETCODE_EXCUTING_CONTINUE; - } - return CMDLINE_RETCODE_SUCCESS; -} - -int mac_poll_command(int argc, char *argv[]) -{ - char *str; - int32_t val; - - cmd_printf("MLME-POLL.request\n"); - data_count = 0; - if (cmd_parameter_int(argc, argv, "--coord_addr_mode", &val)) { - if (val == 2 || val == 3) { - poll_req.CoordAddrMode = val; - } else { - return CMDLINE_RETCODE_INVALID_PARAMETERS; - } - } - if (cmd_parameter_val(argc, argv, "--coord_pan_id", &str)) { - unsigned long pan_id = strtoul(str, NULL, 16); - if (pan_id <= 0xFFFF) { - poll_req.CoordPANId = pan_id; - } else { - return CMDLINE_RETCODE_INVALID_PARAMETERS; - } - } - if (cmd_parameter_val(argc, argv, "--coord_address", &str)) { - int len = (poll_req.CoordAddrMode == 2 ? 2 : 8); - if (string_to_bytes(str, poll_req.CoordAddress, len) != 0) { - return CMDLINE_RETCODE_INVALID_PARAMETERS; - } - } - if (handle_security_args(argc, argv, &poll_req.Key) != CMDLINE_RETCODE_SUCCESS) { - return CMDLINE_RETCODE_INVALID_PARAMETERS; - } - mac_interface->mlme_req(mac_interface, MLME_POLL, &poll_req); - return CMDLINE_RETCODE_EXCUTING_CONTINUE; -} - -int mac_purge_command(int argc, char *argv[]) -{ - int32_t val; - - cmd_printf("MCPS-PURGE.request\n"); - if (cmd_parameter_int(argc, argv, "--msdu_handle", &val)) { - if (val >= 0 && val <= 255) { - purge_req.msduHandle = val; - } else { - return CMDLINE_RETCODE_INVALID_PARAMETERS; - } - } - mac_interface->mcps_purge_req(mac_interface, &purge_req); - return CMDLINE_RETCODE_EXCUTING_CONTINUE; -} - -int mac_set_command(int argc, char *argv[]) -{ - char *str; - int32_t val; - uint8_t val_uint8 = 0; - uint16_t val_uint16 = 0; - uint32_t val_uint32 = 0; - uint8_t *val_ptr_array = NULL; - - cmd_printf("MLME-SET.request\n"); - if (cmd_parameter_val(argc, argv, "--attr", &str)) { - uint32_t attribute = strtoul(str, NULL, 16); - if (attribute <= 255) { - set_req.attr = (mlme_attr_t)attribute; - } else { - return CMDLINE_RETCODE_INVALID_PARAMETERS; - } - } - if (cmd_parameter_int(argc, argv, "--attr_index", &val)) { - if (val >= 0 && val <= 255) { - set_req.attr_index = val; - } else { - return CMDLINE_RETCODE_INVALID_PARAMETERS; - } - } - if (cmd_parameter_val(argc, argv, "--value_ascii", &str)) { - val_ptr_array = (uint8_t *)ns_dyn_mem_temporary_alloc(strlen(str)); - if (val_ptr_array == NULL) { - tr_error("Failed to allocate memory for MLME-SET.request"); - return CMDLINE_RETCODE_FAIL; - } - std::memcpy(val_ptr_array, str, strlen(str)); - set_req.value_pointer = val_ptr_array; - } else if (cmd_parameter_val(argc, argv, "--value_bytes", &str)) { - size_t bytes = (strlen(str) + 1) / 3; - val_ptr_array = (uint8_t *)ns_dyn_mem_temporary_alloc(bytes); - if (val_ptr_array == NULL) { - tr_error("Failed to allocate memory for MLME-SET.request"); - return CMDLINE_RETCODE_FAIL; - } - if (string_to_bytes(str, val_ptr_array, bytes) != 0) { - ns_dyn_mem_free(val_ptr_array); - return CMDLINE_RETCODE_INVALID_PARAMETERS; - } - set_req.value_pointer = val_ptr_array; - } else if (cmd_parameter_int(argc, argv, "--value_uint8", &val)) { - if (val >= 0 && val <= 0xFF) { - val_uint8 = val; - set_req.value_pointer = &val_uint8; - } else { - return CMDLINE_RETCODE_INVALID_PARAMETERS; - } - } else if (cmd_parameter_int(argc, argv, "--value_uint16", &val)) { - if (val >= 0 && val <= 0xFFFF) { - val_uint16 = val; - set_req.value_pointer = &val_uint16; - } else { - return CMDLINE_RETCODE_INVALID_PARAMETERS; - } - } else if (cmd_parameter_int(argc, argv, "--value_uint32", &val)) { - if (val >= 0 && val <= 0x7FFFFFFF) { - val_uint32 = val; - set_req.value_pointer = &val_uint32; - } else { - return CMDLINE_RETCODE_INVALID_PARAMETERS; - } - } - if (cmd_parameter_int(argc, argv, "--value_size", &val)) { - if (val >= 0 && val <= 255) { - set_req.value_size = val; - } - } - - mac_interface->mlme_req(mac_interface, MLME_SET, &set_req); - ns_dyn_mem_free(val_ptr_array); - set_req.value_pointer = NULL; - return CMDLINE_RETCODE_SUCCESS; -} - -int mac_get_command(int argc, char *argv[]) -{ - char *str; - int32_t val; - - cmd_printf("MLME-GET.request\n"); - if (cmd_parameter_val(argc, argv, "--attr", &str)) { - uint32_t attribute = strtoul(str, NULL, 16); - if (attribute <= 255) { - get_req.attr = (mlme_attr_t)attribute; - } else { - return CMDLINE_RETCODE_INVALID_PARAMETERS; - } - } - if (cmd_parameter_int(argc, argv, "--attr_index", &val)) { - if (val >= 0 && val <= 255) { - get_req.attr_index = val; - } else { - return CMDLINE_RETCODE_INVALID_PARAMETERS; - } - } - mac_interface->mlme_req(mac_interface, MLME_GET, &get_req); - return CMDLINE_RETCODE_SUCCESS; -} - -int mac_reset_command(int argc, char *argv[]) -{ - bool boolean; - - cmd_printf("MLME-RESET.request\n"); - if (cmd_parameter_bool(argc, argv, "--set_default_pib", &boolean)) { - reset_req.SetDefaultPIB = boolean; - } - mac_interface->mlme_req(mac_interface, MLME_RESET, &reset_req); - return CMDLINE_RETCODE_SUCCESS; -} - -int mac_address_command(int argc, char *argv[]) -{ - char *str; - uint8_t ext_addr[8]; - - if (cmd_parameter_val(argc, argv, "--64-bit", &str)) { - if (string_to_bytes(str, ext_addr, 8) != 0) { - return CMDLINE_RETCODE_INVALID_PARAMETERS; - } - mac_interface->mac64_set(mac_interface, ext_addr); - cmd_printf("64-bit MAC address set to: %s\n", trace_array(ext_addr, 8)); - } else if (cmd_parameter_val(argc, argv, "--16-bit", &str)) { - uint32_t short_addr_32 = strtoul(str, NULL, 16); - if (short_addr_32 <= 0xFFFF) { - uint16_t short_addr = short_addr_32; - mlme_set_t set_req; - set_req.attr = macShortAddress; - set_req.value_pointer = &short_addr; - set_req.value_size = 2; - mac_interface->mlme_req(mac_interface, MLME_SET, &set_req); - cmd_printf("16-bit MAC address set to: 0x%04X\n", short_addr); - } else { - tr_warn("Invalid 16-bit MAC address given: %lu", short_addr_32); - } - } else if (argc == 1) { - if (mac_interface->mac64_get(mac_interface, MAC_EXTENDED_READ_ONLY, ext_addr) == 0) { - cmd_printf("EUI64: %s\n", trace_array(ext_addr, 8)); - } else { - tr_warn("Failed to read EUI64"); - return CMDLINE_RETCODE_FAIL; - } - if (mac_interface->mac64_get(mac_interface, MAC_EXTENDED_DYNAMIC, ext_addr) == 0) { - cmd_printf("MAC64: %s\n", trace_array(ext_addr, 8)); - } else { - tr_warn("Failed to read MAC64"); - return CMDLINE_RETCODE_FAIL; - } - } else { - return CMDLINE_RETCODE_INVALID_PARAMETERS; - } - return CMDLINE_RETCODE_SUCCESS; -} - -static int key_config_command(int argc, char *argv[]) -{ - char *str; - int32_t val; - bool boolean; - int lookup_index = 0, device_index = 0, usage_index = 0; - - if (cmd_parameter_val(argc, argv, "--key", &str)) { - if (strlen(str) == 2 * 16 + 15) { - if (string_to_bytes(str, key_descriptor.Key, 16) != 0) { - return CMDLINE_RETCODE_INVALID_PARAMETERS; - } - } else { - return CMDLINE_RETCODE_INVALID_PARAMETERS; - } - } - if (cmd_parameter_int(argc, argv, "--key_id_lookup_list_entries", &val)) { - if (val >= 0 && val < LOOKUP_DESCRIPTOR_TABLE_SIZE) { - key_descriptor.KeyIdLookupListEntries = val; - } else { - return CMDLINE_RETCODE_INVALID_PARAMETERS; - } - } - if (cmd_parameter_int(argc, argv, "--key_device_list_entries", &val)) { - if (val >= 0 && val < DEVICE_DESCRIPTOR_TABLE_SIZE) { - key_descriptor.KeyDeviceListEntries = val; - } else { - return CMDLINE_RETCODE_INVALID_PARAMETERS; - } - } - if (cmd_parameter_int(argc, argv, "--key_usage_list_entries", &val)) { - if (val >= 0 && val < USAGE_DESCRIPTOR_TABLE_SIZE) { - key_descriptor.KeyUsageListEntries = val; - } else { - return CMDLINE_RETCODE_INVALID_PARAMETERS; - } - } - if (cmd_parameter_int(argc, argv, "--lookup_index", &val)) { - if (val >= 0 && val < LOOKUP_DESCRIPTOR_TABLE_SIZE) { - lookup_index = val; - } else { - return CMDLINE_RETCODE_INVALID_PARAMETERS; - } - } - if (cmd_parameter_val(argc, argv, "--lookup_data", &str)) { - if (strlen(str) == 2 * 9 + 8) { - if (string_to_bytes(str, key_descriptor.KeyIdLookupList[lookup_index].LookupData, 9) != 0) { - return CMDLINE_RETCODE_INVALID_PARAMETERS; - } - } else { - return CMDLINE_RETCODE_INVALID_PARAMETERS; - } - } - if (cmd_parameter_int(argc, argv, "--lookup_data_size", &val)) { - if (val == 0 || val == 1) { - key_descriptor.KeyIdLookupList[lookup_index].LookupDataSize = val; - } else { - return CMDLINE_RETCODE_INVALID_PARAMETERS; - } - } - if (cmd_parameter_int(argc, argv, "--device_list_index", &val)) { - if (val >= 0 && val < DEVICE_DESCRIPTOR_TABLE_SIZE) { - device_index = val; - } else { - return CMDLINE_RETCODE_INVALID_PARAMETERS; - } - } - if (cmd_parameter_int(argc, argv, "--device_descriptor_handle", &val)) { - if (val >= 0 && val <= 255) { - key_descriptor.KeyDeviceList[device_index].DeviceDescriptorHandle = val; - } else { - return CMDLINE_RETCODE_INVALID_PARAMETERS; - } - } - if (cmd_parameter_bool(argc, argv, "--unique_device", &boolean)) { - key_descriptor.KeyDeviceList[device_index].UniqueDevice = boolean; - } - if (cmd_parameter_bool(argc, argv, "--blacklisted", &boolean)) { - key_descriptor.KeyDeviceList[device_index].Blacklisted = boolean; - } - if (cmd_parameter_int(argc, argv, "--usage_index", &val)) { - if (val >= 0 && val <= USAGE_DESCRIPTOR_TABLE_SIZE) { - usage_index = val; - } else { - return CMDLINE_RETCODE_INVALID_PARAMETERS; - } - } - if (cmd_parameter_int(argc, argv, "--frame_type", &val)) { - if (val >= 0 && val <= 3) { - key_descriptor.KeyUsageList[usage_index].FrameType = val; - } else { - return CMDLINE_RETCODE_INVALID_PARAMETERS; - } - } - if (key_descriptor.KeyUsageList[usage_index].FrameType == 3) { - if (cmd_parameter_int(argc, argv, "--command_frame_identifier", &val)) { - if (val >= 1 && val <= 9) { - key_descriptor.KeyUsageList[usage_index].CommandFrameIdentifier = val; - } else { - return CMDLINE_RETCODE_INVALID_PARAMETERS; - } - } - } - return CMDLINE_RETCODE_SUCCESS; -} - -static int key_add_command(int argc, char *argv[]) -{ - mlme_set_t set_req; - int32_t val; - int key_index = 0; - - if (cmd_parameter_int(argc, argv, "--index", &val)) { - if (val >= 0 && val <= 255) { - key_index = val; - } else { - return CMDLINE_RETCODE_INVALID_PARAMETERS; - } - } - - set_req.attr = macKeyTable; - set_req.attr_index = key_index; - set_req.value_pointer = &key_descriptor; - set_req.value_size = sizeof(mlme_key_descriptor_entry_t); - mac_interface->mlme_req(mac_interface, MLME_SET, &set_req); - return CMDLINE_RETCODE_SUCCESS; -} - -int mac_key_command(int argc, char *argv[]) -{ - char *cmd = argv[1]; - - if (strcmp(cmd, "config") == 0) { - return key_config_command(argc, argv); - } else if (strcmp(cmd, "add") == 0) { - return key_add_command(argc, argv); - } - return CMDLINE_RETCODE_INVALID_PARAMETERS; -} - -int mac_add_neighbour_command(int argc, char *argv[]) -{ - char *str; - int32_t val; - mlme_device_descriptor_t neighbour; - mlme_set_t set_req; - - neighbour.Exempt = false; - if (cmd_parameter_int(argc, argv, "--frame_ctr", &val)) { - neighbour.FrameCounter = val; - } - if (cmd_parameter_val(argc, argv, "--mac16", &str)) { - uint32_t short_addr = strtoul(str, NULL, 16); - if (short_addr <= 0xFFFF) { - neighbour.ShortAddress = short_addr; - } else { - return CMDLINE_RETCODE_INVALID_PARAMETERS; - } - } - if (cmd_parameter_val(argc, argv, "--mac64", &str)) { - if (strlen(str) == 2 * 8 + 7) { - if (string_to_bytes(str, neighbour.ExtAddress, 8) != 0) { - return CMDLINE_RETCODE_INVALID_PARAMETERS; - } - } else { - return CMDLINE_RETCODE_INVALID_PARAMETERS; - } - } - if (cmd_parameter_val(argc, argv, "--pan_id", &str)) { - uint32_t pan_id = strtoul(str, NULL, 16); - if (pan_id <= 0xFFFF) { - neighbour.PANId = val; - } else { - return CMDLINE_RETCODE_INVALID_PARAMETERS; - } - } - if (cmd_parameter_int(argc, argv, "--index", &val)) { - if (val >= 0 && val <= 255) { - set_req.attr_index = val; - } else { - return CMDLINE_RETCODE_INVALID_PARAMETERS; - } - } - - set_req.attr = macDeviceTable; - set_req.value_pointer = &neighbour; - set_req.value_size = sizeof(mlme_device_descriptor_t); - mac_interface->mlme_req(mac_interface, MLME_SET, &set_req); - return CMDLINE_RETCODE_SUCCESS; -} - -#ifndef DISABLE_FILTERING -static int filter_start(int argc, char *argv[]) -{ - char *str; - - if (cmd_parameter_val(argc, argv, "--mode", &str)) { - if (strcmp(str, "allow") == 0) { - return mac_filter_start(mac_interface->parent_id, MAC_FILTER_ALLOWED) < 0 ? CMDLINE_RETCODE_FAIL : CMDLINE_RETCODE_SUCCESS; - } else if (strcmp(str, "block") == 0) { - return mac_filter_start(mac_interface->parent_id, MAC_FILTER_BLOCKED) < 0 ? CMDLINE_RETCODE_FAIL : CMDLINE_RETCODE_SUCCESS;; - } else if (strcmp(str, "fixed") == 0) { - int32_t lqi, dbm; - if (cmd_parameter_int(argc, argv, "--lqi_m", &lqi) && - cmd_parameter_int(argc, argv, "--dbm_m", &dbm)) { - return mac_filter_start(mac_interface->parent_id, MAC_FILTER_FIXED(lqi, dbm)) < 0 ? CMDLINE_RETCODE_FAIL : CMDLINE_RETCODE_SUCCESS; - } - } - } - return CMDLINE_RETCODE_INVALID_PARAMETERS; -} - -static int filter_add(int argc, char *argv[]) -{ - char *str; - uint32_t short_addr; - uint8_t long_addr[8]; - int32_t lqi_m, lqi_add, dbm_m, dbm_add; - - if (cmd_parameter_int(argc, argv, "--lqi_m", &lqi_m) && - cmd_parameter_int(argc, argv, "--lqi_add", &lqi_add) && - cmd_parameter_int(argc, argv, "--dbm_m", &dbm_m) && - cmd_parameter_int(argc, argv, "--dbm_add", &dbm_add)) { - } else if (cmd_parameter_val(argc, argv, "--mode", &str)) { - if (strcmp(str, "allow")) { - lqi_m = dbm_m = 256; - lqi_add = dbm_add = 0; - } else if (strcmp(str, "block")) { - lqi_m = lqi_add = dbm_m = dbm_add = 0; - } else if (strcmp(str, "fixed")) { - lqi_add = dbm_add = 0; - if (cmd_parameter_int(argc, argv, "--lqi_m", &lqi_m) && - cmd_parameter_int(argc, argv, "--dbm_m", &dbm_m)) { - } else { - return CMDLINE_RETCODE_INVALID_PARAMETERS; - } - } else { - return CMDLINE_RETCODE_INVALID_PARAMETERS; - } - } else { - return CMDLINE_RETCODE_INVALID_PARAMETERS; - } - - if (cmd_parameter_val(argc, argv, "--short", &str)) { - short_addr = strtoul(str, NULL, 16); - if (short_addr <= 0xFFFF) { - return mac_filter_add_short(mac_interface->parent_id, short_addr, lqi_m, lqi_add, dbm_m, dbm_add) < 0 ? CMDLINE_RETCODE_FAIL : CMDLINE_RETCODE_SUCCESS; - } else { - return CMDLINE_RETCODE_INVALID_PARAMETERS; - } - } else if (cmd_parameter_val(argc, argv, "--long", &str)) { - if (string_to_bytes(str, long_addr, 8) != 0) { - return CMDLINE_RETCODE_INVALID_PARAMETERS; - } - return mac_filter_add_long(mac_interface->parent_id, long_addr, lqi_m, lqi_add, dbm_m, dbm_add) < 0 ? CMDLINE_RETCODE_FAIL : CMDLINE_RETCODE_SUCCESS; - } else { - return CMDLINE_RETCODE_INVALID_PARAMETERS; - } -} - -static int filter_remove(int argc, char *argv[]) -{ - char *str; - uint32_t short_addr; - uint8_t long_addr[8]; - - if (cmd_parameter_val(argc, argv, "--short", &str)) { - short_addr = strtoul(str, NULL, 16); - if (short_addr <= 0xFFFF) { - return mac_filter_delete_short(mac_interface->parent_id, short_addr) < 0 ? CMDLINE_RETCODE_FAIL : CMDLINE_RETCODE_SUCCESS; - } else { - return CMDLINE_RETCODE_INVALID_PARAMETERS; - } - } else if (cmd_parameter_val(argc, argv, "--long", &str)) { - if (string_to_bytes(str, long_addr, 8) != 0) { - return CMDLINE_RETCODE_INVALID_PARAMETERS; - } - return mac_filter_delete_long(mac_interface->parent_id, long_addr) < 0 ? CMDLINE_RETCODE_FAIL : CMDLINE_RETCODE_SUCCESS; - } else { - return CMDLINE_RETCODE_INVALID_PARAMETERS; - } -} - -static int filter_clear(int argc, char *argv[]) -{ - return mac_filter_clear(mac_interface->parent_id) < 0 ? CMDLINE_RETCODE_FAIL : CMDLINE_RETCODE_SUCCESS; -} - -static int filter_stop(int argc, char *argv[]) -{ - mac_filter_stop(mac_interface->parent_id); - return CMDLINE_RETCODE_SUCCESS; -} -#else -static int filter_start(int argc, char *argv[]) -{ - (void)argc; - (void)argv; - return 0; -} - -static int filter_add(int argc, char *argv[]) -{ - (void)argc; - (void)argv; - return 0; -} -static int filter_remove(int argc, char *argv[]) -{ - (void)argc; - (void)argv; - return 0; -} -static int filter_clear(int argc, char *argv[]) -{ - (void)argc; - (void)argv; - return 0; -} -static int filter_stop(int argc, char *argv[]) -{ - (void)argc; - (void)argv; - return 0; -} -#endif -int mac_filter_command(int argc, char *argv[]) -{ - char *cmd = argv[1]; - - if (strcmp(cmd, "start") == 0) { - return filter_start(argc, argv); - } else if (strcmp(cmd, "add") == 0) { - return filter_add(argc, argv); - } else if (strcmp(cmd, "remove") == 0) { - return filter_remove(argc, argv); - } else if (strcmp(cmd, "clear") == 0) { - return filter_clear(argc, argv); - } else if (strcmp(cmd, "stop") == 0) { - return filter_stop(argc, argv); - } - return CMDLINE_RETCODE_INVALID_PARAMETERS; -} - -int mac_config_status_command(int argc, char *argv[]) -{ - int32_t val; - char *str; - - if (cmd_parameter_int(argc, argv, "--data_conf", &val)) { - if (val >= 0 && val <= 255) { - expected_statuses.data_conf = val; - } else { - return CMDLINE_RETCODE_INVALID_PARAMETERS; - } - } else if (cmd_parameter_val(argc, argv, "--data_ind", &str)) { - size_t len = strlen(str); - ns_dyn_mem_free(expected_statuses.data_ind); - expected_statuses.data_ind = (uint8_t *)ns_dyn_mem_temporary_alloc(len); - expected_statuses.data_ind_len = len; - std::memcpy(expected_statuses.data_ind, str, len); - } else if (cmd_parameter_int(argc, argv, "--get", &val)) { - if (val >= 0 && val <= 255) { - expected_statuses.get_conf = val; - } else { - return CMDLINE_RETCODE_INVALID_PARAMETERS; - } - } else if (cmd_parameter_int(argc, argv, "--scan", &val)) { - if (val >= 0 && val <= 255) { - expected_statuses.scan_conf = val; - } else { - return CMDLINE_RETCODE_INVALID_PARAMETERS; - } - } else if (cmd_parameter_int(argc, argv, "--poll", &val)) { - if (val >= 0 && val <= 255) { - expected_statuses.poll_conf = val; - } else { - return CMDLINE_RETCODE_INVALID_PARAMETERS; - } - } else if (cmd_parameter_int(argc, argv, "--purge", &val)) { - if (val >= 0 && val <= 255) { - expected_statuses.purge_conf = val; - } else { - return CMDLINE_RETCODE_INVALID_PARAMETERS; - } - } else if (cmd_parameter_int(argc, argv, "--comm_status", &val)) { - if (val >= 0 && val <= 255) { - expected_statuses.comm_status_ind = val; - } else { - return CMDLINE_RETCODE_INVALID_PARAMETERS; - } - } else if (cmd_parameter_index(argc, argv, "--list") != -1) { - for (unsigned int i = 0; i < 256; ++i) { - const char *status = mlme_status_string(i); - if (status) { - cmd_printf("%hhu\t%s\n", i, status); - } - } - } else if (cmd_parameter_index(argc, argv, "--reset") != -1) { - expected_statuses.data_conf = MLME_SUCCESS; - expected_statuses.get_conf = MLME_SUCCESS; - expected_statuses.scan_conf = MLME_SUCCESS; - expected_statuses.poll_conf = MLME_SUCCESS; - expected_statuses.purge_conf = MLME_SUCCESS; - expected_statuses.comm_status_ind = MLME_SUCCESS; - expected_statuses.data_ind_len = 0; - expected_statuses.data_ind = NULL; - } else if (argc == 1) { - cmd_printf("MCPS-DATA.confirm: %d (%s)\n", expected_statuses.data_conf, mlme_status_string(expected_statuses.data_conf)); - cmd_printf("MLME-GET.confirm: %d (%s)\n", expected_statuses.get_conf, mlme_status_string(expected_statuses.get_conf)); - cmd_printf("MLME-SCAN.confirm: %d (%s)\n", expected_statuses.scan_conf, mlme_status_string(expected_statuses.scan_conf)); - cmd_printf("MLME-POLL.confirm: %d (%s)\n", expected_statuses.poll_conf, mlme_status_string(expected_statuses.poll_conf)); - cmd_printf("MCPS.PURGE.confirm. %d (%s)\n", expected_statuses.purge_conf, mlme_status_string(expected_statuses.purge_conf)); - cmd_printf("MLME-COMM-STATUS.indication: %d (%s)\n", expected_statuses.comm_status_ind, mlme_status_string(expected_statuses.comm_status_ind)); - cmd_printf("MCPS-DATA.indication: %s <%.*s>\n", trace_array(expected_statuses.data_ind, expected_statuses.data_ind_len), expected_statuses.data_ind_len, expected_statuses.data_ind); - } else { - return CMDLINE_RETCODE_INVALID_PARAMETERS; - } - return CMDLINE_RETCODE_SUCCESS; -} - -int mac_find_beacon_command(int argc, char *argv[]) -{ - char *str; - - if (cmd_parameter_val(argc, argv, "--data", &str)) { - for (int i = 0; i < MLME_MAC_RES_SIZE_MAX; ++i) { - if (received_beacons.beacons[i] == NULL) { - continue; - } - if (strncmp(received_beacons.beacons[i], str, received_beacons.beacon_lengths[i]) == 0) { - return CMDLINE_RETCODE_SUCCESS; - } - } - return CMDLINE_RETCODE_FAIL; - } else { - return CMDLINE_RETCODE_INVALID_PARAMETERS; - } -} - -int mac_wait_command(int argc, char *argv[]) -{ - int32_t val; - static uint32_t timeout_ms = 1000; - int remaining_ms = timeout_ms; - if (cmd_parameter_int(argc, argv, "--timeout", &val)) { - if (val >= 0) { - timeout_ms = val; - } else { - return CMDLINE_RETCODE_INVALID_PARAMETERS; - } - } - while (data_count < 1) { - ThisThread::sleep_for(10); - remaining_ms -= 10; - if (remaining_ms <= 0) { - return CMDLINE_RETCODE_FAIL; - } - } - data_count = 0; - return CMDLINE_RETCODE_SUCCESS; -} - -int mac_analyze_ed_command(int argc, char *argv[]) -{ - int32_t val; - int channel; - - if (cmd_parameter_int(argc, argv, "--channel", &val)) { - if (val >= 0 && val <= 26) { - channel = val; - } else { - return CMDLINE_RETCODE_INVALID_PARAMETERS; - } - } else { - return CMDLINE_RETCODE_INVALID_PARAMETERS; - } - - if (cmd_parameter_int(argc, argv, "--above", &val)) { - for (int i = 0; i < last_ed_results.count; ++i) { - if (last_ed_results.channel[i] == channel) { - return last_ed_results.ED_values[i] >= val ? CMDLINE_RETCODE_SUCCESS : CMDLINE_RETCODE_FAIL; - } - } - } else if (cmd_parameter_int(argc, argv, "--below", &val)) { - for (int i = 0; i < last_ed_results.count; ++i) { - if (last_ed_results.channel[i] == channel) { - return last_ed_results.ED_values[i] <= val ? CMDLINE_RETCODE_SUCCESS : CMDLINE_RETCODE_FAIL; - } - } - } else { - return CMDLINE_RETCODE_INVALID_PARAMETERS; - } - return CMDLINE_RETCODE_FAIL; -} - -static void reset_security(mlme_security_t *sec) -{ - sec->SecurityLevel = 0; - sec->KeyIdMode = 0; - sec->KeyIndex = 0; - memset(sec->Keysource, 0, 8); -} - -int reset_command(int argc, char *argv[]) -{ - wait_for_confirm = true; - silent_mode = false; - data_count = 0; - - start_req.PANId = 0x1234; - start_req.LogicalChannel = 11; - start_req.ChannelPage = 0; - start_req.StartTime = 0; - start_req.BeaconOrder = 15; - start_req.SuperframeOrder = 15; - start_req.PANCoordinator = true; - start_req.BatteryLifeExtension = false; - start_req.CoordRealignment = false; - reset_security(&start_req.CoordRealignKey); - reset_security(&start_req.BeaconRealignKey); - - scan_req.ScanType = MAC_ACTIVE_SCAN; - scan_req.ScanChannels.channel_page = CHANNEL_PAGE_0; - scan_req.ScanChannels.channel_mask[0] = 0x07FFF800; - reset_security(&scan_req.Key); - - data_req.SrcAddrMode = 3; - data_req.DstAddrMode = 3; - data_req.DstPANId = 0x1234; - memset(data_req.DstAddr, 0, 8); - data_req.msduLength = 0; - data_req.msdu = NULL; - data_req.msduHandle = 0; - data_req.TxAckReq = true; - data_req.InDirectTx = false; - data_req.PendingBit = false; - reset_security(&data_req.Key); - - poll_req.CoordAddrMode = 3; - poll_req.CoordPANId = 0x1234; - memset(poll_req.CoordAddress, 0, 8); - reset_security(&poll_req.Key); - - purge_req.msduHandle = 0; - - set_req.attr = (mlme_attr_t)0x39; - set_req.attr_index = 0; - set_req.value_pointer = NULL; - set_req.value_size = 0; - - get_req.attr = (mlme_attr_t)0x39; - get_req.attr_index = 0; - - reset_req.SetDefaultPIB = true; - - return CMDLINE_RETCODE_SUCCESS; -} - -int silent_mode_command(int argc, char *argv[]) -{ - char *cmd; - if (argc < 2) { - return CMDLINE_RETCODE_FAIL; - } - cmd = argv[1]; - if (strcmp(cmd, "on") == 0) { - silent_mode = true; - return CMDLINE_RETCODE_SUCCESS; - } else if (strcmp(cmd, "off") == 0) { - silent_mode = false; - return CMDLINE_RETCODE_SUCCESS; - } else { - return CMDLINE_RETCODE_INVALID_PARAMETERS; - } -} diff --git a/TEST_APPS/device/nanostack_mac_tester/source/mac_commands.h b/TEST_APPS/device/nanostack_mac_tester/source/mac_commands.h deleted file mode 100644 index a15d97faf674..000000000000 --- a/TEST_APPS/device/nanostack_mac_tester/source/mac_commands.h +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright (c) 2017, Arm Limited and affiliates. - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#ifndef MAC_COMMANDS_H_ -#define MAC_COMMANDS_H_ - -#include -#include - -#include "ns_cmdline.h" -#include "nsdynmemLIB.h" -#include "mbed_trace.h" -#include "mac_api.h" -#include "mlme.h" -#include "mac_mcps.h" -#include "mac_common_defines.h" -#include "mac_filter_api.h" -#include "mac_tester_util.h" - -#define LOOKUP_DESCRIPTOR_TABLE_SIZE 2 -#define DEVICE_DESCRIPTOR_TABLE_SIZE 2 -#define USAGE_DESCRIPTOR_TABLE_SIZE 2 -#define KEY_DESCRIPTOR_TABLE_SIZE 2 - -void mac_commands_init(void); - -void mac_data_confirm_handler(const mac_api_t *api, const mcps_data_conf_t *data); -void mac_data_indication_handler(const mac_api_t *api, const mcps_data_ind_t *data); -void mac_purge_confirm_handler(const mac_api_t *api, mcps_purge_conf_t *data); -void mac_mlme_confirm_handler(const mac_api_t *api, mlme_primitive id, const void *data); -void mac_mlme_indication_handler(const mac_api_t *api, mlme_primitive id, const void *data); - -int mac_start_command(int argc, char *argv[]); -int mac_scan_command(int argc, char *argv[]); -int mac_data_command(int argc, char *argv[]); -int mac_poll_command(int argc, char *argv[]); -int mac_purge_command(int argc, char *argv[]); -int mac_set_command(int argc, char *argv[]); -int mac_get_command(int argc, char *argv[]); -int mac_reset_command(int argc, char *argv[]); -int mac_address_command(int argc, char *argv[]); -int mac_key_command(int argc, char *argv[]); -int mac_add_neighbour_command(int argc, char *argv[]); -int mac_filter_command(int argc, char *argv[]); -int mac_config_status_command(int argc, char *argv[]); -int mac_find_beacon_command(int argc, char *argv[]); -int mac_wait_command(int argc, char *argv[]); -int mac_analyze_ed_command(int argc, char *argv[]); -int reset_command(int argc, char *argv[]); -int silent_mode_command(int argc, char *argv[]); - -#endif diff --git a/TEST_APPS/device/nanostack_mac_tester/source/mac_tester_util.cpp b/TEST_APPS/device/nanostack_mac_tester/source/mac_tester_util.cpp deleted file mode 100644 index 15fec17bef92..000000000000 --- a/TEST_APPS/device/nanostack_mac_tester/source/mac_tester_util.cpp +++ /dev/null @@ -1,124 +0,0 @@ -/* - * Copyright (c) 2017, Arm Limited and affiliates. - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#include "mac_tester_util.h" - -int string_to_bytes(const char *str, uint8_t *buf, int bytes) -{ - int len = strlen(str); - - if (len <= (3 * bytes - 1)) { - int i; - - for (i = 0; i < bytes; ++i) { - if (i * 3 < len) { - buf[i] = (uint8_t)strtoul(str + i * 3, NULL, 16); - } else { - buf[i] = 0; - } - } - return 0; - } - return -1; -} - -const char *mlme_status_string(uint8_t status) -{ - switch (status) { - case MLME_SUCCESS: - return "MLME_SUCCESS"; - case MLME_BUSY_CHAN: - return "MLME_BUSY_CHAN"; - case MLME_BUSY_RX: - return "MLME_BUSY_RX"; - case MLME_BUSY_TX: - return "MLME_BUSY_TX"; - case MLME_FORCE_TRX_OFF: - return "MLME_FORCE_TRX_OFF"; - case MLME_IDLE: - return "MLME_IDLE"; - case MLME_RX_ON: - return "MLME_RX_ON"; - case MLME_TRX_OFF: - return "MLME_TRX_OFF"; - case MLME_TX_ON: - return "MLME_TX_ON"; - case MLME_COUNTER_ERROR: - return "MLME_COUNTER_ERROR"; - case MLME_IMPROPER_KEY_TYPE: - return "MLME_IMPROPER_KEY_TYPE"; - case MLME_IMPROPER_SECURITY_LEVEL: - return "MLME_IMPROPER_SECURITY_LEVEL"; - case MLME_UNSUPPORTED_LEGACY: - return "MLME_UNSUPPORTED_LEGACY"; - case MLME_UNSUPPORTED_SECURITY: - return "MLME_UNSUPPORTED_SECURITY"; - case MLME_SECURITY_FAIL: - return "MLME_SECURITY_FAIL"; - case MLME_FRAME_TOO_LONG: - return "MLME_FRAME_TOO_LONG"; - case MLME_INVALID_HANDLE: - return "MLME_INVALID_HANDLE"; - case MLME_INVALID_PARAMETER: - return "MLME_INVALID_PARAMETER"; - case MLME_TX_NO_ACK: - return "MLME_TX_NO_ACK"; - case MLME_NO_BEACON: - return "MLME_NO_BEACON"; - case MLME_NO_DATA: - return "MLME_NO_DATA"; - case MLME_NO_SHORT_ADDRESS: - return "MLME_NO_SHORT_ADDRESS"; - case MLME_PAN_ID_CONFLICT: - return "MLME_PAN_ID_CONFLICT"; - case MLME_TRANSACTION_EXPIRED: - return "MLME_TRANSACTION_EXPIRED"; - case MLME_TRANSACTION_OVERFLOW: - return "MLME_TRANSACTION_OVERFLOW"; - case MLME_UNAVAILABLE_KEY: - return "MLME_UNAVAILABLE_KEY"; - case MLME_UNSUPPORTED_ATTRIBUTE: - return "MLME_UNSUPPORTED_ATTRIBUTE"; - case MLME_INVALID_ADDRESS: - return "MLME_INVALID_ADDRESS"; - case MLME_INVALID_INDEX: - return "MLME_INVALID_INDEX"; - case MLME_LIMIT_REACHED: - return "MLME_LIMIT_REACHED"; - case MLME_READ_ONLY: - return "MLME_READ_ONLY"; - case MLME_SCAN_IN_PROGRESS: - return "MLME_SCAN_IN_PROGRESS"; - case MLME_DATA_POLL_NOTIFICATION: - return "MLME_DATA_POLL_NOTIFICATION"; - default: - return NULL; - } -} - -int channel_from_mask(uint32_t channel_mask, int index) -{ - int expected_index = 0; - for (int i = 0; i < 27; ++i) { - if ((channel_mask >> i) & 1) { - if (expected_index == index) { - return i; - } - ++expected_index; - } - } - return -1; -} diff --git a/TEST_APPS/device/nanostack_mac_tester/source/mac_tester_util.h b/TEST_APPS/device/nanostack_mac_tester/source/mac_tester_util.h deleted file mode 100644 index a79273142724..000000000000 --- a/TEST_APPS/device/nanostack_mac_tester/source/mac_tester_util.h +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) 2017, Arm Limited and affiliates. - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#ifndef UTIL_H_ -#define UTIL_H_ - -#include -#include - -#include "mbed.h" -#include "mlme.h" - -int string_to_bytes(const char *str, uint8_t *buf, int bytes); -const char *mlme_status_string(uint8_t status); -int channel_from_mask(uint32_t channel_mask, int index); - -#endif diff --git a/TEST_APPS/device/nfcapp/NFCCommands.cpp b/TEST_APPS/device/nfcapp/NFCCommands.cpp deleted file mode 100644 index d9c6a609f1c5..000000000000 --- a/TEST_APPS/device/nfcapp/NFCCommands.cpp +++ /dev/null @@ -1,289 +0,0 @@ -/* - * Copyright (c) 2018 ARM Limited. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * Licensed under the Apache License, Version 2.0 (the License); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an AS IS BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#include -#include -#include -#include -#include -#include "mbed_events.h" -#include "mbed-client-cli/ns_cmdline.h" -#include "rtos/Thread.h" -#include "NFCTestShim.h" -#include "NFCCommands.h" - -#if MBED_CONF_NFCEEPROM -#include "NFCEEPROMDriver.h" -#include "NFCProcessEEPROM.h" -#endif - -using mbed::nfc::nfc_rf_protocols_bitmask_t; - -events::EventQueue HandleTestCommand::_nfcQueue; - -rtos::Thread nfcThread; -bool human_trace_enabled = true; - -NFCTestShim *HandleTestCommand::new_testshim() -{ -#if MBED_CONF_NFCEEPROM - mbed::nfc::NFCEEPROMDriver &eeprom_driver = get_eeprom_driver(_nfcQueue); - - return ((NFCTestShim *)(new NFCProcessEEPROM(_nfcQueue, eeprom_driver))); -#else - return ((NFCTestShim *)(new NFCProcessController(_nfcQueue))); -#endif // EEPROM - -} - -void HandleTestCommand::nfc_routine() -{ - _nfcQueue.dispatch_forever(); -} - -void trace_printf(const char *fmt, ...) -{ - if (human_trace_enabled) { - va_list ap; - va_start(ap, fmt); - cmd_vprintf(fmt, ap); - va_end(ap); - } -} - -HandleTestCommand::HandleTestCommand() -{ - osStatus status = nfcThread.start(mbed::callback(&HandleTestCommand::nfc_routine)); - MBED_ASSERT(status == osOK); -} - -int HandleTestCommand::cmd_get_last_nfc_error(int argc, char *argv[]) -{ - _nfcQueue.call(NFCTestShim::cmd_get_last_nfc_error); - return (CMDLINE_RETCODE_EXCUTING_CONTINUE); -} - -/** returns compile time flag if NFC EEPROM was compiled */ -int HandleTestCommand::cmd_get_conf_nfceeprom(int argc, char *argv[]) -{ - _nfcQueue.call(NFCTestShim::cmd_get_conf_nfceeprom); - return (CMDLINE_RETCODE_EXCUTING_CONTINUE); -} - - - -int HandleTestCommand::cmd_set_trace(int argc, char *argv[]) -{ - human_trace_enabled = false; - if (argc > 1) { - static char buffer[7]; - char *p_buffer = buffer; - strncpy(buffer, argv[1], sizeof(buffer) - 1); - buffer[sizeof(buffer) - 1] = 0; - while (*p_buffer) { - *p_buffer = toupper(*p_buffer); - p_buffer++; - } - cmd_printf(buffer); - human_trace_enabled = (0 == strcmp(buffer, "TRUE")) || (0 == strcmp(buffer, "1")) || (0 == strcmp(buffer, "ON")); - } - cmd_printf("set trace '%s'", (human_trace_enabled ? "true" : "false")); - return (CMDLINE_RETCODE_SUCCESS); -} - - -//////////////////////////////////////////////////////////////////////////////////// - -int HandleTestCommand::cmd_set_last_nfc_error(int argc, char *argv[]) -{ - if (argc <= 1) { - cmd_printf("setlastnfcerror() invalid parameter(s)\r\n"); - return (CMDLINE_RETCODE_INVALID_PARAMETERS); - } else { - int value = strtol(argv[1], NULL, 10); - _nfcQueue.call(NFCTestShim::cmd_set_last_nfc_error, value); - } - return (CMDLINE_RETCODE_EXCUTING_CONTINUE); -} - - -int HandleTestCommand::cmd_get_max_ndef(int argc, char *argv[]) -{ - if (pNFC_Test_Shim) { - _nfcQueue.call(pNFC_Test_Shim, &NFCTestShim::cmd_get_max_ndef); - return CMDLINE_RETCODE_EXCUTING_CONTINUE; - } - return CMDLINE_RETCODE_FAIL; -} - - -int HandleTestCommand::cmd_init_nfc(int argc, char *argv[]) -{ - if (pNFC_Test_Shim) { - cmd_printf("WARN init called again!\r\n"); // only legal here, if eeprom driver stops talking - } else { - pNFC_Test_Shim = new_testshim(); - } - _nfcQueue.call(pNFC_Test_Shim, &NFCTestShim::cmd_init); - return (CMDLINE_RETCODE_EXCUTING_CONTINUE); -} - -int HandleTestCommand::cmd_read_message(int argc, char *argv[]) -{ - _nfcQueue.call(pNFC_Test_Shim, &NFCTestShim::cmd_read_nfc_contents); - - return (CMDLINE_RETCODE_EXCUTING_CONTINUE); -} - -int HandleTestCommand::cmd_set_smartposter(int argc, char *argv[]) -{ - // args are "setsmartposter", "" - if (argc <= 1) { - cmd_printf("setlastnfcerror() invalid parameter(s)\r\n"); - return (CMDLINE_RETCODE_INVALID_PARAMETERS); - } else { - // parse arg and queue it up - char *uri = (char *) malloc(strlen(argv[1]) + 1); - if (uri) { - strcpy(uri, argv[1]); - _nfcQueue.call(pNFC_Test_Shim, &NFCTestShim::cmd_set_smartposter, - uri); // called thread must free - } else { - cmd_printf("WARN out of memory!\r\n"); - return (CMDLINE_RETCODE_FAIL); - } - } - return (CMDLINE_RETCODE_EXCUTING_CONTINUE); -} - -int HandleTestCommand::cmd_erase(int argc, char *argv[]) -{ - _nfcQueue.call(pNFC_Test_Shim, &NFCTestShim::cmd_erase); - return (CMDLINE_RETCODE_EXCUTING_CONTINUE); -} - -int HandleTestCommand::cmd_write_long_ndef_message(int argc, char *argv[]) -{ - size_t length, idx, sourceLength; - static const char alphabet[] = "thequickbrownfoxjumpedoverthelazydog"; - char *data; - const char *sourceMessage; - - // expect 2 or 3 args " [optional-text]" - if (argc < 2) { - cmd_printf("supply length of message\r\n"); - return (CMDLINE_RETCODE_INVALID_PARAMETERS); - } - - int converted = sscanf(argv[1], "%d", &length); - if (1 != converted) { - cmd_printf("Cannot convert value to int\r\n"); - return (CMDLINE_RETCODE_INVALID_PARAMETERS); - } - // check that it would not overflow - if (length > MBED_CONF_APP_TEST_NDEF_MSG_MAX) { - cmd_printf("Buffer length may not exceed %d !\r\n", (int)MBED_CONF_APP_TEST_NDEF_MSG_MAX); - return (CMDLINE_RETCODE_FAIL); - } - - data = (char *) malloc(length + 1); - if (!data) { - cmd_printf("WARN out of memory!\r\n"); - return (CMDLINE_RETCODE_FAIL); - } - if (argc > 2) { - // user provided text to copy into text NDEF record - sourceMessage = argv[2]; - } else { - // use our internal default message to copy into the text NDEF - sourceMessage = alphabet; - } - sourceLength = strlen(sourceMessage); - for (idx = 0; idx < length; idx++) { - data[idx] = sourceMessage[idx % sourceLength]; - } - data[length] = '\0'; - - // method must release buffer - _nfcQueue.call(pNFC_Test_Shim, &NFCTestShim::cmd_write_long, data); - return (CMDLINE_RETCODE_EXCUTING_CONTINUE); -} - -int HandleTestCommand::cmd_start_discovery(int argc, char *argv[]) -{ - if ((argc > 1) && (0 == strcmp(argv[1], "man"))) { - trace_printf("User must restart discovery manually()\r\n"); - _nfcQueue.call(pNFC_Test_Shim, &NFCTestShim::cmd_start_discovery, false); - } else { - trace_printf("App will restart discovery loop on auto()\r\n"); - _nfcQueue.call(pNFC_Test_Shim, &NFCTestShim::cmd_start_discovery, true); - } - return (CMDLINE_RETCODE_EXCUTING_CONTINUE); -} - -int HandleTestCommand::cmd_stop_discovery(int argc, char *argv[]) -{ - _nfcQueue.call(pNFC_Test_Shim, &NFCTestShim::cmd_stop_discovery); - return (CMDLINE_RETCODE_EXCUTING_CONTINUE); -} - -int HandleTestCommand::cmd_get_supported_rf_protocols(int argc, char *argv[]) -{ - _nfcQueue.call(pNFC_Test_Shim, &NFCTestShim::cmd_get_rf_protocols); - return (CMDLINE_RETCODE_EXCUTING_CONTINUE); -} - -bool HandleTestCommand::set_protocol_target( - nfc_rf_protocols_bitmask_t &bitmask, const char *protocolName) -{ - bool parsed = false; - if (0 == strcmp(protocolName, "t1t")) { - parsed = bitmask.target_t1t = true; - } - if (0 == strcmp(protocolName, "t2t")) { - parsed = bitmask.target_t2t = true; - } - if (0 == strcmp(protocolName, "t3t")) { - parsed = bitmask.target_t3t = true; - } - if (0 == strcmp(protocolName, "t5t")) { - parsed = bitmask.target_t5t = true; - } - if (0 == strcmp(protocolName, "isodep")) { - parsed = bitmask.target_iso_dep = true; - } - if (0 == strcmp(protocolName, "nfcdep")) { - parsed = bitmask.target_nfc_dep = true; - } - return (parsed); -} - -int HandleTestCommand::cmd_configure_rf_protocols(int argc, char *argv[]) -{ - nfc_rf_protocols_bitmask_t protocols = { 0 }; - - int argindex = argc; - while (argindex > 1) { - if (!set_protocol_target(protocols, argv[argindex - 1])) { - cmd_printf("Unknown protocol %s", argv[argindex - 1]); - return (CMDLINE_RETCODE_INVALID_PARAMETERS); - } - argindex--; - } - _nfcQueue.call(pNFC_Test_Shim, &NFCTestShim::cmd_configure_rf_protocols, - protocols); - return (CMDLINE_RETCODE_EXCUTING_CONTINUE); -} - diff --git a/TEST_APPS/device/nfcapp/NFCCommands.h b/TEST_APPS/device/nfcapp/NFCCommands.h deleted file mode 100644 index ffa9746f3ecb..000000000000 --- a/TEST_APPS/device/nfcapp/NFCCommands.h +++ /dev/null @@ -1,112 +0,0 @@ -/* - * Copyright (c) 2018 ARM Limited. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * Licensed under the Apache License, Version 2.0 (the License); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an AS IS BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef _NFCCOMMANDS_H_INCLUDED -#define _NFCCOMMANDS_H_INCLUDED - -#if MBED_CONF_NFCEEPROM -#include "NFCProcessEEPROM.h" -#else -#include "NFCProcessCtrl.h" -#endif - -// see https://support.microsoft.com/en-my/help/208427/maximum-url-length-is-2-083-characters-in-internet-explorer -#define MAX_URL_LENGTH 2000 - -#ifndef MBED_CONF_NFCEEPROM -#define MBED_CONF_NFCEEPROM false -#endif - - -/** - * \brief adds human-readable traces not needed by the framework, filter is via a switch set_trace_enable() - * \param fmt standard printf formatter - * \param varargs - */ -void trace_printf(const char *fmt, ...); - -/** - * \brief turns on human readable traces - * \param enabled : set to false to disable the extra traces - */ -void set_trace_enable(bool enabled = true); - -/** - * HandleTestCommand turns all the typed-in/serial commands into function calls sent via a eventqueue to the driver - * shim/wrapper class. - * Methods with cmd_ prefix map to the serial commands, and are building blocks for test cases and scenarios. The - * first function a test must call is typically the initnfc command. Commands report back a test verdict, and a - * NFC status code. The test verdict is always success unless the command is not allowed. Tests much check the - * NFC error code for NFC_OK or zero; this pattern allows us to write negative tests which expect a specific NFC error. - * - * Handlers are statics because the test framework is not supporting C++ - */ -class HandleTestCommand { -public: - HandleTestCommand(); - - /** return and clear the last result code. Type "help getlastnfcerror" for a list of error codes */ - static int cmd_get_last_nfc_error(int argc, char *argv[]); - - /** internal function to test getlastnfcerror */ - static int cmd_set_last_nfc_error(int argc, char *argv[]); - - /** returns compile time flag if NFC EEPROM was compiled */ - static int cmd_get_conf_nfceeprom(int argc, char *argv[]); - - static int cmd_set_trace(int argc, char *argv[]); - - /** For EEPROM, returns the driver max_ndef value, else returns the app config MBED_CONF_APP_TEST_NDEF_MSG_MAX */ - static int cmd_get_max_ndef(int argc, char *argv[]); - - /** Init must be called before invoking any other calls, obtains a driver reference and initializes driver */ - static int cmd_init_nfc(int argc, char *argv[]); - /** write a smartposter url, 'Sp' NDEF to the target */ - static int cmd_set_smartposter(int argc, char *argv[]); - /** erases the EEPROM if present */ - static int cmd_erase(int argc, char *argv[]); - - /** Returns a CSV list of protocols supported */ - static int cmd_get_supported_rf_protocols(int argc, char *argv[]); - /** Sets the protocols supported (unimplemented) */ - static int cmd_configure_rf_protocols(int argc, char *argv[]); - /** starts the NFC discovery loop if controller, has no effect on EEPROM */ - static int cmd_start_discovery(int argc, char *argv[]); - /** stops the NFC discovery loop if controller */ - static int cmd_stop_discovery(int argc, char *argv[]); - - /** read raw EEPROM contents, reads a buffer if a controller is used */ - static int cmd_read_message(int argc, char *argv[]); - /** write a text 'T' NDEF message to the target */ - static int cmd_write_long_ndef_message(int argc, char *argv[]); - -private: - /** set corresponding mask bit on in referenced structure, return false if the supplied string cannot parse */ - static bool set_protocol_target(mbed::nfc::nfc_rf_protocols_bitmask_t &bitmask, const char *protocolName); - static NFCTestShim *new_testshim(); - static void nfc_routine(); - - static events::EventQueue _nfcQueue; -}; - - -// un-implemented or sparse support in drivers, so not covered -int cmd_is_iso7816_supported(int argc, char *argv[]); -int cmd_add_iso7816_application(int argc, char *argv[]); -int cmd_set_tagtype(int argc, char *argv[]); -int cmd_get_tagtype(int argc, char *argv[]); - -#endif // _NFCCOMMANDS_H_INCLUDED diff --git a/TEST_APPS/device/nfcapp/NFCProcessCtrl.cpp b/TEST_APPS/device/nfcapp/NFCProcessCtrl.cpp deleted file mode 100644 index 30fabb103681..000000000000 --- a/TEST_APPS/device/nfcapp/NFCProcessCtrl.cpp +++ /dev/null @@ -1,207 +0,0 @@ -/* - * Copyright (c) 2018 ARM Limited. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * Licensed under the Apache License, Version 2.0 (the License); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an AS IS BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#include -#include -#include -#include -#include "mbed_events.h" -#include "mbed-client-cli/ns_cmdline.h" - -#include "nfc/stack/nfc_errors.h" - -#include "nfc/ndef/common/Text.h" -#include "nfc/ndef/common/URI.h" -#include "nfc/ndef/common/Mime.h" -#include "nfc/ndef/MessageBuilder.h" -#include "nfc/ndef/common/util.h" - - -#include "NFCCommands.h" -#include "NFCProcessCtrl.h" -#include "SmartPoster.h" - -using mbed::Span; -#if ! MBED_CONF_NFCEEPROM -using mbed::nfc::nfc_rf_protocols_bitmask_t; -using mbed::nfc::ndef::MessageBuilder; -using mbed::nfc::ndef::RecordType; -using mbed::nfc::ndef::Record; -using mbed::nfc::ndef::RecordID; -using mbed::nfc::ndef::RecordPayload; -using mbed::nfc::ndef::common::span_from_cstr; -using mbed::nfc::ndef::common::Mime; -using mbed::nfc::ndef::common::Text; -using mbed::nfc::ndef::common::URI; -using mbed::nfc::NFCController; - -/** - * Implements NFCRemoteInitiator::Delegate, NFCController::Delegate - */ - -NFCProcessController::NFCProcessController(events::EventQueue &queue) : - NFCTestShim(queue), - // pins: mosi, miso, sclk, ssel, irq, rst - _pn512_transport(D11, D12, D13, D10, A1, A0), _pn512_driver( - &_pn512_transport), - _nfc_controller(&_pn512_driver, &queue, _ndef_buffer) -{ -} - -/** - * Initialise and configure the NFC controller. - * - * @return NFC_OK in case of success or a meaningful error code in case of - * failure. - */ -nfc_err_t NFCProcessController::init() -{ - trace_printf("init()\r\n"); - - // register callbacks - _nfc_controller.set_delegate(this); - return _nfc_controller.initialize(); -} - - -void NFCProcessController::cmd_get_max_ndef() -{ - cmd_printf("{{maxndef=%d}}\r\n", (int)MBED_CONF_APP_TEST_NDEF_MSG_MAX); - cmd_ready(CMDLINE_RETCODE_SUCCESS); -} - -/** - * Start the discovery of peers. - * - * @return NFC_OK in case of success or a meaningful error code in case of - * failure. - */ -nfc_err_t NFCProcessController::start_discovery() -{ - trace_printf("start_discovery()\r\n"); - - return _nfc_controller.start_discovery(); -} - -/** - * Stop discovery. - * - * @return NFC_OK in case of success or a meaningful error code in case of - * failure. - */ -nfc_err_t NFCProcessController::stop_discovery() -{ - trace_printf("stop_discovery()\r\n"); - return _nfc_controller.cancel_discovery(); -} - -nfc_rf_protocols_bitmask_t NFCProcessController::get_rf_protocols() -{ - trace_printf("get_supported_rf_protocols()\r\n"); - return _nfc_controller.get_supported_rf_protocols(); -} - -nfc_err_t NFCProcessController::set_rf_protocols( - nfc_rf_protocols_bitmask_t protocols) -{ - trace_printf("configure_rf_protocols()\r\n"); - - return _nfc_controller.configure_rf_protocols(protocols); -} - - -/* ------------------------------------------------------------------------ - * Implementation of NFCRemoteInitiator::Delegate - */ -void NFCProcessController::on_connected() -{ - cmd_printf("on_connected()\r\n"); -} - -void NFCProcessController::on_disconnected() -{ - cmd_printf("on_disconnected()\r\n"); - - // reset the state of the remote initiator - _nfc_remote_initiator->set_delegate(NULL); - _nfc_remote_initiator.reset(); - - // restart peer discovery - _nfc_controller.start_discovery(); -} - -void NFCProcessController::parse_ndef_message( - const Span &buffer) -{ - size_t len = buffer.size(); - // copy remotely written message into our dummy buffer - if (len <= sizeof(_ndef_write_buffer)) { - trace_printf("Store remote ndef message of size %d\r\n", len); - memcpy(_ndef_write_buffer, buffer.data(), len); - _ndef_write_buffer_used = len; - } else { - trace_printf("Remote ndef message of size %d too large!\r\n", len); - } -} - -size_t NFCProcessController::build_ndef_message(const Span &buffer) -{ - trace_printf("Copying message %d bytes to query buffer\r\n", - _ndef_write_buffer_used); - memcpy(buffer.data(), _ndef_write_buffer, _ndef_write_buffer_used); - for (size_t k = 0; k < _ndef_write_buffer_used; k++) { - cmd_printf("%02x ", buffer[k]); - } - return _ndef_write_buffer_used; -} - -const char *NFCProcessController::str_discovery_terminated_reason( - nfc_discovery_terminated_reason_t reason) -{ - static const char *reasons[4] = { "completed", "cancelled", "rf error"}; - switch (reason) { - case nfc_discovery_terminated_completed : - case nfc_discovery_terminated_canceled: - case nfc_discovery_terminated_rf_error: - return reasons[reason]; - } - return "unexpected!"; -} - - -void NFCProcessController::on_discovery_terminated( - nfc_discovery_terminated_reason_t reason) -{ - trace_printf("on_discovery_terminated(%s)\r\n", - str_discovery_terminated_reason(reason)); - if (reason != nfc_discovery_terminated_completed - && this->_discovery_restart) { - start_discovery(); - } -} - -void NFCProcessController::on_nfc_initiator_discovered( - const SharedPtr &nfc_initiator) -{ - trace_printf("on_nfc_initiator_discovered()\r\n"); - - // setup the local remote initiator - _nfc_remote_initiator = nfc_initiator; - _nfc_remote_initiator->set_delegate(this); - _nfc_remote_initiator->connect(); -} - -#endif // #if ! MBED_CONF_NFCEEPROM - diff --git a/TEST_APPS/device/nfcapp/NFCProcessCtrl.h b/TEST_APPS/device/nfcapp/NFCProcessCtrl.h deleted file mode 100644 index 2f610bc08ce2..000000000000 --- a/TEST_APPS/device/nfcapp/NFCProcessCtrl.h +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright (c) 2018 ARM Limited. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * Licensed under the Apache License, Version 2.0 (the License); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an AS IS BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef _NFCPROCESS_H_INCLUDED -#define _NFCPROCESS_H_INCLUDED - -#include -#include -#include -#include -#include "mbed_events.h" -#include "nfc/ndef/MessageBuilder.h" -#include "nfc/ndef/common/URI.h" -#include "nfc/ndef/common/util.h" -#include "NFCTestShim.h" - -#if !MBED_CONF_NFCEEPROM - -#include "nfc/nfcdefinitions.h" -#ifdef TARGET_PN512 -#include "nfc/controllers/PN512Driver.h" -#include "nfc/controllers/PN512SPITransportDriver.h" -#endif -#include "nfc/NFCRemoteInitiator.h" -#include "nfc/NFCController.h" -#include "nfc/ndef/common/util.h" - -/** - * Wrapper class handles calls and callbacks for NFC controller drivers. Note, that users must call "start" - * in order to start the discovery loop for controllers. An internal buffer stores the NFC message and records. - */ -class NFCProcessController: NFCTestShim, - mbed::nfc::NFCRemoteInitiator::Delegate, - mbed::nfc::NFCController::Delegate { -public: - NFCProcessController(events::EventQueue &queue); - - void cmd_get_max_ndef(); - nfc_err_t init(); - nfc_err_t start_discovery(); - nfc_err_t stop_discovery(); - mbed::nfc::nfc_rf_protocols_bitmask_t get_rf_protocols(); - nfc_err_t set_rf_protocols(mbed::nfc::nfc_rf_protocols_bitmask_t protocols); - - virtual void parse_ndef_message(const mbed::Span &buffer); - virtual size_t build_ndef_message(const mbed::Span &buffer); - const char *str_discovery_terminated_reason( - nfc_discovery_terminated_reason_t reason); - -private: - // these events are handled, to restart discovery - /** - * Implementation of NFCRemoteEndpoint::Delegate */ - virtual void on_connected(); - /** - * Implementation of NFCRemoteEndpoint::Delegate */ - virtual void on_disconnected(); - /** - * Implementation of NFCController::Delegate */ - virtual void on_discovery_terminated( - nfc_discovery_terminated_reason_t reason); - /** - * Implementation of NFCController::Delegate */ - virtual void on_nfc_initiator_discovered( - const SharedPtr &nfc_initiator); - -private: - mbed::nfc::PN512SPITransportDriver _pn512_transport; - mbed::nfc::PN512Driver _pn512_driver; - mbed::nfc::NFCController _nfc_controller; - SharedPtr _nfc_remote_initiator; -}; -#endif // Controller - -#endif // _NFCPROCESS_H_INCLUDED diff --git a/TEST_APPS/device/nfcapp/NFCProcessEEPROM.cpp b/TEST_APPS/device/nfcapp/NFCProcessEEPROM.cpp deleted file mode 100644 index f475ccc65cfc..000000000000 --- a/TEST_APPS/device/nfcapp/NFCProcessEEPROM.cpp +++ /dev/null @@ -1,146 +0,0 @@ -/* - * Copyright (c) 2018 ARM Limited. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * Licensed under the Apache License, Version 2.0 (the License); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an AS IS BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#include -#include -#include -#include -#include -#include "mbed_events.h" -#include "mbed-client-cli/ns_cmdline.h" - -#include "nfc/stack/nfc_errors.h" -#include "nfc/ndef/common/Text.h" -#include "nfc/ndef/common/URI.h" -#include "nfc/ndef/common/Mime.h" -#include "nfc/ndef/MessageBuilder.h" -#include "nfc/ndef/common/util.h" -#if MBED_CONF_NFCEEPROM -#include "NFCEEPROMDriver.h" - -#include "NFCProcessEEPROM.h" -#include "SmartPoster.h" - -using mbed::Span; -using mbed::nfc::ndef::MessageBuilder; -using mbed::nfc::ndef::RecordType; -using mbed::nfc::ndef::Record; -using mbed::nfc::ndef::RecordID; -using mbed::nfc::ndef::RecordPayload; -using mbed::nfc::ndef::common::span_from_cstr; -using mbed::nfc::ndef::common::Mime; -using mbed::nfc::ndef::common::Text; -using mbed::nfc::ndef::common::URI; -using mbed::nfc::NFCEEPROM; -using mbed::nfc::NFCEEPROMDriver; - -// implements : mbed::nfc::NFCEEPROM::Delegate -NFCProcessEEPROM::NFCProcessEEPROM(events::EventQueue &queue, NFCEEPROMDriver &eeprom_driver) : - NFCTestShim(queue), _eeprom(&eeprom_driver, &queue, _ndef_buffer), _ptr_eeprom_driver(&eeprom_driver) -{} - -nfc_err_t NFCProcessEEPROM::init() -{ - nfc_err_t err = _eeprom.initialize(); - if (err != NFC_OK) { - cmd_printf("NFCProcessEEPROM::init() (error: %d)!\r\n", err); - _queue.break_dispatch(); - } else { - cmd_printf("NFCProcessEEPROM::init() OK\r\n"); - } - _eeprom.set_delegate(this); - return (err); -} - - -void NFCProcessEEPROM::cmd_get_max_ndef() -{ - cmd_printf("{{maxndef=%d}}\r\n", (int)_ptr_eeprom_driver->read_max_size()); - cmd_ready(CMDLINE_RETCODE_SUCCESS); -} - -void NFCProcessEEPROM::queue_write_call() -{ - cmd_printf("NFCProcessEEPROM::queue_write_call() entry\r\n"); - _queue.call(&_eeprom, &NFCEEPROM::write_ndef_message); -} - -void NFCProcessEEPROM::queue_read_call() -{ - cmd_printf("NFCProcessEEPROM::queue_read_call() entry\r\n"); - _queue.call(&_eeprom, &NFCEEPROM::read_ndef_message); -} - -void NFCProcessEEPROM::queue_erase_call() -{ - cmd_printf("NFCProcessEEPROM::queue_erase_call() entry\r\n"); - _queue.call(&_eeprom, &NFCEEPROM::erase_ndef_message); -} - -void NFCProcessEEPROM::on_ndef_message_written(nfc_err_t result) -{ - set_last_nfc_error(result); - if (result == NFC_OK) { - cmd_printf("message written successfully\r\n"); - } else { - cmd_printf("Failed to write (error: %d)!\r\n", result); - } - // complete the async test method here - cmd_ready(CMDLINE_RETCODE_SUCCESS); -} - -void NFCProcessEEPROM::on_ndef_message_read(nfc_err_t result) -{ - set_last_nfc_error(result); - if (result == NFC_OK) { - cmd_printf("message read successfully\r\n"); - } else { - cmd_printf("Failed to read (error: %d)!\r\n", result); - } - // complete the async test method here - cmd_ready(CMDLINE_RETCODE_SUCCESS); -} - -void NFCProcessEEPROM::on_ndef_message_erased(nfc_err_t result) -{ - set_last_nfc_error(result); - if (result == NFC_OK) { - cmd_printf("message erased successfully\r\n"); - } else { - cmd_printf("Failed to erase (error: %d)!\r\n", result); - } - // complete the async test method here - cmd_ready(CMDLINE_RETCODE_SUCCESS); -} - -void NFCProcessEEPROM::parse_ndef_message(const Span &buffer) -{ - cmd_printf("Received an ndef message of size %d\r\n", buffer.size()); - print_ndef_message(buffer, buffer.size()); -} - -size_t NFCProcessEEPROM::build_ndef_message(const Span &buffer) -{ - cmd_printf("Copying ndef message %d bytes into buffer\r\n", _ndef_write_buffer_used); - // make a copy into our buffer - memcpy(buffer.data(), _ndef_write_buffer, _ndef_write_buffer_used); - for (size_t k = 0; k < _ndef_write_buffer_used; k++) { - cmd_printf("%02x ", buffer[k]); - } - return _ndef_write_buffer_used; -} - -#endif // MBED_CONF_NFCEEPROM - diff --git a/TEST_APPS/device/nfcapp/NFCProcessEEPROM.h b/TEST_APPS/device/nfcapp/NFCProcessEEPROM.h deleted file mode 100644 index c56fec724839..000000000000 --- a/TEST_APPS/device/nfcapp/NFCProcessEEPROM.h +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright (c) 2018 ARM Limited. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * Licensed under the Apache License, Version 2.0 (the License); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an AS IS BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef _NFCPROCESS_H_INCLUDED -#define _NFCPROCESS_H_INCLUDED - -#include -#include -#include -#include - -#include "nfc/ndef/MessageBuilder.h" -#include "nfc/ndef/common/URI.h" -#include "nfc/ndef/common/util.h" -#include "NFCTestShim.h" - -#if MBED_CONF_NFCEEPROM -#include "NFCEEPROM.h" -#include "EEPROMDriver.h" - - -/** - * Wrapper class handles events specific to the EEPROM driver. - */ -class NFCProcessEEPROM : NFCTestShim, mbed::nfc::NFCEEPROM::Delegate { -public: - NFCProcessEEPROM(events::EventQueue &queue, mbed::nfc::NFCEEPROMDriver &eeprom_driver); - virtual nfc_err_t init(); - void queue_write_call(); - void queue_write_long_call(); - void queue_read_call(); - void queue_erase_call(); - virtual void cmd_get_max_ndef(); - - -private: - virtual void on_ndef_message_written(nfc_err_t result); - virtual void on_ndef_message_read(nfc_err_t result); - virtual void parse_ndef_message(const mbed::Span &buffer); - virtual size_t build_ndef_message(const mbed::Span &buffer); - virtual void on_ndef_message_erased(nfc_err_t result); -private: - mbed::nfc::NFCEEPROM _eeprom; - mbed::nfc::NFCEEPROMDriver *_ptr_eeprom_driver; -}; - -#endif // eeprom - -#endif // _NFCPROCESS_H_INCLUDED diff --git a/TEST_APPS/device/nfcapp/NFCTestShim.cpp b/TEST_APPS/device/nfcapp/NFCTestShim.cpp deleted file mode 100644 index c62482f210a1..000000000000 --- a/TEST_APPS/device/nfcapp/NFCTestShim.cpp +++ /dev/null @@ -1,408 +0,0 @@ -/* - * Copyright (c) 2018 ARM Limited. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * Licensed under the Apache License, Version 2.0 (the License); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an AS IS BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#include -#include -#include -#include -#include -#include "mbed-client-cli/ns_cmdline.h" -#include "nfc/ndef/common/Text.h" -#include "nfc/ndef/common/URI.h" -#include "nfc/ndef/common/Mime.h" -#include "nfc/ndef/MessageBuilder.h" -#include "nfc/ndef/common/util.h" -#include "nfc/nfcdefinitions.h" - -#include "NFCEEPROMDriver.h" -#include "NFCCommands.h" -#include "NFCTestShim.h" -#include "SmartPoster.h" - -using mbed::Span; -using mbed::nfc::ndef::MessageBuilder; -using mbed::nfc::ndef::RecordType; -using mbed::nfc::ndef::common::span_from_cstr; -using mbed::nfc::ndef::common::Text; -using mbed::nfc::ndef::common::URI; -using mbed::nfc::nfc_rf_protocols_bitmask_t; - - -// statics -namespace { - -char const *uri_prefix_string[] = { "", - "http://www.", - "https://www.", - "http://", - "https://", - "tel:", - "mailto:", - "ftp://anonymous:anonymous@", - "ftp://ftp.", - "ftps://", - "sftp://", - "smb://", - "nfs://", - "ftp://", - "dav://", - "news:", - "telnet://", - "imap:", - "rstp://", - "urn:", - "pop:", - "sip:", - "sips:", - "tftp:", - "btspp://", - "btl2cap://", - "btgoep://", - "tcpobex://", - "irdaobex://", - "file://", - "urn:epc:id:", - "urn:epc:tag:", - "urn:epc:pat:", - "urn:epc:raw:", - "urn:epc:", - "urn:nfc:" - }; - - -} - - -int NFCTestShim::last_nfc_error = 0; -NFCTestShim *pNFC_Test_Shim = NULL; - -NFCTestShim::NFCTestShim(events::EventQueue &queue) : - _ndef_write_buffer_used(0), _ndef_poster_message(_ndef_write_buffer), - _discovery_restart(true), // on disconnect, will restart discovery - _queue(queue) -{ -} - -void NFCTestShim::cmd_get_last_nfc_error() -{ - get_last_nfc_error(); -} - -void NFCTestShim::cmd_set_last_nfc_error(int err) -{ - set_last_nfc_error(err); - cmd_ready(CMDLINE_RETCODE_SUCCESS); -} - -void NFCTestShim::cmd_get_conf_nfceeprom() -{ - get_conf_nfceeprom(); -} - -/** \brief The last failed NFC API call status, gets cleared upon reading it. - * \return void The NFC error is set asyncronously by sending text back over serial - */ -void NFCTestShim::get_last_nfc_error() -{ - int last = last_nfc_error; - last_nfc_error = 0; - // return data as text to the plugin framework - cmd_printf("{{lastnfcerror=%d}}\r\n", last); - cmd_ready(CMDLINE_RETCODE_SUCCESS); -} - -void NFCTestShim::set_last_nfc_error(int err) -{ - last_nfc_error = err; - cmd_printf("\r\n{{lastnfcerror=%d}}\r\n", last_nfc_error); -} - -// if an NFC EEPROM driver is configured -void NFCTestShim::get_conf_nfceeprom() -{ - set_last_nfc_error(NFC_OK); - // return data as text to the plugin framework - cmd_printf("{{iseeprom=%s}}\r\n", (MBED_CONF_NFCEEPROM ? "true" : "false")); - cmd_ready(CMDLINE_RETCODE_SUCCESS); -} - -void NFCTestShim::print_ndef_message(const Span &buffer, - size_t length) -{ - // return data as text to the plugin framework - cmd_printf("{{nfcmessage="); - for (size_t k = 0; k < length; k++) { - cmd_printf("%02x ", buffer.data()[k]); - } - cmd_printf("}}\r\n"); -} - -URI::uri_identifier_code_t NFCTestShim::get_ndef_record_type(char const *url) -{ - size_t i; - int len, bestLen = -1, index = -1; - // find largest matching prefix - for (i = 1; i < sizeof(uri_prefix_string) / sizeof(uri_prefix_string[0]); i++) { - len = strlen(uri_prefix_string[i]); - if (0 == strncmp(uri_prefix_string[i], url, len)) { - if (len > bestLen) { - index = i; - bestLen = len; - } - } - } - return (URI::uri_identifier_code_t)index; -} - -char const *NFCTestShim::get_ndef_record_type_prefix(URI::uri_identifier_code_t id) -{ - if ((id < 1) | (id > sizeof(uri_prefix_string) / sizeof(uri_prefix_string[0]))) { - return (""); // unknown case - } - return (::uri_prefix_string[(int)id]); -} - -void NFCTestShim::cmd_init() -{ - nfc_err_t ret = init(); - set_last_nfc_error(ret); - - if (NFC_OK != ret) { - cmd_ready(CMDLINE_RETCODE_FAIL); - } else { - cmd_ready(CMDLINE_RETCODE_SUCCESS); - } -} - -void NFCTestShim::cmd_get_rf_protocols() -{ -#if MBED_CONF_NFCEEPROM - cmd_printf("EEPROM cannot get protocol()\r\n"); - set_last_nfc_error(NFC_ERR_UNSUPPORTED); - cmd_ready(CMDLINE_RETCODE_INVALID_PARAMETERS); - -#else - nfc_rf_protocols_bitmask_t protocols = get_rf_protocols(); - - static char strSupported[7 * 6 + 1] = ""; - if (protocols.target_t1t) { - strcat(strSupported, "t1t,"); - } - if (protocols.target_t2t) { - strcat(strSupported, "t2t,"); - } - if (protocols.target_t3t) { - strcat(strSupported, "t3t,"); - } - if (protocols.target_iso_dep) { - strcat(strSupported, "isodep,"); - } - if (protocols.target_nfc_dep) { - strcat(strSupported, "nfcdep,"); - } - if (protocols.target_t5t) { - strcat(strSupported, "t5t,"); - } - if (strlen(strSupported)) { - strSupported[strlen(strSupported) - 1] = '\0'; // strip trailing comma - } - // return data as text to the plugin framework - cmd_printf("{{protocols=%s}}", strSupported); - set_last_nfc_error(NFC_OK); - cmd_ready(CMDLINE_RETCODE_SUCCESS); -#endif -} - -void NFCTestShim::cmd_configure_rf_protocols( - nfc_rf_protocols_bitmask_t protocols) -{ -#if MBED_CONF_NFCEEPROM - cmd_printf("EEPROM cannot set protocol()\r\n"); - set_last_nfc_error(NFC_ERR_UNSUPPORTED); - cmd_ready(CMDLINE_RETCODE_INVALID_PARAMETERS); -#else - - nfc_err_t err = set_rf_protocols(protocols); - set_last_nfc_error(err); - if (NFC_OK != err) { - cmd_ready(CMDLINE_RETCODE_FAIL); - } else { - cmd_ready(CMDLINE_RETCODE_SUCCESS); - } -#endif -} - -/** \brief Copy data from the Controller buffer, or if EEPROM will initiate a read of the - * eeprom contents which get dumped as a string {{bytes=XX XX XX XX.. }} and parsed by - * the framework - * \return void An ICETEA error code and NFC error is set asyncronously - */ -void NFCTestShim::cmd_read_nfc_contents() -{ -#if MBED_CONF_NFCEEPROM - ((NFCProcessEEPROM *)this)->queue_read_call(); - trace_printf("NFCTestShim::cmd_read_nfc_contents() exit\r\n"); - -#else - // returns last message "written", since we cannot read - print_ndef_message(_ndef_write_buffer, _ndef_write_buffer_used); - trace_printf("Controller buffer data size=%d\r\n", _ndef_write_buffer_used); - set_last_nfc_error(NFC_OK); - - trace_printf("NFCTestShim::cmd_read_nfc_contents() exit\r\n"); - cmd_ready(CMDLINE_RETCODE_SUCCESS); -#endif -} - -void NFCTestShim::cmd_erase() -{ -#if MBED_CONF_NFCEEPROM - ((NFCProcessEEPROM *)this)->queue_erase_call(); -#else - trace_printf("Erase (reset) controller msg buffer\r\n"); - _ndef_write_buffer_used = 0; - memset(_ndef_write_buffer, 0, sizeof(_ndef_write_buffer)); - set_last_nfc_error(NFC_OK); - cmd_ready(CMDLINE_RETCODE_SUCCESS); -#endif -} - -/** \brief Writes a Text T record buffer with really long message - length checks to be done by driver only. - * If an NFC controller, no write to the chip happens, we copy the data into a Controller buffer - * \param text_string This method must free the passed in pointer - * \return void An ICETEA error code and NFC error is set asynchronously - */ -void NFCTestShim::cmd_write_long(char *text_string) -{ - MessageBuilder builder(_ndef_poster_message); - Text text(Text::UTF8, span_from_cstr("en-US"), - span_from_cstr((const char *)(text_string))); - - text.append_as_record(builder, true); - _ndef_write_buffer_used = builder.get_message().size(); - trace_printf("Composed NDEF message %d bytes\r\n", _ndef_write_buffer_used); - -#if MBED_CONF_NFCEEPROM - ((NFCProcessEEPROM *)this)->queue_write_call(); -#else - // not on a wire, and we just stored the message in _ndef_write_buffer above - set_last_nfc_error(NFC_OK); - cmd_ready(CMDLINE_RETCODE_SUCCESS); -#endif - free(text_string); // free buffer allocated by the command class now - trace_printf("NFCTestShim::write_long() exit\r\n"); -} - -/** \brief Write a URI Use case would be to prompt to install an app from the appstore using the tag - * \param uri This method must free the passed in pointer - * \return void An ICETEA error code and NFC error is set asyncronously - */ -void NFCTestShim::cmd_set_smartposter(char *cmdUri) -{ - MessageBuilder builder(_ndef_poster_message); - - struct SPBuilder: MessageBuilder::PayloadBuilder { - SPBuilder(char *cmd_uri) - { - URI::uri_identifier_code_t uri_id = get_ndef_record_type(cmd_uri); - char *urlbegin = cmd_uri - + strlen(get_ndef_record_type_prefix(uri_id)); - uri = URI(uri_id, span_from_cstr(urlbegin)); - cmd_printf("{{uri_id=%d}}\r\n", (int) uri_id); - } - - virtual size_t size() const - { - return uri.get_record_size(); - } - - virtual void build(const Span &buffer) const - { - MessageBuilder smart_poster_builder(buffer); - - uri.append_as_record(smart_poster_builder, true); - } - URI uri; - }; - - builder.append_record( - RecordType(RecordType::well_known_type, span_from_cstr("Sp")), - SPBuilder(cmdUri), true); - - _ndef_write_buffer_used = builder.get_message().size(); - trace_printf("Composed NDEF message %d bytes\r\n", _ndef_write_buffer_used); - -#if MBED_CONF_NFCEEPROM - ((NFCProcessEEPROM *)this)->queue_write_call(); -#else - // not on a wire, so the call just stores the message in a buffer - set_last_nfc_error(NFC_OK); - cmd_ready(CMDLINE_RETCODE_SUCCESS); -#endif - trace_printf("NFCTestShim::setsmartposter() exit\r\n"); - free(cmdUri); -} - -// disabled in EEPROMs, overridden if controller present -void NFCTestShim::cmd_start_discovery(bool manual) -{ -#if MBED_CONF_NFCEEPROM - cmd_printf("EEPROM cannot start_discovery()\r\n"); - set_last_nfc_error(NFC_ERR_UNSUPPORTED); - cmd_ready(CMDLINE_RETCODE_INVALID_PARAMETERS); - -#else - - // todo: Jira logged. remove hard coded protocol - nfc_rf_protocols_bitmask_t protocols = { 0 }; - protocols.target_iso_dep = 1; - - nfc_err_t err = set_rf_protocols(protocols); - - if (manual) { - set_discovery_restart_manual(); - } else { - set_discovery_restart_auto(); - } - err = start_discovery(); - set_last_nfc_error(err); - if (NFC_OK != err) { - cmd_ready(CMDLINE_RETCODE_FAIL); - } else { - cmd_ready(CMDLINE_RETCODE_SUCCESS); - } -#endif -} - -// disabled in EEPROMs, overridden if controller present -void NFCTestShim::cmd_stop_discovery() -{ - -#if MBED_CONF_NFCEEPROM - cmd_printf("EEPROM cannot stop_discovery()\r\n"); - set_last_nfc_error(NFC_ERR_UNSUPPORTED); - cmd_ready(CMDLINE_RETCODE_INVALID_PARAMETERS); -#else - nfc_err_t err = stop_discovery(); - set_last_nfc_error(err); - if (NFC_OK != err) { - cmd_ready(CMDLINE_RETCODE_FAIL); - } else { - cmd_ready(CMDLINE_RETCODE_SUCCESS); - } - -#endif -} - diff --git a/TEST_APPS/device/nfcapp/NFCTestShim.h b/TEST_APPS/device/nfcapp/NFCTestShim.h deleted file mode 100644 index 6aba9b820bd2..000000000000 --- a/TEST_APPS/device/nfcapp/NFCTestShim.h +++ /dev/null @@ -1,111 +0,0 @@ -/* - * Copyright (c) 2018 ARM Limited. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * Licensed under the Apache License, Version 2.0 (the License); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an AS IS BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef _NFCTESTSHIM_H_INCLUDED -#define _NFCTESTSHIM_H_INCLUDED - -#include -#include -#include -#include - -#include "mbed_config.h" -#include "nfc/ndef/MessageBuilder.h" -#include "nfc/ndef/common/URI.h" -#include "nfc/ndef/common/util.h" -#include "nfc/NFCDefinitions.h" - -/** - * Test app driver wrapper. This is a base class containing shared EEPROM and Controller test data + logic. - * Variations for the 2 different kinds of driver supported are delegated to derived classes. - */ -class NFCTestShim { -public: - NFCTestShim(events::EventQueue &queue); - - static void cmd_get_last_nfc_error(); - static void cmd_set_last_nfc_error(int err); - static void cmd_get_conf_nfceeprom(); - /** - * For an EEPROM, this queries and responds with the flash size, - * For a Controller, responds with the config macro TEST_NDEF_MSG_MAX - */ - virtual void cmd_get_max_ndef() = 0; - - static void get_last_nfc_error(); - static void set_last_nfc_error(int err); - static void get_conf_nfceeprom(); - static void print_ndef_message(const mbed::Span &buffer, - size_t length); - static mbed::nfc::ndef::common::URI::uri_identifier_code_t get_ndef_record_type(char const *url); - static char const *get_ndef_record_type_prefix(mbed::nfc::ndef::common::URI::uri_identifier_code_t id); - - void cmd_init(); - - void cmd_set_smartposter(char *cmdUri); - void cmd_erase(); - void cmd_write_long(char *text_string); - void cmd_read_nfc_contents(); - void cmd_start_discovery(bool manual = false); - void cmd_stop_discovery(); - void cmd_configure_rf_protocols(mbed::nfc::nfc_rf_protocols_bitmask_t protocols); - void cmd_get_rf_protocols(); - -protected: - // implement/declare EEPROM and Controller model underlying common BH and delegate specializations - virtual nfc_err_t init() = 0; - virtual nfc_err_t set_rf_protocols(mbed::nfc::nfc_rf_protocols_bitmask_t protocols) - { - return NFC_ERR_UNSUPPORTED ; - }; - virtual mbed::nfc::nfc_rf_protocols_bitmask_t get_rf_protocols() - { - mbed::nfc::nfc_rf_protocols_bitmask_t none; - memset((void *)&none, 0, sizeof(none)); - return none; - }; - virtual nfc_err_t start_discovery() - { - return NFC_ERR_UNSUPPORTED ; - }; - virtual nfc_err_t stop_discovery() - { - return NFC_ERR_UNSUPPORTED ; - }; - void set_discovery_restart_auto() - { - _discovery_restart = true; - }; - void set_discovery_restart_manual() - { - _discovery_restart = false; - }; - -protected: - size_t _ndef_write_buffer_used; - mbed::Span _ndef_poster_message; // message to build and send - uint8_t _ndef_write_buffer[MBED_CONF_APP_TEST_NDEF_MSG_MAX]; // if this buffer is smaller than the EEPROM, the driver may crash see IOTPAN-297 - uint8_t _ndef_buffer[MBED_CONF_APP_TEST_NDEF_MSG_MAX]; // driver I/O buffer - bool _discovery_restart; // default true, restart discovery loop again on remote disconnect - events::EventQueue &_queue; -private: - static int last_nfc_error; -}; - -// forward declare single instance -extern NFCTestShim *pNFC_Test_Shim; - -#endif // _NFCTESTSHIM_H_INCLUDED diff --git a/TEST_APPS/device/nfcapp/SmartPoster.cpp b/TEST_APPS/device/nfcapp/SmartPoster.cpp deleted file mode 100644 index c09cf8488ae1..000000000000 --- a/TEST_APPS/device/nfcapp/SmartPoster.cpp +++ /dev/null @@ -1,247 +0,0 @@ -/* Copyright (c) 2018 ARM Limited. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * Licensed under the Apache License, Version 2.0 (the License); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an AS IS BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - - -#include "SmartPoster.h" - -#include "nfc/ndef/common/Text.h" -#include "nfc/ndef/common/URI.h" -#include "nfc/ndef/common/Mime.h" -#include "nfc/ndef/MessageBuilder.h" -#include "nfc/ndef/common/util.h" - -using mbed::Span; - -using mbed::nfc::ndef::MessageBuilder; -using mbed::nfc::ndef::RecordType; -using mbed::nfc::ndef::Record; -using mbed::nfc::ndef::RecordID; -using mbed::nfc::ndef::RecordPayload; -using mbed::nfc::ndef::common::span_from_cstr; -using mbed::nfc::ndef::common::Mime; -using mbed::nfc::ndef::common::Text; -using mbed::nfc::ndef::common::URI; - -// todo: this class probably needs to be in the nfc module itself - -namespace { -static RecordType smart_poster_record_type() -{ - return RecordType(RecordType::well_known_type, span_from_cstr("Sp")); -} - -static RecordType action_record_type() -{ - return RecordType(RecordType::well_known_type, span_from_cstr("act")); -} - -static RecordType size_record_type() -{ - return RecordType(RecordType::well_known_type, span_from_cstr("s")); -} - -static RecordType type_record_type() -{ - return RecordType(RecordType::well_known_type, span_from_cstr("T")); -} - -static size_t compute_record_size(const RecordType &type, - const RecordPayload &payload) -{ - return MessageBuilder::compute_record_size( - Record(type, payload, RecordID(), false, false)); -} - -} // end of anonymous namespace - -SmartPoster::SmartPoster(const URI &uri) : - _uri(uri), _action(), _resource_size(0), _action_set(false), _resource_size_set( - false) -{ -} - -void SmartPoster::set_title(const Text &text) -{ - _title = text; -} - -void SmartPoster::set_icon(const Mime &icon) -{ - _icon = icon; -} - -void SmartPoster::set_action(action_t action) -{ - _action = action; - _action_set = true; -} - -void SmartPoster::set_resource_size(uint32_t size) -{ - _resource_size = size; - _resource_size_set = true; -} - -void SmartPoster::set_resource_type(Span &type) -{ - _type.set_text(Text::UTF8, Span(), type); -} - -bool SmartPoster::append_record(MessageBuilder &ndef_builder, - bool is_last_record) const -{ - if (_uri.get_uri_field().empty()) { - return false; - } - - struct PayloadBuilder: MessageBuilder::PayloadBuilder { - PayloadBuilder(const SmartPoster &sp) : - sp(sp) - { - } - - virtual size_t size() const - { - return sp.get_uri_record_size() + sp.get_title_record_size() - + sp.get_icon_record_size() + sp.get_action_record_size() - + sp.get_resource_size_record_size() - + sp.get_type_record_size(); - } - - virtual void build(const Span &buffer) const - { - MessageBuilder smart_poster_builder(buffer); - sp.append_title(smart_poster_builder); - sp.append_icon(smart_poster_builder); - sp.append_resource_size(smart_poster_builder); - sp.append_type(smart_poster_builder); - sp.append_action(smart_poster_builder); - sp.append_uri(smart_poster_builder); - } - - const SmartPoster &sp; - }; - - bool result = ndef_builder.append_record(smart_poster_record_type(), - PayloadBuilder(*this), is_last_record); - return result; -} - -void SmartPoster::append_uri(MessageBuilder &builder) const -{ - _uri.append_as_record(builder, true); -} - -size_t SmartPoster::get_uri_record_size() const -{ - return _uri.get_record_size(); -} - -void SmartPoster::append_title(MessageBuilder &builder) const -{ - if (_title.get_text().empty()) { - return; - } - _title.append_as_record(builder); -} - -size_t SmartPoster::get_title_record_size() const -{ - if (_title.get_text().empty()) { - return 0; - } - - return _title.get_record_size(); -} - -void SmartPoster::append_icon(MessageBuilder &builder) const -{ - if (_icon.get_mime_content().empty()) { - return; - } - _icon.append_as_record(builder); -} - -size_t SmartPoster::get_icon_record_size() const -{ - if (_icon.get_mime_content().empty()) { - return 0; - } - - return _icon.get_record_size(); -} - -void SmartPoster::append_action(MessageBuilder &builder) const -{ - if (!_action_set) { - return; - } - - const uint8_t action_value[1] = { _action }; - builder.append_record(action_record_type(), action_value); -} - -size_t SmartPoster::get_action_record_size() const -{ - if (!_action_set) { - return 0; - } - - const uint8_t action_value[1] = { _action }; - - return compute_record_size(action_record_type(), action_value); -} - -void SmartPoster::append_resource_size(MessageBuilder &builder) const -{ - if (!_resource_size_set) { - return; - } - - uint8_t value[4]; - std::reverse_copy(&_resource_size, &_resource_size + 4, value); - - builder.append_record(size_record_type(), value); -} - -size_t SmartPoster::get_resource_size_record_size() const -{ - if (!_resource_size_set) { - return 0; - } - - uint8_t value[4]; - - return compute_record_size(size_record_type(), value); -} - -void SmartPoster::append_type(MessageBuilder &builder) const -{ - if (_type.get_text().empty()) { - return; - } - - builder.append_record(type_record_type(), _type.get_text()); -} - -size_t SmartPoster::get_type_record_size() const -{ - if (_type.get_text().empty()) { - return 0; - } - - return compute_record_size(type_record_type(), _type.get_text()); -} - diff --git a/TEST_APPS/device/nfcapp/SmartPoster.h b/TEST_APPS/device/nfcapp/SmartPoster.h deleted file mode 100644 index 065abdceac90..000000000000 --- a/TEST_APPS/device/nfcapp/SmartPoster.h +++ /dev/null @@ -1,138 +0,0 @@ -/* Copyright (c) 2018 ARM Limited. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * Licensed under the Apache License, Version 2.0 (the License); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an AS IS BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef SMARTPOSTER_H_ -#define SMARTPOSTER_H_ - -#include "nfc/ndef/common/Text.h" -#include "nfc/ndef/common/URI.h" -#include "nfc/ndef/common/Mime.h" -#include "nfc/ndef/MessageBuilder.h" - -/** - * Smart poster object. - * - * A smart poster is one of the basic use case of NFC. It encapsulates a URI to - * a resource and meta-data of the resource. - * - * Meta-data are optional, they can be: - * - title: name of the resource - * - icon: image/media associated to the resource - * - action: Action the peer should execute upon reception of the smart poster - * - size: The size of the resource. - * - type: Mime type of the resource. - * - * @note It obeys to value semantic and can be copied around. - */ -class SmartPoster { -public: - typedef mbed::nfc::ndef::common::Mime Mime; - typedef mbed::nfc::ndef::common::Text Text; - typedef mbed::nfc::ndef::common::URI URI; - typedef mbed::nfc::ndef::MessageBuilder MessageBuilder; - - /** - * Type of actions that should be executed upon smart poster reception. - */ - enum action_t { - EXECUTE, //!< EXECUTE - SAVE, //!< SAVE - EDIT //!< EDIT - }; - - /** - * Construct a smart poster. - * - * @param uri The URI to the resource. - */ - SmartPoster(const URI &uri); - - /** - * Set the title of the resource. - * - * @param text The title of the resource to set. - */ - void set_title(const Text &text); - - /** - * Set the icon of the resource. - * - * @param icon The icon to set. - */ - void set_icon(const Mime &icon); - - /** - * Set the action to trigger upon smart poster reception. - * - * @param action The action to do upon reception. - */ - void set_action(action_t action); - - /** - * Set the size of the resource. - * - * @param size The size of the resource. - */ - void set_resource_size(uint32_t size); - - /** - * Set the type of the resource. - * - * @param resource_type The type of the resource pointed by the URI. - */ - void set_resource_type(mbed::Span &resource_type); - - /** - * Append the smart poster as a ndef record. - * - * @param ndef_builder The message builder where the record is appended. - * @param is_last_record Indicates if this message is the last one. - * - * @return true if the message has been appended to the builder or false - * otherwise. - */ - bool append_record(MessageBuilder &ndef_builder, bool is_last_record) const; - -private: - void append_uri(MessageBuilder &builder) const; - size_t get_uri_record_size() const; - - void append_title(MessageBuilder &builder) const; - size_t get_title_record_size() const; - - void append_icon(MessageBuilder &builder) const; - size_t get_icon_record_size() const; - - void append_action(MessageBuilder &builder) const; - size_t get_action_record_size() const; - - void append_resource_size(MessageBuilder &builder) const; - size_t get_resource_size_record_size() const; - - void append_type(MessageBuilder &builder) const; - size_t get_type_record_size() const; - - URI _uri; - Text _title; - Mime _icon; - action_t _action; - uint32_t _resource_size; - Text _type; - - bool _action_set : 1; - bool _resource_size_set : 1; -}; - -#endif /* SMARTPOSTER_H_ */ diff --git a/TEST_APPS/device/nfcapp/main.cpp b/TEST_APPS/device/nfcapp/main.cpp deleted file mode 100644 index 72f6ead2d593..000000000000 --- a/TEST_APPS/device/nfcapp/main.cpp +++ /dev/null @@ -1,157 +0,0 @@ -/* - * Copyright (c) 2018 ARM Limited. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * Licensed under the Apache License, Version 2.0 (the License); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an AS IS BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#include -#include -#include -#include -#include -#include -#include "platform/Span.h" -#include "mbed_events.h" -#include "mbed-client-cli/ns_cmdline.h" -#include "NFCTestShim.h" -#include "NFCCommands.h" - -#if MBED_CONF_NFCEEPROM -using mbed::nfc::NFCEEPROM; -using mbed::nfc::NFCEEPROMDriver; -#else -#ifndef TARGET_PN512 -#warning [NOT_SUPPORTED] NFC not supported for this target -#endif - -#endif // MBED_CONF_NFCEEPROM - -const char *errorcodes = // descriptions from nfc/stack/nfc_errors.h - " 0 NFC_OK\r\n" - " 1 NFC_ERR_UNKNOWN\r\n" - " 2 NFC_ERR_LENGTH\r\n" - " 3 NFC_ERR_NOT_FOUND\r\n" - " 4 NFC_ERR_UNSUPPORTED\r\n" - " 5 NFC_ERR_PARAMS\r\n" - " 6 NFC_ERR_BUFFER_TOO_SMALL\r\n" - " 7 NFC_ERR_TIMEOUT\r\n" - " 8 NFC_ERR_CRC\r\n" - " 9 NFC_ERR_NOPEER\r\n" - "10 NFC_ERR_PARITY\r\n" - "11 NFC_ERR_FIELD\r\n" - "12 NFC_ERR_COLLISION\r\n" - "13 NFC_ERR_WRONG_COMM\r\n" - "14 NFC_ERR_PROTOCOL\r\n" - "15 NFC_ERR_BUSY\r\n" - "16 NFC_ERR_CONTROLLER\r\n" - "17 NFC_ERR_HALTED\r\n" - "18 NFC_ERR_MAC\r\n" - "19 NFC_ERR_UNDERFLOW\r\n" - "20 NFC_ERR_DISCONNECTED\r\n" - "21 NFC_ERR_ABORTED\r\n"; - - -void wrap_printf(const char *f, va_list a) -{ - vprintf(f, a); -} - - -/** Disables VT100 etc. for easy manual UI interaction */ -int set_easy_printer(int argc, char *argv[]) -{ - const char msg[][20] = - { "echo off", "set --retcode true", "set --vt100 off" }; - for (size_t i = 0; i < (sizeof(msg) / sizeof(msg[0])); i++) { - cmd_exe((char *) msg[i]); - } - return (CMDLINE_RETCODE_SUCCESS); -} - - -/** - * This test app can be used standalone interactively with at 115200 baud terminal. It is designed to work with the - * IceTea test framework https://os.mbed.com/docs/latest/tools/icetea-testing-applications.html . This app does - * not run test cases, it wraps functions in the API in ways that let us test multiple cases and scenarios. - * Test commands are routed in the CommandHandler class to an eventqueue, so it interfaces to the driver - * on a separate driver thread, which means test functions complete asynchronously. - * The driver is only called in a thread in the shim or wrapper class called NFCTestShim, which handles driver - * callbacks and completes the async part of a test function. NFCTestShim has specializations for NFC controllers - * and EEPROMS. The classes NFCProcessController and NFCProcessEEPROM respectively implement the needed specialization. - * - * If using an NFC EEPROM, an extra library is needed. Please see the documentation in the README.MD for instructions - * on how to modify this test for new drivers/targets, and the steps to run this test suite. - */ -int main() -{ - cmd_init(&wrap_printf); - HandleTestCommand handleCommands; // For handling test commands and set nfc message queue - - cmd_add("getlastnfcerror", HandleTestCommand::cmd_get_last_nfc_error, - "last NFC error code", errorcodes); - cmd_add("setlastnfcerror", HandleTestCommand::cmd_set_last_nfc_error, - "self-test", "for self-test only"); - cmd_add("iseeprom", HandleTestCommand::cmd_get_conf_nfceeprom, - "get NFC configEEPROM present", - "true if config exists, else false"); - cmd_add("initnfc", HandleTestCommand::cmd_init_nfc, "init NFC driver", - "call first"); - cmd_add("getmaxndef", HandleTestCommand::cmd_get_max_ndef, "get max NDEF record target supports", - "returns the eeprom size, or max buffer if a controller"); - cmd_add("init", HandleTestCommand::cmd_init_nfc, "alias initnfc", - "call first"); - cmd_add("setsmartposter", HandleTestCommand::cmd_set_smartposter, - "send smartposter NDEF", ""); - cmd_add("readmessage", HandleTestCommand::cmd_read_message, - "read EEPROM else return last message", "returns hex dump"); - cmd_add("read", HandleTestCommand::cmd_read_message, "alias readmessage", - "returns hex dump"); - cmd_add("erase", HandleTestCommand::cmd_erase, - "erase EEPROM or clear last message", "erase entire flash/buffer"); - cmd_add("writelong", HandleTestCommand::cmd_write_long_ndef_message, - "fill T NDEF with pattern up to ", - "writelong [messagetorepeat='thequickbrownfoxisadog']"); - cmd_add("start", HandleTestCommand::cmd_start_discovery, - "start discovery [auto=autorestart|man=manual]", - "loop restarts by default, man to disable"); - cmd_add("stop", HandleTestCommand::cmd_stop_discovery, "stop discovery", - "[wait=0] with optional wait for session end"); - - cmd_add("getprotocols", HandleTestCommand::cmd_get_supported_rf_protocols, - "get supported protocols", "returns CSV list, see setprotocols"); - cmd_add("setprotocols", HandleTestCommand::cmd_configure_rf_protocols, - "set rf protocols", "-p [t1t]/[t2t]/[t3t]/[isodep]/[nfcdep]/[t5t]"); - cmd_add("easy", set_easy_printer, "Use human readable terminal output", - "echo off,vt100 off,return-codes visible"); - cmd_add("trace", HandleTestCommand::cmd_set_trace, "detailed tracing on/off, ", - "Defaults to enabled; values like 'on','true','1' all turn it on, anything else turns off detailed tracing."); - -#if MBED_CONF_NFCEEPROM - cmd_printf("MBED NFC EEPROM defined\r\n"); -#else - cmd_printf("MBED NFC Controller tests\r\n"); -#endif - -#ifdef TARGET_M24SR - cmd_printf("Using driver: M24SR\r\n"); -#endif -#ifdef TARGET_PN512 - cmd_printf("Using driver: PN512\r\n"); -#endif - { - int c; - while ((c = getc(stdin)) != EOF) { - cmd_char_input(c); - } - } - return 0; -} diff --git a/TEST_APPS/device/nfcapp/mbed_app.json b/TEST_APPS/device/nfcapp/mbed_app.json deleted file mode 100644 index 291ce371f0d5..000000000000 --- a/TEST_APPS/device/nfcapp/mbed_app.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "config": { - "TEST_NDEF_MSG_MAX": { - "help": "NFC-Driver buffer (EEPROM and Controller) maximum MAX Size of NFC message(s) driver buffer", - "value": 4096 - } - }, - "target_overrides": { - "DISCO_L475VG_IOT01A": { - "target.extra_labels_add": ["M24SR"], - "MBED_NFC_M24SR.nfceeprom": true - }, - "NUCLEO_F401RE": { - "target.extra_labels_add": ["PN512"], - "MBED_NFC_M24SR.nfceeprom": false - }, - "NUCLEO_F746ZG": { - "target.extra_labels_add": ["M24SR"], - "MBED_NFC_M24SR.X_NUCLEO_NFC01A1": true, - "MBED_NFC_M24SR.nfceeprom": true - }, - "NUCLEO_F429ZI": { - "target.extra_labels_add": ["M24SR"], - "MBED_NFC_M24SR.X_NUCLEO_NFC01A1": true, - "MBED_NFC_M24SR.nfceeprom": true - } - } -} diff --git a/TEST_APPS/device/nfcapp/uart.cpp b/TEST_APPS/device/nfcapp/uart.cpp deleted file mode 100644 index 807d0d2aee4b..000000000000 --- a/TEST_APPS/device/nfcapp/uart.cpp +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) 2018 ARM Limited. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * Licensed under the Apache License, Version 2.0 (the License); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an AS IS BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#include -#include -#include "platform/FileHandle.h" -#include "drivers/BufferedSerial.h" - -/** - * Macros for setting console flow control. - */ -#define CONSOLE_FLOWCONTROL_RTS 1 -#define CONSOLE_FLOWCONTROL_CTS 2 -#define CONSOLE_FLOWCONTROL_RTSCTS 3 -#define mbed_console_concat_(x) CONSOLE_FLOWCONTROL_##x -#define mbed_console_concat(x) mbed_console_concat_(x) -#define CONSOLE_FLOWCONTROL mbed_console_concat(MBED_CONF_TARGET_CONSOLE_UART_FLOW_CONTROL) - -#define SERIAL_CONSOLE_BAUD_RATE 115200 - -mbed::FileHandle *mbed::mbed_override_console(int) -{ - static mbed::BufferedSerial console( - STDIO_UART_TX, STDIO_UART_RX, SERIAL_CONSOLE_BAUD_RATE - ); -#if CONSOLE_FLOWCONTROL == CONSOLE_FLOWCONTROL_RTS - mbed::console.set_flow_control(SerialBase::RTS, STDIO_UART_RTS, NC); -#elif CONSOLE_FLOWCONTROL == CONSOLE_FLOWCONTROL_CTS - mbed::console.set_flow_control(SerialBase::CTS, NC, STDIO_UART_CTS); -#elif CONSOLE_FLOWCONTROL == CONSOLE_FLOWCONTROL_RTSCTS - mbed::console.set_flow_control(SerialBase::RTSCTS, STDIO_UART_RTS, STDIO_UART_CTS); -#endif - return &console; -} diff --git a/TEST_APPS/icetea_plugins/__init__.py b/TEST_APPS/icetea_plugins/__init__.py deleted file mode 100644 index b09b705cde23..000000000000 --- a/TEST_APPS/icetea_plugins/__init__.py +++ /dev/null @@ -1,16 +0,0 @@ -""" -Copyright (c) 2020 Arm Limited -SPDX-License-Identifier: Apache-2.0 - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -""" diff --git a/TEST_APPS/icetea_plugins/ip_test_parsers.py b/TEST_APPS/icetea_plugins/ip_test_parsers.py deleted file mode 100644 index 7f215be8d7de..000000000000 --- a/TEST_APPS/icetea_plugins/ip_test_parsers.py +++ /dev/null @@ -1,159 +0,0 @@ -""" -Copyright 2018 ARM Limited -SPDX-License-Identifier: Apache-2.0 - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -""" -import re -import time -from collections import OrderedDict -from datetime import datetime - -from icetea_lib.Plugin.PluginBase import PluginBase - - -class IpTestParsers(PluginBase): - # constructor - def __init__(self): - super(IpTestParsers, self).__init__() - - def get_parsers(self): - return { - 'ifconfig': self.__ifconfigParser, - 'ifup': self.__ifconfigParser, - 'ethup': self.__ifconfigParser, - 'dut1': self.__ifconfigParser, - 'dut2': self.__ifconfigParser, - 'dut3': self.__ifconfigParser, - 'dut4': self.__ifconfigParser, - 'dut5': self.__ifconfigParser, - 'dut6': self.__ifconfigParser, - 'socket': self.__mbedossocketParser, - 'ticker': self.__ticker_parser - } - - # socket command for mbedos - def __mbedossocketParser(self, response): - results = {'socket_id': None, - 'data_type': None, - 'data': "", - 'printed_bytes': None, - 'sent_bytes': None, - 'received_bytes': None, - 'address': None, - 'port': None, - 'loop_id': None - } - respLines = response.lines - part = None - for line in respLines: - ret = PluginBase.find_one(line, ".*sid: ([0-9]+)") - if ret is not False: - results['socket_id'] = ret - - ret = PluginBase.find_one(line, ".*(hex|string) data, printing .* bytes:") - if ret is not False: - results['data_type'] = ret - - ret = PluginBase.find_one(line, ".*data, printing (.*) bytes:") - if ret is not False: - part = "data" - - ret = PluginBase.find_one(line, "^Printed (.*) bytes$") - if ret is not False: - results['printed_bytes'] = int(ret) - part = None - - if part == "data": - ret = PluginBase.find_one(line, "^\d{4}: (.*)$") - if ret is not False: - results['data'] = results['data'] + ret - - ret = PluginBase.find_one(line, ".*sent: ([0-9]+) bytes") - if ret is not False: - results['sent_bytes'] = int(ret) - - ret = PluginBase.find_one(line, ".*received: ([0-9]+) bytes") - if ret is not False: - results['received_bytes'] = int(ret) - - ret = PluginBase.find_one(line, ".*address: ([0-9a-fxA-F:.]+)") - if ret is not False: - results['address'] = ret - - ret = PluginBase.find_one(line, ".*port: ([0-9]+)") - if ret is not False: - results['port'] = ret - - ret = PluginBase.find_one(line, ".*lid: ([0-9]+)") - if ret is not False: - results['loop_id'] = ret - - return results - - # response parser for ifup - def __ifconfigParser(self, response): - results = {} - lines = response.traces - part = None - - results['address'] = { - 'll': '', - 'globals': [], - 'ipv4': None, - 'ipv6': [] - } - - for line in lines: - # print "ifcfgparser: %s" % line - match = re.search('IPv6 if addr', line) - if match: - part = "address" - match = re.search('IPv4 if addr', line) - if match: - part = "address" - match = re.search('MAC-48\:[\W]{1,}(.*)', line) - if match: - mac48 = match.group(1) - # Validate the MAC-48 syntax as well - match = re.search("([0-9a-fA-F]{2}:??){5}([0-9a-fA-F]{2})", mac48) - if match: - results['MAC'] = mac48 - - if part == "address": - match = re.search('.*\[(\d)\]:\W([abcdefg\d\:]{5,})', line) - if match: - addr = match.group(2) - if re.search('^fe80\:\:', addr): - results['address']['ll'] = addr - else: - results['address']["globals"].append(addr) - - match = re.search('\[(\d)\]:\W([a-fA-F\d\:]{5,})', line) - if match: - results['address']['ipv6'].append(match.group(2)) - - match = re.search('(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})$', line) - if match: - results['address']['ipv4'] = match.group(1) - - return results - - def __ticker_parser(self, response): - results = {} - respLines = response.lines - for line in respLines: - ret = PluginBase.find_one(line, 'Ticker id: ([0-9]+)') - if ret is not False: - results['ticker_id'] = ret - return results diff --git a/TEST_APPS/icetea_plugins/nfc_test_parsers.py b/TEST_APPS/icetea_plugins/nfc_test_parsers.py deleted file mode 100644 index 633ced1542ea..000000000000 --- a/TEST_APPS/icetea_plugins/nfc_test_parsers.py +++ /dev/null @@ -1,139 +0,0 @@ -""" -Copyright 2018 ARM Limited -SPDX-License-Identifier: Apache-2.0 - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -""" - - -from icetea_lib.Plugin.PluginBase import PluginBase -import re -import os - -class NfcTestParsers(PluginBase): - # constructor - def __init__(self): - super(NfcTestParsers, self).__init__() - - def get_parsers(self): - return { - 'iseeprom': self.status_parser, - 'getmaxndef': self.status_parser, - 'getlastnfcerror': self.trace_parser, - 'setlastnfcerror': self.trace_parser, - 'initnfc': self.trace_parser, # all commands that return an NFC error code - 'readmessage' : self.trace_parser, - 'erase' : self.trace_parser, - 'writelong' : self.trace_parser, - 'stop' : self.trace_parser, - 'start' : self.trace_parser, - 'setsmartposter': self.trace_parser, - 'getprotocols': self.trace_parser, - 'setprotocols': self.trace_parser - } - - def status_parser(self, response): - """ - commands that do NOT return an NFC result-code - """ - results = {'iseeprom': None, # 'true' if EEPROM - 'lastnfcerror':0, # ignored here - 'maxndef':None # actual driver buffer size - } - respLines = response.lines - for line in respLines: - try: - # iseeprom - value = PluginBase.find_one(line, "{{iseeprom=([\w]+)}}") - if value is not False: - if ("TRUE" == value.upper() or "1" == value): - results['iseeprom'] = True - else: - results['iseeprom'] = False - # max ndef - value = PluginBase.find_one(line, "{{maxndef=([0-9]+)}}") - if value is not False: - results['maxndef'] = int(value) - except re.error as e: # the framework gobbles errors in the plugin - print("Regex error",e,"occured in",os.path.basename(__file__), "!!") - raise e - return results - - def convert_from_hex(self, data): - value = [] - for byte in data.split(' '): - if bool(byte): - if len(byte) > 2: # the line wrapping code for huge lines appears to munch the space character between 2 bytes - value.append( int(byte[:2], 16)) - value.append( int(byte[2:4], 16)) - else: - value.append( int(byte, 16)) - return value - - # regex findall with additional filtering - @staticmethod - def find_all_hex_data(line, lookup): - """ - regexp search with one value to return. - - :param line: Line - :param lookup: regexp - :return: List of match groups or False - """ - results = re.findall(lookup, line) - if results is not False: - results = [m for m in results if len(m) > 2] # remove empty matches and - # non hex-data result entries - return results - return False - - def trace_parser(self, response): - results = {'iseeprom': None, # 'true' if EEPROM - 'lastnfcerror':None, # 0=OK >0 = error - 'nfcmessage':None, # NDEF array of bytes - 'protocols':None, # csv list - 'uri_id':None} # nfc URI type identifier - respLines = response.lines - started_read_data = False - partial_data = "" - for line in respLines: - try: - value = PluginBase.find_one(line, "{{lastnfcerror=([0-9]+)}}") - if value is not False: - results['lastnfcerror'] = int(value) - # {{nfcmessage=([0-9a-f\s]*)}} - # message may be split over multiple lines, so we will start a search and wait until we get a }} pair - data = PluginBase.find_one(line, "{{nfcmessage=([0-9a-f\s]*).*") - if data is not False: - started_read_data = True - if started_read_data: # read data until we see a }} pair - if "{{nfcmessage=" in line: - line = line[13:] # trim header - if PluginBase.find_one(line, ".*(}})") is not False: # search for end marker - started_read_data = False - line = line[:-2] # trim closing }} - partial_data += line - if not started_read_data: - results['nfcmessage'] = self.convert_from_hex(partial_data) - # t1t,t2t,t3t,isodep,nfcdef,t5t - value = PluginBase.find_one(line, "{{protocols=(([\w]*,?)*)}}") - if value is not False: - results['protocols'] = value # a csv list - # smartposter uri - value = PluginBase.find_one(line, "{{uri_id=([0-9]+)}}") - if value is not False: - results['uri_id'] = int(value) - except re.error as e: # the framework gobbles errors in the plugin - print("Regex error",e,"occured in",os.path.basename(__file__), "!!") - raise e - return results diff --git a/TEST_APPS/icetea_plugins/plugins_to_load.py b/TEST_APPS/icetea_plugins/plugins_to_load.py deleted file mode 100644 index bc8b9be74a27..000000000000 --- a/TEST_APPS/icetea_plugins/plugins_to_load.py +++ /dev/null @@ -1,24 +0,0 @@ -""" -Copyright 2018 ARM Limited -SPDX-License-Identifier: Apache-2.0 - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -""" -from ip_test_parsers import IpTestParsers -from nfc_test_parsers import NfcTestParsers - - -plugins_to_load = { - "ip_test_parsers": IpTestParsers, - "nfc_test_parsers": NfcTestParsers -} diff --git a/TEST_APPS/readme.md b/TEST_APPS/readme.md deleted file mode 100644 index 01c9c4175111..000000000000 --- a/TEST_APPS/readme.md +++ /dev/null @@ -1,101 +0,0 @@ -## Running Icetea tests located under mbed-os - -### Structure - -Mbed OS has a folder called `TEST_APPS` that contains everything related to Icetea testing. - -There are currently three folders: - -- `device` - contains all the different test applications you can flash to your board. -- `icetea_plugins` - contains plugins that are being used by some of the testcases, needed for the test execution. -- `testcases` - contains Icetea testcases written in Python. - -The testcases depend on test applications. - -### Preparing your work environment - -#### Prerequisites - -You need Icetea and version 1.8.0 or higher of Mbed CLI installed. - -#### Selecting the network interface to use - -Depending on the device, there might be a default network interface type defined in `mbed-os/targets/targets.json`, which you can use to locate a default test-config file. - -If the default network interface type is not defined or you want to use a different interface than the default, you need to provide a test-config file to the mbed test with `--test-config` option. - -The test-config file contains the necessary information for the test application. There are some test-config files located under `mbed-os/tools/test_configs`. - -Devices that have their network drivers residing inside `mbed-os` can use generic `test_configs`, such as `HeapBlockDeviceAndEthernetInterface.json` and `HeapBlockDeviceAndWifiInterface.json`. Otherwise, you need to use a device-specific test-config. - -### Running the tests - -Now that you have selected the interface, you can run the Icetea tests from the `mbed-os` root on your command-line by running the following command: - -`mbed test -m -t --icetea` - -This command compiles the OS, compiles the test applications, creates a test suite and then starts running the tests. - -If you only want to run some specific tests, you can use the `-n` option. You can choose multiple tests by separating them with a comma (`,`): - -`mbed test -m -t --icetea -n test1,test2` - -#### Running the tests with a specific test-config - -Some devices may offer multiple network interfaces to operate with. The tests can be run for either one of those using already existing test-config -files. - -To run the tests with the Wi-Fi interface: - -`mbed test -m -t --icetea --test-config tools/test_configs/HeapBlockDeviceAndWifiInterface.json` - -To run the tests with the ethernet interface: - -`mbed test -m -t --icetea --test-config tools/test_configs/HeapBlockDeviceAndEthernetInterface.json` - -#### Providing Wi-Fi access point information - -If you are using the Wi-Fi interface for running the tests, you need to also provide information about the used access point. - -The information can be provided in the used test-config file. - -Example of access point information: - -``` - "target_overrides": { - "*": { - "target.network-default-interface-type": "WIFI", - "nsapi.default-wifi-ssid": "\"ssid\"", - "nsapi.default-wifi-password": "\"password\"", - "nsapi.default-wifi-security": "WPA_WPA2" - } - } -``` - -### Test results - -Icetea prints the results from the test run to the command-line, and the final result looks similar to this: - -``` -+--------------------------------+---------+-------------+-------------+-----------+----------+ -| Testcase | Verdict | Fail Reason | Skip Reason | platforms | duration | -+--------------------------------+---------+-------------+-------------+-----------+----------+ -| test_cmdline | pass | | | K64F | 8.555 | -| UDPSOCKET_BIND_PORT | pass | | | K64F | 19.614 | -| TCPSOCKET_BIND_PORT | pass | | | K64F | 15.852 | -| TCPSERVER_ACCEPT | pass | | | K64F | 41.629 | -| TCPSOCKET_ECHOTEST_BURST_SHORT | pass | | | K64F | 19.926 | -+--------------------------------+---------+-------------+-------------+-----------+----------+ -+---------------+----------------+ -| Summary | | -+---------------+----------------+ -| Final Verdict | PASS | -| count | 5 | -| passrate | 100.00 % | -| pass | 5 | -| Duration | 0:01:45.576000 | -+---------------+----------------+ -``` - -You can also find the results from the tests in the `mbed-os/log` folder. - -You probably want to add the log folder to your `.mbedignore` file to prevent issues with build commands becoming too long over the time. diff --git a/TEST_APPS/testcases/README.md b/TEST_APPS/testcases/README.md deleted file mode 100644 index a3aec02ff4a0..000000000000 --- a/TEST_APPS/testcases/README.md +++ /dev/null @@ -1,14 +0,0 @@ -Icetea tests -============ - -This folder contains all the test cases done with Icetea residing in `mbed-os`. -The tests are divided in to subfolders and each subfolder contains a set of testcases. -The subfolder has a description of all the testcases it contains. - -Testcases ---------- - -Current testcases: - -- [`example`](https://github.com/ARMmbed/mbed-os/blob/master/TEST_APPS/testcases/example) -- [`nanostack_mac_tester`](https://github.com/ARMmbed/mbed-os/blob/master/TEST_APPS/testcases/nanostack_mac_tester) diff --git a/TEST_APPS/testcases/__init__.py b/TEST_APPS/testcases/__init__.py deleted file mode 100644 index b09b705cde23..000000000000 --- a/TEST_APPS/testcases/__init__.py +++ /dev/null @@ -1,16 +0,0 @@ -""" -Copyright (c) 2020 Arm Limited -SPDX-License-Identifier: Apache-2.0 - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -""" diff --git a/TEST_APPS/testcases/example/README.md b/TEST_APPS/testcases/example/README.md deleted file mode 100644 index 1b5cddac6783..000000000000 --- a/TEST_APPS/testcases/example/README.md +++ /dev/null @@ -1,22 +0,0 @@ -##Example tests - -This folder contains example tests for Icetea -The test located under this folder is dependent of the application [`exampleapp`](https://github.com/ARMmbed/mbed-os/blob/master/TEST_APPS/device/exampleapp) -The exampleapp is disabled by default, to be able to run the test_cmdline with the exampleapp, either remove the preprocessor macro from exampleapp.cpp or add `-DICETEA_EXAMPLE_ENABLED` to the mbed test command - -## Test cases - -### `test_cmdline` - -**Description:** -Send command line commands to target over serial interface. -This test introduces the Icetea test case structure to the user. - -**Test steps:** -Send "echo hello world" to the target. -Target sends "hello world" back to the host machine. -Send help to the target. -Target prints out the command line commands the application supports. - -**Expected result:** -The test exits without timeouts. diff --git a/TEST_APPS/testcases/example/__init__.py b/TEST_APPS/testcases/example/__init__.py deleted file mode 100644 index b09b705cde23..000000000000 --- a/TEST_APPS/testcases/example/__init__.py +++ /dev/null @@ -1,16 +0,0 @@ -""" -Copyright (c) 2020 Arm Limited -SPDX-License-Identifier: Apache-2.0 - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -""" diff --git a/TEST_APPS/testcases/example/test_cmdline.py b/TEST_APPS/testcases/example/test_cmdline.py deleted file mode 100644 index 6988f0b0ca37..000000000000 --- a/TEST_APPS/testcases/example/test_cmdline.py +++ /dev/null @@ -1,52 +0,0 @@ -""" -Copyright 2018 ARM Limited -SPDX-License-Identifier: Apache-2.0 - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -""" - -from icetea_lib.bench import Bench - - -class Testcase(Bench): - def __init__(self): - Bench.__init__(self, - name="test_cmdline", - title="Smoke test for command line interface", - status="released", - purpose="Verify Command Line Interface", - component=["cmdline"], - type="smoke", - requirements={ - "duts": { - '*': { - "count": 1, - "type": "hardware", - "application": { - "name": "TEST_APPS-device-exampleapp" - } - }, - "1": {"nick": "dut1"}, - } - } - ) - - def setup(self): - pass - - def case(self): - self.command("dut1", "echo hello world") - self.command("dut1", "help") - - def teardown(self): - pass diff --git a/TEST_APPS/testcases/nanostack_mac_tester/ED_scan.py b/TEST_APPS/testcases/nanostack_mac_tester/ED_scan.py deleted file mode 100644 index eef8d96bdc12..000000000000 --- a/TEST_APPS/testcases/nanostack_mac_tester/ED_scan.py +++ /dev/null @@ -1,139 +0,0 @@ -""" -Copyright (c) 2017, Arm Limited and affiliates. -SPDX-License-Identifier: Apache-2.0 - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -""" - -import threading -import os,sys -from icetea_lib.bench import Bench -from icetea_lib.TestStepError import TestStepFail - -class Testcase(Bench): - def __init__(self): - Bench.__init__(self, name = "ED_scan", - title = "ED scan test", - status = "released", - type = "smoke", - subtype = "", - execution = { - "skip": { - "value": False, - "reason": "" - } - }, - author = "Valtteri Erkkila", - purpose = "Tests reading the ED values from channels 11-16", - feature = ["MLME-SCAN (ED)"], - component = ["MAC"], - requirements = { - "duts": { - '*': { - "count":3, - "type": "hardware", - "allowed_platforms": ["K64F", "K66F", "NUCLEO_F429ZI", "KW41Z"], - "application": { - "name": "TEST_APPS-device-nanostack_mac_tester" - } - }, - "1":{"nick": "First"}, - "2":{"nick": "Second"}, - "3":{"nick": "Third"} - }} - ) - - def setUp(self): - self.channel = 11 - - def spam_channel(self, event): - while not event.wait(0.1): - self.lock_th.acquire() - self.command("First", "data --dst_addr 01:02:03:00:00:00:00:03 --msdu {} --msdu_length {} --wait_for_confirm false".format(self.payload, len(self.payload))) - self.command("Third", "data --dst_addr 01:02:03:00:00:00:00:01 --msdu {} --msdu_length {} --wait_for_confirm false".format(self.payload, len(self.payload))) - self.lock_th.release() - - def mask_from_channel_list(self, channels): - res = 0 - for ch in channels: - res = res | ( 1 << ch) - return hex(res) - - def do_test_iteration(self): - self.lock_th = threading.Lock() - self.command("First", "mlme-reset") - self.command("Second", "mlme-reset") - self.command("Third", "mlme-reset") - - self.command("First", "addr --64-bit 01:02:03:00:00:00:00:01") - self.command("Second", "addr --64-bit 01:02:03:00:00:00:00:02") - self.command("Third", "addr --64-bit 01:02:03:00:00:00:00:03") - - self.payload = "01234567890123456789012345678901234567890123456789" - - # Start PAN coordinator - self.command("First", "start --pan_coordinator true --logical_channel {}".format(self.channel)) - # Start PAN beacon - self.command("Second", "start --pan_coordinator false --logical_channel {}".format(self.channel)) - self.command("Third", "start --pan_coordinator false --logical_channel {}".format(self.channel)) - - #No reason to print their spamming - self.command("First", "silent-mode on") - self.command("Third", "silent-mode on") - - self.stop_event = threading.Event() - self.th = threading.Thread(target=self.spam_channel, args=(self.stop_event,)) - self.th.start() - self.stopped = True - channels = range(11,27) - for i in range(0, 3): - self.lock_th.acquire() - # Reset MAC settings - self.command("First", "mlme-reset") - # Start PAN coordinator - self.command("First", "start --pan_coordinator true --logical_channel {}".format(self.channel)) - self.command("Third", "mlme-reset") - # Start PAN beacon - self.command("Third", "start --pan_coordinator false --logical_channel {}".format(self.channel)) - self.lock_th.release() - # Scan all channels - self.command("Second", "scan --scan_type 0 --scan_duration 7 --channel_mask {}".format(self.mask_from_channel_list(channels))) - # Energy detection analysis - self.command("Second", "analyze-ed --channel {} --above 100".format(self.channel)) - - def case(self): - # Try tests few times because of potential RF failures - loop = 0 - while loop < 5: - try: - self.do_test_iteration() - break - except TestStepFail: - self.logger.info("Warning, iteration failed #" + str(loop+1)) - loop = loop + 1 - if (loop < 5): - self.stop_event.set() - self.th.join() - self.delay(5) - - else: - raise TestStepFail("Too many failed iterations!") - - def tearDown(self): - self.command("First", "silent-mode off") - self.command("Third", "silent-mode off") - self.stop_event.set() - self.th.join() - del self.th - self.reset_dut() - diff --git a/TEST_APPS/testcases/nanostack_mac_tester/README.md b/TEST_APPS/testcases/nanostack_mac_tester/README.md deleted file mode 100644 index a7edcf73f7c4..000000000000 --- a/TEST_APPS/testcases/nanostack_mac_tester/README.md +++ /dev/null @@ -1,298 +0,0 @@ -## Nanostack MAC RF tests - -This folder contains nanostack MAC RF tests for Icetea. -The test located under this folder is dependent of the application [`nanostack_mac_tester`](https://github.com/ARMmbed/mbed-os/blob/master/TEST_APPS/device/nanostack_mac_tester). -The nanostack MAC tester is disabled by default. To run the test cases with the application, either remove the preprocessor macro from main.cpp or add `-DICETEA_MAC_TESTER_ENABLED` to the `mbed test` command. - -Icetea test cases are processed by passing commands through the `mbed-client-cli` command line. It is possible to manually replicate most test cases by following the instructions below. - -In test cases with more than one device under test (DUT) the target device is given in the instructions as DUT1, DUT2 or DUT3. - -## Test cases - -### `address_read_and_write` - -**Description:** - -Write addresses to MAC interface, verify successful write. - -**Preconditions:** - -None - -**Test steps:** - -1. Set 64-bit MAC address to 01:02:03:00:00:00:00:01: - `addr --64-bit 01:02:03:00:00:00:00:01` -2. Set 16-bit MAC address to 0xABCD: - `addr --16-bit 0xABCD` -3. Set MAC PAN ID to 0xCDCD: - `mlme-set --attr 0x50 --value_bytes CD:CD --value_size 2` -4. Read and verify 64-bit address: - `addr` - -**Expected result:** - -The address that was read is the same as the one that was written. - -The test exits with status `PASS` without timeouts. - -### `create_and_join_PAN` - -**Description:** - -Create two Personal Area Networks (PAN) and verify beacon transmission. - -Requires 3 devices. - -**Preconditions:** - -1. All devices have 802.15.4 tranceivers and are in sufficient proximity. -2. RF channel and adjacent channel are sufficiently clear. - The RF channel is set in the test case method setUp(). The adjacent - channel is automatically the next higher one, except for channel 26, - where the adjacent channel becomes the next lower one. This is because - 26 is the highest available of the 16 channels in the 2.4-GHz band. - -**Test steps:** - -1. DUT1: Set MAC beacon payload to "mac-tester": - `mlme-set --attr 0x45 --value_ascii mac-tester --value_size 10` -2. DUT1: Set payload length: - `mlme-set --attr 0x46 --value_uint8 10 --value_size 1` -3. DUT2: Set MAC beacon payload to "second-mac-tester": - `mlme-set --attr 0x45 --value_ascii second-mac-tester --value_size 17` -4. DUT2: Set payload length: - `mlme-set --attr 0x46 --value_uint8 17 --value_size 1` -5. DUT1: Start PAN coordinator in chosen channel: - `start --pan_coordinator true --logical_channel ` -6. DUT2: Start PAN coordinator in adjacent channel: - `start --pan_coordinator true --logical_channel ` -7. DUT3: Scan with channel mask: - `scan --channel_mask ` - Channel mask is given as a left bitshifted channel number in hexadecimal format. - For channels 11 and 12, the channel mask becomes 0x1800. -8. DUT3: Search beacon data for DUT1's beacon: - `find-beacon --data mac-tester` -9. DUT3: Search beacon data for DUT2's beacon: - `find-beacon --data second-mac-tester` - -**Expected result:** - -DUT1 and DUT2 start beacon transmissions on respective channels. - -DUT3 receives and parses beacon transmissions. - -The test exits with status `PASS` without timeouts. - -### `ED_scan` - -**Description:** - -Perform Energy Detection (ED) scan to find Personal Area Networks (PAN). - -The test case requires that a lot of data is sent on the RF channel. In the test case -this is done automatically at a rate that is hard to perform manually, which makes -it difficult to run the test case manually. - -Requires 3 devices. - -**Preconditions:** - -1. All devices have 802.15.4 tranceivers and are in sufficient proximity. -2. RF channel is sufficiently clear. - -**Test steps:** - -1. Set addresses for devices: - DUT1: `addr --64-bit 01:02:03:00:00:00:00:01` - DUT2: `addr --64-bit 01:02:03:00:00:00:00:02` - DUT3: `addr --64-bit 01:02:03:00:00:00:00:03` -2. DUT1: Start PAN coordinator: - `start --pan_coordinator true --logical_channel ` -3. DUT2,DUT3: Start PAN beacon: - `start --pan_coordinator false --logical_channel ` -4. (optional) Silence beacon traces: - `silent-mode on` -5. Start repeatedly sending data between DUT1 and DUT3: - DUT1: `data --dst_addr 01:02:03:00:00:00:00:03 --msdu --msdu_length --wait_for_confirm false` - DUT3: `data --dst_addr 01:02:03:00:00:00:00:01 --msdu --msdu_length --wait_for_confirm false` - In the test case this repeats every 100ms. -6. DUT1,DUT3: Reset MAC settings: - `mlme-reset` -7. DUT1: Start PAN coordinator: - `start --pan_coordinator true --logical_channel ` -8. DUT3: Start PAN beacon: - `start --pan_coordinator false --logical_channel ` -9. DUT2: Scan channels 11-26: - `scan --scan_type 0 --scan_duration 7 --channel_mask 0x7fff800` - Channel mask is given as a left bitshifted channel numbers in hexadecimal format. -10. DUT2: Do Energy Detection analysis on data: - `analyze-ed --channel --above 100` - -Test case repeats steps 5 to 10 three times. - -**Expected result:** - -Devices start beacon transmissions and send data on channel. - -DUT2 scans channels for activity, and verifies that ED value for test channel is above 100. - -The test exits with status `PASS` without timeouts. - -### `send_data` - -**Description:** - -Send data between two devices over single RF hop. - -Requires 2 devices. - -**Preconditions:** - -1. All devices have 802.15.4 tranceivers and are in sufficient proximity. -2. RF channel is sufficiently clear. - -**Test steps:** - -1. DUT1: Set 64-bit MAC address to 01:02:03:00:00:00:00:01: - `addr --64-bit 01:02:03:00:00:00:00:01` -2. DUT2: Set 64-bit MAC address to 01:02:03:00:00:00:00:02: - `addr --64-bit 01:02:03:00:00:00:00:02` -3. DUT1: Start PAN coordinator: - `start --pan_coordinator true --logical_channel ` -4. DUT2: Start PAN beacon: - `start --pan_coordinator false --logical_channel ` -5. DUT1: Send data to DUT2: - `data --dst_addr 01:02:03:00:00:00:00:02 --msdu_length 5 --msdu abcde` -6. DUT1: Send data to DUT2: - `data --dst_addr 01:02:03:00:00:00:00:01 --msdu_length 5 --msdu 12345` - -**Expected result:** - -Data send commands succeeds. - -The test exits with status `PASS` without timeouts. - -### `send_data_indirect` - -**Description:** - -Send data between two devices over two RF hops with one relay. - -Requires 3 devices. - -**Preconditions:** - -1. All devices have 802.15.4 tranceivers and are in sufficient proximity. -2. RF channel is sufficiently clear. - -**Test steps:** - -1. DUT1: Set 64-bit MAC address to 01:02:03:00:00:00:00:01: - `addr --64-bit 01:02:03:00:00:00:00:01` -2. DUT2: Set 64-bit MAC address to 01:02:03:00:00:00:00:02: - `addr --64-bit 01:02:03:00:00:00:00:02` -3. DUT3: Set 64-bit MAC address to 01:02:03:00:00:00:00:03: - `addr --64-bit 01:02:03:00:00:00:00:03` -4. DUT1: Start PAN coordinator: - `start --pan_coordinator true --logical_channel ` -5. DUT2: Start PAN beacon: - `start --pan_coordinator false --logical_channel ` -6. DUT3: Start PAN beacon: - `start --pan_coordinator false --logical_channel ` -7. DUT2,DUT3: Set MAC RX on-while-idle off: - `mlme-set --attr 0x52 --value_uint8 0 --value_size 1` -8. DUT1: Add DUT2 and DUT3 as neighbours: - `add-neigh --frame_ctr 0 --mac16 0xFFFF --mac64 01:02:03:00:00:00:00:02 --pan_id 0x1234 --index 0` - `add-neigh --frame_ctr 0 --mac16 0xFFFF --mac64 01:02:03:00:00:00:00:03 --pan_id 0x1234 --index 1` -9. DUT2,DUT3: Add DUT1 as neighbour: - `add-neigh --frame_ctr 0 --mac16 0xFFFF --mac64 01:02:03:00:00:00:00:01 --pan_id 0x1234 --index 0` -10. DUT2: Configure indirect data: - `config-status --data_ind abcde` -10. DUT3: Configure indirect data: - `config-status --data_ind 12345` -11. DUT1,DUT2,DUT3: Mute traces (can cause timing issues): - `silent-mode on` -12. DUT1: Send data indirectly to DUT2: - `data --dst_addr 01:02:03:00:00:00:00:02 --msdu_length 5 --msdu abcde --indirect_tx true --wait_for_confirm false` -13. DUT2: Poll DUT1 (coordinator) for data: - `poll --coord_address 01:02:03:00:00:00:00:01` -14. DUT1: Resend data twice: - `data` - `data` -15. DUT2: Poll data twice: - `poll` - `poll` -16. DUT2: Set expected poll return status to 0xEB (No data after poll): - `config-status --poll 235")` -17. DUT2: Expected fail for poll command: - `poll` -16. DUT2: Set expected poll return status to 0xEB (No data after poll): - `config-status --poll 235")` -17. DUT1: Send data indirectly to DUT3 (other values set before are preserved): - `data --dst_addr 01:02:03:00:00:00:00:03 --msdu 12345` -19. DUT2: Expected fail for poll command: - `poll` -20. DUT3: Poll DUT1 (coordinator) for data: - `poll --coord_address 01:02:03:00:00:00:00:01` - -**Expected result:** - -DUT2 receives data from DUT1 when polling after send. - -DUT2 does not receive data from DUT1 when no data available. - -DUT2 does not receive data from DUT1 when data available for DUT3. - -DUT3 receives data from DUT1 when polling after send. - -The test exits with status `PASS` without timeouts. - -### `send_large_payloads` - -**Description:** - -Send large payloads between two devices. - -Requires 2 devices. - -**Preconditions:** - -1. All devices have 802.15.4 tranceivers and are in sufficient proximity. -2. RF channel is sufficiently clear. - -**Test steps:** - -1. DUT1: Set 64-bit MAC address to 01:02:03:00:00:00:00:01: - `addr --64-bit 01:02:03:00:00:00:00:01` -2. DUT2: Set 64-bit MAC address to 01:02:03:00:00:00:00:02: - `addr --64-bit 01:02:03:00:00:00:00:02` -3. DUT1: Start PAN coordinator: - `start --pan_coordinator true --logical_channel ` -4. DUT2: Start PAN beacon: - `start --pan_coordinator false --logical_channel ` -5. Create large payload: - 104 characters, headers are 2+1+2+8+8+2=23 bytes, resulting in a packet size of 127 (max): - `large_payload = "0123456789abcdefghjiklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZZZZZZZZZ0123456789012345678901234567891234"` -6. DUT1,DUT2: Set indirect data: - `config-status --data_ind ` -7. DUT1: Send payload: - `data --dst_addr 01:02:03:00:00:00:00:02 --msdu_length --msdu ` -8. DUT2: wait for transmission to finish: - `wait --timeout 500` -9. DUT2: send data : - `data --dst_addr 01:02:03:00:00:00:00:01 --msdu_length --msdu ` -10. DUT1: wait for transmission to finish: - `wait --timeout 500` -11. DUT1,DUT2: Take turns waiting and transmitting: - `data` - `wait` - -Test case repeats step 11 25 times for both devices. - -**Expected result:** - -Data send commands succeed. - -The test exits with status `PASS` without timeouts. diff --git a/TEST_APPS/testcases/nanostack_mac_tester/__init__.py b/TEST_APPS/testcases/nanostack_mac_tester/__init__.py deleted file mode 100644 index 7473ca9ad43c..000000000000 --- a/TEST_APPS/testcases/nanostack_mac_tester/__init__.py +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/env python -""" -Copyright (c) 2020 Arm Limited -SPDX-License-Identifier: Apache-2.0 - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -""" diff --git a/TEST_APPS/testcases/nanostack_mac_tester/address_read_and_write.py b/TEST_APPS/testcases/nanostack_mac_tester/address_read_and_write.py deleted file mode 100644 index 8467fb985d15..000000000000 --- a/TEST_APPS/testcases/nanostack_mac_tester/address_read_and_write.py +++ /dev/null @@ -1,82 +0,0 @@ -""" -Copyright (c) 2017, Arm Limited and affiliates. -SPDX-License-Identifier: Apache-2.0 - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -""" - -import os,sys -from icetea_lib.bench import Bench -from icetea_lib.TestStepError import TestStepFail - -class Testcase(Bench): - def __init__(self): - Bench.__init__(self, name = "address_read_and_write", - title = "MAC address and PAN id read/write test", - status = "released", - type = "smoke", - subtype = "", - execution = { - "skip": { - "value": False, - "reason": "" - } - }, - author = "Valtteri Erkkila", - purpose = "Tests reading a MAC address from the driver, and writing to the modifiable MAC address", - feature = ["MLME-SET"], - component = ["MAC"], - requirements = { - "duts": { - '*': { - "count":1, - "type": "hardware", - "allowed_platforms": ["K64F", "K66F", "NUCLEO_F429ZI", "KW41Z"], - "application": { - "name": "TEST_APPS-device-nanostack_mac_tester" - } - }, - "1":{"nick": "First"} - }} - ) - - def setUp(self): - pass - - def do_test_iteration(self): - self.command("First", "mlme-reset") - self.command("First", "addr") - self.command("First", "addr --64-bit 01:02:03:00:00:00:00:01") - self.command("First", "addr --16-bit 0xABCD") - # Set MAC PAN ID - self.command("First", "mlme-set --attr 0x50 --value_bytes CD:CD --value_size 2") - self.command("First", "addr") - self.verify_trace(1, "MAC64: 01:02:03:00:00:00:00:01") - - def case(self): - # Try tests few times because of potential RF failures - loop = 0 - while loop < 5: - try: - self.do_test_iteration() - break - except TestStepFail: - self.logger.info("Warning, iteration failed #" + str(loop+1)) - loop = loop + 1 - self.delay(5) - else: - raise TestStepFail("Too many failed iterations!") - - def tearDown(self): - self.reset_dut() - diff --git a/TEST_APPS/testcases/nanostack_mac_tester/create_and_join_PAN.py b/TEST_APPS/testcases/nanostack_mac_tester/create_and_join_PAN.py deleted file mode 100644 index 7dd0def76268..000000000000 --- a/TEST_APPS/testcases/nanostack_mac_tester/create_and_join_PAN.py +++ /dev/null @@ -1,107 +0,0 @@ -""" -Copyright (c) 2017, Arm Limited and affiliates. -SPDX-License-Identifier: Apache-2.0 - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -""" - -import os,sys -from icetea_lib.bench import Bench -from icetea_lib.TestStepError import TestStepFail - -class Testcase(Bench): - def __init__(self): - Bench.__init__(self, name = "create_and_join_PAN", - title = "Create a PAN and have a device join it", - status = "released", - type = "smoke", - subtype = "", - execution = { - "skip": { - "value": False, - "reason": "" - } - }, - author = "Valtteri Erkkila", - purpose = "", - feature = ["MLME-START", "MLME-SCAN (active)"], - component = ["MAC"], - requirements = { - "duts": { - '*': { - "count":3, - "type": "hardware", - "allowed_platforms": ["K64F", "K66F", "NUCLEO_F429ZI", "KW41Z"], - "application": { - "name": "TEST_APPS-device-nanostack_mac_tester" - } - }, - "1":{"nick": "First"}, - "2":{"nick": "Second"}, - "3":{"nick": "Third"} - }} - ) - - def mask_from_channel_list(self, channels): - res = 0 - for ch in channels: - res = res | ( 1 << ch) - return hex(res) - - def setUp(self): - self.channel = 11 - - def do_test_iteration(self): - self.command("First", "mlme-reset") - self.command("Second", "mlme-reset") - self.command("Third", "mlme-reset") - - # Beacon payload - self.command("First", "mlme-set --attr 0x45 --value_ascii mac-tester --value_size 10") - # Beacon payload length - self.command("First", "mlme-set --attr 0x46 --value_uint8 10 --value_size 1") - - self.command("Second", "mlme-set --attr 0x45 --value_ascii second-mac-tester --value_size 17") - self.command("Second", "mlme-set --attr 0x46 --value_uint8 17 --value_size 1") - - # Start PAN coordinator - self.command("First", "start --pan_coordinator true --logical_channel {}".format(self.channel)) - self.command("Second", "start --pan_coordinator true --logical_channel {}".format(int(self.channel)+1)) - self.delay(3) - if self.channel == 11: - channels = [11,12] - elif self.channel == 26: - channels = [25,26] - else: - channels = [self.channel, self.channel+1] - self.command("Third", "scan --channel_mask {}".format(self.mask_from_channel_list(channels))) - self.delay(0.2) - self.command("Third", "find-beacon --data mac-tester") - self.command("Third", "find-beacon --data second-mac-tester") - - def case(self): - # Try tests few times because of potential RF failures - loop = 0 - while loop < 5: - try: - self.do_test_iteration() - break - except TestStepFail: - self.logger.info("Warning, iteration failed #" + str(loop+1)) - loop = loop + 1 - self.delay(5) - else: - raise TestStepFail("Too many failed iterations!") - - def tearDown(self): - self.reset_dut() diff --git a/TEST_APPS/testcases/nanostack_mac_tester/send_data.py b/TEST_APPS/testcases/nanostack_mac_tester/send_data.py deleted file mode 100644 index 95e5fea5020f..000000000000 --- a/TEST_APPS/testcases/nanostack_mac_tester/send_data.py +++ /dev/null @@ -1,89 +0,0 @@ -""" -Copyright (c) 2017, Arm Limited and affiliates. -SPDX-License-Identifier: Apache-2.0 - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -""" - -import os,sys -from icetea_lib.bench import Bench -from icetea_lib.TestStepError import TestStepFail - -class Testcase(Bench): - def __init__(self): - Bench.__init__(self, name = "send_data", - title = "Simple data transmission test", - status = "released", - type = "smoke", - subtype = "", - execution = { - "skip": { - "value": False, - "reason": "" - } - }, - author = "Valtteri Erkkila", - purpose = "Tests that sending data works", - feature = ["MCPS-DATA"], - component = ["MAC"], - requirements = { - "duts": { - '*': { - "count":2, - "type": "hardware", - "allowed_platforms": ["K64F", "K66F", "NUCLEO_F429ZI", "KW41Z"], - "application": { - "name": "TEST_APPS-device-nanostack_mac_tester" - } - }, - "1":{"nick": "First"}, - "2":{"nick": "Second"} - }} - ) - - def setUp(self): - self.channel = 11 - - def do_test_iteration(self): - self.command("First", "mlme-reset") - self.command("Second", "mlme-reset") - - self.command("First", "addr --64-bit 01:02:03:00:00:00:00:01") - self.command("Second", "addr --64-bit 01:02:03:00:00:00:00:02") - - # Start PAN coordinator - self.command("First", "start --pan_coordinator true --logical_channel {}".format(self.channel)) - # Start PAN beacon - self.command("Second", "start --pan_coordinator false --logical_channel {}".format(self.channel)) - - # Send data - self.command("First", "data --dst_addr 01:02:03:00:00:00:00:02 --msdu_length 5 --msdu abcde") - self.command("Second", "data --dst_addr 01:02:03:00:00:00:00:01 --msdu_length 5 --msdu 12345") - - def case(self): - # Try tests few times because of potential RF failures - loop = 0 - while loop < 5: - try: - self.do_test_iteration() - break - except TestStepFail: - self.logger.info("Warning, iteration failed #" + str(loop+1)) - loop = loop + 1 - self.delay(5) - else: - raise TestStepFail("Too many failed iterations!") - - def tearDown(self): - self.reset_dut() - diff --git a/TEST_APPS/testcases/nanostack_mac_tester/send_data_indirect.py b/TEST_APPS/testcases/nanostack_mac_tester/send_data_indirect.py deleted file mode 100644 index f884818a98b6..000000000000 --- a/TEST_APPS/testcases/nanostack_mac_tester/send_data_indirect.py +++ /dev/null @@ -1,134 +0,0 @@ -""" -Copyright (c) 2017, Arm Limited and affiliates. -SPDX-License-Identifier: Apache-2.0 - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -""" - -import os,sys -from icetea_lib.bench import Bench -from icetea_lib.TestStepError import TestStepFail - -class Testcase(Bench): - def __init__(self): - Bench.__init__(self, name = "send_data_indirect", - title = "Indirect data transmission test", - status = "released", - type = "smoke", - subtype = "", - execution = { - "skip": { - "value": False, - "reason": "" - } - }, - author = "Valtteri Erkkila", - purpose = "Tests sending data indirectly, i.e polling the coordinator for data", - feature = ["MCPS-DATA", "MLME-POLL"], - component = ["MAC"], - requirements = { - "duts": { - '*': { - "count":3, - "type": "hardware", - "allowed_platforms": ["K64F", "K66F", "NUCLEO_F429ZI", "KW41Z"], - "application": { - "name": "TEST_APPS-device-nanostack_mac_tester" - } - }, - "1":{"nick": "First"}, - "2":{"nick": "Second"}, - "3":{"nick": "Third"} - }} - ) - - def setUp(self): - self.channel = 11 - - def do_test_iteration(self): - self.channel = 11 - self.command("First", "mlme-reset") - self.command("Second", "mlme-reset") - self.command("Third", "mlme-reset") - - self.command("First", "addr --64-bit 01:02:03:00:00:00:00:01") - self.command("Second", "addr --64-bit 01:02:03:00:00:00:00:02") - self.command("Third", "addr --64-bit 01:02:03:00:00:00:00:03") - - # Start PAN coordinator - self.command("First", "start --pan_coordinator true --logical_channel {}".format(self.channel)) - # Start PAN beacon - self.command("Second", "start --pan_coordinator false --logical_channel {}".format(self.channel)) - self.command("Third", "start --pan_coordinator false --logical_channel {}".format(self.channel)) - - # Set MAC RX on-while-idle off - self.command("Second", "mlme-set --attr 0x52 --value_uint8 0 --value_size 1") - self.command("Third", "mlme-set --attr 0x52 --value_uint8 0 --value_size 1") - - # Add neighbours - self.command("First", "add-neigh --frame_ctr 0 --mac16 0xFFFF --mac64 01:02:03:00:00:00:00:02 --pan_id 0x1234 --index 0") - self.command("First", "add-neigh --frame_ctr 0 --mac16 0xFFFF --mac64 01:02:03:00:00:00:00:03 --pan_id 0x1234 --index 1") - self.command("Second", "add-neigh --frame_ctr 0 --mac16 0xFFFF --mac64 01:02:03:00:00:00:00:01 --pan_id 0x1234 --index 0") - self.command("Third", "add-neigh --frame_ctr 0 --mac16 0xFFFF --mac64 01:02:03:00:00:00:00:01 --pan_id 0x1234 --index 0") - - # Configure indirect data - self.command("Second", "config-status --data_ind abcde") - self.command("Third", "config-status --data_ind 12345") - - # Runs into timing issues if extensive printing is enabled - self.command("*", "silent-mode on") - - # Send data indirectly to DUT2 - self.command("First", "data --dst_addr 01:02:03:00:00:00:00:02 --msdu_length 5 --msdu abcde --indirect_tx true --wait_for_confirm false") - # Poll DUT1 for data - self.command("Second", "poll --coord_address 01:02:03:00:00:00:00:01") - - # Send more data - self.command("First", "data") - self.command("First", "data") - # Poll more data - self.command("Second", "poll") - self.command("Second", "poll") - # Set expected poll return status to 0xEB(no data after poll) - self.command("Second", "config-status --poll 235") - # No data should remain to be polled for - self.command("Second", "poll") - - # Set expected poll return status to 0xEB(no data after poll) - self.command("Second", "config-status --poll 235") - # Send data to DUT3 - self.command("First", "data --dst_addr 01:02:03:00:00:00:00:03 --msdu 12345") - # Poll(expected failure) - self.command("Second", "poll") - # Poll DUT1 for data(expected success) - self.command("Third", "poll --coord_address 01:02:03:00:00:00:00:01") - self.command("*", "silent-mode off") - - def case(self): - # Try tests few times because of potential RF failures - loop = 0 - while loop < 5: - try: - self.do_test_iteration() - break - except TestStepFail: - self.logger.info("Warning, iteration failed #" + str(loop+1)) - loop = loop + 1 - self.delay(5) - else: - raise TestStepFail("Too many failed iterations!") - - def tearDown(self): - self.command("*", "silent-mode off") - self.reset_dut() - diff --git a/TEST_APPS/testcases/nanostack_mac_tester/send_large_payloads.py b/TEST_APPS/testcases/nanostack_mac_tester/send_large_payloads.py deleted file mode 100644 index 74427caf3ee2..000000000000 --- a/TEST_APPS/testcases/nanostack_mac_tester/send_large_payloads.py +++ /dev/null @@ -1,107 +0,0 @@ -""" -Copyright (c) 2017, Arm Limited and affiliates. -SPDX-License-Identifier: Apache-2.0 - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -""" - -import os,sys -from icetea_lib.bench import Bench -from icetea_lib.TestStepError import TestStepFail - -class Testcase(Bench): - def __init__(self): - Bench.__init__(self, name = "send_large_payloads", - title = "Data transmission test with large packets", - status = "released", - type = "reliability", - subtype = "", - execution = { - "skip": { - "value": False, - "reason": "" - } - }, - author = "Valtteri Erkkila", - purpose = "Repeatedly sends long packets, checking that the payload is correct in each one", - feature = ["MCPS-DATA"], - component = ["MAC"], - requirements = { - "duts": { - '*': { - "count":2, - "type": "hardware", - "allowed_platforms": ["K64F", "K66F", "NUCLEO_F429ZI", "KW41Z"], - "application": { - "name": "TEST_APPS-device-nanostack_mac_tester" - } - }, - "1":{"nick": "First"}, - "2":{"nick": "Second"} - }} - ) - - def setUp(self): - self.channel = 11 - - def do_test_iteration(self): - self.command("First", "mlme-reset") - self.command("Second", "mlme-reset") - - self.command("First", "addr --64-bit 01:02:03:00:00:00:00:01") - self.command("Second", "addr --64-bit 01:02:03:00:00:00:00:02") - - #104 characters, headers are 2+1+2+8+8+2=23 bytes, resulting in a packet size of 127 (max) - large_payload = "0123456789abcdefghjiklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZZZZZZZZZ0123456789012345678901234567891234" - # Start PAN coordinator - self.command("First", "start --pan_coordinator true --logical_channel {}".format(self.channel)) - # Start PAN beacon - self.command("Second", "start --pan_coordinator false --logical_channel {}".format(self.channel)) - - # Set indirect data - self.command("First", "config-status --data_ind {}".format(large_payload)) - self.command("Second", "config-status --data_ind {}".format(large_payload)) - - # Send data to DUT2 - self.command("First", "data --dst_addr 01:02:03:00:00:00:00:02 --msdu_length {} --msdu {}".format(len(large_payload), large_payload)) - # Wait for transmission to finish - self.command("Second", "wait --timeout 500") - - # Send data to DUT1 - self.command("Second", "data --dst_addr 01:02:03:00:00:00:00:01 --msdu_length {} --msdu {}".format(len(large_payload), large_payload)) - # Wait for transmission to finish - self.command("First", "wait --timeout 500") - # Loop with previous settings - for i in range(0, 25): - self.command("First", "data") - self.command("Second", "wait") - self.command("Second", "data") - self.command("First", "wait") - - def case(self): - # Try tests few times because of potential RF failures - loop = 0 - while loop < 5: - try: - self.do_test_iteration() - break - except TestStepFail: - self.logger.info("Warning, iteration failed #" + str(loop+1)) - loop = loop + 1 - self.delay(5) - else: - raise TestStepFail("Too many failed iterations!") - - def tearDown(self): - self.reset_dut() - diff --git a/TEST_APPS/testcases/nanostack_mac_tester/template b/TEST_APPS/testcases/nanostack_mac_tester/template deleted file mode 100644 index 4335851efd03..000000000000 --- a/TEST_APPS/testcases/nanostack_mac_tester/template +++ /dev/null @@ -1,65 +0,0 @@ -""" -Copyright (c) 2017, Arm Limited and affiliates. -SPDX-License-Identifier: Apache-2.0 - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -""" -import os,sys -# ensure that test/ directory is first choice for imports -test_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), "..")) -if not test_dir in sys.path: - sys.path.insert(0, test_dir) -from GenericTestcase import Bench -from Error import TestStepFail - -class Testcase(Bench): - def __init__(self): - Bench.__init__(self, name = "template", # Name should be the same as the filename - title = "TITLE", - status = "development", - type = "TYPE", - subtype = "", - execution = { - "skip": { - "value": False, - "reason": "" - } - }, - author = "Valtteri Erkkila", - purpose = "", - feature = [""], - component = ["MAC"], - requirements = { - "duts": { - '*': { - "count":2, # Count must reflect the amount of specified devices below - "type": "hardware", - "application":{ "name":"generalTestApplication", "version": "1.0"}, - "rf_channel": 11 - }, - "1":{"nick": "First"}, - "2":{"nick": "Second"} - }} - ) - - def setUp(self): - pass - - def case(self): - pass - - def tearDown(self): - pass - -if __name__=='__main__': - sys.exit( Testcase().run() ) diff --git a/TEST_APPS/testcases/nfc/README.md b/TEST_APPS/testcases/nfc/README.md deleted file mode 100644 index 6d9082e9700a..000000000000 --- a/TEST_APPS/testcases/nfc/README.md +++ /dev/null @@ -1,336 +0,0 @@ -# NFC tests. - -A CI test suite for NFC component. These tests validate card mbed emulation cases. The key use case is an NFC smart poster supporting commissioning workflow. -The SUT (system under test) is the NFC target. Tests exercise the framework and NDEF transactions when a NFC controller driver is used, or when the stack is configured for an NFC EEPROM chip in the system integration. - -This project is called CreamScone, which is an ice tea framework based cli-driven python test. - - - -- [NFC tests.](#nfc-tests) -- [Overview](#overview) -- [System Test high level requirement](#system-test-high-level-requirement) -- [Low level design](#low-level-design) -- [User Guide](#user-guide) - - [Test cases](#test-cases) - - [cli commands](#cli-commands) - - [How to](#how-to) - - [Running the tests](#running-the-tests) -- [Alternate NFC drivers note:](#alternate-nfc-drivers-note) -- [Known issues](#known-issues) - - - -# Overview -A set of tests run in CI, which can provide: -- Internal confidence -- Faster iterations -- More efficient work -- Clear escalation path - -A [Ice-tea](https://github.com/ARMmbed/mbed-os-5-docs/blob/development/docs/tools/testing/testing_icetea.md) based test suite. In it's simplest form, the suite merely drives API's for the NFC tag reader/writer, and validates a tag simulation running on an idle target, allows test cases in discovery, connection and read/write NDEF records. - -In order to mitigate the costs associated with system testing, use existing frameworks or parts and make it easy to test each individually. The [nfcpy](https://nfcpy.readthedocs.io/) Python library is used as the core of the *CreamScone* component which uses a PN53* device [SCL3711 usb reader](https://www.identiv.com/products/smart-card-readers/rfid-nfc-contactless/scl3711/) over USB to read the mbed simulated tag. This library is used to drive host interactions because it is portable (windows/GNULinux.) Remote NFC interactions will raise events in the mbed application. Connection and read/write events which get handled in user application on the target get wired up to asynchronously return responses and the data values (NDEF messages) to the ice tea framework. These events and data are thus tested/checked in the code (python) running on host. The target test app wraps the API, allowing many new test-scenarios to be written purely in Python. - -**NFC compliance** - -This suite only assists in NFC forum compliance. Developers must self certify using test tools from a provider to uncover early issues and get an external test vendor to achieve certification. - -**Mobiles and inter-op** - -Not in scope. Test procedures using a mobile phone app for Android and for IOS were not in scope for this test suite. - -![Basic Overview](img/simple-overview.png) - -Because the commissioning workflow application quality is the end goal, the NFC suite includes learnings to design the CI setup needed for future system testing that bring a mobile phone into the test-rig. The use of a mobile and bluetooth pairing as well as the continuous integration system is not included. - - - -# System Test high level requirement -Mitigate risks identified, to the product from an internal view to supporting releases. Help customers develop a driver or a design, and reduce their production risks. In summary: -- Architecture risks and Api breaks -- Partner cannot NFC forum Certify -- Partner driver has bugs -- Code regressions in O/S -- Arm mbed provided driver or HAL has bugs -- Security vulnerabilities - -In short, “Empower engineers to efficiently ship quality code with confidence.” - -**Design requirements: ** -- Identify and use tools to allow running in CI system, on many targets/configurations -- Be portable (can run in the CI system) using NFC explorer boards in lab for correctly co-located targets. -- Be able to set up and run locally in development - -# Low level design -**Components** - -API standalone Self tests [test_self.py](TEST_APPS\testcases\nfc\test_self.py) - -API E2E (wireless) tests [test_nfc.py](TEST_APPS\testcases\nfc\test_nfc.py) - -An [icetea](https://github.com/ARMmbed/icetea/blob/master/README.md) framework test program. Commandline (serial port) driven [target app](TEST_APPS\devices\nfcapp\main.cpp) aka _'CreamScone'_ which allows manual interactions with the driver. The app will send all API return data over serial link. - -An icetea plugin [nfc_test_parsers.py](TEST_APPS\icetea_plugins\nfc_test_parsers.py) which parses API responses over the serial port into python variables. - -MbedOS cli test app [main.cpp](TEST_APPS\device\nfcapp\main.cpp). The CLI commands return results asynchronously for most commands which get passed to and handled on a driver thread. - -**Future: ** A complete inter-op ready design intended to include a switch-box to allow the reader to connect to NFC enabled targets nearby using flying cables and a sticky-back antenna. The switch should allow selecting either alternative tags, or NFC peers, and provide inter-operability coverage. The switch-box may be controlled using GPIO either driven from spare IO pins on the target DUT itself (preferred option), or perhaps from a Raspberry pi. - -![inter-op](img/inter-op-view.png) - -![future](img/creamscone-mobile.png) - - -** Reference: ** - -[ARMmbed NFC design](https://github.com/ARMmbed/mbed-os/blob/master/docs/design-documents/nfc/nfc_design.md) - -[ARMmbed NFC code](https://github.com/ARMmbed/mbed-os/tree/master/features/nfc/nfc) - -[ARMmbed NFC example application](https://github.com/ARMmbed/mbed-os-example-nfc/) - -[Python NFC library](https://nfcpy.readthedocs.io/en/latest/topics/get-started.html) - -[NFC forum](https://nfc-forum.org/) - -# User Guide -This section covers the test case specification and how to run the test suite. - -The SUT target is rebooted between tests, since tests modify the target hardware state. - -## Test cases -CLI commands used by each test case describe the steps in a test. -** Basic local only cases ** -- test_nfc_error_codes : inintnfc , setlastnfcerror \ , getlastnfcerror - - Verify that the test CLI engine can initialize the stack, and can return NFC codes -- test_nfc_eeprom : iseeprom - - prints "true" if the target has an EEPROM configured stack, else prints "false" diagnostic only -- test_nfc_get_controller_protocols - - set nfc protocols supported -- test_nfc_set_controller_protocols - - get nfc protocols supported -- test_nfc_setsmartposter : setsmartposter \<-u> \ - - Sets a smartposter message, does not verify over wireless! (Only https protocol tested.) -- test_nfc_erase : initnfc, erase, readmessage - - Erase entire EEPROM, (behaviour for controller stack is null) -- test_nfc_write_long : initnfc, erase, writelong \, readmessage - - Write a very large text T record, and verify expected length written -- test_nfc_reprogrammed : iseeprom, initnfc, erase, wirelessly reprogram, wirelessly verify - - Use a reader/writer to program the tag using the default M24SR chip password -** End-to-End cases ** -- test_nfce2e_target_found - - tag can actually be detected wireless -test_nfce2e_type4_found - - correct tag detected -- test_nfce2e_discovery_loop - - Start or Stop discovery loop or disable depending on stack -test_nfce2e_read_stress - - read large message from device -test_nfce2e_reprogrammed - - modify large message from device -test_nfce2e_reprogrammed_stress - - write moderate message wirelessly -test_nfce2e_smartposter - - as with the basic test, but wirelessly - -** unimplemented due to limited support ** -- test_nfc_iso7816_supported -- test_nfc_add_iso7816_application -- test_nfc_set_tagtype -- test_nfc_get_tagtype - - -## cli commands -cli commands take parameters, its possible to type help at the cli for a list of commands. -``` -mbed sterm --baudrate 115200 -help -... -getlastnfcerror last NFC error code -setlastnfcerror self-test -initnfc init NFC driver -setsmartposter send smartposter NDEF -iseeprom NFC configEEPROM present -readmessage read EEPROM else return last message -erase erase EEPROM or clear last message -writelong fill entire FILE with pattern -... -``` -Note: Most commands also return a NFC status value (type "getlastnfcerror help" in console) which allow us to build negative test cases. -Note: Some commands only apply to NFC controllers, these commands fail with the appropriate not-supported code NFC_ERR_UNSUPPORTED and additionally return -2 error code to ice-tea. Commands like the erase command is a no-op on a NFC Controller target in the test app, for test-writting convenience. - - -**unimplemented CLI commands** -commands that were not implemented in the test app -- set/get tag type -- get/set iso7816 app - -**Excluded** -- power consumption -- throughput -- memory consumption - -## How to -**Wirring diagram for NFC Explorer with PN512** - -If using the Raspbery Pi explorer (PN512) board, use this pinout mapping diagram to connect the shield to the reference target. In this case a ST NucleoF401RE pinout is shown. -``` - Nucleo F401RE Explore NFC - (Arduino header) (pin1 on shield shown with a <|) - +-------+ +-------+ +--------+ - | [NC] | | [B8] | |[ 2][ 1]| - | [IOREF| | [B9] | |[ 4][ 3]| - | [RST] | | [AVDD]| |[ 6][ 5]| -1<---+ [3V3] | | [GND] | |[ 8][ 7]| - | [5V] | | [A5] +--->23 |[10][ 9]| - | [GND] | | [A6] +--->21 |[12][11]| -25<--+ [GND] | | [A7] +--->19 |[14][13]| - | [VIN] | | [B6] +--->3 |[16][15]| - | | | [C7] | |[18][17]| -26<--+ [A0] | | [A9] | |[20][19]| -16<--+ [A1] | | [A9] | |[22][21]| - | ... | | | |[24][23]| - | | | [A8] | |[26][25]| - +-------+ | ... | +--------+ - | | - | | - +-------+ - -Patch using jumper wires to the -indicated pins on the Shield. - -``` -Schematic (https://www.element14.com/community/docs/DOC-76384/l/explore-nfc-board-schematic) -To change pinouts, if your reference design or shield pins differ for the PN512 controller driver, open nfcProcessCtrl.cpp and find the code -```json -NFCProcessController::NFCProcessController(events::EventQueue &queue) : - // pins: mosi, miso, sclk, ssel, irq, rst - _pn512_transport(D11, D12, D13, D10, A1, A0), _pn512_driver( - &_pn512_transport), _queue(queue), _nfc_controller( - &_pn512_driver, &queue, _ndef_buffer) { -} -``` -modify pins as needed. - -**Compilation target drivers** - -If using the EEPROM driver, the mbed_app.json will contain -```json - "target_overrides": { - "DISCO_L475VG_IOT01A": { - "target.extra_labels_add": ["M24SR"] - } - } -... -``` -If using the Explorer Shield or PN512 driver mbed_app.json will add -```json - "target_overrides": { - "NUCLEO_F401RE": { - "target.extra_labels_add": ["PN512"] - } - } -... -``` - -## Running the tests -1. Wire an [explorer shield](https://cpc.farnell.com/nxp/explore-nfc/add-on-board-nfc-for-raspberry/dp/SC13404) up to and compile the target application. -2. Flash the binary to target and verify that it responds with an _`action NDEF record http://www.mbed.com`_ by using a mobile phone to scan over the antenna. -3. Install python (2.7) and install the nfcpy library, [see](https://nfcpy.readthedocs.io/en/latest/topics/get-started.html) . NFC reader can be connected to a serial port, or more commonly a USB dongle. Verify the dongle is functioning. -4. Place the scanner near the explorer shield. Run various test program commands like so: -- python ice_device -command describe - -**run the suite** -In a working folder, run - -`git clone https://github.com/ARMmbed/mbed-os.git` - - -If using the EEPROM driver, ( ST Discovery and the M24SR driver), you need the driver: -`git clone https://github.com/ARMmbed/mbed-nfc-m24sr.git' - - -And copy the files into your mbed root: -`xcopy ..\mbed-nfc-m24sr\*.* .\eeprom_driver\' - -To run the End2End tests, type: -`mbed test --icetea --app-config .\TEST_APPS\device\nfcapp\mbed_app.json -n test_nfce2e` - -To run only the standalone (readerless tests if you do not have a card reader), type: -`mbed test --icetea --app-config .\TEST_APPS\device\nfcapp\mbed_app.json -n test_nfc_eeprom,test_nfc_error_codes,test_nfc_setsmartposter,test_nfc_erase,test_nfc_write_long` - -# Alternate NFC drivers note: - -Please see the example json file .\TEST_APPS\testcases\nfc\mbed_app.json . The test does not check that you have any needed shield installed, so if it "hangs" at the point the "initnfc" command is used, the driver or shield may be the fault. The test assumes that MBED_CONF_NFCEEPROM is set to 1, if not it assumes that a NFC Controller driver is in use. To test drivers other than PN512 and M24SR, it is required to make test code changes that reference the driver. The driver can be instantiated once only. - -If the new driver you add is for Eeprom, open nfccommands.cpp and find the code and modify line as shown +++ -```C++ -NFCTestShim* new_testshim() { -#if MBED_CONF_NFCEEPROM ---- mbed::nfc::NFCEEPROMDriver& eeprom_driver = get_eeprom_driver(nfcQueue); - -+++ mbed::nfc::NFCEEPROMDriver& eeprom_driver = get_myeeprom_driver(nfcQueue); - - return ( (NFCTestShim *)(new NFCProcessEEPROM(nfcQueue, eeprom_driver)) ); -#else - return ((NFCTestShim *) (new NFCProcessController(nfcQueue))); -#endif // EEPROM -``` - -If the driver you add is a Controller driver, open nfcProcessCtrl.cpp and find the code -```C++ -NFCProcessController::NFCProcessController(events::EventQueue &queue) : - // pins: mosi, miso, sclk, ssel, irq, rst - _pn512_transport(D11, D12, D13, D10, A1, A0), _pn512_driver( - &_pn512_transport), _queue(queue), _nfc_controller( - &_pn512_driver, &queue, _ndef_buffer) { -} -``` -1. You will want to replace this and reference the desired controller driver. Likewise, this code is where pinout changes have to be made if using the supplied Controller driver. -2. Search for occurrences of guard macros `#ifdef TARGET_PN512` , and `#endif`. Add a new guard macro and code for your specific controller driver at the same point. - - -Note: If the target uses an EEPROM, it need not be powered/running, to be read, mbedOS is not running at that point. - -**Device API error codes** - -You can issue the command "getlastnfcerror help" to see a list of error codes that are returned by most commands. -```C++ -#define NFC_OK 0 ///< No error -#define NFC_ERR_UNKNOWN 1 ///< Unknown error -#define NFC_ERR_LENGTH 2 ///< Length of parameter is wrong -#define NFC_ERR_NOT_FOUND 3 ///< Could not find item -#define NFC_ERR_UNSUPPORTED 4 ///< This action is not supported -#define NFC_ERR_PARAMS 5 ///< These parameters are not correct -#define NFC_ERR_BUFFER_TOO_SMALL 6 ///< The buffer is too small to store all data (buffer overflow) -#define NFC_ERR_TIMEOUT 7 ///< Timeout -#define NFC_ERR_CRC 8 ///< Checksum does not match -#define NFC_ERR_NOPEER 9 ///< No target/initiator in vicinity -#define NFC_ERR_PARITY 10 ///< Parity error -#define NFC_ERR_FIELD 11 ///< No RF field detected (or RF field lost) -#define NFC_ERR_COLLISION 12 ///< Collision detected -#define NFC_ERR_WRONG_COMM 13 ///< Communication error -#define NFC_ERR_PROTOCOL 14 ///< Protocol is not conformant -#define NFC_ERR_BUSY 15 ///< Resource is busy -#define NFC_ERR_CONTROLLER 16 ///< Controller failure -#define NFC_ERR_HALTED 17 ///< Target has been halted -#define NFC_ERR_MAC 18 ///< MAC does not match -#define NFC_ERR_UNDERFLOW 19 ///< Could not send data in time -#define NFC_ERR_DISCONNECTED 20 ///< Link has disconnected -#define NFC_ERR_ABORTED 21 ///< Command was aborted -``` -# Known issues - -1. The test app defines large buffer to store the maximum realistic message of 8K by default. For targets with limited memory (< ~32K) will need to modify the app config. Open mbed_app.config and modify the setting -` "TEST_NDEF_MSG_MAX" : 8192` to suit by overriding it on specific targets. The test cases (python code) which stress read/write will need updates if the buffer is reduced to 2K by editing test_nfc.py and modifying the line(s) to fall within the new macro value. -```python - # Values > 4 k incur large time costs - STRESS_BUFFLEN = 2050 -``` - -2. The test app and the supplied drivers only support Type4 tags. The test app thus does not exercise the different protocols and always sets iso-dep level functionality (Type4) for NFC Controller initialization. - -1. Test test_nfce2e_discovery_loop fails on NFC controller. The NFC controller driver discovery loop cannot be stopped manually. No major functionality is lost, it only prevents a complete disable of NFC at runtime. A bug ticket #IOTPAN-313 was logged to fix the stop function. The Controller still restarts discovery loop normally under app control after a peer disconnects. - -1. The smartposter NDEF record wrapper class `smartposter.h` is also provided as part of the NFC examples. The examples are not needed to compile the test app, but this example class may be useful to customers. This file may thus move into the NFC component in future. diff --git a/TEST_APPS/testcases/nfc/__init__.py b/TEST_APPS/testcases/nfc/__init__.py deleted file mode 100644 index b09b705cde23..000000000000 --- a/TEST_APPS/testcases/nfc/__init__.py +++ /dev/null @@ -1,16 +0,0 @@ -""" -Copyright (c) 2020 Arm Limited -SPDX-License-Identifier: Apache-2.0 - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -""" diff --git a/TEST_APPS/testcases/nfc/img/creamscone-mobile.png b/TEST_APPS/testcases/nfc/img/creamscone-mobile.png deleted file mode 100644 index 114a622099f57563e128627590bd49379b21a323..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 35996 zcmb@thg(xm)GZup0-;2aA{`V#stQO?sDgkXD!mHQq)RWMS81XmC><0~y7b;bMF_oj z1OfpPAP`6>H~ilBe*eICd7eC+oHLo3GiUbNYp=ae+*2KOT548m002PySVQ$006;<@ zex89SiD!<|eXzuTO+z$M8`%vdDBbH$m_YA zotN*+H?{!xmyWJpqOP`H+!CVqMDNRtPyT!b03_Uetg7_F&tf+V=*K=WflF?BWxA&} zVc^+aXya@%Ps^g=@Ytd7^YG!frxx#}sP2<@Wk{2dZoPX-7Ip)4+snqR@_ss9-;;^$ zy*lUL+c_7$8#{{}gU%^FhRr31f!Tz=f3uoOCeF|@xOvYtS>oSg2)Pm@GM#VHj5?ef z6b>n95GEv`LKJV&)fHk8Xs@f=9h+9@)71GYskl?qZ^U5$k@Eu4T& ztC*$Qh`;9Uk>)-AubZ{lX)y6XIpLPI81X#leo}1f|APitl|{cJeNT~}>GF<01;e?? znXd&ZRg#2zULLG(7@&=7til>6rLafm=j*d2X+KuMjyFKcR>Zj|$A$@H)%sO6PDssP zz%Fgd)gIQ*2R940rAxUb5j#4GAI|FqgN}E|Tfk>hJjovuMsVC7 zQ7^G^=g76x#c@kdpmI5Jt7|9zPZ3i9;NgW}7MTKos>YSHlsm|_3=0=fC3f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)Jk+e9<$aUrK$$KX`u9CrnNb`lTt+FV1}FSs^wl_wTW@!B^6naF9E@B3zXVaYmD*<{No4o0XW@w$z*ij zpeXwM7=;KD{s<6`z)v9L?;j8c`u!oH-!F>&{es9=h=3V-n-XE`v9??l^|SEBr-xuJ zgeI}*o}4XJqgp{h-{Tc7f++ys;~i#?fn*}HWEBy~a+XN-?hE2qkw_!5`C>sN!sZ%N z!KvYJ)L{&8$<16_s$MmNVvLg0UOvURI|K>RF#BU#s#X9>O_f;?+LS7lGx_Xmoy86V z0+g0LsabV^V%+(2UB9SbWP%wwkD+OKE%R1ciR^WiL~iNaQf;c;^{jzvMz^I^R|}Mu zs?vr8W#b)DO8`nu1-CU(3zUr~0A=H;1fYDr6Y{KT_vN_cIR)k^lez07*qoM6N<$g8Wt7YybcN diff --git a/TEST_APPS/testcases/nfc/img/simple-overview.png b/TEST_APPS/testcases/nfc/img/simple-overview.png deleted file mode 100644 index 3c02dd9f86d5267a0d4c62cb5cc82a9cddc6d04d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 38235 zcmd>lXE+?**B}zTL=e43@1l<`i5?{+dhenej4pbK-rFEbMD%X--i;_>FnSqflpqMf zPJaL2zPtNvcfY>#@bKKZ_ndQ2z31L@Vze}r2=S=#(9qBbRg_yuT*%Hjd-<9q+ThAsp<>9HRRHDm$fkDw)Rz_=2jFJ zc4d{8msa!;QP)%k*y)P{ttDP7Dk-VHSJqZley9IlO;P8~dtDt>T|Ip@Jtsp8V{Kb^ z8v`v%V+UtDU0XYQI|uI%9v|$zd^{ZOfll5aF9$DgZ#>~hLg``_sR%NqH2gPJ*!Gba z&PjOg@o1h|7o^-u7~u^$R%kC>g}PGAVxR zl&IlR^T8|L&iAXjZ?8pA4|7t0VFIOD3Zp|7uVs7`dIW_*oF6(=Bs-~94^48YYsNBKmlHsVY zbFposaSaQZUx(5wf8;cdWHrubG;fqQPn30R)C?zd&Xj%{T1xr8`L%zvd=U0+_DAc$ zXzS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-- [Comparison](#comparison) - - [IOS (objective C)](#ios-objective-c) - - [Android (Java)](#android-java) - - [pynfc (python)](#pynfc-python) -- [Observe](#observe) - - - -# Overview -A comparison which analyses NFC use cases on mobile, as background to the test case design/implementation in the commissioning workflow :NFC-Bluetooth-pairing application. -- Analyse the [Apple API](https://developer.apple.com/documentation/corenfc) -- Analyse the [Android API](https://developer.android.com/guide/topics/connectivity/nfc/advanced-nfc#java) -- Python test [pynfc modules](https://nfcpy.readthedocs.io/en/latest/modules/index.html) - - -# Comparison -From the lowest level, each programmer interface has a definition for Errors, Link, NDEF, Tags and Sessions. -Note: Comparisons are high level and use past experience and old docs. - - -## IOS (objective C) -1. Errors: - are a struct with 3 members:
- int:value,
struct:string:usererror
struct:string:localized -1. isodep: - - not supported -1. NDEF support parameters with - - payload
and Typename, -4. Tags: - - Are an Object representing tag -5. Sessions are managed using - - Delegate &callbacks - -## Android (Java) -1. Errors: - - thrown as IOException with cause and message, there are no returned error datas -2. isodep: - - get/set communication parameters and RAW. -3. NDEF: - - Includes SNEP -4. Tags : - - (3)A,(3)B,(4)F,V and isoDep layer -5. Sessions - - Intents and Actions, runtime registration of PendingIntent() allows hooking using tag filters - -## pynfc (python) -1. Errors : - - raises Exceptions nfc.clf.Error and others per class -2. isodep: - - get/set communication parameters and RAW. -3. NDEF: - - full implementation and types. Includes SNEP -4. Tags : - - 1,2,(3)A,(3)B,(4)F isoDep layer -5. Sessions : - - using delegate class callbacks - -# Observe -Negative test cases would be better designed around the user cases, than around the implementations, base error conditions at the API layer look more like -- UnsupportedTarget -- Communication -- Protocol -- (w) Transmission -- (w) Timeout -- (w) BrokenLink -- ValueError - -Valuable test data cases shall be for valid and boundary cases for the smartposter NDEF record: -- uri – URI string ASCII only -- title – Smart poster title(s), (additional internationalizations with IANA codes not tested) -- icons – omitted -- action – The recommended action , a string diff --git a/TEST_APPS/testcases/nfc/nfc_clf_wrapper.py b/TEST_APPS/testcases/nfc/nfc_clf_wrapper.py deleted file mode 100644 index 8a47dbfca19b..000000000000 --- a/TEST_APPS/testcases/nfc/nfc_clf_wrapper.py +++ /dev/null @@ -1,98 +0,0 @@ -""" -Copyright (c) 2017, Arm Limited and affiliates. -SPDX-License-Identifier: Apache-2.0 - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -""" - -import time -import nfc -from nfc.clf import RemoteTarget -import logging - -""" - Wrap calls to nfcpi testing module, handle loading the driver -""" - - - -def debug_nfc_data(key, value): - """ - print useful data values for the host/user {{in between}} easy to spot brackets. - """ - text = "{{%s=%s}}" % (key, value) - logger.info(text) - - -logger = logging.getLogger() - - -class NfcWrapper: - """ - Finds the NFC reader USB front-end and prepares it for use. - """ - def __init__(self): - # will need a parameter here to help with libusb detection? - # clf.open("usb:04e6:5591") will open the SCL3711-NFC - logger.info("Initializing the NFC tag reader...") - self.clf = nfc.ContactlessFrontend() - if (self.clf.open("usb") ): # the NFC reader was not detected on any USB port! - logger.info("NFC Frontend found OK") - else: - logger.error("The NFC reader was not detected on any USB port!") - self.clfResponse = None - - def connect(self): - # note: only supporting type4 - time.sleep(0.5) - after5s = lambda: time.time() - started > 5 - started = time.time() - - tag = self.clf.connect( rdwr={'on-connect': lambda tag: False}, - terminate = after5s) - if tag: # None if timeout expires - logging.info("NFCReader: connected " + str(tag)) - else: - logging.info("NFCReader: warning, no tag detected ") - return tag - - def mute(self): - """turn off the reader radio""" - if (self.clf.device is not None): - logging.info("NFCReader: radio mute" + self.clf.device.product_name) - self.clf.device.mute() - else: - logging.warning("NFCReader: reader not initialized!") - - def disconnect(self): - logging.info("NFCReader: close frontend.") - self.clf.close() - -""" -Handle interactions with the NFC reader, and singleton -""" -class ContactlessCommandRunner(): - - """ - Lazy initialization singleton to open the reader once only - else when the framework scans for - tests, it causes us to open the reader. This breaks the Windows driver. - """ - def __getattr__(self, name): - if name == 'nfc': - - if ContactlessCommandRunner.__nfc_wrapper is None: - ContactlessCommandRunner.__nfc_wrapper = NfcWrapper() - return ContactlessCommandRunner.__nfc_wrapper - - __nfc_wrapper = None - diff --git a/TEST_APPS/testcases/nfc/nfc_cli_helper.py b/TEST_APPS/testcases/nfc/nfc_cli_helper.py deleted file mode 100644 index 8d49dc9044f8..000000000000 --- a/TEST_APPS/testcases/nfc/nfc_cli_helper.py +++ /dev/null @@ -1,80 +0,0 @@ -""" -Copyright (c) 2017, Arm Limited and affiliates. -SPDX-License-Identifier: Apache-2.0 - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -""" - -# ice-tea cli commands decorator class - - -from nfc_messages import NfcErrors -import logging -import icetea_lib.tools.asserts as asserts - -# Values > 1 k incur large time costs -LARGE_BUFFLEN = 400 # Value for large buffer tests, a maximum value can be read from the target with a command - -class CliHelper(): - """ - Helper methods, checks the nfc SDK error-code for you, makes writing a negative test much easier - Example: - if (target_is_eeprom): - nfc_command("dev1", "start", expected_retcode=-2, expected_nfc_error= NfcErrors.nfc_err_unsupported) - else: - nfc_command("dev1", "start") - """ - - def nfc_command(self, k, cmd, # pylint: disable=invalid-name - wait=True, - timeout=10, - expected_retcode=0, - asynchronous=False, - report_cmd_fail=True, - expected_nfc_error=NfcErrors.nfc_ok): - """ - By default will assert if the NFC result code is non-zero. - """ - response = self.command(k, cmd, wait, timeout, expected_retcode, asynchronous, report_cmd_fail) - asserts.assertEqual(int(response.parsed['lastnfcerror']), expected_nfc_error.value) - return response - - @staticmethod - def command_is(string, command): - return string.split(' ')[0] == command - - @staticmethod - def debug_nfc_data(key, value): - """ - print useful data values for the host/user with a >> preamble to make it easy to spot - """ - text = ">> %s=%s" % (key, value) - logging.Logger.info(text) - - def assert_binary_equal(self, left, right): - asserts.assertEqual(len(left), len(right), "Buffers are not same length %d %d" % (len(left), len(right))) - i = 0 - while i < len(left): - asserts.assertEqual(left[i], ord(right[i]), ("Missmatch @offset %d 0x%x <> 0x%x" % (i, left[i], ord(right[i]))) ) - i = i + 1 - - def assert_text_equal(self, left, right): - """ - Asserts if the 2 buffers (Text) differ - """ - asserts.assertEqual(len(left), len(right), "Buffers are not same length %d %d" % (len(left), len(right))) - i = 0 - while i < len(left): - asserts.assertEqual(ord(left[i]), ord(right[i]), ("Missmatch @offset %d %d <> %d" % (i, ord(left[i]), ord(right[i]))) ) - i = i + 1 - diff --git a/TEST_APPS/testcases/nfc/nfc_messages.py b/TEST_APPS/testcases/nfc/nfc_messages.py deleted file mode 100644 index 895dab294376..000000000000 --- a/TEST_APPS/testcases/nfc/nfc_messages.py +++ /dev/null @@ -1,89 +0,0 @@ -""" -Copyright (c) 2017, Arm Limited and affiliates. -SPDX-License-Identifier: Apache-2.0 - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -""" - -import nfc -from enum import Enum -import logging - - -class NfcErrors(Enum): - nfc_ok = 0 - nfc_err_unknown = 1 - nfc_err_length = 2 - nfc_err_not_found = 3 - nfc_err_unsupported = 4 - nfc_err_params = 5 - nfc_err_buffer_too_small = 6 - nfc_err_timeout = 7 - nfc_err_crc = 8 - nfc_err_nopeer = 9 - nfc_err_parity = 10 - nfc_err_field = 11 - nfc_err_collision = 12 - nfc_err_wrong_comm = 13 - nfc_err_protocol = 14 - nfc_err_busy = 15 - nfc_err_controller = 16 - nfc_err_halted = 17 - nfc_err_mac = 18 - nfc_err_underflow = 19 - nfc_err_disconnected = 20 - nfc_err_aborted = 21 - - -''' -return a 'T'ext text ndef record -''' -def make_textrecord(text, language='en-US'): - return nfc.ndef.Message(nfc.ndef.TextRecord(text, language)) - -''' -Return an NDEF message -resource -- url -titles -- list of : colon delimited titles where an optional language code precedes the title - -if lang codes are omitted, 'en' is assumed -action -- one of default/save/exec/edit -''' -def make_smartposter(resource, titles, action = 'default'): - record = nfc.ndef.SmartPosterRecord(resource) - for title in titles: - lang, text = title.split(':', 1) if ':' in title else ('en', title) - record.title[lang] = text - if not action in ('default', 'exec', 'save', 'edit'): - logging.error("action not one of 'default', 'exec', 'save', 'edit'") - return - record.action = action - - return nfc.ndef.Message(record) - - -''' -Program the provided NDEF messsage into the tag (authentication is not required) -''' -def program_remote_tag(message, tag): - if not tag.ndef.is_writeable: - logging.error("This Tag is not writeable.") - return False - tag.ndef.message = message - logging.info("Programmed tag OK.") - return True - -''' -Builds a long string by repeating a shorter string up to the required length -''' -def repeat_string_to_length(string_to_expand, length): - return (string_to_expand * ((length/len(string_to_expand))+1))[:length] diff --git a/TEST_APPS/testcases/nfc/test_nfc.py b/TEST_APPS/testcases/nfc/test_nfc.py deleted file mode 100644 index cdad33f9e949..000000000000 --- a/TEST_APPS/testcases/nfc/test_nfc.py +++ /dev/null @@ -1,259 +0,0 @@ -""" -Copyright (c) 2017, Arm Limited and affiliates. -SPDX-License-Identifier: Apache-2.0 - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -""" - - -from icetea_lib.bench import Bench -from nfc_clf_wrapper import ContactlessCommandRunner -import nfc_messages -import time -from mbed_clitest.tools.tools import test_case -import icetea_lib.tools.asserts as asserts -from nfc_messages import NfcErrors -from nfc_cli_helper import CliHelper -from nfc_cli_helper import LARGE_BUFFLEN - - -class CreamSconeTests(Bench, CliHelper): - """ - This test wrapper requires a usb connected contactless card reader dongle, and allows E2E testing. - See readme file for details - """ - def __init__(self, **kwargs): - testcase_args = { - 'title':"NFC tests with a reader", - 'status':"development", - 'purpose':"NFC e2e", - 'component':["NFC"], - 'type':"regression", - 'requirements':{ - "duts": { - '*': { - "count": 1, - "type": "hardware", - "application": { - "name": "TEST_APPS-device-nfcapp" - } - }, - "1": {"nick": "dev1"} - } - } - } - testcase_args.update(kwargs) - Bench.__init__(self, **testcase_args) - - def setup(self): - self.logger.info("Test setup: Open Reader and mute...") - try: - self.clf = ContactlessCommandRunner() - self.clf.nfc.mute() # mute if the last test case did not mute - except: - raise asserts.TestStepFail("Could not find NFC reader") - - def teardown(self): - self.logger.info("Test teardown: Reboot target...") - self.reset_dut() - self.clf.nfc.mute() # mute if the last test case did not mute - - def prepare_target(self): - """ - simple set up a clean target device - :return: - """ - response = self.nfc_command("dev1", "iseeprom") - eeprom = response.parsed['iseeprom'] - self.logger.info("Target includes NFCEEPROM: %s" % eeprom) - self.nfc_command("dev1", "initnfc") - if not eeprom: - self.nfc_command("dev1", "start") - - self.nfc_command("dev1", "erase") - - -@test_case(CreamSconeTests) -def test_nfce2e_target_found(self): - """ - smoke - Our emulated tag is detectable - """ - - response = self.nfc_command("dev1", "iseeprom") - eeprom = response.parsed['iseeprom'] - - # Invokes icetea command, this method also checks the NFC api result expected_nfc_error=NFC_OK - # Tester can supply the expected_nfc_error=NFC_XXX parameter, to override. - self.nfc_command("dev1", "initnfc") - if not eeprom: - self.nfc_command("dev1", "start") - - tag = self.clf.nfc.connect() - asserts.assertNotNone(tag, "Could not connect to any tag") - - -@test_case(CreamSconeTests) -def test_nfce2e_smartposter(self): - """ - check - Tag can be set and read via contactless - """ - expectedURI = "https://www.mbed.com" # ensure that these differ per test case - - self.prepare_target() - - # write poster tag to target - self.command("dev1", "setsmartposter %s" % expectedURI) - - tag = self.clf.nfc.connect() - asserts.assertNotNone(tag, "Could not connect to any tag") - asserts.assertEqual(1, len(tag.ndef.records), "expected number NDEF records") - - asserts.assertEqual(tag.ndef.records[0].__class__.__name__, "SmartposterRecord", "expected SmartposterRecord") - asserts.assertEqual(expectedURI, tag.ndef.records[0].uri_records[0].uri, "expected exact URI") - - -@test_case(CreamSconeTests) -def test_nfce2e_reprogrammed(self): - """ - check - Tag can be programmed from a remote and read via contactless - """ - expectedURI = "https://www.google.com" - - self.prepare_target() - - # program a poster tag to target - self.logger.info("Write Smartposter MESSAGE wirelessly") - tag = self.clf.nfc.connect() - asserts.assertNotNone(tag, "Could not connect to any tag") - smartposter = nfc_messages.make_smartposter(expectedURI, ["en-US:Other search engines exist"]) - nfc_messages.program_remote_tag(smartposter, tag) - self.logger.info("Remote programmed %d bytes Smartposter" % len(str(smartposter))) - - self.logger.info("Write back Smartposter MESSAGE wirelessly") - tag = self.clf.nfc.connect() - asserts.assertNotNone(tag, "Could not re-connect to any tag") - - asserts.assertEqual(tag.ndef.records[0].__class__.__name__, "SmartposterRecord", "expected SmartposterRecord") - asserts.assertEqual(expectedURI, tag.ndef.records[0].uri_records[0].uri, "expected exact URI") - self.clf.nfc.mute() # disable radio, to allow a local session - - # verify in target - response = self.nfc_command("dev1", "readmessage") - - # check contents - expected_message = str(smartposter) - self.assert_binary_equal(response.parsed['nfcmessage'], expected_message) - - -@test_case(CreamSconeTests) -def test_nfce2e_read_stress(self): - """ - check - Large record can be programmed in and read via contactless - """ - message_to_repeat = 'thequickbrownfoxjumpedoverthelazydog' # repeating message written - text_length = LARGE_BUFFLEN - # calculate actual message to compare to using the library - expected_text = nfc_messages.repeat_string_to_length(message_to_repeat, text_length) - - self.prepare_target() - # write a large message to the tag via API, then read it wirelessly - self.logger.info("Write/set tag MESSAGE (%d) bytes" % text_length) - self.nfc_command("dev1", "writelong %d %s" % (text_length,message_to_repeat)) - - - # assert that read the eeprom contents gives correct data and length - self.logger.info("Read tag MESSAGE wirelessly" ) - tag = self.clf.nfc.connect() - asserts.assertNotNone(tag, "Could not connect to any tag") - - asserts.assertEqual(tag.ndef.records[0].__class__.__name__, "TextRecord", "expected TextRecord") - self.assert_text_equal(tag.ndef.records[0].text, expected_text) - - -@test_case(CreamSconeTests) -def test_nfce2e_reprogrammed_stress(self): - """ - check - Large record can be programmed from a remote and read via contactless - """ - message_to_repeat = 'thequickbrownfoxjumpedoverthelazydog' # repeating message written - text_length = LARGE_BUFFLEN # large values slow down test runs and may time out - - # calculate actual message to compare to using the library - message = nfc_messages.make_textrecord( nfc_messages.repeat_string_to_length(message_to_repeat, text_length)) - expected_message = str(message) - - self.prepare_target() - # program a large tag to target remotely - self.logger.info("Write tag MESSAGE wirelessly (%d) bytes" % len(str(message))) - tag = self.clf.nfc.connect() - asserts.assertNotNone(tag, "Could not connect to any tag") - nfc_messages.program_remote_tag(message, tag) - self.logger.info("%d bytes chunk of data written to tag remotely" % len(str(message))) - self.clf.nfc.mute() - - # read device locally - self.logger.info("Read back tag MESSAGE wirelessly") - tag = self.clf.nfc.connect() - asserts.assertNotNone(tag, "Could not re-connect to any tag") - asserts.assertEqual(tag.ndef.records[0].__class__.__name__, "TextRecord", "expected TextRecord") - self.clf.nfc.mute() # disable the reader radio, to allow local access - - # verify in target - response = self.nfc_command("dev1", "readmessage") - self.assert_binary_equal(response.parsed['nfcmessage'], expected_message) - - -@test_case(CreamSconeTests) -def test_nfce2e_discovery_loop(self): - """ - check - Controller discovery loop stop/start - fails : blocked by an issue on NFC controllers only - """ - expectedURI = "https://www.nasa.com" # ensure that these differ per test case - - response = self.command("dev1", "iseeprom") # will hold result from the init lib call - eeprom = response.parsed['iseeprom'] - self.logger.info("Target includes NFCEEPROM: %s" % eeprom) - - self.nfc_command("dev1", "initnfc") # this NOT automatically start discovery at the same time, the test command - # "start" must be used on a controller. (Eeeproms always have the loop enabled.) - # By default, the test app automatically starts discovery loop again after a reader disconnects from the controller. - # Automatic resume after disconnect can be turned off by using command "start man" , the default is "start auto" . - - if not eeprom: - # we are muted at this point, and the target is not in discovery mode yet. - tag = self.clf.nfc.connect() - asserts.assertNone(tag, "post-init: Tag discovery loop should be stopped!") - self.nfc_command("dev1", "stop") - time.sleep(1) - - tag = self.clf.nfc.connect() - asserts.assertNone(tag, "post-stop: Tag discovery loop should be stopped!") - self.nfc_command("dev1", "start") - time.sleep(1) - - tag = self.clf.nfc.connect() - asserts.assertNotNone(tag, "Could not connect to any tag") - - self.clf.nfc.mute() - self.nfc_command("dev1", "stop") - time.sleep(10) - tag = self.clf.nfc.connect() - # test blocked by issue raised IOTPAN313 NFC Controller discovery can stop but cannot restart - PN512 - asserts.assertNone(tag, "post-restart: Tag discovery loop should be stopped!") - - else: - # eeprom, so not supported - self.nfc_command("dev1", "start", expected_retcode=-2, expected_nfc_error= NfcErrors.nfc_err_unsupported ) - self.nfc_command("dev1", "stop", expected_retcode=-2, expected_nfc_error= NfcErrors.nfc_err_unsupported ) - diff --git a/TEST_APPS/testcases/nfc/test_self.py b/TEST_APPS/testcases/nfc/test_self.py deleted file mode 100644 index d59eeb3c46d8..000000000000 --- a/TEST_APPS/testcases/nfc/test_self.py +++ /dev/null @@ -1,256 +0,0 @@ -""" -Copyright (c) 2017, Arm Limited and affiliates. -SPDX-License-Identifier: Apache-2.0 - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -""" - -import time -from icetea_lib.bench import Bench -from mbed_clitest.tools.tools import test_case -import icetea_lib.tools.asserts as asserts -import nfc_messages -from nfc_messages import NfcErrors -from nfc_cli_helper import CliHelper -from nfc_cli_helper import LARGE_BUFFLEN -import nfc - -""" -Standalone (no NFC reader needed) tests, which cover API with no end-to-end checks. -""" -class CreamSconeSelfTests(Bench, CliHelper): - def __init__(self, **kwargs): - testcase_args = { - 'title':"NFC tests with no reader", - 'status':"development", - 'purpose':"NFC target-only checks", - 'component':["NFC"], - 'type':"smoke", - 'requirements':{ - "duts": { - '*': { - "count": 1, - "type": "hardware", - "application": { - "name": "TEST_APPS-device-nfcapp" - } - }, - "1": {"nick": "dev1"} - } - } - } - testcase_args.update(kwargs) - Bench.__init__(self, **testcase_args) - - def setup(self): - pass - - def teardown(self): - self.logger.info("Test teardown: Reboot target...") - self.reset_dut() - - -""" -smoke - target app is running, and can exchange simple values -""" -@test_case(CreamSconeSelfTests) -def test_nfc_error_codes(self): - wally = NfcErrors.nfc_err_not_found - for x in range(0, 3): - self.nfc_command("dev1", "setlastnfcerror %d" % wally.value, expected_nfc_error=wally) - self.nfc_command("dev1", "getlastnfcerror", expected_nfc_error=wally) - - self.nfc_command("dev1", "setlastnfcerror %d" % 0) - self.nfc_command("dev1", "getlastnfcerror") - - -""" -smoke - target app reports if NFC eeprom driver present -""" -@test_case(CreamSconeSelfTests) -def test_nfc_eeprom(self): - - response = self.command("dev1", "iseeprom") # will hold result from the init lib call - self.logger.info("Target includes NFCEEPROM: %s" % response.parsed['iseeprom']) - -""" -check - Assert discovery can be started/stopped -""" -@test_case(CreamSconeSelfTests) -def test_nfc_discovery(self): - - self.nfc_command("dev1", "initnfc") - - response = self.nfc_command("dev1", "iseeprom") # will hold result from the init lib call - eeprom = response.parsed['iseeprom'] - self.logger.info("Target includes NFCEEPROM: %s" % eeprom) - if not eeprom: - self.nfc_command("dev1", "start") - self.nfc_command("dev1", "stop") - self.nfc_command("dev1", "start") - self.nfc_command("dev1", "stop") - else: - # eeprom, so not supported - self.nfc_command("dev1", "start", expected_retcode=-2, expected_nfc_error = NfcErrors.nfc_err_unsupported ) - self.nfc_command("dev1", "stop", expected_retcode=-2 , expected_nfc_error= NfcErrors.nfc_err_unsupported ) - -""" -check - Create a SmartPoster but does not read it back -""" -@test_case(CreamSconeSelfTests) -def test_nfc_setsmartposter(self): - - self.nfc_command("dev1", "initnfc") - - self.nfc_command("dev1", "setsmartposter https://www.mbed.com") - -@test_case(CreamSconeSelfTests) -def test_nfc_erase(self): - self.nfc_command("dev1", "initnfc") - response = self.nfc_command("dev1", "iseeprom") - eeprom = response.parsed['iseeprom'] - if eeprom: - self.logger.info("Target includes NFCEEPROM: %s" % eeprom) - self.nfc_command("dev1", "erase", timeout=30) - response = self.nfc_command("dev1", "readmessage") - asserts.assertEqual(response.parsed['nfcmessage'] is None, True) - -''' -check - Build a long message by copying a string to stress the driver with a nominal buffer. Verify contents of entire message -can be read back. -''' -@test_case(CreamSconeSelfTests) -def test_nfc_write_long(self): - messageRep = 'thequickbrownfoxjumpedoverthelazydog' # repeating message written - textLength = LARGE_BUFFLEN # large values take longer - # calculate actual message to compare to using the library - message = nfc_messages.make_textrecord( nfc_messages.repeat_string_to_length(messageRep, textLength)) - expected_message = str(message) - - self.nfc_command("dev1", "initnfc") - response = self.nfc_command("dev1", "iseeprom") - eeprom = response.parsed['iseeprom'] - if eeprom: - self.logger.info("Target includes NFCEEPROM: %s" % eeprom) - self.nfc_command("dev1", "erase") - self.nfc_command("dev1", "writelong %d %s" % (textLength,messageRep)) - response = self.nfc_command("dev1", "readmessage") - # assert that read the eeprom contents gives textlength bytes (including framing bytes which will vary) - self.assert_binary_equal(response.parsed['nfcmessage'], expected_message) - -''' -check - Query supported protocols if we have a controller -''' -@test_case(CreamSconeSelfTests) -def test_nfc_get_controller_protocols(self): - self.nfc_command("dev1", "initnfc") - - response = self.nfc_command("dev1", "iseeprom") - eeprom = response.parsed['iseeprom'] - if eeprom: - self.logger.info("Test ignore - target includes NFCEEPROM: %s" % eeprom) - else: - response = self.nfc_command("dev1", "getprotocols") - self.logger.info("Protocols = %s" % response.parsed['protocols']) - self.assertNotEqual(len(response.parsed['protocols']), 0, "Expected at least 1 protocol supported") - - -''' -check - Can set used protocols if we have a controller -Note: Currently only support Typ4 tags in PN512 driver -''' -@test_case(CreamSconeSelfTests) -def test_nfc_set_controller_protocols(self): - self.nfc_command("dev1", "initnfc") - - response = self.nfc_command("dev1", "iseeprom") - eeprom = response.parsed['iseeprom'] - if eeprom: - # eeproms do not allow target control - self.logger.info("Test ignore - target includes NFCEEPROM: %s" % eeprom) - else: - self.nfc_command("dev1", "setprotocols t1t") - self.nfc_command("dev1", "setprotocols t2t") - self.nfc_command("dev1", "setprotocols t3t") - self.nfc_command("dev1", "setprotocols isodep") - self.nfc_command("dev1", "setprotocols nfcdep") - self.nfc_command("dev1", "setprotocols t5t") - self.nfc_command("dev1", "setprotocols t1t t2t t3t isodep nfcdep t5t") - -''' -check - SmartPoster URI forms are supported (in the test-app) -''' -@test_case(CreamSconeSelfTests) -def test_nfc_check_smartposter_uri_forms(self): - def enum(**enums): - return type('Enum', (), enums) - - IDS = enum(NA=0x00, # Not applicable - HTTP_WWW=0x01, # http://www. - HTTPS_WWW=0x02, # https://www. - HTTP=0x03, # http:// - HTTPS=0x04, # https:// - TEL=0x05, # tel: - MAILTO=0x06, # mailto: - FTP_ANONYMOUS=0x07, # ftp://anonymous:anonymous@ - FTP_FTP=0x08, # ftp://ftp. - FTPS=0x09, # ftps:// - SFTP=0x0A, # sftp:// - SMB=0x0B, # smb:// - NFS=0x0C, # nfs:// - FTP=0x0D, # ftp:// - DAV=0x0E, # dav:// - NEWS=0x0F, # news: - TELNET=0x10, # telnet:// - IMAP=0x11, # imap: - RSTP=0x12, # rstp:// - URN=0x13, # urn: - POP=0x14, # pop: - SIP=0x15, # sip: - SIPS=0x16, # sips: - TFTP=0x17, # tftp: - BTSPP=0x18, # btspp:// - BTL2CAP=0x19, # btl2cap:// - BTGOEP=0x1A, # btgoep:// - TCPOBEX=0x1B, # tcpobex:// - IRDAOBEX=0x1C, # irdaobex:// - FILE=0x1D, # file:// - URN_EPC_ID=0x1E, # urn:epc:id: - URN_EPC_TAG=0x1F, # urn:epc:tag: - URN_EPC_PAT=0x20, # urn:epc:pat: - URN_EPC_RAW=0x21, # urn:epc:raw: - URN_EPC=0x22, # urn:epc: - URN_NFC=0x23, # urn:nfc: - ) - self.nfc_command("dev1", "initnfc") - result = self.nfc_command("dev1", "setsmartposter https://www.mbed.com") - asserts.assertEqual(result.parsed['uri_id'], IDS.HTTPS_WWW, "uri type expected HTTPS_WWW") - result = self.nfc_command("dev1", "setsmartposter http://www.mbed.com") - asserts.assertEqual(result.parsed['uri_id'], IDS.HTTP_WWW) - result = self.nfc_command("dev1", "setsmartposter https://www.topleveldomain") - asserts.assertEqual(result.parsed['uri_id'], IDS.HTTPS_WWW) - result = self.nfc_command("dev1", "setsmartposter tel:555-5551234") - asserts.assertEqual(result.parsed['uri_id'], IDS.TEL) - result = self.nfc_command("dev1", "setsmartposter ftp://www.mbed.com/files/") - asserts.assertEqual(result.parsed['uri_id'], IDS.FTP ) - -''' -smoke - driver buffer size can be retrieved -''' -@test_case(CreamSconeSelfTests) -def test_nfc_get_max_ndef(self): - self.nfc_command("dev1", "initnfc") - max = self.nfc_command("dev1", "getmaxndef").parsed['maxndef'] - self.logger.info("Target NDEF max buffer size %d" % max) - self.logger.info("Teststress size %d" % LARGE_BUFFLEN) -