1

A similar question has been asked before , but I'm unsure how to add a follow up question ....

Essentially, I want to connect one of these M5600 sensors to a RPI to use with a python script of pressure logging .

All attempts so far to connect to my linux (ubuntu) development machine have also failed - my TPLink UB400 BT4.0 dongle sees the device but refuses to connect. I managed to get it to connect to another ble device using gatttool , so I'm sure the dongle is working ok.

Any assistance would be welcome

TIA

Bill

  • 1
    Hello and welcome -- What's your objective of asking this question? – M. Rostami Mar 2 at 16:55
  • 1
    I'm hoping one of the previous posters (raspberrypi.stackexchange.com/questions/77578/…) might be able to point me at a way of connecting the RPI without recompiling the rpi kernel (way beyond my ability!) . One poster implied that a particular usb adapter could help. – Bill Todd Mar 2 at 20:02
  • 1
    Ok. Good. Please add this comment as an UPDATE to the question. Maybe others could help you. – M. Rostami Mar 2 at 22:27
0

Ok figured it out, so to answer my question for the benefit of others:

Using the specified Laird USB BT900-US adapter configured with correct firmware and loaded with the precompiled smartZ basic program. The sensor can then be accessed via the ttyUSBx serial port with a 'gatttool' like app that is running on the adapter.

1 send "smartZ" to start the USB app.

2 wait for "-------->" prompt to ensure app is running

3 send "hcitool lecc 01xxxxxxxxxxxx" {01= BT900 type : xx = MAC address of device}

4 wait for "Connection handle hhhhhh" {hh = con handle}

5 wait for "-------->-------->" prompt

6 send "gatttool –b 01xxxxxxxxxx --char-read --handle=0x00000020 {x = MAC : 0x00000020 is data handle}

7 wait for "ConHandle:hhhhhhh Characteristic value/descriptor: B30979730F00F088F0FF6C346900 (\B3\tys\0F\00\F0\88\F0\FFl4i\00) {hh = connection handle from above : hex value is temperature and pressure readings as defined at the end of the software manual }

The above is a minimal set up. Your program should scan for devices with "hcitool lescan", parse the returned data to determine the device type and MAC , use "gatttool -b 01xxxxxxxxxxx --primary" and gatttool -b 01xxxxxxxxxxx --characteristics" to determine handle numbers by comparing to UUIDs.

Basically lots of string parsing !

(WHY! don't designers of these things have a non-verbose response version to make the process easier and more reliable????)

| improve this answer | |
  • Please accept your own answer with a click on the tick on its left side. Only this will finish the question and it will not pop up again year for year. – Ingo Mar 6 at 23:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.