Get the overall signal strength in Android - android

I would like to get the overall signal strenght received with the mobile antenna. Ideally, I would love to get the electric field measured with my phone antenna.
I did found a lot of methods to get the signal strength but they all give a specific signal strenth (either GSM, Wifi, GPRS ...) but not the overall signal. Moreover, if there are no SIM card in the phone, the GSMsignalStrength will return 0 or null and even if there is a SIM card, I will only get the strength of the signal of that operator only.
Could you please help me?

Related

is there any difference in mobile signal strength and data connection strength?

I am trying to create an app which gives signal strength of various mobile networks ,
here is a few things I need to know
1 : I am getting phone signal strength like 13,14,17 using TelePhonyManager ,
what it actually means
2 : So if this declares the mobile signal strength , can the same strength be assumed for data being using using edge , 3G or any other way
i dont need full source codes ,
a little guidance should be sufficient.

Android - How to find if device is receiving GSM signals or not?

I simply want to check if my device is receiving GSM signals or not. I know about SignalStrength class and its getGsmSignalStrength(). I have worked with PhoneStateListener and onSignalStrengthsChanged().
But even where I am not receiving any signals, I still get greater than 0 GSM signals strength, as shown in the screenshot:
See the signals level, its not even low, its red crossed. And the getGsmSignalStrength() returned me 16. (Current is a different number, please ignore it.)
If you are only interested in the GSM signal from your operator then use getMnc() from CellIdentityGsm to establish if the signal you are measuring is valid.
If you want the GSM signal only when the device is in service (ie successfully connected to a network) then use the ServiceState checker to establish what state the device is in.
As per above comments, the symptoms indicate that you are measuring other operators' GSM signals.

Android: setting signal strength

I was wondering if you can set signal strength parameters. In andriod.telephony class I only see methods which get you the values, however, is it possible to set values too ?
No. Signal strength is a measurement of a physical thing- the ratio of signal to noise of the cellular signal. You can't set that- it is whatever it is. You can set its variable to 1 billion, it won't effect the physical reality. The only use of it would be to lie to other apps about what the real signal strength is. And no, there is no way to do that.

Android - SignalStrength Terminology Explanation

I am looking through the documentation on the SignalStrength class for an app I plan to make, but there is a lot of telecommunications terminology that I'm not very familiar with. I was wondering if anyone could briefly shed some light on some of the methods in this class, specifically these:
int getCdmaDbm()
Get the CDMA RSSI value in dBm
int getCdmaEcio()
Get the CDMA Ec/Io value in dB*10
int getEvdoDbm()
Get the EVDO RSSI value in dBm
int getEvdoEcio()
Get the EVDO Ec/Io value in dB*10
int getEvdoSnr()
Get the signal to noise ratio.
int getGsmBitErrorRate()
Get the GSM bit error rate (0-7, 99) as defined in TS 27.007 8.5
int getGsmSignalStrength()
Get the GSM Signal Strength, valid values are (0-31, 99) as defined in TS 27.007 8.5
As I understand it, GSM and CDMA are two different protocols for mobile cellular networks, EVDO is the standard by which data is moved through CDMA, and HSPA is the equivalent data standard on GSM. Why then, are there no corresponding HSPA methods, as well as no getCDMASignalStrength() or getCDMABitErrorRate()? I'm also not too clear on what RSSI or Ec/Io are.
Ok, Here we go.
You got the part that GSM is different than CDMA correctly.
Also The part that EVDO is the data transport protocols on CDMA while HSPA is the equivalent in GSM.
The Modulation (data representation in the signal) is completely different between CDMA and GSM. That is why you can't use equivalent units (B.E.R) to calculate the quality of a signal sent by those different protocols.
Now for the measurement values we got:
DBM is a pure signal power measurement unit (in decibel) the more you get the higher reception you have. This covers (getCdmaDbm() and getGsmSignalStrength())
Bit Error Rate: Is a simple quality measurement unit for GSM link, the lower it is the higher the quality of the received signal (independent of signal strength).
EC/IO Represents the ration of Power of signal received to the power of interference signal. the higher this value the higher the quality of the signal you are getting (Regardless of its strength) . in details
RSSI is a signal power measurement unit also.
Now the reason there is two APIS for RSSI and ECIO is that EVDO is carried on part of the CDMA signal so it makes sense that it may have different quality figures than the whole CDMA signal.
hope that helps
RSSI is the raw power measured in the channel. Ec/Io is the Energy of the Carrier relative to the Interference and Noise, so it is a measure of the quality of the signal. dBm is the unit of RF power relative to 1 milliwatt, on the dB (Decibel) scale. EVDO SNR is the Signal to Noise Ratio, which is another representation of the quality of the signal in the presence of interference.
RSSI- received signal strength indicator. It's the amount of power in the signal.
ECIO- it's another ratio of power density.
Why CDMA doesn't have signal strength- my guess is that Dbm is a good enough measure of it, but I can't swear to that.
If you need to use signal strength, you're going to need to do serious research. Unless all you're doing is the equivalent of showing how many bars of signal you have. Even that's non-trivial, the iphone got it wrong for years.

How to determine signal strength when GSM returns '99'?

We have an in-house Android app which is a migration of a pre-existing JME application. There was an issue where users in the field were complaining that the app drained the device battery when it tried to send data when the signal strength was low (this is common behaviour in mobile devices and not our immediate problem)
The data needs to be sent promptly but not immediately, so we placed a check on the signal strength before sending the data. This check used the PhoneStateListener and the onSignalStrengthsChanged(SignalStrength signalStrength) callback as recommended by many similar SO questions and articles elsewhere.
This works fine on my own phone (running on Telstra Australia) and SignalStrength.getGsmSignalStrength() returns a value from 0-31 as expected. On a phone running on another network (Optus Australia) however, it reports GSM is true but returns 99 (ie an error code) when determining the signal strength. I believe this is still correct behaviour since GSM is the 2G data and it is the 3G UMTS/HSPA that should be checked. UMTS/HSPA is the network reported by the Elixir app on the phone, as expected. We have also had unconfirmed reports that my network (Telstra Australia) reports insufficient GSM strength to send data from the application, but is able to browse the internet and perform other data activities without issue. This leads me to believe that the GSM strength is the wrong thing to check anyway.
I am in the process of running tests on other Android phones on the same network (still trying to access some devices) but it is definitely the case that we are able to browse the internet and send (HTTP) data from our application, it just fails if we check the signal strength and always receive '99'. On Optus, SignalStrength.toString() always returns 99 -1 -1 -1 -1 -1 -1 gsm 3 after several days of testing against multiple towers.
The closest (unanswered) SO thread is this one: Getting Signal Strength RSCP and Ec/Io from a phone served by a HSPA network
In summary:
Telstra connection reports GSM is true and returns a usable signal strength
Optus connection reports GSM true but always reports '99'
GSM is possibly the wrong thing to check anyway, we need to try to obtain the 'actual data transmission network strength'
after testing with multiple handsets from multiple vendors and multiple (Australian) carriers, it appears that this behaviour is specific to the Samsung Galaxy S2 and was not seen on the previous version (Galaxy S).

Categories

Resources