Sony SmartWatch 2 communication with Host Application on phone - sony-smartwatch

As i know host application for Sony products are responsable for communication between phone and accessory.
But, in bluetooth data transfer from phone to watch what is specially transferred?
For examle, My Extension data as a object array and layout which will be displayed passed to watch? Or all rendered 176x220px UI block is send from phone to watch.
In this transfer is there any security issues to be considered?
Thanks.

Everything is passed to the watch from the host application, so it would be the complete 176x220 bitmap.
As far as security, Bluetooth data is encrypted in BT v2.1+ plus the user still has to pair the device and confirm a pairing code as with all BT devices. So it's not any less secure than any other Bluetooth device on the market in that respect.

Related

BLE Pairing with Android things acting as Peripheral

I'm using Android Things 1.0.4 in a prototype where it acts as BLE peripheral device: advertising services and running a GATT server.
I encounter an issue in the BLE pairing process when trying to bond the Android Things board (Raspberry Pi 3) and a smartphone.
Since the device has no display, I set using BluetoothConfigManager:
IoCapability = BluetoothConfigManager.IO_CAPABILITY_NONE
which results in the error AUTH_FAILED every time.
Instead,
IoCapability = BluetoothConfigManager.IO_CAPABILITY_OUT
logs the pairing key and prompts the smartphone to enter it during pairing, but it results in the REMOVED error.
Questions:
Is Android Things in peripheral role capable of handling BLE pairing or not yet?
Are there more things that need to be implemented in the app's code to replicate the full-fledged Android logic?
Here's the source code of the Android Things app to test BLE pairing and bonding
The same code stripped from Android Things specific elements completes BLE pairing and bonding successfully when running on an Android phone as Peripheral (server), and an Android device or iPhone as Central (client).
Generally speaking, if you attempt to read an encrypted GATT characteristic before pairing (which triggers the pairing logic automatically), this results in GATT error 137 returned from the read request (AUTH_FAIL). This is because the device doesn't have enough time to finish setting up the bond before a response is sent by the Bluetooth stack. Retying the read request again generally succeeds.
I have not tested this with an iOS client device, but it certainly holds true with an Android client connecting to an Android (Things) peripheral. As such, I would recommend a few things:
Have the client (mobile) device explicitly initiate pairing, and Android Things should simply react to these incoming requests in the BluetoothPairingCallback. This lets the mobile device decide the pairing type based on the reported capabilities of the IoT device.
Separate the pairing flow from the GATT flow. Pair to the discovered device separately from making any attempts to read the characteristics. This tends to be the best way to avoid timing problems.
Regarding capability choices, this depends on your device. In my experience, if you choose IO_CAPABILITY_NONE this results in PAIRING_VARIANT_CONSENT inside of onPairingInitiated() and the pairing operation succeeds once finishPairing() is called. If you adjust your capabilities, you should be prepared for any number of the variants requiring you to display a PIN for the mobile device to enter. I have not not personally tested these paths.

Bluetooth low energy device secure authorization

I am trying to find solution for secure authorization to my own bluetooth device. Multiple users can connect to that device via Bluetooth Low Energy from their smartphones, but that device is not connected to the Internet. It has no database, low memory and not every user should be able to connect and manage my device (one user can be connected at the same time). How can I authorize user secure? I would to like to avoid storing single plain password in device, but right now I have not any other idea.

IBeacons with proximity and clickable button

I am trying to find informations about IBeacons, plus bluetooth Dash Buttons and google delivers contradictory results.
Is there a IBeacon's with an button to click. And an interface on the connected device to react on the click event?
I need if possible to have the proximity and click event.
Is this even possible with IBeacons/BLE specifications?
All kind of informations are welcome.
Thanks
IoT buttons like Amazon Dash and Bluetooth LE beacons like iBeacon have fundamental differences:
Amazon Dash connects to the internet over WiFi to make a web service call on button press, and requires configuration with your WiFi network. Other IoT buttons work similarly, although some connect to the internet via a nearby mobile device using Bluetooth. You must write some code and deploy it to a cloud server to do something whenever somebody taps the button.
Bluetooth LE beacons like iBeacon are transmit only Bluetooth LE devices that do not connect to the internet, but simply sent out a bluetooth packet with a unique identifier. These devices are much simpler, and rely on another bluetooth-enabled computer within 40 meters to be listening (typically a mobile phone). You must write an app on the mobile phone then does something when it detects the beacon transmission is detected.
Most Bluetooth LE beacons are always transmitting, although it is possible to buy ones that are click-on click-off like the RadBeacon Dot. This could provide similar functionality to a Amazon Dash if a mobile app is running nearby that can forward the detection to a similar cloud sever as used for an Amazon Dash solution.

Bluetooth Hands Free Profile (HFP) just call notification, no audio?

I write an QT application on my laptop (Debian 8). I want to be notified if there is a new call on my phone available (Android).
Is it possible to just notify the laptop without being the laptop a headset?
I already managed to get a connection to the HFP, and my laptop gets a 'RING' signal, but when i want to answer the call, my mobile phone shows a bluetooth speaker /headset connected (in call display) and everything what is spoken is lost on both mobile phones.
So it would be great to just notify about a new call.
Thank you!
I assume you want to keep the audio stay at mobile phone side; is there SCO/eSCO connect/disconnect API's on your laptop? if yes, just reject the audio connect request, or disconnect/switch the audio if it connected.
There are may no audio handler on your PC yet so you could not found the audio.

where the real time audio data is stored in mobile?

we want to route the call to ip network instead of GSM network. for that purpose first we are connecting our mobile phone to a PC through bluetooth. So we want to transfer the real time audio data to that PC over bluetooth. Could you please help..
If you can trick the mobile phone to function as a bluetooth headeset [profile] -- which I doubt any phones would support because phones are, well, the consumers of such headset devices -- then you could use it like any other "headset" device. (It would be much more feasible to just purchase a headset or plug in a microphone.)
As far as "where the real time audio data is stored?" -- well, that just won't go anywhere. The "data" (perhaps already in an encoded/delta form) is briefly (like milliseconds!) "stored" in a few small buffers / integrated circuits in the radio circuitry. This circuity will vary based upon phone/radio module used and is not accessible from a PC.
Happy doing productive things.

Resources