Push Notification Over Wifi - push-notification

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.

Related

Send Battery Level notifications to nRF Connect app when battery level reaches certain level

I am new to BLE and I need help with Battery Service notifications. I am using nrf52840dk, nrf sdk 17.1.0 and I am using ble_app_proximity example which already uses Battery Service.
I need to send a pop up notification from device to nRF Connect mobile app when battery level reaches 40%. Whenever battery level reaches 40%, a notification should pop up in nRF Connect app telling us that battery level has reached 40% and please charge.
Can anyone please help me with this?
I have tested the ble_app_proximity code and it is showing battery level only when I Read it, but I need it to display a pop up notification on nRF Connect app when battery level reaches 40%.
Thanks,
Kanthi Deep.
There are two steps required in order to achieve what you want:-
Enable the notifications from the nRF Connect app (GATT client).
Send the notification from the nRF52840dk (GATT server).
Let's go through each one in details:-
Enable notifications from the nRF Connect app
Given that your phone is the GATT client, it needs to subscribe to the battery characteristic notifications. This way, when the nRF52840dk sends out a new battery notification, the nRF Connect app will receive it. In order to do this, connect to the devkit using the nRF Connect app, browse through the services and click on the Battery Service to reveal the characteristics. When you do that, you will see the battery level characteristic with a downward (read), upward (I'm not sure if this exists but maybe it doesn't) and multiple downward (enable notification) arrows. The downward arrow is for reading the battery value, the upward arrow (if it exists) is for writing to the battery value, and the multiple downward arrows are for subscribing to notifications. In your case, you want to click on the multiple downward arrows. I have attached a picture below of what the arrows should look like:-
Please note that in your case, this should be the battery value characteristic and not an unknown characteristic.
Send the notification from the nRF52840dk (GATT server)
In your code, you should be continuously monitoring the value of your battery to check if it has reached 40%. If you're using the SDK's libraries, you can have a look at this function that specifically does what you need in that it sends the battery value as a notification when you call it. There are a few posts on Nordic DevZone on how to read the battery voltage, and these are a few examples (link1 and link2).

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

specifying connection on ESP8266 with AP and STA modes

I want to try to set up an ESP8266 (using the Arduino IDE) to occasionally connect to a wifi SSID to send telemetry back. I also would really like to be able to have it running a softAP for configuration/settings purposes. (i.e. so if you want to change internal settings in your code, you can connect directly to the device to access a web form to do so)
The problem is, I am not 100% sure how I know which is which when making an outgoing telemetry json query. I want it to go out on the STATION mode connection. Presumably in most cases the AP mode won't be connected, but there may be rare instances where both are connected at the same time. Thus how do I tell the device to specifically use the STA side of things when it needs to send data back over the internet?
I can't even seem to find any specific examples to ask if one or the other is connected. (you can poll WiFi.status() but - which one is it reporting?)
Any help is appreciated

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.

Android BLE API: Autoconnect does not work for every device?

I have two peripheral devices, say device1 & device2 and one Android device for central role. Android can connect to both by BluetoothDevice.connectGatt() method with autoConnect = false.
Problem is - While autoConnect functionalities work well for device1, device2 even does not connect for once with autoConnect = true.
onConnectionStateChange callback is not called in either side (android & device2).
Advertisement and scan-response packets been customized in device2, is that causing the problem? Though we know that, settings for autonomous connection is to be provided entirely at central side, peripheral side has nothing to do with it, change in peripheral device also changing auto-connect behavior at central side.
any insight? Thanks in advance.

Resources