[Gsmmap] Getting PCS1900 to work

Ed Dee eddie3gpp at gmail.com
Tue Oct 7 22:40:19 CEST 2014


Been struggling to get osmocom-bb working on my C139, with the GSM-850 and
PCS-1900 bands.  The GSMMAP branch seemed to be by far the most up-to-date,
so that is what I've been using.  I appreciate that the cell_log app has
built-in scanning by band already, for instance, which other branches I
checked out seem to lack.

GSMMAP branch worked on GSM850 out of the box, but the ARFCN number reuse
between DCS1800 and PCS1900 has caused all sorts of havoc when I try to
look at that band.

First, I made the rffe_dualband changes to enable the correct antenna port
on my C139, hoping that would resolve the problem.  It did not.  So I dug
into the code further.

Here are some quick and dirty hacks to make GSMMAP work on PCS1900, at
least for my simple tests on a non-hopping network.  These will presumably
break proper DCS support.  I'm sure there is a cleaner way to do this, but
for my proof of concept, this was adequate.
I made a brief attempt to find a way to detect whether PCS or DCS should be
used at run-time.  From the fact that "struct osmocom_ms" is passed into
osmo_make_band_arfcn, I thought there might be something in there to hint
whether to use DCS or PCS numbering, but if it's there, it has eluded me.
It appears to be mostly uninitialized.  All of the relevant fields I
checked were still set to 0.  Presumably this structure is really only
initialized in the "mobile" app.

In app_ccch_scan.c:
In void follow_assignment(struct osmocom_ms *ms, struct gsm_assignment *ga):

        if (!ga->h) {
                int arfcn = ga->h0.band_arfcn;
                if(arfcn >= 512 && arfcn <= 810)
                        arfcn |= ARFCN_PCS;
                l1ctl_tx_dm_est_req_h0(ms,
                        arfcn, ga->chan_nr, ga->tsc,
                        GSM48_CMODE_SIGN, 0);
This change allows ccch_scan to actually follow the channel assignment;
before it was trying to go to channel 522 (for example) when it should have
been requesting 522 + ARFCN_PCS.

In l1ctl.c:
static int osmo_make_band_arfcn(struct osmocom_ms *ms, uint16_t arfcn)
{
        if(arfcn >= 512 && arfcn <= 810)
                arfcn |= ARFCN_PCS;
        return arfcn;
}

Another problem with PCS1900 that doesn't directly affect what I've tried
to do so far, but still caught my eye as I was bug-hunting:

In int arfcn2index(uint16_t arfcn):
        if ((arfcn & ARFCN_PCS) && arfcn >= 512 && arfcn <= 810)
This will never evaluate to true.  ARFCN_PCS is 0x8000, so if
(arfcn&ARFCN_PCS) is true, arfcn can never be <= 810.

Actually after digging deeper, this particular problem seems to be fixed in
other branches.  So that's good!

I'm nearly positive that these problems will affect the 'mobile'
application, too, at a minimum.  Maybe others, not sure.  But if anyone
else out there is struggling with getting PCS1900 working, this is a good
place to start.

Good luck!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.srlabs.de/pipermail/gsmmap/attachments/20141007/f7f9da6c/attachment-0003.html>


More information about the Gsmmap mailing list