This CLI (Command Line Interface) is based mbed-os. Both NNN50 and NQ620 are supported.
Fork of NNN40_CLI by
BLE CLI Document can be downloaded here .
Note that when evaluate using Windows PC as the host, the Serial driver need to be installed in advance. The instruction is explained in the link below
https://developer.mbed.org/handbook/Windows-serial-configuration
Once installed, a device called 'mbed Serial Port (COM#)' should be recognized in Device Manager, as shown below
Please open the com port at 115200 8n1 as default
Diff: main.cpp
- Revision:
- 0:5c195ab2f696
- Child:
- 3:38ec8ad317f4
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Fri Sep 11 07:29:31 2015 +0000 @@ -0,0 +1,41 @@ +#include "mbed.h" +#include "Gap.h" +#include "command-interpreter.h" + + +DigitalOut swio(p19); +Serial console(TX_PIN_NUMBER,RX_PIN_NUMBER); + +//void disconnectionCallback(Gap::Handle_t handle, Gap::DisconnectionReason_t reason) +//{ +// /* Leave for application */ +//} + +int main(void) +{ + /* swio default low for BLE RF */ + swio = 0; + + /* Select external 32MHz crystal for NNN40-DT1R */ + NRF_CLOCK->XTALFREQ = 0x00000000; + NRF_CLOCK->EVENTS_HFCLKSTARTED = 0; + NRF_CLOCK->TASKS_HFCLKSTART = 1; + while (NRF_CLOCK->EVENTS_HFCLKSTARTED == 0) + {// Do nothing. + } + + uint8_t inputChar; + console.baud(115200); + console.printf("\r\nDELTA BLE with WiFi\r\n"); + + while(1) { + while (NRF_UART0->EVENTS_RXDRDY != 1) + { + // Wait for RXD data to be received + } + NRF_UART0->EVENTS_RXDRDY = 0; + inputChar = (uint8_t)NRF_UART0->RXD; + + cyntecProcessCommandInput(inputChar); + } +}