here's a quick link for the feature exchange during pairing (OOB too like NFC):

http://blog.bluetooth.com/bluetooth-pairing-part-1-pairing-feature-exchange

https://blog.bluetooth.com/bluetooth-pairing-part-2-key-generation-methods

https://blog.bluetooth.com/bluetooth-pairing-passkey-entry?_ga=2.116852804.378017028.1515697544-664430033.1515094290

https://blog.bluetooth.com/bluetooth-pairing-part-4

https://blog.bluetooth.com/bluetooth-pairing-part-5-legacy-pairing-out-of-band


LL connection is the first step, from that point on, you can communicate with 
the device. Pairing are extra step to remember the device connections key in a 
relatively secure way (no bluetooth connection can be considered 100% bullet 
proof, but you can reduce the risk and the MIT attack).


  1.  connect
  2.  authentificate
  3.  encryption
  4.  GATT services discovery
  5.  Now you can exchange data

Also, make sure you understand this:
BLE 4.0 != BLE 4.2
4.0 is legacy / smart
4.2 is secure
Secure connection can only be acheive is both side support 4.2. Make sure you 
don't try to do it on 4.0 it won't be supported.

________________________________
From: Interest <interest-bounces+godboutj=amotus...@qt-project.org> on behalf 
of Jason H <jh...@gmx.com>
Sent: June 29, 2018 9:33 AM
To: Maurice Kalinowski
Cc: Interest@qt-project.org
Subject: Re: [Interest] Bluetooth on Qt on Pi (for real this time)

Thanks all for your experience reports. Looking around, it seems that  
disabling the built-in BT and going wth a dongle worked for some people. Has 
anyone tried that?

As for me bing a Bluetooth noob, what do I need to know about Bt vs TCP 
sockets? Speficically:
Can I access my service without pairing?
During pairing does my service have to be active?
Once paired, can I restart my service without having to re-pair?
Since my protocol is serial (Rfcomm) Do I have to use the existing serial Uuid?
How can I set the Pi to automatically pair with my application?

Many thanks!

Sent: Friday, June 29, 2018 at 3:44 AM
From: "Maurice Kalinowski" <maurice.kalinow...@qt.io>
To: "Tomasz Siekierda" <sierd...@gmail.com>, "Shawn Rutledge" 
<shawn.rutle...@qt.io>
Cc: "Interest@qt-project.org" <interest@qt-project.org>
Subject: Re: [Interest] Bluetooth on Qt on Pi (for real this time)

>
> BT on Raspberry Pi is very unstable. I've tried to work with it 6 months ago 
> and actually abandoned the project because it was practically unusable. 
> However, I've noticed they have released a lot of software and firmware 
> updates since then. So my first suggestion: upgrade Raspbian (if you are 
> using it) to newest version.

Have they updated their Qt version yet?  Last time I tried Bluetooth on the Pi, 
a few months ago, they still had 5.7, which is ridiculous IMO.  I wanted to try 
BLE, so had to recompile Qt on the Pi.  And yeah, BT wasn’t stable either.



I don't think so, Raspbian usually sticks to the same Qt version for whole 
release cycle. So, last Raspbian had Qt 5.2, this one has 5.7 and that's it. I 
haven't checked recently, though, I always compile my own anyway.



[Maurice Kalinowski]

On the SensorTag demo we did for Qt for Automation we also recognized a heavy 
instability of BT on the Pi. Basically on every third boot “rfkill unblock” and 
“hciconfig” are your weapons. It’s hard to automate this, but that might be 
somewhat of an option for prototyping. Basically you need to restart the whole 
BT stack after a boot a second time.



Maurice



P.S.:Please forgive my Outlook reply-for format.

_______________________________________________ Interest mailing list 
Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to