Cinterion radio bands
Giacinto Cifelli
gciofono at gmail.com
Mon May 18 03:56:50 UTC 2020
Hey Aleksander,
On Fri, May 15, 2020 at 9:02 PM Aleksander Morgado
<aleksander at aleksander.es> wrote:
>
> Hey,
> > > > I am trying to update the code for the Radio/Bands of Cinterion
> > > > Today in the code there is a parser for this format (only for the test part):
> > > > AT^SCFG=?
> > > > ^SCFG: "Radio/Band",("1-479","0-1")
> > > >
> > > > the PLS62 reports:
> > > > under GSM charset:
> > > > AT^SCFG=?
> > > > ^SCFG: "Radio/Band/2G",("0x00000004"-"0x00000074")
> > > > ^SCFG: "Radio/Band/3G",("0x00000001"-"0x0004019B")
> > > > ^SCFG: "Radio/Band/4G",("0x00000001"-"0x080E08DF")
> > > > and under UCS2 charset:
> > > > AT^SCFG=?
> > > > ^SCFG: "Radio/Band/2G",("0030007800300030003000300030003000300034"-"0030007800300030003000300030003000370034")
> > > > ^SCFG: "Radio/Band/3G",("0030007800300030003000300030003000300031"-"0030007800300030003000340030003100390042")
> > > > ^SCFG: "Radio/Band/4G",("0030007800300030003000300030003000300031"-"0030007800300038003000450030003800440046")
> > >
> > > > To determine the charset, I use some heuristics on string length and
> > > > prefix (0x aka 00300078). Note also that a model returns lowercase
> > > > hexa while another uppercase...
> > >
> > > Isn't mm_broadband_modem_get_current_charset () not returning the
> > > correct thing? I would definitely avoid doing heuristics to detect
> > > charset if possible.
> >
> Is there not a CSCS=? check during initialization, plus a CSCS=X set
> command after that? I believe that ModemManager tries to set the
> "best" charset of the ones available. Do you have a full debug log to
> check how that is happening?
>
> > The only time it is called is after setting it, and it looks like it
> > requires a dbus input, and therefore can only happen after the modem
> > is detected.
>
> No no, there is no charset setting based on DBus calls. It's done during init.
>
> > Unfortunately the call above happens during the modem detection phase.
> >
> > one fix could be sending the line
> > AT+CSCS="GSM"
> > in the initialization, along with other test commands like AT*CNTI=2?
> >
I have checked the code, and the charset detection&set is part of the
enable state machine, while the radio/band detection is part of the
modem discovery state machine in :src/mm-iface-modem.c:
typedef enum {
...
ENABLING_STEP_SUPPORTED_CHARSETS,
ENABLING_STEP_CHARSET,
...
} EnablingStep;
typedef enum {
...
INITIALIZATION_STEP_SUPPORTED_BANDS,
...
INITIALIZATION_STEP_CURRENT_BANDS,
...
} InitializationStep;
It is possible that other initialization steps require the right
charset. Wouldn't be good to move the charset settings among these
steps?
After all setting the charset is part of setting up the communication
channel, a bit like the baudrate and similar parameters.
Thank you,
Giacinto
More information about the ModemManager-devel
mailing list