Home › Forums › Mooshimeter Support › Pairing from a PC without BLE113
- This topic has 0 replies, 2 voices, and was last updated 6 years, 8 months ago by
admin.
- AuthorPosts
Anonymous
InactiveHello!
I intend to implement a driver/library to communicate with the Mooshimeter from SIGROK, using the standard linux bluetooth stack (as opposed to the one specific dongle supported by the official Python API).
I cannot, however, get the mooshimeter to pair with my machine, neither in Linux nor in Windows 10.
I have a BLE-capable adapter built into my computer, and scanning for devices shows my Mooshimeter as expected.
When attempting to pair in windows, I am prompted for a passkey. Sometimes it works with six zeroes (“000000”) and sometimes with eight (“00000000”), but even after pairing, the device does not expose any services in the device properties and as far as I can tell, it is only paired but never connected.
When attempting to pair in Linux using the bluetoothctl frontend, I am either prompted for a passcode and none works, like so:
1234567891011121314151617181920albin@stimpy:~$ bluetoothctl[NEW] Controller 44:85:00:39:B0:6F ChromeLinux_38DA [default][NEW] Device 68:9E:19:CB:DE:AE Muschi[bluetooth]# power onChanging power on succeeded[bluetooth]# agent KeyboardOnlyAgent registered[bluetooth]# pair 68:9E:19:CB:DE:AEAttempting to pair with 68:9E:19:CB:DE:AE[CHG] Device 68:9E:19:CB:DE:AE Connected: yesRequest passkey[CHG] Device 68:9E:19:CB:DE:AE UUIDs: 00001800-0000-1000-8000-00805f9b34fb[CHG] Device 68:9E:19:CB:DE:AE UUIDs: 00001801-0000-1000-8000-00805f9b34fb[CHG] Device 68:9E:19:CB:DE:AE UUIDs: 1bc5ffa0-0200-62ab-e411-f254e005dbd4[agent] Enter passkey (number in 0-999999): 000000Failed to pair: org.bluez.Error.AuthenticationFailed[CHG] Device 68:9E:19:CB:DE:AE Connected: no[bluetooth]#Or, if I attempt to force Simple Pairing (i.e. the bluetooth mode without passkeys and PINs), it looks like this:
123456789101112131415albin@stimpy:~$ bluetoothctl[NEW] Controller 44:85:00:39:B0:6F ChromeLinux_38DA [default][NEW] Device 68:9E:19:CB:DE:AE Muschi[bluetooth]# agent NoInputNoOutputAgent registered[bluetooth]# power onChanging power on succeeded[bluetooth]# pair 68:9E:19:CB:DE:AEAttempting to pair with 68:9E:19:CB:DE:AE[CHG] Device 68:9E:19:CB:DE:AE Connected: yesFailed to pair: org.bluez.Error.AuthenticationFailed[CHG] Device 68:9E:19:CB:DE:AE Connected: no[bluetooth]#The time between “Connected: yes” and the AuthenticationFailed error is less than one second.
The meter works with my Android phone, where I do not need to manually pair it at all or input any passkey – simply selecting it from the Scan screen in the mooshimeter app is enough to connect and start reading values.
What are the correct connection parameters for the Mooshimeter?
Has anyone successfully paired with it from a PC rather than a mobile device?Anonymous
InactiveAfter reading the README at https://github.com/ghtyrant/libsooshi (Thanks!), I tried fetching the BlueZ stack from git and running it with experimental features enabled (this currently includes BLE and GATT as far as I can tell), and some new things happened:
1234567891011121314151617181920212223242526272829303132333435363738394041424344[bluetooth]# agent KeyboardOnlyAgent registered[bluetooth]# pair 68:9E:19:CB:DE:AEAttempting to pair with 68:9E:19:CB:DE:AE[CHG] Device 68:9E:19:CB:DE:AE Connected: yesRequest passkey[NEW] Primary Service/org/bluez/hci0/dev_68_9E_19_CB_DE_AE/service000cGeneric Attribute Profile[NEW] Characteristic/org/bluez/hci0/dev_68_9E_19_CB_DE_AE/service000c/char000dService Changed[NEW] Descriptor/org/bluez/hci0/dev_68_9E_19_CB_DE_AE/service000c/char000d/desc000fClient Characteristic Configuration[NEW] Primary Service/org/bluez/hci0/dev_68_9E_19_CB_DE_AE/service0010Vendor specific[NEW] Characteristic/org/bluez/hci0/dev_68_9E_19_CB_DE_AE/service0010/char0011Vendor specific[NEW] Descriptor/org/bluez/hci0/dev_68_9E_19_CB_DE_AE/service0010/char0011/desc0013Characteristic User Description[NEW] Characteristic/org/bluez/hci0/dev_68_9E_19_CB_DE_AE/service0010/char0014Vendor specific[NEW] Descriptor/org/bluez/hci0/dev_68_9E_19_CB_DE_AE/service0010/char0014/desc0016Client Characteristic Configuration[NEW] Descriptor/org/bluez/hci0/dev_68_9E_19_CB_DE_AE/service0010/char0014/desc0017Characteristic User Description[CHG] Device 68:9E:19:CB:DE:AE UUIDs: 00001800-0000-1000-8000-00805f9b34fb[CHG] Device 68:9E:19:CB:DE:AE UUIDs: 00001801-0000-1000-8000-00805f9b34fb[CHG] Device 68:9E:19:CB:DE:AE UUIDs: 1bc5ffa0-0200-62ab-e411-f254e005dbd4[CHG] Device 68:9E:19:CB:DE:AE ServicesRehttps://github.com/ghtyrant/libsooshihttps://github.com/ghtyrant/libsooshisolved: yes[agent] Enter passkey (number in 0-999999): 000000Failed to pair: org.bluez.Error.AuthenticationFailed[CHG] Device 68:9E:19:CB:DE:AE ServicesResolved: no[CHG] Device 68:9E:19:CB:DE:AE Connected: no[bluetooth]#This new output only appears about a second after the passkey prompt first comes up, but the authentication still fails, both with and without passkey.
Anonymous
InactiveAnother update: libsooshi’s example program and the more advanced sooshichef by the same developer work just fine, even without pairing with the Mooshimeter.
It appears the problem was in my head – I didn’t realize bluetooth devices could be used without some form of handshaking/pairing but apparently it works when done by the right interface.
In conclusion: Don’t try to pair with the Mooshimeter – you’re not supposed to need to do that. This is taken care of with GATT.
admin
KeymasterHi Albin,
This was a good read, thank you! Sorry I didn’t get to it sooner.
Bluetooth terminology is very confusing, especially when you get to Bluetooth Low Energy. In my opinion they shouldn’t have called it Bluetooth Low Energy, they should have used another name entirely because it’s a very different radio protocol than Bluetooth “Classic”.
Anyway, the Mooshimeter does not use pin codes or pairing, just a basic GATT profile over BLE.
Best
~James
- AuthorPosts