java Android:如何获取 3G/UMTS 信号强度值

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/3800383/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-30 03:26:19  来源:igfitidea点击:

Android: How to Get 3G/UMTS Signal Strength Values

javaandroid

提问by Aussie 123

I am a Cellular RF Engineer and have been trying to get some specific WCDMA/3G/UMTSsignal measurement values out of Android SDK environment. Using the public class SignalStrengthI have been successful in getting meaningful GSM values (with the assistance of a Software Engineer) using getGsmSignalStrength(), but only yield "-1" values for getCdmaDbm()and getCdmaEcio()respectively which are supposed to return relevant CDMA signal strength values. -1 is definitely not right!

我是一名蜂窝射频工程师,一直在尝试从 Android SDK 环境中获取一些特定的 WCDMA/3G/UMTSsignal 测量值。使用公共类,SignalStrength我已经成功地使用 获得了有意义的 GSM 值(在软件工程师的帮助下)getGsmSignalStrength(),但只为getCdmaDbm()getCdmaEcio()分别产生“-1”值,这些值应该返回相关的 CDMA 信号强度值。-1 绝对不对!

My phone was definitely on a UMTS at the time and I can read UMTS parameters in the field test software (to get the field test software going was a hassle in itself).

当时我的手机肯定是在 UMTS 上,我可以在现场测试软件中读取 UMTS 参数(让现场测试软件运行本身很麻烦)。

I think it is quite likely that getCdmaDbm()and getCdmaEcio()methods are for CDMA networks, not WCDMA (CDMA and WCDMA are different technologies) which leaves me high and dry in terms of trying to get 3G measurements out of the phone. Alternatively, there is some other methods out there but I simply can't find them in the reference material on the web:

我认为很可能getCdmaDbm()getCdmaEcio()方法适用于 CDMA 网络,而不是 WCDMA(CDMA 和 WCDMA 是不同的技术),这让我在尝试从手机中获取 3G 测量结果方面感到非常沮丧。或者,还有一些其他方法,但我根本无法在网上的参考资料中找到它们:

http://developer.android.com/reference/android/telephony/SignalStrength.html

http://developer.android.com/reference/android/telephony/SignalStrength.html

Can someone please assist me? There must be a way (after all, field test s/w can get this information) but how? Someone wrote an app called Cellumap which gets UMTS, GSM and CDMA measurement information.

有人可以帮助我吗?一定有办法(毕竟现场测试软件可以得到这个信息)但是怎么做?有人编写了一个名为 Cellumap 的应用程序,它可以获取 UMTS、GSM 和 CDMA 测量信息。

回答by Lycha

Have you tried getRSSI()method from NeighboringCellInfo class. It's description:

您是否尝试过NeighboringCellInfo 类中的getRSSI()方法。它的描述是:

Returns received signal strength or UNKNOWN_RSSI if unknown For GSM, it is in "asu" ranging from 0 to 31 (dBm = -113 + 2*asu) 0 means "-113 dBm or less" and 31 means "-51 dBm or greater" For UMTS, it is the Level index of CPICH RSCP defined in TS 25.125

如果未知,则返回接收信号强度或 UNKNOWN_RSSI 对于 GSM,它在“asu”范围内,范围从 0 到 31 (dBm = -113 + 2*asu) 0 表示“-113 dBm 或更低”,31 表示“-51 dBm 或更高” " 对于 UMTS,它是 TS 25.125 中定义的 CPICH RSCP 的级别索引

回答by Luis Mendo

You need the CellSignalStrengthWcdmaclass, which is specific for WCDMA (UMTS):

您需要CellSignalStrengthWcdma专门针对 WCDMA (UMTS)的课程:

Also, take a look at NeighboringCellInfo.getRssi().

另外,看看NeighboringCellInfo.getRssi()