bluetooth communication

Hi,
I am completely new to developing for Garmin but do have a few years of development experience.
When I read the api documentation it seems like Bluetooth communication requires the Garmin app to be installed on the phone.

At least that is one possible interpretation of the api when I read it.

Can I, using the SDK and the available API, send data/messages back and forth over bluetooth to any device that is listening (using my self written application)?
Or is there is a need to somehow have all communication happen via the Garmin app in some way?

Sorry if it's a dumb question but the API documentation isn't completely clear to me on the communications module.
Any help is appreciated Slight smile

  • I'm actually trying to get this going... i.e. communicate with devices via BLE. This was only introduced a few weeks ago in the 3.1.0 beta SDK. You'll need a development board (NRF52 DK with the Garmin firmware for it). Download the 3.1.0 beta SDK and look in for the programmer's guide. There's a section there dedicated to BLE. Also, for the API docs open the ToyBox.html from the docs folder.

  • I'm unclear as to what you want to do here.  And part of it, is there's two ways to use BT in CIQ (well, the second one is only available in the 3.0.1 beta)

    The first way ins using "Communications" where you have a companion app on your phone, and the two apps can talk, which involves GCM. There are SDKS for the phone side to build your companion app (iOS and Android). You can also use GCM on the phone to allow doing things like makeWebRequest, so something on a watch can interact with a website.

    The second way (again, still new and only available with CIQ 3.1.x) is to talk over BLE using BluetoothLowEnergey in the API, and deal with BLE at a lower level for talking to something like a BLE sensor.

  • first off, thank you for the quick reply!

    so, my goal was to build an app on my forerunner that would allow me to register time on projects while I am at work by talking to the api of the tool we use.

    Because I found out that the api doesn't include wifi support I figured I would bite the bullet and create an app for my smartphone and computer (I already have an old prototype for receiving BT messages and acting on them for pc in Java) as a go between for making the webrequests.

    I did understand from the api docs that I can do that by sending the http request to GCM which would handle it but I am not sure I would be allowed to do so by my employer because the data passes through the GCM which means the dataflow is not completely under my/our control.

    So that is why I figured to write a lower level companion app, especially since I have a listener service in Java that I can easily adapt and I can focus on learning and writing the app for my forerunner.

    I found the direct download for the 3.1.0 Beta 2 SDK but it doesn't show up in my SDK manager in Eclipse so I might have to figure out how to get it working there.

    Thanks again for the clarification!

  • Why is there a need for a development board?
    Is it explicitly stated by Garmin that one wouldn't be able to communicate via BLE with a laptop or smartphone?

    just asking since that doesn't make any sense to me since that is the whole point of a standard protocol..

  • did you ever make progress in this? The virtual run app for instance can connect to an app in c# on windows, i can read for example heart rate data but i want to create a ble charachteristic to send other data over it.

  • At the end I decided to don't continue on my project because the whole point of it was to have my watch be an independent tool to log time etc and it added an extra layer/dependency to have to use my phone as well.
    So I can't help you as I haven't done any development for Garmin devices since I made this post

  • CIQ BluetoothLowEnergy allows writing a GATT client and not a GATT Server.  

  • Can you elaborate? I'm looking for example code that creates a new bluetooth service and characteristic and passes accelerometer x y z to this characteristic. If the virtual run app can connect to all ble receivers (which it does)  i think it should be possible: https://github.com/cornelhuman/QuickBluetoothLE

  • You can't.  With CIQ you can create an app that scans for a specific UUID, pairs to it, and then reads/writes characteristics. You can't advertise with CIQ.

    Virtual run is not written in CIQ.

  • Ok, so at this moment only way to get accelerometer x y z is to write to webserver and not bluetooth?