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

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.

Related

how get the images from the flying drone to the phone or cloud

we are doing a project on image processing using a camera,raspberry pi3 and a gsm module. Above mentioned things are with a flying drone. I can send a notification message to a mobile using gsm module if required object detected on the cam. But we store that image to view on a webpage or through a mobile app easily. while it's flying it can't connect to the internet. So can you suggest a solution to get those images when it is inside our home wifi range.(any how we can get the images from sd card but i need to get those as soon as possible it detected the wifi) . Thanks in advance
You could consider using "tethering", a.k.a. "Personal Hotspot" in Apple parlance, on your mobile phone.
Basically, you would enable the Personal Hotspot on your iPhone and allow your RPi to connect to it via Wifi. You would have to check your setup, but my iPhone takes IP address 172.20.10.1 for itself and dishes out IP addresses to clients which are the same but with the 1 replaced by a small number under 13.
You can see from here how to setup your RPi to automagically connect to your Hotspot whenever in range. You could also consider fixing a static IP address when on that network, so you know where the RPi will show up for sure.
You would then ensure that Apache, or maybe lighttpd which is lighter weight, is running on your RPi.
Then, your app on the RPi would store its image as image.jpg in Apache's DOCUMENT_ROOT directory, probably /var/www/html/image.jpg but check.
Now, on the iPhone, start Safari and browse to:
http://172.20.10.N/image.jpg
where N is a small number. You should see your image and be able to save it to DropBox or Photos or iCloud Drive for others to see.
Of course, once your RPi is connected to your iPhone's hotspot, it can FTP or ssh copy the image to any website or other server on the Internet it has access to itself.
I have understood your question also I have cheapest solution to build your project. you will be needing 3 modules
ESP8266 (Wifi module)
SD card logger
Camera module(go with your choice, try ESP8266(But I have not tried it))
Combining all these can get your work done. But most instructing part is When connected with wifi it should transmit video to webpage or app and when not connected should log video to SD card
Below is my try to solve your problem, if you have any doubts feel free to ask your question.
ESP8266 is an WiFi module, you can connect it with an hot-spot or an router, similar to any WiFi device's on successful connection it throws 200,OK failing will throw 404 or so. Technically just like any TCP devices it will work. You can connect, disconnect, send and receive data continuously using software(using code you write).
0-code for camera unit starts
1-try connecting WiFi && start the camera and start logging into SD card //InCase if WiFi module takes longer time than usual to connect, this will prevent data from losing
2-if connection failed - continue writing to SD card
3-else(connection made) - start streaming the data && stop the SD card logging and save the file and create a new empty file so that we can save on next connection out without wasting data.
4-check for connection status in regular interval (goto step2).
5-on any external inputs(like click an image)
most important thing: code for your camera interface should work independent from the flight controller code.
-NandhaFrost

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: How to read messages from "Message Notification Service" (MNS) from MAP? QT

I am writing a QT 5 application on my laptop (Debian 8) where i want to be notified if a new SMS is available on my phone (OnePlus One, Android 5.1).
I managed to register the MAP service and read SMS manually. For this i created a socket. When there is new data available the readyRead() signal should be called. This works fine for getting SMS manually. Over the same socket i register the Message Notification Service.
The problem i have is, that the readyRead() signal is never emitted when a new message arraives. To monitor the data flow i use wireshark. Wireshark shows the event. So the smartphone sends the event to laptop, but not to socket which starts the connection request?
The information for registration i got from the (MAP) specification here: https://www.bluetooth.org/docman/handlers/DownloadDoc.ashx?doc_id=409110
My idea was that smartphone and laptop create a new socket, but not sure. And even when, i have no idea how to access this socket with QT.
Can anybody help? Thank you.
Over the same socket i register the Message Notification Service.
MAS and MNS should be two RFCOMM links, i.e. you may have two sockets, one for MAS client and the other one for MNS server.
You may refer the figure 6.3 at MAP spec 1.1 section 6.4.2.

Sony SmartWatch 2 communication with Host Application on phone

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.

Push Notification Over Wifi

I've got a problem that we are hoping there is a simple solution for.
We have a need to allow a push notification to appear on a device when it enters into a certain space. The space is only going to be about 1500 sq ft. So my thought is to set up a wifi network in this area... I'm curious if anyone is aware if it is possible to notify anyone with our app installed on their device when they enter into this wifi space if they want to take a certain action... for instance to open the app?
Create an Android service that is launched when the intent WIFI connected is triggered.
The service will check if the bssid of the wifi connection is the same of the wifi area you want to monitor and then it could either launch the app/show popup/show notification.

Resources