petervojtek / cordova-plugin-signal-strength

Apache Cordova Plugin to detect GSM Signal Strength
Apache License 2.0
6 stars 18 forks source link

Signal strength always reports -1 dbm #2

Closed tyleha closed 7 years ago

tyleha commented 7 years ago

I'm running this plugin on an Asus Zen Pad 8 tablet running Android 6.0.1. No matter what ssid I'm connected to, the plugin always reports wifi signal strength as -1 dbm, which the docs say indicates a failure.

What are some of the reasons the plugin might be failing? Any steps to troubleshoot this issue?

petervojtek commented 7 years ago

if i understand properly you have a SIM card in the tablet, right? (if on wifi you should receive -1 dbm).

I would start by inspecting this java code of the plugin: https://github.com/petervojtek/cordova-plugin-signal-strength/blob/master/src/org/apache/cordova/plugin/SignalStrength.java#L20

tyleha commented 7 years ago

Ah - this may be my misunderstanding. The tablet does not have a SIM card. Only wifi. I was hoping to use this plugin to access the wifi signal strength in dbm. Is a SIM card required for that?

petervojtek commented 7 years ago

this plugin is fetching this android api information: https://developer.android.com/reference/android/telephony/PhoneStateListener.html#LISTEN_SIGNAL_STRENGTH

it is means to provide cellular (gsm/..) network info, not wifi.