Re: [QtMoko] GSM not turning on / registering

2014-05-19 Thread Nick
Quoth Michael Spacefalcon:
 Nick openmoko-commun...@njw.me.uk wrote:
 
  The phone that works is 3G, and it doesn't seem to have a 'force 2G' 
  option anywhere.
 
 The option in question often goes by different names: it may also be
 named network type or network selection etc, with the choices
 being GSM or WCDMA or both.  Try selecting GSM if you can find the
 elusive option.

Hmm, I didn't see anything like that even, but I'll take another 
look tonight.

  I'm in the Greater Boston area,
 
 Ahh - I didn't realize you were still here in the States - I remember
 you asking on this list a few months ago about GSM frequency bands in
 USA, with the intention of traveling to Boston area, but it was back
 in February, so I thought the trip was over and you were back home in
 the UK.

Yeah, I'm here for 6 months. It's a good place :)

 How long ago have you arrived in Boston?  Is the FR-not-working
 problem something that happened upon arrival in USA, or has it been
 working for you for a while in this part of the world?

No, it has worked fine (well, in fact) for the past couple of 
months, so it definitely *can* work here.

 Ahh, so you decided to be adventurous and use ATT instead of the more
 tried  tested T-Mobile.  Before we spend an inordinate amount of
 effort figuring out why your FR doesn't work on ATT in Boston,
 perhaps you could try a T-Mobile SIM card just as a quick test?  If
 you don't have one, just go into any T-Mobile store and ask them to
 borrow a SIM for a few minutes to test in your phone while inside
 their store.

I may end up doing that, but there isn't a T-Mobile store very 
conveniently located for me, so I'll at least try some fun logging 
of AT commands first.
 
 Also if there is any chance you might visit California before you go
 back to the UK, we could meet up and do some GSM hacking together. :)

Aah, that would be nice, but no, I don't think I'm going to get to 
the west coast this trip. It sounds like something well worth doing, 
and someday I'll make it there. I'll let you know if my plans change 
and I end up in California. Similarly, let me know if you come to 
Boston. :)

  Basically because I just want a dumbphone that works, really, so 
  tend towards laziness regarding my phone nowadays.
 
 If you are using your FR as an oversized dumbphone, have you considered
 using a real dumbphone instead?  You might want to grab a Mot C139 on
 ebay while they are still available - it is one of the models which I
 am using for FreeCalypso firmware bring-up (along with the Neo FR and
 Pirelli DP-L10) before building my own dumbphone hardware, and it has
 the advantage of being a very simple dumbphone with full schematics
 available (unlike the Pirelli).

Hmm... I'll consider it...

Thanks, and expect some nice AT output later.

Nick

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: [QtMoko] GSM not turning on / registering

2014-05-19 Thread joerg Reisenweber
Please consider that - it seems / I heard - several 850/900 and 1800/1900 
cells are getting reassigned in USA from GSM to UMTS or even LTE during last 
year. Ongoing.

good luck!
jOERG

On Mon 19 May 2014 08:27:15 Nick wrote:
 Quoth Michael Spacefalcon:
  Nick openmoko-commun...@njw.me.uk wrote:
   The phone that works is 3G, and it doesn't seem to have a 'force 2G'
   option anywhere.
  
  The option in question often goes by different names: it may also be
  named network type or network selection etc, with the choices
  being GSM or WCDMA or both.  Try selecting GSM if you can find the
  elusive option.
 
 Hmm, I didn't see anything like that even, but I'll take another
 look tonight.
 
   I'm in the Greater Boston area,
  
  Ahh - I didn't realize you were still here in the States - I remember
  you asking on this list a few months ago about GSM frequency bands in
  USA, with the intention of traveling to Boston area, but it was back
  in February, so I thought the trip was over and you were back home in
  the UK.
 
 Yeah, I'm here for 6 months. It's a good place :)
 
  How long ago have you arrived in Boston?  Is the FR-not-working
  problem something that happened upon arrival in USA, or has it been
  working for you for a while in this part of the world?
 
 No, it has worked fine (well, in fact) for the past couple of
 months, so it definitely *can* work here.
 
  Ahh, so you decided to be adventurous and use ATT instead of the more
  tried  tested T-Mobile.  Before we spend an inordinate amount of
  effort figuring out why your FR doesn't work on ATT in Boston,
  perhaps you could try a T-Mobile SIM card just as a quick test?  If
  you don't have one, just go into any T-Mobile store and ask them to
  borrow a SIM for a few minutes to test in your phone while inside
  their store.
 
 I may end up doing that, but there isn't a T-Mobile store very
 conveniently located for me, so I'll at least try some fun logging
 of AT commands first.
 
  Also if there is any chance you might visit California before you go
  back to the UK, we could meet up and do some GSM hacking together. :)
 
 Aah, that would be nice, but no, I don't think I'm going to get to
 the west coast this trip. It sounds like something well worth doing,
 and someday I'll make it there. I'll let you know if my plans change
 and I end up in California. Similarly, let me know if you come to
 Boston. :)
 
   Basically because I just want a dumbphone that works, really, so
   tend towards laziness regarding my phone nowadays.
  
  If you are using your FR as an oversized dumbphone, have you considered
  using a real dumbphone instead?  You might want to grab a Mot C139 on
  ebay while they are still available - it is one of the models which I
  am using for FreeCalypso firmware bring-up (along with the Neo FR and
  Pirelli DP-L10) before building my own dumbphone hardware, and it has
  the advantage of being a very simple dumbphone with full schematics
  available (unlike the Pirelli).
 
 Hmm... I'll consider it...
 
 Thanks, and expect some nice AT output later.
 
 Nick
 
 ___
 Openmoko community mailing list
 community@lists.openmoko.org
 http://lists.openmoko.org/mailman/listinfo/community

-- 
()  ascii ribbon campaign - against html e-mail 
/\  www.asciiribbon.org   - against proprietary attachments
(alas the above page got scrapped due to resignation(!!), so here some 
supplementary links:)
http://www.georgedillon.com/web/html_email_is_evil.shtml  
http://www.nonhtmlmail.org/campaign.html
http://www.georgedillon.com/web/html_email_is_evil_still.shtml
http://www.gerstbach.at/2004/ascii/ (German)


signature.asc
Description: This is a digitally signed message part.
___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: [QtMoko] GSM not turning on / registering

2014-05-19 Thread Michael Spacefalcon
joerg Reisenweber jo...@openmoko.org wrote:

 Please consider that - it seems / I heard - several 850/900 and 1800/1900
 cells are getting reassigned in USA from GSM to UMTS or even LTE during last
 year. Ongoing.

Yes, I heard that too.  Dunno about Boston area, as I'm nowhere near
there, but at least in my roaming area in SoCal I have not lost any
T-Mobile GSM1900 coverage yet.  Yet..

I do have to agree that the problem Nick is having (FR working like a
charm for 2 months, then all of a sudden, bam, getting no coverage)
sounds very suspiciously like the result of GSM cell shutdown, rather
than anything being wrong with the FR.  That is the reason I keep asking
Nick to try a T-Mobile SIM in his area - while both carriers have the
same GSM killing agenda in the long run, it is rather unlikely that
both of them would kill GSM in one specific spot at *exactly* the same
time...

Open letter to FBI/NSA/etc: you guys might want to consider paying
T-Mobile to retain some minimal GSM coverage in Southern California,
just enough for one (1) user, so you can continue tracking my
approximate location.  For as long as I have working GSM (and you know
I almost never turn my phone off, so my sweetie can call me any time),
you can easily track my location with cell-site granularity, and if
you care to do some actual work (call me to cause my phone to transmit
continuously, then bring out your DF gear), you can pin-point where I
am even more precisely than that.  But I will never, ever, ever use a
3G phone, as a firm matter of principle, so if usable GSM service goes
away in my neck of the woods, then I won't have a cellphone at all: of
any kind, period, and then you will have no idea where I am at any
given moment.  Just some food for thought.

Nick openmoko-commun...@njw.me.uk wrote:

 Yeah, I'm here for 6 months. It's a good place :)

6 months from now, or from your arrival however many months ago?  Just
trying to figure out what the time window is for possibly catching you
in Boston area. :)

 No, it has worked fine (well, in fact) for the past couple of 
 months, so it definitely *can* work here.

Hence my worry about you possibly being the first victim of GSM
shutdown by evil greedy carriers who only care about selling data,
rather than traditional call minutes.

 I may end up doing that, but there isn't a T-Mobile store very 
 conveniently located for me,

I've heard that MetroPCS and Simple Mobile are T-Mobile resellers.
If you spot either of these two in your area, try going in there and
asking for a test SIM.

 so I'll at least try some fun logging of AT commands first.

When the modem is working normally, the AT+COPS=? command gives a
listing of all available carriers, so one can see what's available
beyond the specific SIM you've got.  But for some reason that command
only works after I issue a plain AT+COPS first, which is the command
to register to the default operator.  I don't know what will happen if
one issues AT+COPS and that operation fails: will AT+COPS=? work or
not?  I also have not yet studied the relevant part of the firmware
source, so I don't know whether the behaviour I see in this area is a
bug in need of fixing, or if there is some good reason it works this
way.

One can also use the cell_log utility from OsmocomBB to list all
available GSM cells and their owners without having any SIM at all
(and without registering to any of these detected networks), but
because OsmocomBB is dominated by EUnians (not one soul from North
America in that gang), getting cell_log to work in the PCS band was an
incredible pita.  At least I did it on a dumbphone (Pirelli DP-L10);
trying to do it on a Neo would be even more pain..

 Similarly, let me know if you come to Boston. :)

See my question above as to the time window of your presence there.

VLR,
SF

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: [QtMoko] GSM not turning on / registering

2014-05-19 Thread Andrew Schenck


On 5/19/2014 12:28 PM, Michael Spacefalcon wrote:

joerg Reisenweber jo...@openmoko.org wrote:

I may end up doing that, but there isn't a T-Mobile store very
conveniently located for me,

I've heard that MetroPCS and Simple Mobile are T-Mobile resellers.
If you spot either of these two in your area, try going in there and
asking for a test SIM.
I can verify that SimpleMobile is a T-Mobile MVNO, but I thought 
MetroPCS was Sprint.


-Andrew

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: [QtMoko] GSM not turning on / registering

2014-05-19 Thread Michael Spacefalcon
There is one more way to test/observe what 2G and 3G services and
carriers are available at a given location: by giving that AT+COPS=?
query command to a 3G USB modem stick that speaks AT commands.  I've
got a Huawei E303 (South American Claro branding), it is supported by
recent versions of the usb_modeswitch package, which puts it into AT
command speaking mode, and one can then run a terminal program on the
/dev/gsmmodem symlink it generates.  Giving this modem an AT+COPS=?
query returns the list of carriers that looks like this:

at+cops=?
+COPS: 
(2,T-Mobile,TMO,310260,0),(1,ATT,ATT,310410,2),(1,ATT,ATT,310410,0),,(0,1,2,3,4),(0,1,2)

OK

The 5 fields in each parenthesized entry mean:

- state: 2 means currently selected, 1 not selected;
- full name in quotes
- short name in quotes
- the true numeric ID sent by the cell network (the decoded names in
  the previous two fields come from a look-up table in the modem fw);
- 3G-added field not in the GSM 07.07 spec: 2 means 3G, 0 means 2G.

The example output above is from a location that has both T-Mobile and
ATT service, both 2G and 3G, but T-Mobile 3G in this location is on a
frequency this modem doesn't support, hence it doesn't show up in the
list.  The modem has a T-Mobile SIM in it, hence in the shown example
it is registered on T-Mobile 2G instead of ATT 3G.

To Nick - if you happen to have one of these 3G USB modem sticks or
are able to borrow one, you should try it at the location where you
are having FR woes and see what it shows.

Andrew Schenck and...@springahead.com wrote:

 I can verify that SimpleMobile is a T-Mobile MVNO, but I thought 
 MetroPCS was Sprint.

Perhaps it differs by region.  Recently a new MetroPCS retail outlet
opened in a strip mall near me, I went in there to mess with their
minds a little (I was bored), and they told me they were a T-Mobile
MVNO.

SF

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: [QtMoko] GSM not turning on / registering

2014-05-19 Thread joerg Reisenweber
On Mon 19 May 2014 20:08:36 Michael Spacefalcon wrote:
 - full name in quotes
 - short name in quotes
 - the true numeric ID sent by the cell network (the decoded names in
   the previous two fields come from a look-up table in the modem fw);
Nope they shouldn't, that LUT-name is a 3rd way to get the plaintext of 
carrier as long as network fails to transmit full and short name OTA (AFAIK).
And in userspace of GTA02 there's usually yet another LUT for a 4th way to get 
the name ;-)
SIM also might provide a name, so that would be a 5th way.

/j
-- 
()  ascii ribbon campaign - against html e-mail 
/\  www.asciiribbon.org   - against proprietary attachments
(alas the above page got scrapped due to resignation(!!), so here some 
supplementary links:)
http://www.georgedillon.com/web/html_email_is_evil.shtml  
http://www.nonhtmlmail.org/campaign.html
http://www.georgedillon.com/web/html_email_is_evil_still.shtml
http://www.gerstbach.at/2004/ascii/ (German)


signature.asc
Description: This is a digitally signed message part.
___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: [QtMoko] GSM not turning on / registering

2014-05-19 Thread Nick
Alright, I'll go to a T-Mobile shop (or reseller) in the next few 
days to get a test SIM.

In the meantime, I tried running the AT commands with socat, but 
didn't get very far. Maybe I'm using socat incorrectly - I haven't 
done it before, so forgive my ignorance. Following is the transcript 
from my console session (done over ssh from my laptop):

root@neo:~# socat - file:/dev/ttySAC0,crtscts,crnl
~
+CREG: 3
 ~~
ERROR
@~~
%CSQ:  18, 99, 2
 ~~
+CIEV: 1, 3
 ~AT+COPS=?
ATE1
~
%CSQ:  15, 99, 1
 ~~
+CIEV: 1, 2
 ~AT+CFUN=1
AT+CGMI

The commands 'AT+COPS=?', 'ATE1', 'AT+CFUN=1', 'AT+CGMI' were 
entered by me. I'm guessing I should have seen at least a 'OK' or 
'ERROR' message, so maybe I'm using socat incorrectly?

I don't have a 3G USB modem, unfortunately.

I'm pretty surprised that the carriers are decommissioning 2G in the 
USA. Crazy bastards.

Thanks for your continued help.

Nick

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: [QtMoko] GSM not turning on / registering

2014-05-19 Thread Michael Spacefalcon
Nick openmoko-commun...@njw.me.uk wrote:

 In the meantime, I tried running the AT commands with socat, but 
 didn't get very far.

I've never used socat (I use my own tool, see below), so I don't have
much to comment on that part, but the transcript you've posted shows
that you managed to catch some of the modem's output while it was being
driven by QtMoko (perhaps stopping QtMoko doesn't power the modem off),
and this output contains a smoking gun:

 +CREG: 3

The +CREG unsolicited response from the modem indicates its registration
status, and looking up the meaning of status code 3 in GSM spec 07.07
tells us that it means registration denied - aha!  So the GSM radio
signal *is* present, but when your FR tries to register to the network
it hears, the network actively denies that registration!  Two
possibilities come to mind:

Possibility 1: ATT GSM service went away (either a deliberate service
shutdown, or the tower simply went down for some random reason or
another, and they are in no hurry to fix it because it's 2G which is
only used by outlaws and freedom lovers like us), but T-Mobile GSM is
still present; your FR tries to register with the T-Mobile network,
but the latter rejects the ATT SIM.

Possibility 2: ATT GSM service is still there, and your FR is trying
to register to it because it's got an ATT SIM, but ATT has decided
to reject your FR for some truly nefarious reason, such as an IMEI ban
against an entire range of devices they don't like - I've read stories
on the web about ATT specifically pulling such BS.

See below on my proposed method for distinguishing between these two
possibilities.

 %CSQ:  18, 99, 2

%CSQ is TI's non-standard extended version of the standard +CSQ command
and unsolicited response; the standard +CSQ response gives two numbers,
while %CSQ adds a third.  I don't fully understand the meaning of the
3rd number yet, but we can ignore it for now.  99 in the 2nd number
position is a placeholder meaning that the modem has no BER information,
but the 1st number is the RSSI: received signal strength indicator.
Numbers like 18 or 15 seen further in your transcript look good to me.

 +CIEV: 1, 3

Yet another way by which TI's modem implementation returns the RSSI,
apparently.

 The commands 'AT+COPS=?', 'ATE1', 'AT+CFUN=1', 'AT+CGMI' were 
 entered by me. I'm guessing I should have seen at least a 'OK' or 
 'ERROR' message, so maybe I'm using socat incorrectly?

Because I am the kind of guy who finds it easier to write his own
program than to learn how to use one that already exists, I've been
using my own ad hack tool called engcons to talk AT commands to the
modem in my Neo FR.  The engcons.c source is appended at the end of
this post; you'll need to compile and run it on your FR.  Use it like
this:

# stop QtMoko
/etc/init.d/qtmoko-neo stop
# power-cycle the modem
echo 0  /sys/bus/platform/devices/gta02-pm-gsm.0/power_on
echo 1  /sys/bus/platform/devices/gta02-pm-gsm.0/power_on
# run engcons to talk AT commands
engcons /dev/ttySAC0 r115200

Once you do the above, you should be in a state where you can type AT
commands and see the expected responses.  Try AT+CGMI, AT+CGMM, AT+CGMR,
AT+CFUN=1, AT+COPS and AT+COPS=?, and post the results you get.

VLR,
SF

engcons.c source follows; this ad hack program was originally written
for some completely different purposes and thus contains a bunch of
crud that will make no sense, but I just reused what I already had
working.

/*
 * This utility is used at Harhan Engineering Co. to connect to
 * the console ports of various targets in the lab.  Most of the latter
 * are either MicroVAXen or our own designs inspired by the VAX/MicroVAX
 * console, and this program has a few nifty features specifically
 * intended for those consoles.
 *
 * Beyond simple pass-thru of bytes in both directions, the following
 * features are provided:
 *
 *   - logging
 *   - ^P sends a break
 *   - binary upload via X command
 *   - changing console baud rate on HEC MC68302 targets (not in this version)
 *
 * This is the POSIX termios version of the program; the original version
 * was for 4.3BSD UNIX.
 *
 * Author: Michael Sokolov, Harhan Engineering Co.
 * msoko...@ivan.harhan.org
 */

#include sys/param.h
#include sys/file.h
#include sys/stat.h
#include sys/ioctl.h
#include sys/errno.h
#include termios.h
#include ctype.h
#include stdio.h
#include strings.h

extern int errno;

int mypid;
int tfd;
FILE *tfdF;

struct termios saved_termios, my_termios, target_termios;

int kbd_eol_state = 1;
FILE *logF;

static struct speedtab {
int num;
speed_t code;
} speed_table[] = {
{300, B300},
{1200, B1200},
{2400, B2400},
{4800, B4800},
{9600, B9600},
{19200, B19200},
{38400, B38400},
{57600, B57600},
{115200, B115200},
{0, 0}};

main(argc, argv)
char **argv;
{
int zero = 0;
struct speedtab *spd;
int speed, rtscts = 0;
char *cp;