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)
156
156
157
157
void connect_callback (void )
158
158
{
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);
160
164
}
161
165
162
166
void disconnect_callback (uint8_t reason)
Original file line number Diff line number Diff line change @@ -115,7 +115,13 @@ void setupAdv(void)
115
115
116
116
void connect_callback (void )
117
117
{
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" );
119
125
}
120
126
121
127
Original file line number Diff line number Diff line change @@ -94,7 +94,13 @@ void setupAdv(void)
94
94
95
95
void connect_callback (void )
96
96
{
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" );
98
104
}
99
105
100
106
void loop ()
You can’t perform that action at this time.
0 commit comments