This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Windows 10, Thingy 52 BLE

I'm attempting to write a plugin/dll to pull data from the Nordic Thingy52. I can scan all devices that are paired with windows 10, and load up the services, etc.

I can also read from descriptors that have explicit Read permissions. However, when I attempt to set a characteristic (such as motion data) to notify, or write to a service configuration characteristic, It instantly disconnects.

I loaded up the Thingy Firmware as a debug build from the github repo, and logged the data thingy_log.txt

It appears to reboot 20+ times. Int he Jlink RTT Viewer I would sometimes see drv_ext_gpio.c line 466 error (in Keil it's a blank line) (correction: line 446)

err_code = drv_sx1509_data_modify((1UL << pin_number), 0);
RETURN_IF_ERROR_EXT_GPIO_CLOSE(err_code);

Is there a sequence to connecting to the Thingy that's done in android/iOS apps that I'm missing here?

Edit: I am Currently connecting by getting the Config service, then getting motion, sound, and UI services (I don't need the rest) from the DeviceInfo on windows.

I am then attempting to write characteristic values for motion config, etc. But nothing stays connected. Do I need to be doing some sort of MTU request?

Parents
  • Hi jublin,

    Just did a test on a Microsoft Surface 2 with Windows 10 version 1703 (Creators update). I used the Bluetooth LE Explorer app which was downloaded from the Windows Store.

    With the app I was able to connect to Thingy:52 and read the GATT profile. In addition I was able to:

    1. Read and write device name with the device name characteristic (EF680101-9B35-4933-9B10-52FFA9740042)
    2. Start notifications for the temperature characteristic (EF680201-9B35-4933-9B10-52FFA9740042)
    3. Read and write Eddystone URL with the Eddystone URL characteristic (EF680105-9B35-4933-9B10-52FFA9740042)
    4. Start notifications for the Euler characteristic (EF680407-9B35-4933-9B10-52FFA9740042)

    Could you try to recreate these steps? Also make sure your Windows 10 version is updated since Microsoft has made several recent improvements to their BLE drivers and APIs.

    If you manage to get it working with the Bluetooth LE Explorer app you might want to take a look at the source code for tips on how to write your plugin/dll. I also recommend these videos introducing BLE for Windows developers.

    Also, there is no need to do an MTU request unless you are using the speaker or microphone on Thingy:52. The reason for this is to get an adequate throughput.

    Ketil

  • So, I think i've narrowed down the problem, but have no idea how to fix it.

    I'm using this nuget package: github.com/.../README.md

    Which stops at Anniversary update prior to Spring Creators update. Spring update added pairing-free ble device enumeration and connection. If I have the device previously paired (which I have been doing for multiple other devices), it will fail to connect and show the device as unreachable. If I pair the device and leave the settings window open (Thingy thinks it's connected), Bluetooth LE will Let me connect. If I turn the device off/on, it will be unreachable.

    In my windows application, If I pair and leave the window open, I can write the notify out and such, but the valuechanged for whichever characteristic is never hit.

    Any ideas on that?

Reply
  • So, I think i've narrowed down the problem, but have no idea how to fix it.

    I'm using this nuget package: github.com/.../README.md

    Which stops at Anniversary update prior to Spring Creators update. Spring update added pairing-free ble device enumeration and connection. If I have the device previously paired (which I have been doing for multiple other devices), it will fail to connect and show the device as unreachable. If I pair the device and leave the settings window open (Thingy thinks it's connected), Bluetooth LE will Let me connect. If I turn the device off/on, it will be unreachable.

    In my windows application, If I pair and leave the window open, I can write the notify out and such, but the valuechanged for whichever characteristic is never hit.

    Any ideas on that?

Children
No Data
Related