ARMmbed / ble-examples

BLE demos using mbed OS 3 and yotta.
Apache License 2.0
24 stars 27 forks source link

Cannot get DeviceInformationService to work #78

Closed PeterKenyon closed 8 years ago

PeterKenyon commented 8 years ago

Just adding the DeviceInformationService seems to crash the examples, and I cant find an example of it being used anywhere. The crash occurs when a device connects but before device discovery

PeterKenyon commented 8 years ago

I have pruned the DeviceInformationService class and removed hardwareRevision firmwareRevision and softwareRevision Characteristics and now I can connect and discover and read just fine. Is there some limit somewhere, this is very odd behaviour

DeviceInformationService.h.txt

PeterKenyon commented 8 years ago

running using yt debug on connect I hit a __BKPT(0) in /yotta_modules/mbed-drivers/source/retarget.cpp:568 investigating further...

pan- commented 8 years ago

@PeterKenyon It looks like you have memory issues, the memory available on mkit is very small.

Basically with the default configuration, there is just 4k of RAM available for the application (2k are used by the stack and 10k are used by the soft device). If you use printf, it will use 1k of RAM and other parts of mbed OS also use RAM.

The first things you can do are:

PeterKenyon commented 8 years ago

Solved, It was indeed a memory issue as pan described. you need to add a config.json file with the S110 device and life is good again Wow! see #issue80