diff --git a/part7-bluetooth/bt.c b/part7-bluetooth/bt.c index 31cf5a8..960eb24 100644 --- a/part7-bluetooth/bt.c +++ b/part7-bluetooth/bt.c @@ -239,8 +239,8 @@ void startActiveScanning() { } void startActiveAdvertising() { - float advertMinFreq = 100; // every 48ms - float advertMaxFreq = 100; // every 48ms + float advertMinFreq = 100; // every 100ms + float advertMaxFreq = 100; // every 100ms float bleGranularity = 0.625; unsigned int min_interval = advertMinFreq / bleGranularity; diff --git a/part7-bluetooth/kernel.c b/part7-bluetooth/kernel.c index 9a0e88a..05b0301 100644 --- a/part7-bluetooth/kernel.c +++ b/part7-bluetooth/kernel.c @@ -127,12 +127,7 @@ void main() uart_writeText("bt_setbdaddr()\n"); bt_setbdaddr(); - /* - uart_writeText("startActiveScanning()\n"); - setLEeventmask(0xff); - startActiveScanning(); - */ - + // Check we set the BD_ADDR correctly unsigned char local_addr[6]; uart_writeText("bt_getbdaddr()\n"); bt_getbdaddr(local_addr); @@ -140,6 +135,14 @@ void main() for (int c=5;c>=0;c--) uart_byte(local_addr[c]); uart_writeText("\n"); + // Start scanning for devices around us + /* + uart_writeText("startActiveScanning()\n"); + setLEeventmask(0xff); + startActiveScanning(); + */ + + // Get the Eddystone beacon going uart_writeText("startActiveAdvertising()\n"); startActiveAdvertising();