Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 0b9e84a

Browse files
committed
[WIP] Add comments and print for revisions
1 parent 89fd740 commit 0b9e84a

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

‎src/local/BLELocalCharacteristic.cpp‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,10 @@ int BLELocalCharacteristic::writeValue(const uint8_t value[], int length)
123123

124124
GAP.setAdvertisedServiceData(serviceUuid, value, length);
125125

126+
// TO BE REVISIONED
127+
// could advertise also if connected
126128
if (!ATT.connected() && GAP.advertising()) {
129+
// if it is already advertising it should stop before requesting advertising again
127130
GAP.advertise();
128131
}
129132
}

‎src/utility/HCI.cpp‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -620,6 +620,10 @@ void HCIClass::handleEventPkt(uint8_t /*plen*/, uint8_t pdata[])
620620
uint16_t supervisionTimeout;
621621
uint8_t masterClockAccuracy;
622622
} *leConnectionComplete = (EvtLeConnectionComplete*)&pdata[sizeof(HCIEventHdr) + sizeof(LeMetaEventHeader)];
623+
624+
// CLIENT: 0x01 / PERIPHERAL: 0x00
625+
Serial.println("role:");
626+
Serial.println(leConnectionComplete->role);
623627

624628
if (leConnectionComplete->status == 0x00) {
625629
ATT.addConnection(leConnectionComplete->handle,

‎src/utility/HCICordioTransport.cpp‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,8 @@ size_t HCICordioTransportClass::write(const uint8_t* data, size_t length)
259259
void HCICordioTransportClass::handleRxData(uint8_t* data, uint8_t len)
260260
{
261261
if (_rxBuf.availableForStore() < len) {
262+
// This drop can cause many problems
263+
Serial.println("DROP");
262264
// drop!
263265
return;
264266
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /