diff mbox series

[RFC] atmodem: let +COPS: report access technology

Message ID 20241008091009.1567305-1-sean@geanix.com (mailing list archive)
State Changes Requested
Headers show
Series [RFC] atmodem: let +COPS: report access technology | expand

Commit Message

Sean Nyekjaer Oct. 8, 2024, 9:10 a.m. UTC
When using the SIMCom A7672E-FASE in gsm mode, gsm is never reported as
access technology. Fix this by letting +COPS: report it.
---
For EUTRAN networks at_creg_cb() is setting the correct technology.
But as I read it, CREG doesn't differentiate between GSM and UMTS.
Can we fix this by using the technology from +COPS: ?

 drivers/atmodem/network-registration.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Denis Kenzior Oct. 9, 2024, 3:47 p.m. UTC | #1
Hi Sean,

On 10/8/24 4:10 AM, Sean Nyekjaer wrote:
> When using the SIMCom A7672E-FASE in gsm mode, gsm is never reported as
> access technology. Fix this by letting +COPS: report it.
> ---
> For EUTRAN networks at_creg_cb() is setting the correct technology.
> But as I read it, CREG doesn't differentiate between GSM and UMTS.
> Can we fix this by using the technology from +COPS: ?
> 
>   drivers/atmodem/network-registration.c | 3 +++
>   1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/atmodem/network-registration.c b/drivers/atmodem/network-registration.c
> index 46b8512a..ccd01234 100644
> --- a/drivers/atmodem/network-registration.c
> +++ b/drivers/atmodem/network-registration.c
> @@ -353,6 +353,9 @@ static void cops_cb(gboolean ok, GAtResult *result, gpointer user_data)
>   	op.status = 2;
>   	op.tech = tech;
>   
> +	/* Set current access technology */
> +	nd->tech = tech;
> +

Maybe behind a vendor check with an explanation?  COPS isn't really meant to be 
used for this as it can contain the cell capabilities rather than the actual 
registration technology.

>   	DBG("cops_cb: %s, %s %s %d", name, nd->mcc, nd->mnc, tech);
>   
>   	cb(&error, &op, cbd->data);

Regards,
-Denis
Sean Nyekjaer Oct. 11, 2024, 12:58 p.m. UTC | #2
Hi Denis,

On Wed, Oct 09, 2024 at 10:47:33AM +0100, Denis Kenzior wrote:
> Hi Sean,
> 
> On 10/8/24 4:10 AM, Sean Nyekjaer wrote:
> > When using the SIMCom A7672E-FASE in gsm mode, gsm is never reported as
> > access technology. Fix this by letting +COPS: report it.
> > ---
> > For EUTRAN networks at_creg_cb() is setting the correct technology.
> > But as I read it, CREG doesn't differentiate between GSM and UMTS.
> > Can we fix this by using the technology from +COPS: ?
> > 
> >   drivers/atmodem/network-registration.c | 3 +++
> >   1 file changed, 3 insertions(+)
> > 
> > diff --git a/drivers/atmodem/network-registration.c b/drivers/atmodem/network-registration.c
> > index 46b8512a..ccd01234 100644
> > --- a/drivers/atmodem/network-registration.c
> > +++ b/drivers/atmodem/network-registration.c
> > @@ -353,6 +353,9 @@ static void cops_cb(gboolean ok, GAtResult *result, gpointer user_data)
> >   	op.status = 2;
> >   	op.tech = tech;
> > +	/* Set current access technology */a

So something like:

if (nd->vendor == OFONO_VENDOR_SIMCOM_A76XX) ?
> > +	nd->tech = tech;
> > +
> 
> Maybe behind a vendor check with an explanation?  COPS isn't really meant to
> be used for this as it can contain the cell capabilities rather than the
> actual registration technology.

And an explanation from the SIMCom datasheet?

> 
> >   	DBG("cops_cb: %s, %s %s %d", name, nd->mcc, nd->mnc, tech);
> >   	cb(&error, &op, cbd->data);
> 
> Regards,
> -Denis

/Sean
Denis Kenzior Oct. 14, 2024, 3:51 p.m. UTC | #3
Hi Sean,

> 
> So something like:
> 
> if (nd->vendor == OFONO_VENDOR_SIMCOM_A76XX) ?
>>> +	nd->tech = tech;
>>> +

Yep.

>>
>> Maybe behind a vendor check with an explanation?  COPS isn't really meant to
>> be used for this as it can contain the cell capabilities rather than the
>> actual registration technology.
> 
> And an explanation from the SIMCom datasheet?
> 

Yeah, that would be great.

Regards,
-Denis
diff mbox series

Patch

diff --git a/drivers/atmodem/network-registration.c b/drivers/atmodem/network-registration.c
index 46b8512a..ccd01234 100644
--- a/drivers/atmodem/network-registration.c
+++ b/drivers/atmodem/network-registration.c
@@ -353,6 +353,9 @@  static void cops_cb(gboolean ok, GAtResult *result, gpointer user_data)
 	op.status = 2;
 	op.tech = tech;
 
+	/* Set current access technology */
+	nd->tech = tech;
+
 	DBG("cops_cb: %s, %s %s %d", name, nd->mcc, nd->mnc, tech);
 
 	cb(&error, &op, cbd->data);