Can't find BLE to connect to on Hexiwear


#1

Hi,

I loaded the ble_data_transmission example for Hexiwear and I can see the serial port showing that it is running fine.

However, when I open my phone or look at my computer’s bluetooth, I cannot discover the Hexiwear at all.

I see in the comments that
"The original Hexiwear default application binary file must be pre-loaded inside the kw40z 

    # The application binary file for kw40z can be found here:
    # Link: https://github.com/MikroElektronika/HEXIWEAR/blob/master/SW/binaries/HEXIWEAR_KW40.bin"

But when I click the link, it is not working.

#2

Hi Anjian,

new link is this https://github.com/MikroElektronika/HEXIWEAR/blob/master/SW/KW40%20IAR/HEXIWEAR_bluetooth/binary/HEXIWEAR_KW40_v100.bin - they commit new changes and move bin file in new location.

In the example “ble_data_transmission” you can see that the left capacitive button (see pinmap) is used to turn on and off the Hexiwear bluetooth; if bluetooth is on the blue led is on; check if the bluetooth is on and try again.

When you succeed to visualize the device from your BT device manager, you can request the pair code (Hexiwear will be print the code on the serial monitor) and with a BLE scanner (android app) you can check the battery level.

Let me know if this can help you


#3

Hi Matteo,

Thank you again for helping me. You were correct, I just needed to make sure that the LED was ON and then I had to use a 3rd party APP to get my macbook to reveal BLE devices. I can connect to hexiwear fine now.

My other question is, how exactly can I send and receive data from the Hexiwear to my laptop. My goal is to stream accelerometer and gyro data using BLE to a python script on my mac (sampling hopefully around 10 Hz). I understand that BLE has different protocols and data types. Is there anyway that I can just connect to Hexiwear like a BLE UART?

Also can I treat the kw40z library as a “BLE” library as described here: https://docs.zerynth.com/latest/official/core.zerynth.stdlib/docs/official_core.zerynth.stdlib_wireless_ble.html#service-class 

I’ve been googling around for hours to see if there is any python BLE libraries that I can use, but I haven’t been able to get anything to work. For example, I’ve tried Adafruit’s BLE python library, which is supposed to work on Mac OSX. But their test examples just cause for my macbook 2016 to just crash without even being able to identify any devices.

Anyhow, I am just wondering what would you recommend as the best way to do this?


#4

Hi Anjian,

BLE driver of the Hexiwear device is little different from the standard; KW40Z is another chip inside the Hexiwear (main core is the K64 NXP chip) with is own firmware that handles Bluetooth features and capacitive buttons.

To perform all tests, I install on my Android phone the “BLE Scanner” app that allows to check/read/write exposed register (Battery Level, Gyro, Accelerometer Data, etc.) of the BLE device connected (here the related documentation).

Let me know if this can help you :slight_smile: