I am researching on Cellular connectivity in rural areas.
Is there an API in Android which helps you access Cellular radio properties as a call or SMS is made ?
P.S.: I am not looking for properties like signal Strength or Neighboring Cell Info. I am interested in listening to changes like in increase in CPU cycles, cellular handovers etc.
Edit:
My main reason for asking this is, so that I can detect events from different SIMs in Dual SIM phones as there is no current way of doing this. So by monitoring the radios, I can tell whether this was the SIM that made the call or the other.
Related
A mobile phone can carry out power measurements
on the frequency currently in use, on UMTS neighbour frequencies and on GSM frequencies. It sends the results to the
network on the current link. A new link is established to the
neighbour cell that offers the best radio link quality.
Mobile phones perform measurements
for determining link quality in a radio
network and then send the results to
the network as UE measurement reports.
These reports provide vital information
for dynamic network planning and the
distribution of resources at the radio
interface (radio resource management).
The measurements and the mode of signalling are defined in the 3GPP specifications. Mobile phones have to be
tested to verify this functionality and the
stipulated measurement accuracy.
A mobile phone measures important
characteristics such as the power on
the frequency currently in use (intra-frequency measurements), on UMTS neighbour frequencies (inter-frequency measurements) and on GSM frequencies
(inter-RAT measurements; RAT: radio
access technology). These measurements are used to determine which
neighbour cell offers the best radio link
quality; a link is then set up to this cell.
During signalling, it is also possible to
query the current transmit power of the
mobile phone, the timing of its transmit
and receive signals, and the block error
ratio (BLER) of a data channel. To prepare for handover between UMTS cells,
the mobile phone can determine the
frame timing of its current link and of its
target cell.
How can we read the data that come out of the mobile phone using an android app? how can we read transmit power of the mobile phone device to be more specific?
Like tx level in the picture:
The interface into the telephony side of an Android device (assuming it supports telephony - i.e. not a tablet, TV STB etc) is the Android telephony API's:
https://developer.android.com/reference/android/telephony/package-summary
You will see there are several which provide information around the strength of the signal and also the neighbouring cell strength.
The strengths here are the received signal strength. I am not aware at the time of writing of an API which will give the transmitted power. It may be useful to note, depending on your needs, that the transmit power is usually influenced by the receive strength - if a phone is near a tower and receiving a good signal it typically does not need to use as much power to transmit to that tower, and conversely if it is a long way away it typically needs more power to reach the tower. This is just a rough principle, but depending on your application it may be useful.
Is it possible to change the cell which your smartphone is connected to?
No. It is impossible.
Device changes the Cell which is camped via 2 mechanisms:
Cell Re-selection
Handover
Cell Reselection
This mechanism enable the device to find a better cell to register. Basically, phone remains measuring signal level of different cells, frequencies and RAT (2G/3G/4G) and it can then, select an suitable cell.
Since phone choose the best cell, re-selection is possible only when device is in IDLE (IDLE means that no resources are allocated to your device.. there's no DATA Traffic / Call ongoing etc).
Each MODEM vendor has implemented its own Algorithm to decide the most suitable cell but usually, thy always try to move your device to LTE and to the cell with strongest signal level.
HANDOVER
This mechanism allow the phone to move to a better cell while it is on service (during a call or during data traffic). Since you have resources allocated to you, this is fully controlled by network (only network knows if target cell can receive your device and keep delivering the service that you are using).
This is just overview
This is just the basic idea of what happens in Modem side. Even in case of re-selection, a lot of parameters are controlled by network (such as "Start to measure a better cell if the signal level falls below a certain level" etc).
Most important is that you can not manually control it... You can force your device to 2G/3G or LTE. Even then, MODEM side will decide the better cell to you (based on carrier settings for that location) and you can not control it...
Also, each chipset (modem) vendor has its own implementation for this...
Some chipset vendors are Qualcom, Infineon, Marvell, Spreadtrum, Broadcom (RIP)
I've been doing some research into this feature for a potential app. I want to give the user the option to turn off WiFi (automatically) when they are getting no signal from a specific network, or perhaps when no data has been transmitted over the connected network for a specific amount of time.
I've seen a promising method in the WiFiManager object, called getScanResults, which returns some information regarding each network, one of which is the signal strength or RSSI, so I would assume I could get the signal strength for the network from this, and manage the currently connected network to detect when it's below a certain level.
However, I've done a small amount of research into this feature, and some applications seem to do it based on triangulation using GPS/mobile data. Is this because it's more accurate?
Is my original idea feasible, using the WiFi manager (or any other Android libraries), can you control WiFi usage based on the signal strength of a network (i.e. its gone below 0), or the network activity (0 for 10 minutes, etc.)
Thanks!
A service can be used to achieve the objectives stated above. The service can have a timer when not connected, a request can be made to the manager on the service which would get all the information from a broadcast receiver.
Services
Broadcast Receiver
This page can be used tofigure out how to find if wifi is connected, I know it is to do withWifiP2p however it is very similar!
I need to measure bluetooth signal between two or more mobile phones and detect nearest phone in range. After a lot of researching I came to idea to do periodically discovering for new bluetooth devices and measure rssi via EXTRA_RSSI that returned by ACTION_FOUND. All devices must be always in discovery mode and also must periodically scan for other devices.
Is this approach good or there are some better solution? What problems I can expect with this approach?
This solution Android 2.1: How do I poll the RSSI value of an existing Bluetooth connection? doesn't work for me because need phones to be rooted.
RSSI is a bad indicator for distance under real world conditions.
It could work under ideal conditions (free space propagation) but in reality you always have obstacles like walls, trees, etc. that affect the propagation.
See this article for more detailed information on propagation models.
RSSI doesn't indicate which phone is nearest, only which phone has the strongest signal.
I have problem (challenge) with my app. I want to be connected to the "best" GSM or CDMA cell - the closest, with the best signal, etc... As I turned off the cell-phone functions and turned it on back. That is the thing I want to do in my app, because I need to have the most recent informations of location without using GPS or any data.
Can I find the way, how to force Android to refind the GSM/CDMA cell?
Lot of thanks for all!
For GSM, the cell you are connected to is decided by the network. The network tells the device which cell to use and also when to perform an handover,.i.e. change the cell. I would assume that this functionality is deeply buried in the hardware/firmware of your device with no chance to change it