02-07-2014 05:48 AM
I'm currently having a very frustrating problem when using the native Bluetooth API within a headless application. I'm limited to what I can post in terms of code, but I'll try and explain the situation as best as I can without those examples.
Thing is, once the Bluetooth SPP server is recreated and the device reconnects, the background service app crashes whenever a bt_rdev function is called (in this case bt_rdev_get_device()). My problem is made worse by the fact that Momentics currently cannot attach a debugger to service apps, only to UI-level apps, and the crash message is not relayed to my console for service apps. Therefore I can't ascertain as to why this bluetooth call is crashing the app. Worse still, when I use the very same driver in a UI-only application, everything works fine with no crashing. The only thing I can say is that it's not a memory issue as the heap only uses a maximum of 454KB prior to the crash.
Has anyone else tried using the Bluetooth API with headless apps? And if so, what's been your experience with using an SPP server in a headless app.
03-07-2014 08:51 AM
Just to comment on this, I'm seeing something similar with my headless app, but with the MessageService APIs, works fine in GUI but certain messages, when received, are causing the API to crash when message(s)Added is fired using the headless app (again, similar to OP, I've noted memory is not near the 3mb limit).