Closed frankcohen closed 1 month ago
This is a part of my Reflection's open source entertainment platform making project https://github.com/frankcohen/ReflectionsOS. The code needs to have server and client on the same device as the device may be in a room full of other devices, and there's no way to declare a single device to be a beacon or server. -Frank
Found it. Line 34: static NimBLEAdvertisedDevice* myDevice; needs to be named advDevice, and line 39 deleted, and line 93 needs to be advDevice = advertisedDevice; Of course, now I get a different error:
E NimBLEClient: A connection to 60:55:f9:f5:c3:b5 already exists
Digging into this next. I love C/C++, not.
@frankcohen Did you figure out your new error? I am having some problem
@frankcohen Did you figure out your new error? I am having some problem
I found that I was making some basic mistakes on how to initialize the libraries objects. The working code is in BLE.cpp and BLE.h in https://github.com/frankcohen/ReflectionsOS/tree/main/Devices/BlueFish/ReflectionsOfFrank. Glad to get your feedback and changes.
Thanks!
On Wed, Dec 27, 2023 at 2:27 PM Frank Cohen @.***> wrote:
@frankcohen https://github.com/frankcohen Did you figure out your new error? I am having some problem
I found that I was making some basic mistakes on how to initialize the libraries objects. The working code is in BLE.cpp and BLE.h in https://github.com/frankcohen/ReflectionsOS/tree/main/Devices/BlueFish/ReflectionsOfFrank. Glad to get your feedback and changes.
— Reply to this email directly, view it on GitHub https://github.com/h2zero/NimBLE-Arduino/issues/561#issuecomment-1870570829, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFKFNLVXPKEP6GTRD2Y5P53YLRZBDAVCNFSM6AAAAAAZY2QPSOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZQGU3TAOBSHE . You are receiving this because you commented.Message ID: @.***>
I'm getting a core panic when running code that connects to a BLE server. I am using NimBLE 1.4.1, ESP32-S3, Arduino Version: 2.1.1-nightly-20230627, and derived by code from https://github.com/h2zero/NimBLE-Arduino/blob/release/1.4/examples/NimBLE_Server/NimBLE_Server.ino and https://github.com/h2zero/NimBLE-Arduino/blob/release/1.4/examples/NimBLE_Client/NimBLE_Client.ino.
My code crashes when executing:
I'm going to keep debugging to solve the problem, and I will post the solution here. Still, if anyone wants to offer me ideas, solutions, and criticism I would be glad to receive it. Thanks, in advance.
Here is what I see in the Serial Monitor:
BLE.h contents:
BLE.cpp contents: