Skip to content

Commit 97427bb

Browse files
committed
update debug log
1 parent dc0b679 commit 97427bb

File tree

1 file changed

+41
-4
lines changed

1 file changed

+41
-4
lines changed

libraries/Bluefruit52Lib/src/bluefruit.cpp

Lines changed: 41 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -561,8 +561,43 @@ void AdafruitBluefruit::printInfo(void)
561561
// Skip if Bluefruit.begin() is not called
562562
if ( _ble_event_sem == NULL ) return;
563563

564-
const char* title_fmt = "%-15s: ";
564+
Serial.println("--------- SoftDevice Config ---------");
565565

566+
const char* title_fmt = "%-16s: ";
567+
568+
/*------------- SoftDevice Config -------------*/
569+
// Max uuid128
570+
Serial.printf(title_fmt, "Max UUID128");
571+
Serial.println(_sd_cfg.uuid128_max);
572+
573+
// ATTR Table Size
574+
Serial.printf(title_fmt, "ATTR Table Size");
575+
Serial.println(_sd_cfg.attr_table_size);
576+
577+
// Service Changed
578+
Serial.printf(title_fmt, "Service Changed");
579+
Serial.println(_sd_cfg.service_changed);
580+
581+
#if SD_VER >= 500
582+
// Max MTU
583+
Serial.printf(title_fmt, "Max MTU");
584+
Serial.println(_sd_cfg.mtu_max);
585+
586+
// Event Length
587+
Serial.printf(title_fmt, "Event Length");
588+
Serial.println(_sd_cfg.event_len);
589+
590+
// HVN Queue Size
591+
Serial.printf(title_fmt, "HVN Queue Size");
592+
Serial.println(_sd_cfg.hvn_tx_qsize);
593+
594+
// Write Command Queue Size
595+
Serial.printf(title_fmt, "WrCmd Queue Size");
596+
Serial.println(_sd_cfg.wr_cmd_qsize);
597+
#endif
598+
599+
/*------------- Settings -------------*/
600+
Serial.println("\n--------- BLE Settings ---------");
566601
// Name
567602
Serial.printf(title_fmt, "Name");
568603
{
@@ -574,9 +609,9 @@ void AdafruitBluefruit::printInfo(void)
574609
Serial.println();
575610

576611
// Max Connections
577-
Serial.printf(title_fmt, "Max Connection");
612+
Serial.printf(title_fmt, "Max Connections");
578613
Serial.printf("Peripheral = %d, ", _prph_enabled ? 1 : 0);
579-
Serial.printf("Central = %d, ", _central_enabled ? BLE_CENTRAL_MAX_CONN : 0);
614+
Serial.printf("Central = %d ", _central_enabled ? BLE_CENTRAL_MAX_CONN : 0);
580615
Serial.println();
581616

582617
// Address
@@ -592,16 +627,18 @@ void AdafruitBluefruit::printInfo(void)
592627
}
593628
Serial.println();
594629

630+
// Tx Power
595631
Serial.printf(title_fmt, "TX Power");
596632
Serial.printf("%d dBm", _tx_power);
597633
Serial.println();
598634

635+
// Connection Intervals
599636
Serial.printf(title_fmt, "Conn Intervals");
600637
Serial.printf("min = %.2f ms, ", _ppcp_min_conn*1.25f);
601638
Serial.printf("max = %.2f ms", _ppcp_max_conn*1.25f);
602639
Serial.println();
603640

604-
// List the paried device
641+
/*------------- List the paried device -------------*/
605642
Serial.printf(title_fmt, "Paired Devices");
606643
Serial.println();
607644

0 commit comments

Comments
 (0)