Develop app so two mobile phones can directly communicate using their network sensor - networking

Mobile phones are like radios which listen/broadcast on their bands. A mobile phone can connect to a base station and then to another mobile phone. Since the mobile phone has a range of 5 km, I would like to create an app that allows two devices to connect to each other without a base station.
Can anyone provide a reference to a book, online tutorial, website.. anything? Thanks in advance!

In current mobile phones, the radio used to communicate with the phone network is not under the direct control of the main CPU, where your application runs. It is controlled by a separate baseband processor, and the software on this is not typically user-updateable (often, it is not even updateable by the manufacturer of the phone!).

Related

Need help for a deeper understanding of BLE

I have to write a BLE application on an embedded device and there are some features where I'm not sure if BLE supports that or whether I've to create some wrapper around everything or if it's maybe not possible at all. The gerenal descriptions of Bluetooth and BLE I found around the internet usually only cover the overall functionality but don't go in too much detail. If this post gets too complex I'll split it up into different smaller ones.
I use the STM32 BlueNRG-MS chip
1. Discoverability (resolved)
The user has to be able to disable the BLE function in case there are several devices in reach. I see that there are functions aci_gap_set_discoverable() or aci_gap_set_non_discoverable() but altough I set it to not discoverable I can still see it in the LightBlue App on my mobile. How would I correctly disable the BLE functionality of a device to make sure no one can see it or connect to it?
Update: Okay that has been a mistake from my end, if I call the aci_gap_set_non_discoverable() function it is actually undiscoverable. So that's fine.
2. Only accept connections of paired devices
I'd like to achieve a behavior such that, if you have an unpaired phone you have to set the BLE device into a pairing mode in order to connect. If the phone has already been paired, the BLE device shall accept the connection request regardless of whether it's currently in pairing mode or not. Is this what the whitelist should be there for or do I have to do this manually by saving the address of the device after successful pairing? If whitelist is the right approach, I read that newer phones cause issues with whitelisting because they change their address on a regular basis, how can I handle this? That's actually where I thought I'm gonna work with the "discoverability".
3. Automatically reconnect
I'm not sure if this topic has to be handled on the BLE device or on the mobile phone. E.g. my phone is paired with my car's radio, so whenever the phone is in the car it automatically connects - how is this done? It's still the phone that acts as central device I assume?

Is it possible to record external HDMI device in Android TV app?

For example, if there is a gaming console (i.e PlayStation) connected to HDMI input in a TV with Android TV. Then, is it possible to record the video going through this HDMI input with a 3rd party app?
In my question I'm referring to Android's TV input framework
Thanks for the helpers.
The TV Input Framework docs mentions that it supports TV recording APIs.
DVR
For devices on Android 7.0 and above, the TV App must support the
Android framework TV recording
APIs,
to support, list, and play recorded programs.
This allows device manufacturers to plug their DVR subsystems into TIF
and dramatically reduce the integration effort it takes to enable or
integrate DVR functionality on a TV device. It also enables third
parties to provide aftermarket DVR systems that can be plugged into an
Android TV device.
In addition to recording live content, the TV App also handles
resource conflict. For example, if the device has two tuners, it can
record two programs at the same time. If the user asks to record
three, the TV App must handle the conflict and should either surface a
notification or request that the user schedules a priority for these
requests.
However I don't have code samples for you as I haven't experimented with this yet.
Another approach would be to use the MediaProjection API and record this with a MediaRecorder. Jake Wharton's app Telecine follows this approach and you can find the source code on GitHub.
The benefit is that these APIs were introduced with Lollipop, so you can use them on all Android TV devices. However I just started experimenting with Android TV, so I can not tell from personal experiences.

Is it possible to monitor multiple bands from a single app?

Is it possible to have one app on the android or ios phone monitor 2 or more bands, Place tiles and respond to button/ accelerometer events? I did not see that in the docs.
Thanks
Yes, this is possible. It is a more advanced configuration so you must pair the Band's in the phone's BlueTooth Settings. Then when you query the SDK APIs for devices you iterate over the devices and create one connection per device. This should allow you to then communicate with each device from within one app.

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.

Downloading data to a PIC micro from the web

I have a client that would like a small PIC board that plugs into a PC's USB as a dongle in HID mode. It would basically just transfer small amounts of data over RF to another device across the room.
They would like the data to come from the web. ie. user clicks a link in their browser which wakes up the PIC board and begins a download to the PIC device without the need for another application to visibly popup in front of the user.
I would think this can't be done without the setting up the browser preferences and assigning a custom application to recognize the data file. The security issues with a link initiating this kind of flow of events must be too great unless I'm missing something.
Has anyone done something like what I described above?
You could write a small piece of software that runs in the background on the PC (e.g. a Windows service), and:
Interfaces to the PIC device via USB
Provides a web interface on port 80 or probably some other port, which the browser can then connect to.
If the PIC device is network connected (e.g. has an Ethernet connection, and its own IP address on the network) then the PIC device could provide a web interface to control it. I don't know how feasible it is to fit a small web server onto a PIC though--that would be a tight fit.
Yeah that sequence of events doesn't seem too kosher. Perhaps a browser plugin or a program running on the PC that handles communication between the PIC and web would be better?

Resources