BLE demo for mbed Ported RunningElectronics's SBDBT firmware for BLE. It can communicate with iOS

Dependencies:   FatFileSystem mbed

Fork of BTstack by Norimasa Okamoto

Files at this revision

API Documentation at this revision

Comitter:
todotani
Date:
Mon Feb 11 14:10:57 2013 +0000
Parent:
4:3e8cd77ee303
Child:
6:cf06ba884429
Commit message:
Change pc.baud to 921600. Disable btstack debug-log

Changed in this revision

BLE_demo.cpp Show annotated file Show diff for this revision Revisions of this file
BTstack/config.h Show annotated file Show diff for this revision Revisions of this file
usb/mydbg.h Show annotated file Show diff for this revision Revisions of this file
usbbt/usbbt.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/BLE_demo.cpp	Sun Feb 10 08:44:13 2013 +0000
+++ b/BLE_demo.cpp	Mon Feb 11 14:10:57 2013 +0000
@@ -31,14 +31,16 @@
  *
  */
 
-/*  changed
+/*  Change history
  2013/2/10: by todotani 
   Modified tick event handler
   Modified LED control
   - LED 3 flush when connected
   - LED 2 OFF in case write attribute, ON in case read attribute
   - LED 1 OFF of after start of advertisement, then reflect write value to 0xFFF2
-
+2013/2/11: by todotani
+  Changed serial pc.baud (115200 to 921600) to avoid imcomplete connection issue
+  Disable btstack debug-log
 */
 
 //*****************************************************************************
@@ -58,8 +60,6 @@
 Serial pc(USBTX, USBRX);
 DigitalOut led1(LED1), led2(LED2), led3(LED3);
 
-#define HEARTBEAT_PERIOD_MS 500
-
 // from btstack ble_server.c
 #include "global.h"
 #include "debug.h"
@@ -309,7 +309,7 @@
 // main
 int main(void)
 {
-    pc.baud(115200);
+    pc.baud(921600);
     log_info("%s\n", __FILE__);
 
     // init LEDs
--- a/BTstack/config.h	Sun Feb 10 08:44:13 2013 +0000
+++ b/BTstack/config.h	Mon Feb 11 14:10:57 2013 +0000
@@ -2,7 +2,7 @@
 
 #define EMBEDDED
 
-#define ENABLE_LOG_DEBUG
+//#define ENABLE_LOG_DEBUG
 #define ENABLE_LOG_INFO
 #define ENABLE_LOG_ERROR
 
--- a/usb/mydbg.h	Sun Feb 10 08:44:13 2013 +0000
+++ b/usb/mydbg.h	Mon Feb 11 14:10:57 2013 +0000
@@ -1,5 +1,6 @@
 #ifndef _MYDBG_H_
 #define _MYDBG_H_
+
 #ifdef __DEBUG
 #include "Utils.h"
 #define DBG(...) do{fprintf(stderr,"[%s@%d] ",__PRETTY_FUNCTION__,__LINE__);fprintf(stderr,__VA_ARGS__);} while(0);
@@ -16,9 +17,9 @@
 #define DBG_LED4(A) while(0);
 #define DBG_PRINTF(...)  while(0);
 #endif //__DEBUG
+
 #ifdef __DEBUG3
 #define DBG3(...) do{fprintf(stderr,"[%s@%d] ",__PRETTY_FUNCTION__,__LINE__);fprintf(stderr,__VA_ARGS__);} while(0);
-
 #else //__DEBUG3
 #define DBG3(...)  while(0);
 #endif //__DEBUG3
--- a/usbbt/usbbt.cpp	Sun Feb 10 08:44:13 2013 +0000
+++ b/usbbt/usbbt.cpp	Mon Feb 11 14:10:57 2013 +0000
@@ -1,5 +1,5 @@
 #include "usbbt.h"
-#define __DEBUG
+//#define __DEBUG
 #include "mydbg.h"
 #include "Utils.h"