Signal strength extraction within Java | Thales IoT Developer Community
May 28, 2015 - 11:03pm, 3577 views
When checking a response from a modem, ie EHS6T, it is straight forward if there is only one response parameter. However when using AT^SMONI for checking EC/n0 and RSCP for checking the GSM signal levels, they are two of about 18 parameters within the response. I am struggling trying to find technigues within a Java program for extracting these two parameters from the response string. Any guidance on the best methods for doing this would be appreciated.
I use AT+CSQ on BGS5T for getting signal strenght
and then I change signal to lvl's like you have them on your cell phone.
I don't know if you have that command on EHS. If you want smoni, then you just split response by "\n" saved it in to array. And then each parameter is inside array. So you just find index of the parameter and retrive it with:
String signal = response[index];
The AT+CSQ is only for a 2G system, not applicable for a 3G network (section 8.6 of the Gemalta EHS6 AT Command Guide), thus the requirement for monitoring EC/n0 and RSCP for 3G. I also needed to detect if I have a 2G signal or a 3G signal, hence the use of smoni.
I ended up searching through the response string and creating separate parameter strings from the characters between the ',' parts of the response. Once that was done, then simply converting the parameter string into a integer or float value.
I had hoped there would be a simpler / standardised method for doing this, but could not find one.
AT+CREG=2 can also be used to detect the network technology.
Radio access technology
“3“ GSM w/EGPRS
“4“ UTRAN w/HSDPA
“5“ UTRAN w/HSUPA
“6“ UTRAN w/HSDPA and w/HSUPA
See page 153 of the EHS6 AT Command manual.
There's no standard for that. You can just iterate the string to find the n-th value you need.
I could paste some example. But it would not be any perfect and best one but just some example.