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: CLI_Source/ble_cli.cpp
- Revision:
- 25:1423b707b705
- Parent:
- 24:838a0b25934b
--- a/CLI_Source/ble_cli.cpp Fri Nov 11 09:02:51 2016 +0000
+++ b/CLI_Source/ble_cli.cpp Fri May 12 01:53:35 2017 +0000
@@ -15,8 +15,8 @@
//0920 Silvia modify
#if defined(TARGET_DELTA_DFBM_NQ620)
#define MODULE_NAME "DFBM-NQ620"
-#else if defined(TARGET_DELTA_DFCM_NNN40)
-#define MODULE_NAME "DFCM-NNN40-DT1R"
+#else if defined(TARGET_DELTA_DFCM_NNN50)
+#define MODULE_NAME "DFCM-NNN50"
#endif
//0920 Silvia modify
@@ -395,7 +395,7 @@
#if defined(TARGET_DELTA_DFBM_NQ620)
const uint8_t NUM_TXPOW = 7;
int8_t validTxPow[NUM_TXPOW] = {-20, -16, -12, -8, -4, 0, 4};
-#else if defined(TARGET_DELTA_DFCM_NNN40)
+#else if defined(TARGET_DELTA_DFCM_NNN50)
const uint8_t NUM_TXPOW = 9;
int8_t validTxPow[NUM_TXPOW] = {-40, -30, -20, -16, -12, -8, -4, 0, 4};
#endif
@@ -405,8 +405,8 @@
if ( arg != NULL ) {
#if defined(TARGET_DELTA_DFBM_NQ620)
setValue = atoi((const char *)arg);
-#else if defined(TARGET_DELTA_DFCM_NNN40)
- setValue = cyntecAtoInt(arg);//work around for NNN40 since somehow atoi doesn't work properly
+#else if defined(TARGET_DELTA_DFCM_NNN50)
+ setValue = cyntecAtoInt(arg);//work around for NNN50 since somehow atoi doesn't work properly
#endif
for (i = 0; i < NUM_TXPOW; i++) {
if (setValue == validTxPow[i]) {
@@ -1203,7 +1203,7 @@
}
/*Tsungta, @0913 modify to compatiable with mbed os 5.0*/
-#include <mbed-events/events.h>
+//#include <mbed-events/events.h>
void onBleInitError(BLE &ble, ble_error_t error)
{
(void)ble;
@@ -1222,7 +1222,7 @@
void scheduleBleEventsProcessing(BLE::OnEventsToProcessCallbackContext* context) {
BLE &deltaBLE = BLE::Instance();
- eventQueue.post(Callback<void()>(&deltaBLE, &BLE::processEvents));
+ eventQueue.call(Callback<void()>(&deltaBLE, &BLE::processEvents));
}
void cynBLEInitCommand(void)
