On 6/05/2021 16:43, Ryan Gardner wrote:
Thanks for the info. I'm not an expert mac developer either - so I switched to using a linux box for what I'm trying to do. (A raspberry pi with built in bluetooth is acting in that role now)
The device I'm working on uses BLE - it looks like the configure.ac configure.ac always marks the bluetooth_le transport as being unsupported.
For BLE there is no implementation for any of the supported platforms.
What do you think is the easiest way to test / debug adding a new BLE device? I was hoping to use the simple dctool as a way to test things as I implemented it
- but maybe there's a better approach? Do I need to build my own simple test app
that sets up the ble connection and then hands things over to libdivecomputer?
I also mainly use dctool for development and debugging. But for testing the actual BLE communication, you'll need a host application like subsurface so you can use their BLE implementation.
If you have some capture files, you can also simulate and replay the communication. I have a small tool to replay libdivecomputer logs (after some postprocessing) over pty's. So if you can easily extract the actual I/O data from the capture files, that may also be an option. It's certainly not for everything, but it can help to try things without any hardware.
There is also a simulator to simulate the device end of the communication. But that's mainly useful afterwards, because it also needs to be implemented of course.
Jef