File tree Expand file tree Collapse file tree 3 files changed +19
-3
lines changed
libraries/Bluefruit52Lib/examples/Peripheral Expand file tree Collapse file tree 3 files changed +19
-3
lines changed Original file line number Diff line number Diff line change @@ -156,7 +156,11 @@ void setupHRM(void)
156156
157157void connect_callback (void )
158158{
159- Serial.println (" Connected" );
159+ char central_name[32 ] = { 0 };
160+ Bluefruit.Gap .getPeerName (central_name, sizeof (central_name));
161+
162+ Serial.print (" Connected to " );
163+ Serial.println (central_name);
160164}
161165
162166void disconnect_callback (uint8_t reason)
Original file line number Diff line number Diff line change @@ -115,7 +115,13 @@ void setupAdv(void)
115115
116116void connect_callback (void )
117117{
118- Serial.println (" Connected ! Please select 'Uart' tab and send any characters" );
118+ char central_name[32 ] = { 0 };
119+ Bluefruit.Gap .getPeerName (central_name, sizeof (central_name));
120+
121+ Serial.print (" Connected to " );
122+ Serial.println (central_name);
123+
124+ Serial.println (" Please select 'Uart' tab and send any characters" );
119125}
120126
121127
Original file line number Diff line number Diff line change @@ -94,7 +94,13 @@ void setupAdv(void)
9494
9595void connect_callback (void )
9696{
97- Serial.println (" Connected !! Please select the 'Neopixels' tab, click 'Connect' and have fun" );
97+ char central_name[32 ] = { 0 };
98+ Bluefruit.Gap .getPeerName (central_name, sizeof (central_name));
99+
100+ Serial.print (" Connected to " );
101+ Serial.println (central_name);
102+
103+ Serial.println (" Please select the 'Neopixels' tab, click 'Connect' and have fun" );
98104}
99105
100106void loop ()
You can’t perform that action at this time.
0 commit comments