maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   [Announce] Cellnet-Info for N900 (https://talk.maemo.org/showthread.php?t=89238)

ade 2013-12-14 15:35

Re: [Announce] Cellnet-Info for N900
 
Quote:

Originally Posted by Estel (Post 1396460)
My provider does supply network time, so I'll test it and report back as soon as autobuilder chew new version of cellnet-info (no update available here, yet).



No problem, I was suggesting, only :) Just keep in mind that current values are really misleading, and your tests confirmed it - stating CSQ 17 as 100% signal is laughable, to say at least (of course it's not your fault, bullet at Nokia[?]).

In case you would like to fix it *without* query'ing CSQ from modem (which gives a little strange replies, anyway), I've prepared a simple algo to calculate CSQ from dBm (which you have access to, already). It is cellular variant, the most commonly used one (at least in cellular network communities):

Code:

CSQ 0 = 113dBm
CSQ 1 = 111dBm
....
CSQ X = 113-(X*2) [dBm]

Then, remaining thing to get % values is to assign percents to corresponding values (CSQ 32 = 100%, CSQ 16 = 50%, CSQ 0 = 0%, etc) and in-between things.

Thinking about that, you may skip calculating CSQ entirely - just check lowest and highest dBm values from algo above, and assign percents, from best to worst.

/Estel

I will see what I can do with this info.

And yes, version 0.0.1-8 is still not downloadable from extras-devel. Perhaps cron schedule time intervals from the autobuilder have changed, as lately it takes longer that it used to :)

ade 2013-12-14 16:10

Re: [Announce] Cellnet-Info for N900
 
Quote:

Originally Posted by ade (Post 1396465)
I will see what I can do with this info.

And yes, version 0.0.1-8 is still not downloadable from extras-devel. Perhaps cron schedule time intervals from the autobuilder have changed, as lately it takes longer that it used to :)

Edit: it is available now in extras-devel

pichlo 2013-12-14 20:03

Re: [Announce] Cellnet-Info for N900
 
Quote:

Originally Posted by Estel (Post 1396460)
Just keep in mind that current values are really misleading, and your tests confirmed it - stating CSQ 17 as 100% signal is laughable, to say at least (of course it's not your fault, bullet at Nokia[?]).

I wouldn't be so harsh. There may well be a reason for the current allocation. For example, the signal level is measured not in absolute strenght but in reliabiliy - and CSQ 17 is plenty to provide 100%. Just a speculation (I don't even know what CSQ is :)), but it might be a good explanation for why it kept jumping from 48% to 72% and anywhere in between while I was typing this missive - all the while the dBm value stayed fixed at 92 (edit: now it jumped to 100%, 82 dBm. Go figure).

I would vote for keeing the current info as it is as it matches what people see in the bar meter. Perhaps, to keep Estel happy, find a way to provide both but keep the current number.

Quote:

Originally Posted by ade (Post 1396423)
Remarks/questions:
  • My operator does not supply network time AFAIK, so can anyone who does receive this, check if a (valid) time is displayed using "Provider info"?

No network time for me either :(

Quote:

  • My primary device has 112/911/999 as emergency numbers, while my backup device shows 112/911/118/119/000/110/999/08. Can't relate it to regional or device settings. Any clue why they differ? Only difference is that my backup device has no SIM card, perhaps that's the cause.

112/911/999 here. Possibly related to the SIM (my device has one). Although I've never tried if 911 works here (and have no intention to try). 112 and 999 do.

Quote:

  • opencellid.org is giving me issues retrieving cellinfo (failed to lookup cellid). Most likely opencellid.org related. This version should deal with that without errors, and you can always disable the internet lookup. So far, I have not heard they have changed their API.

I am happy to report that the location was fixed for me. It used to pin me some 13 km from the actual location, now it is within the same street.

pichlo 2013-12-14 21:46

Re: [Announce] Cellnet-Info for N900
 
Emergency numbers are definitely related to the SIM. Just took mine out and got the long list including 08. I wonder where that one is used.

ade 2013-12-14 22:56

Re: [Announce] Cellnet-Info for N900
 
Quote:

Originally Posted by pichlo (Post 1396606)
Emergency numbers are definitely related to the SIM. Just took mine out and got the long list including 08. I wonder where that one is used.

Thanks for testing. Did a bit of search on the web on that. Without a SIM, these numbers should be reachable. With a SIM, it is narrowed down to relevant numbers. I see 08 mentioned twice in http://en.wikipedia.org/wiki/Emergency_telephone_number, so it is not very common.

Estel 2013-12-15 05:53

Re: [Announce] Cellnet-Info for N900
 
I've tried to check network time option, but "Provider" tab doesn't work for me, *at all*. "Loading" circle spins indefinitely (left it for 15 minutes), and only way to stop it is closing the application (although, via normal X, not killing from Maemo or terminal). After trying "Provider" tab, other tabs are non-responding, until restart of cellnet-info.

If I don't touch "Provider", everything else works OK - emergency numbers with SIM inserted seems approriate for my location.

Quote:

Originally Posted by pichlo (Post 1396572)
I would vote for keeing the current info as it is as it matches what people see in the bar meter. Perhaps, to keep Estel happy, find a way to provide both but keep the current number.

I don't think that keeping me happy is worth changes to cellnet-info ;) If it would be for me only, I can calculate ~signal power from -dBm. Hoever, I think that some more meaningful readings could be useful for people trying to get better signal in worse reception areas (via antenna coupleing-adaptors now, or via external antenna after repl. body gets finished), or for general cellular signal troubleshooting.

As you said, the "Nokian" signal strength is already visible via bars on status menu, thus I don't see much reason to clone them in cellnet-info - while "objective" signal strength isn't available anywhere, unless someone calculate dBm in own head. But, maybe it's only me, so I'm not pushing it by any means.
---

The thing about "Nokians" signal strength % fluctuating during same -dBm value bugges me, though - may it be only about different refresh intervals, so they don't "meet" on screen? Or their signal level meter have access to some other reports from modem, about signal quality (!= strength, at least not directly)? If the latter, I wonder, if we can access it too, directly?

Indeed, there is a different "meter" for signal quality, next to signal strength, in most community software for cellular modems. It is queried by different AT comand, normally, and shouldn't be merged with overall "signal strength" %, as those two values are more useful as separate entities - it helps nailing down antennae issues or filtering in noisy enviromnents. But I doubted that we can read it in N900, up to date.

/Estel

ade 2013-12-15 09:46

Re: [Announce] Cellnet-Info for N900
 
The reply should take about 17 seconds, so there is something wrong. Maybe it is the networktime that I could not test.

Could you start cellnet-info using:
/opt/cellnet-info/cellnet-info

from the terminal and see if any error messages are generated?

sixwheeledbeast 2013-12-15 12:57

Re: [Announce] Cellnet-Info for N900
 
Quote:

Originally Posted by ade (Post 1396701)
The reply should take about 17 seconds, so there is something wrong.

I am having Provider button issues too.

https://www.privatepaste.com/b991906197

Estel 2013-12-15 14:19

Re: [Announce] Cellnet-Info for N900
 
I got exactly same output as sixwheeledbeast's, it appears something like ten seconds after pressing button.

Sorry forf not providing log 1st time - something must have clouded my mind :rolleyes:

/Estel

pichlo 2013-12-15 15:09

Re: [Announce] Cellnet-Info for N900
 
Looks quite straightforward. Can one of you try wrapping yy, mm, etc on line 508 in /opt/cellnet-info/cellnet-info with str(), like this:

Code:

networktimeVal = str(yy)+"/"+str(mm)+"/"+str(dd)+" "+str(hh)+":"+str(mm)+":"+str(ss)
I would have tried it myself excxept it's pointless since my network does not provide the time.

Ade, sorry for meddling ;)

ade 2013-12-15 15:10

Re: [Announce] Cellnet-Info for N900
 
Stupid mistake of course :)

Just uploaded version: 0.0.1-9 to extras-devel. Changes:
* added signal strength % based on max -50dBm
* fixed bug in display of networktime

Should be downloadable within a few hours.

Estel 2013-12-16 09:03

Re: [Announce] Cellnet-Info for N900
 
Providcer tab does work now, and network time half-work - date, hours and seconds are OK, but minutes are not.

For example, at 9:54:36 local time, network time shows 8:12:36. Suprisingly, at 9:56:48 local time, it is 8:12:48.

As you notice, seconds switch OK, but minutes are stuck. Hours are either stuck too, or (as I suspect) presented as UTC (I'll check after 10 AM, if it changes to 9 AM network time).

I have NFC how network time protocol works, but for me, it always update device time correctly (including minutes, so I suspect some hiccup in displaying it).

Cheers,
/Estel

ade 2013-12-16 10:11

Re: [Announce] Cellnet-Info for N900
 
Quote:

Originally Posted by Estel (Post 1396960)
Providcer tab does work now, and network time half-work - date, hours and seconds are OK, but minutes are not.

For example, at 9:54:36 local time, network time shows 8:12:36. Suprisingly, at 9:56:48 local time, it is 8:12:48.

As you notice, seconds switch OK, but minutes are stuck. Hours are either stuck too, or (as I suspect) presented as UTC (I'll check after 10 AM, if it changes to 9 AM network time).

I have NFC how network time protocol works, but for me, it always update device time correctly (including minutes, so I suspect some hiccup in displaying it).

Cheers,
/Estel

Meh, I show the month instead of the minutes (that's why it's 12). Will fix that of course. And the time is UTC indeed (although it also sends timezone and daylight savings info I could use).

Edit:
Version 0.0.1-10 in extras-devel:
* introduced use of secondary theme color
* fixed minutes in networktime

sixwheeledbeast 2013-12-18 00:01

Re: [Announce] Cellnet-Info for N900
 
0.0.1-10
Code:

Error calling slot "cellinfoButtonPressed"
Traceback (most recent call last):
  File "/opt/cellnet-info/cellnet-info", line 246, in cellinfoButtonPressed
    widget = cellWindow(self)
  File "/opt/cellnet-info/cellnet-info", line 828, in __init__
    self.get_cell_id_info(c_mcc,c_mnc,c_id,c_lac)
  File "/opt/cellnet-info/cellnet-info", line 983, in get_cell_id_info
    maps_url = "http://maps.googleapis.com/maps/api/geocode/xml?latlng=" + self.latitude + "," + self.longitude + "&sensor=false"
AttributeError: 'cellWindow' object has no attribute 'latitude'

App locks out on pressing cell info button.
Seems to only happen with "Access Internet enabled"

pichlo 2013-12-18 00:39

Re: [Announce] Cellnet-Info for N900
 
I got the same:
Code:

~ $ /opt/cellnet-info/cellnet-info
/opt/cellnet-info/cellnet-info:1472: GtkWarning: gtk_widget_set_sensitive: assertion `GTK_IS_WIDGET (widget)' failed
  app = QApplication(sys.argv)
Error calling slot "cellinfoButtonPressed"
Traceback (most recent call last):
  File "/opt/cellnet-info/cellnet-info", line 246, in cellinfoButtonPressed
    widget = cellWindow(self)
  File "/opt/cellnet-info/cellnet-info", line 828, in __init__
    self.get_cell_id_info(c_mcc,c_mnc,c_id,c_lac)
  File "/opt/cellnet-info/cellnet-info", line 983, in get_cell_id_info
    maps_url = "http://maps.googleapis.com/maps/api/geocode/xml?latlng=" + self.latitude + "," + self.longitude + "&sensor=false"
AttributeError: 'cellWindow' object has no attribute 'latitude'
[~ $ /opt/cellnet-info/cellnet-info
/opt/cellnet-info/cellnet-info:1472: GtkWarning: gtk_widget_set_sensitive: assertion `GTK_IS_WIDGET (widget)' failed
  app = QApplication(sys.argv)
Error calling slot "cellinfoButtonPressed"
Traceback (most recent call last):
  File "/opt/cellnet-info/cellnet-info", line 246, in cellinfoButtonPressed
    widget = cellWindow(self)
  File "/opt/cellnet-info/cellnet-info", line 828, in __init__
    self.get_cell_id_info(c_mcc,c_mnc,c_id,c_lac)
  File "/opt/cellnet-info/cellnet-info", line 983, in get_cell_id_info
    maps_url = "http://maps.googleapis.com/maps/api/geocode/xml?latlng=" + self.latitude + "," + self.longitude + "&sensor=false"
AttributeError: 'cellWindow' object has no attribute 'latitude'


ade 2013-12-18 08:06

Re: [Announce] Cellnet-Info for N900
 
Me too :)

Looking at the error it is opencellid.org that is responding with unrecognized answers. I will see what they are, and handle unusable answers in a way that is does not give errors on the background.

Edit:
The response of opencellid.org seems to be correct again.

Changelog 0.0.1.11:
* better error handling when receiving invalid coordinates

pichlo 2013-12-18 08:24

Re: [Announce] Cellnet-Info for N900
 
What's the assertion failure at the very beginning? Can it be ignored?

ade 2013-12-18 09:31

Re: [Announce] Cellnet-Info for N900
 
Quote:

Originally Posted by pichlo (Post 1397996)
What's the assertion failure at the very beginning? Can it be ignored?

It's a harmless warning. AFAIK is a result of using some GTK related functions within Qt. Perhaps it is expecting to be called within a GTK widget. You will also see this in the syslog on regular base.

sixwheeledbeast 2014-01-18 23:00

Re: [Announce] Cellnet-Info for N900
 
Is there a reason for having different loading indicators?
Mobile Networks has a nice maemo style loading bar dialog but Operator Info has an odd swirly browser style loading icon.
Just wondering, why?

ade 2014-01-19 07:57

Re: [Announce] Cellnet-Info for N900
 
Quote:

Originally Posted by sixwheeledbeast (Post 1407408)
Is there a reason for having different loading indicators?
Mobile Networks has a nice maemo style loading bar dialog but Operator Info has an odd swirly browser style loading icon.
Just wondering, why?

I was planning on using the default indicators, but simply failed.

By creating a simple test program, I can make it work. But as soon as I call it from another place than the mainwindow class, it does not work anymore. So I looked for alternatives.

sixwheeledbeast 2014-02-13 18:13

Re: [Announce] Cellnet-Info for N900
 
Not keen on google's formatting for Location information compared with opencellid's.
Is there anyway to use a different service or make the services optional?

ade 2014-02-13 20:34

Re: [Announce] Cellnet-Info for N900
 
Quote:

Originally Posted by sixwheeledbeast (Post 1412596)
Not keen on google's formatting for Location information compared with opencellid's.
Is there anyway to use a different service or make the services optional?

It is optional in the sense that you can disable internet access :)

As noted in the latest changelog, openCellID no longer accepts a dummy api key for location information retrieval.
I am not sure if they provide developer/application keys, so users should probably have to register themselves to obtain a key.

That could be implemented, but the most easy/user friendly way was to switch to a service without mandatory api key. That was google in this case.

But this switch should not have affected the formatting of the location information, as this part has not changed. The coordinates are no longer obtained from openCellID, but the location text is (and was) always retrieved from google, as openCellID does not have this info.

Do note that the location information is always kinda random, meaning it can be just a postal location, or a more precise point (street). Don't know if google made some changes there.

sixwheeledbeast 2014-02-18 18:24

Re: [Announce] Cellnet-Info for N900
 
Quote:

Originally Posted by ade (Post 1412626)
That could be implemented, but the most easy/user friendly way was to switch to a service without mandatory api key. That was google in this case.

But this switch should not have affected the formatting of the location information, as this part has not changed. The coordinates are no longer obtained from openCellID, but the location text is (and was) always retrieved from google, as openCellID does not have this info.

Do note that the location information is always kinda random, meaning it can be just a postal location, or a more precise point (street). Don't know if google made some changes there.

Well, the information shown has definitely changed somehow.

It didn't include the "UK administrative area" before the switch and it does now. I find UK administrative areas annoying and pointless, it also means the Location string is so long it goes off screen.

Anyway I thought I'd ask, I wasn't sure if there was another FOSS service or a way we could get our own API key for opencellid.

handaxe 2014-02-19 01:03

Re: [Announce] Cellnet-Info for N900
 
Quote:

Originally Posted by sixwheeledbeast (Post 1413254)
..... or a way we could get our own API key for opencellid.

You mean for entry into the app? Or, just get an API key because indeed that is what they want users to do to enter into their app (and then if the app is capable, to transmit loc data back to them).

The site mentions maemo but has no apps listed.

ade 2014-03-01 09:56

Re: [Announce] Cellnet-Info for N900
 
New version in extras-devel (0.0.1-13).

Changes:
Code:

* added settings screen
* switched to QSettings for config
* google or openCellId selectable as source for coordinates

For using openCellId instead of Google, you need to obtain a personal api key. If you can't enter the key as a whole, I might have to change or remove the current input mask.
To save a few bytes, you can remove the old config file (/home/user/.config/cellnet-info/cellnet-info.cfg) if it is an upgrade.

handaxe 2014-03-01 11:07

Re: [Announce] Cellnet-Info for N900
 
Quote:

Originally Posted by ade (Post 1414923)
For using openCellId instead of Google, you need to obtain a personal api key. If you can't enter the key as a whole, I might have to change or remove the current input mask.

Works for me. Thank you.

sixwheeledbeast 2014-03-04 22:11

Re: [Announce] Cellnet-Info for N900
 
Seem to be having trouble since the last update.

Current Cellular Info hangs for ~20 sec before the banner message "no info or incorrect api key."

Can't seem to get Google working either.

pastebin.com/x4FiR7QL

It seems OpenCellID will register any information without validating it and issue a API key, so is there a reason the application can't use one key for everyone?

ade 2014-03-04 23:20

Re: [Announce] Cellnet-Info for N900
 
Quote:

Originally Posted by sixwheeledbeast (Post 1415467)
Seem to be having trouble since the last update.

Current Cellular Info hangs for ~20 sec before the banner message "no info or incorrect api key."

Can't seem to get Google working either.

pastebin.com/x4FiR7QL

You seem to have some kind of (timing) trouble with already deleted objects. Maybe cellinfo changed before it could get the location info updated. Can't reproduce it right now. Was it incidental or is it a constant issue?

Quote:

It seems OpenCellID will register any information without validating it and issue a API key, so is there a reason the application can't use one key for everyone?
Can't find a clear policy on this if it is allowed. You could ask them :). But if an API key is included, it could be abused (for upload of bogus data for example), leading to a block of that key (and Cellnet-Info as a result).

sixwheeledbeast 2014-03-04 23:37

Re: [Announce] Cellnet-Info for N900
 
Quote:

Originally Posted by ade (Post 1415474)
You seem to have some kind of (timing) trouble with already deleted objects. Maybe cellinfo changed before it could get the location info updated. Can't reproduce it right now. Was it incidental or is it a constant issue?

I had issues with another application, so I rebooted and seems to have partially fixed. No hanging and Google works fine, but seens OpenCellID has no information about my mast "cellinfo not found".
I'll keep an eye on it for now.

Quote:

Originally Posted by ade (Post 1415474)
Can't find a clear policy on this if it is allowed. You could ask them :). But if an API key is included, it could be abused (for upload of bogus data for example), leading to a block of that key (and Cellnet-Info as a result).

Understood, I wasn't thinking of removing the option for entering your own key, just supplying one OOTB. I suppose default is Google anyway.

handaxe 2014-03-05 02:24

Re: [Announce] Cellnet-Info for N900
 
Quote:

Originally Posted by sixwheeledbeast (Post 1415476)
....but seens OpenCellID has no information about my mast "cellinfo not found".
I'll keep an eye on it for now.

And the same here as well. OpenCellId database seems sparse. Google works. Must poke around on the web site to see if a search there finds stuff...

xes 2015-03-22 01:24

Re: [Announce] Cellnet-Info for N900
 
One problem:
Today while cheking my sim data, i checked the ICCID and i discovered that cellnet-info fails reading it in a "funny" way. It swaps every pair of numbers!
Example:
iccid printed on the sim: 1234567890
cellnet-info reported iccid: 2143658709

if you plan to make a number portability request and you need the iccid....pay attention!

ade 2015-03-22 13:47

Re: [Announce] Cellnet-Info for N900
 
Quote:

Originally Posted by xes (Post 1464621)
One problem:
Today while cheking my sim data, i checked the ICCID and i discovered that cellnet-info fails reading it in a "funny" way. It swaps every pair of numbers!
Example:
iccid printed on the sim: 1234567890
cellnet-info reported iccid: 2143658709

if you plan to make a number portability request and you need the iccid....pay attention!

Hi Xes,

What kind of refurbished chinese SIM card are you using :D ?

As I have no device left with a sim card, I can't test/confirm this. cellnet-info should do (a python equivalent of):
Code:

dbus-send --system --type=method_call --print-reply --dest=com.nokia.phone.SSC /com/nokia/phone/SSC com.nokia.phone.SSC.get_iccid
Does this command provide you with a correct id? And do others have the same issue?

xes 2015-03-22 14:16

Re: [Announce] Cellnet-Info for N900
 
@ade
Thanks! :) Nah, a good sim that i'm using without problems since 8 years.
Anyway it seems that also dbus-send request produces the same wrong result.
Then, AT+ICCID gives only ERROR... No idea if there are other ways.

Sorry, for my previous post, it's clear that is not a problem with your app.
Anyway, it could be a warning for others to doublecheck the info returned by the N900.

ade 2015-03-22 14:28

Re: [Announce] Cellnet-Info for N900
 
Quote:

Originally Posted by xes (Post 1464652)
@ade
Thanks! :) Nah, a good sim that i'm using without problems since 8 years.
Anyway it seems that also dbus-send request produces the same wrong result.
Then, AT+CCID gives only ERROR... No idea if there are other ways.

Sorry, for my previous post, it's clear that is not a problem with your app.
Anyway, it could be a warning for others to doublecheck the info returned by the N900.

If the output is alway mixed up the way you describe, I could reorder the output. But then I would need confirmation from at least a few others. I can't remember if I double-checked it myself back then.

xes 2015-03-22 14:50

Re: [Announce] Cellnet-Info for N900
 
Well, the iccid should be 18 digits long
In my device and sim the iccid appears to be long 20 digits where the first 18 digits are swapped pairs and at the end there is a "F0" that doesn't exist anywhere.

Checking this:
http://www.forensicswiki.org/wiki/SIM_Cards
should be easy to guess when the results is completely wrong.
Maybe something like if first 2 digits are 98 instead of 89 (every iccid should start with 89) swap all digit pairs and cut after 18.

Anyway, yes we need other checks and confirmations, i have no idea if it's just my device behaving in that way.

Then

peterleinchen 2015-03-22 17:40

Re: [Announce] Cellnet-Info for N900
 
My ICCID is 20 digits long and starts with 35 (ending with 86) :eek:

Cellnet-info and dbus give the same output.
So it is not only your device but all...
That puzzled me during a walk. But I found no matching swap. packed BCD, binary representation or whatever that would explain my numbers!

ICCID may be 18/19/20 (even 22) digits.
But should always start with 89 for GSM SIMs.
Followed by the calling code of issuer country (e.g. Germany 49, England 44, America 1, Slovakia 421, ...)


http://en.wikipedia.org/ICCID#ICCID
http://en.wikipedia.org/Binary-coded-decimal
http://en.wikipedia.org/ISO/IEC_7812

So another mysterium of our beloved gem.

(btw.: my N9 spits out a 19 digit ICCID starting with 89 followed by calling code of 49, so absolutely correct. I may test my N900 with similar SIM as of N9 but only in a few days/weeks.)

ade 2015-03-22 18:28

Re: [Announce] Cellnet-Info for N900
 
I just inserted a decatived sim card, but I can still use it for ICCID queries it turns out.

It has the last 8 digits engraved. And those are indeed swapped as Xes described. And it is ending with "f8". The country code etc. are also reversed.

So in my case I could "fix" it by swapping the number pairs and removing the last two characters.

@peterleinchen: are you sure you do not have the same number swap issue?

Halftux 2015-03-22 18:30

Re: [Announce] Cellnet-Info for N900
 
For me cellnet-info cannot start I am getting a segmentation fault.

With dbus I get a twisted pair ICCID 20 digits long starting with 9894...

I will look if qt mobility can read out this information.

handaxe 2015-03-22 20:23

Re: [Announce] Cellnet-Info for N900
 
Yup swapped here too, both cellnet-info and dbus.... with the f6 termination.

ade 2015-03-22 20:35

Re: [Announce] Cellnet-Info for N900
 
Thanks for all the responses.

Just uploaded version 0.0.1-14 (can take a while before available).

It swaps the number pairs and removes the "f". I still needed the number behind the "f" as last number.

Let me know how it looks after the update.


All times are GMT. The time now is 04:57.

vBulletin® Version 3.8.8