Subject: Adding USB modem support to Yocto #raspberrypi To: yocto@lists.yoctoproject.org From: jose_amador95@hotmail.com X-Originating-Location: Veracruz, MX (201.138.29.119) X-Originating-Platform: Linux Firefox 85 User-Agent: GROUPS.IO Web Poster MIME-Version: 1.0 Date: Tue, 23 Feb 2021 11:41:23 -0800 Message-ID: Content-Type: multipart/alternative; boundary="BBBMvg0DkfnojuIUqnZF" --BBBMvg0DkfnojuIUqnZF Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hi! I'm a new Yocto user trying to develop a fork of Chirpstack's Gateway OS (= https://github.com/brocaar/chirpstack-gateway-os ) for Raspberry Pi based = LoRaWAN gateways. Although I have successfully modified and added new recip= es, I'm struggling with adding a USB cellular modem to my image. I have a Huawei E303C USB modem and followed the instructions from the Emb= exus website ( https://embexus.com/2017/06/04/add-a-mobile-broadband-connec= tivity-to-embedded-linux/ ) with no success. It basically proposes using oF= ono + connman to create a network interface, but after running the instruct= ed commands, I get this error: $ sudo /usr/lib/ofono/test/activate-context Error activating /huawei_0/context1: org.ofono.Error.NotImplemented: Imple= mentation not provided As an additional step, I enabled roaming using the set-roaming-allowed scr= ipt in the oFono tests directory. I made the kernel configuration in layers= ( https://github.com/brocaar/chirpstack-gateway-os/tree/master/layers ) / = targets ( https://github.com/brocaar/chirpstack-gateway-os/tree/master/laye= rs/targets ) / meta-raspberrypi ( https://github.com/brocaar/chirpstack-gat= eway-os/tree/master/layers/targets/meta-raspberrypi ) / recipes-kernel ( ht= tps://github.com/brocaar/chirpstack-gateway-os/tree/master/layers/targets/m= eta-raspberrypi/recipes-kernel ) / linux ( https://github.com/brocaar/chirp= stack-gateway-os/tree/master/layers/targets/meta-raspberrypi/recipes-kernel= /linux ) /linux-raspberrypi_%.bbappend and the connman package conf igurati= on in meta ( https://github.com/brocaar/chirpstack-gateway-os/tree/master/m= eta ) / conf ( https://github.com/brocaar/chirpstack-gateway-os/tree/master= /meta/conf ) / distro ( https://github.com/brocaar/chirpstack-gateway-os/tr= ee/master/meta/conf/distro ) /chirpstack-gateway-os.conf. I considered installing NetworkManager from the OpenEmbedded layer. Still,= it has a declared conflict with connman, which is used to set a WIFI AP, a= nd I don't want to remove that feature. This is the output from the list-modems script: [ /huawei_0 ] Online =3D 1 Powered =3D 1 Lockdown =3D 0 Emergency =3D 0 Manufacturer =3D huawei Model =3D E303C Revision =3D 21.157.01.01.18 Serial =3D 867360018081349 SystemPath =3D /sys/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3 Interfaces =3D org.ofono.CellBroadcast org.ofono.NetworkRegistration org.o= fono.SupplementaryServices org.ofono.CallBarring org.ofono.CallSettings org= .ofono.CallForwarding org.ofono.MessageWaiting org.ofono.ConnectionManager = org.ofono.SmartMessaging org.ofono.PushNotification org.ofono.MessageManage= r org.ofono.RadioSettings org.ofono.Phonebook org.ofono.AudioSettings org.o= fono.VoiceCallManager org.ofono.AllowedAccessPoints org.ofono.SimManager Features =3D cbs net ussd gprs sms rat sim Type =3D hardware [ org.ofono.CellBroadcast ] Powered =3D 0 Topics =3D 2,4,36,50,118,135,255,555,569 [ org.ofono.NetworkRegistration ] Status =3D roaming Mode =3D auto Technology =3D umts MobileCountryCode =3D 334 MobileNetworkCode =3D 020 Name =3D EMnify (Mx Telcel GSM) Strength =3D 41 [ org.ofono.SupplementaryServices ] State =3D idle [ org.ofono.CallBarring ] VoiceOutgoing =3D disabled VoiceIncoming =3D disabled [ org.ofono.CallSettings ] CallingLinePresentation =3D enabled CallingNamePresentation =3D unknown ConnectedLinePresentation =3D disabled ConnectedLineRestriction =3D unknown CalledLinePresentation =3D disabled CallingLineRestriction =3D off HideCallerId =3D default VoiceCallWaiting =3D disabled [ org.ofono.CallForwarding ] VoiceUnconditional =3D VoiceBusy =3D VoiceNoReply =3D VoiceNoReplyTimeout =3D 20 VoiceNotReachable =3D ForwardingFlagOnSim =3D 0 [ org.ofono.MessageWaiting ] VoicemailWaiting =3D 0 VoicemailMessageCount =3D 0 VoicemailMailboxNumber =3D [ org.ofono.ConnectionManager ] Attached =3D 1 Bearer =3D umts RoamingAllowed =3D 1 Powered =3D 1 Suspended =3D 0 [ org.ofono.SmartMessaging ] [ org.ofono.PushNotification ] [ org.ofono.MessageManager ] ServiceCenterAddress =3D +42379010570 UseDeliveryReports =3D 0 Bearer =3D cs-preferred Alphabet =3D default [ org.ofono.RadioSettings ] [ org.ofono.Phonebook ] [ org.ofono.AudioSettings ] Active =3D 0 [ org.ofono.VoiceCallManager ] EmergencyNumbers =3D 118 110 08 911 000 112 999 119 [ org.ofono.AllowedAccessPoints ] [ org.ofono.SimManager ] Present =3D 1 CardIdentifier =3D 89883030000055775206 SubscriberIdentity =3D 295050901033049 ServiceProviderName =3D EMnify FixedDialing =3D 0 BarredDialing =3D 0 MobileCountryCode =3D 295 MobileNetworkCode =3D 05 SubscriberNumbers =3D LockedPins =3D PreferredLanguages =3D de en PinRequired =3D none Retries =3D [pin =3D 3] [pin2 =3D 3] [puk =3D 10] [puk2 =3D 10] CardSlotCount =3D 1 ActiveCardSlot =3D 1 --BBBMvg0DkfnojuIUqnZF Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable

Hi!
I'm a new Yocto user trying to develop a fork of Chirpstack's Gateway OS for Raspberry Pi based LoRaWAN gateways.= Although I have successfully modified and added new recipes, I'm strugglin= g with adding a USB cellular modem to my image.

I have a Huawei = E303C USB modem and followed the instructions from the Embexus website with no success. = It basically proposes using oFono + connman to create a network interface, = but after running the instructed commands, I get this error:

$ sudo /usr/lib/ofono/test/activate-context
Error activatin= g /huawei_0/context1: org.ofono.Error.NotImplemented: Implementation not pr= ovided

As an additional step, I enabled roaming using the s= et-roaming-allowed script in the oFono tests directory. I made the kernel c= onfiguration in la= yers/targets/meta-raspberrypi/recipes-kernel/linux/linux-raspberr= ypi_%.bbappend and the connman package configuration in meta/conf/distro/chirpstack-gate= way-os.conf.

 


I considered installing NetworkManager from the OpenEmbedded laye= r. Still, it has a declared conflict with connman, which is used to set a W= IFI AP, and I don't want to remove that feature.

This is the ou= tput from the list-modems script:
[ /huawei_0 ]
 &n= bsp;  Online =3D 1
    Powered =3D 1
 &n= bsp;  Lockdown =3D 0
    Emergency =3D 0
&nbs= p;   Manufacturer =3D huawei
    Model =3D E3= 03C
    Revision =3D 21.157.01.01.18
  &= nbsp; Serial =3D 867360018081349
    SystemPath =3D /sy= s/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3
    = Interfaces =3D org.ofono.CellBroadcast org.ofono.NetworkRegistration org.of= ono.SupplementaryServices org.ofono.CallBarring org.ofono.CallSettings org.= ofono.CallForwarding org.ofono.MessageWaiting org.ofono.ConnectionManager o= rg.ofono.SmartMessaging org.ofono.PushNotification org.ofono.MessageManager= org.ofono.RadioSettings org.ofono.Phonebook org.ofono.AudioSettings org.of= ono.VoiceCallManager org.ofono.AllowedAccessPoints org.ofono.SimManager     Features =3D cbs net ussd gprs sms rat sim
&nbs= p;   Type =3D hardware
    [ org.ofono.CellBr= oadcast ]
        Powered =3D 0
        Topics =3D 2,4,36,50,118,135,2= 55,555,569
    [ org.ofono.NetworkRegistration ]
&= nbsp;       Status =3D roaming
 &nb= sp;      Mode =3D auto
   &nbs= p;    Technology =3D umts
     = ;   MobileCountryCode =3D 334
     =    MobileNetworkCode =3D 020
     &= nbsp;  Name =3D EMnify (Mx Telcel GSM)
    &n= bsp;   Strength =3D 41
    [ org.ofono.Supple= mentaryServices ]
        State =3D= idle
    [ org.ofono.CallBarring ]
  &n= bsp;     VoiceOutgoing =3D disabled
  &n= bsp;     VoiceIncoming =3D disabled
  &n= bsp; [ org.ofono.CallSettings ]
      &n= bsp; CallingLinePresentation =3D enabled
     = ;   CallingNamePresentation =3D unknown
   &n= bsp;    ConnectedLinePresentation =3D disabled
 &n= bsp;      ConnectedLineRestriction =3D unknown
        CalledLinePresentation =3D dis= abled
        CallingLineRestrictio= n =3D off
        HideCallerId =3D = default
        VoiceCallWaiting = =3D disabled
    [ org.ofono.CallForwarding ]
&nb= sp;       VoiceUnconditional =3D
 =        VoiceBusy =3D
   =      VoiceNoReply =3D
    &nb= sp;   VoiceNoReplyTimeout =3D 20
    &nb= sp;   VoiceNotReachable =3D
     &= nbsp;  ForwardingFlagOnSim =3D 0
    [ org.ofono.M= essageWaiting ]
        VoicemailWa= iting =3D 0
        VoicemailMessag= eCount =3D 0
        VoicemailMailb= oxNumber =3D
    [ org.ofono.ConnectionManager ]
=         Attached =3D 1
  =       Bearer =3D umts
    = ;    RoamingAllowed =3D 1
     = ;   Powered =3D 1
       = Suspended =3D 0
    [ org.ofono.SmartMessaging ]
=     [ org.ofono.PushNotification ]
    [= org.ofono.MessageManager ]
       = ServiceCenterAddress =3D +42379010570
     &= nbsp;  UseDeliveryReports =3D 0
     &nb= sp;  Bearer =3D cs-preferred
      =   Alphabet =3D default
    [ org.ofono.RadioSettin= gs ]
    [ org.ofono.Phonebook ]
   = ; [ org.ofono.AudioSettings ]
      &nbs= p; Active =3D 0
    [ org.ofono.VoiceCallManager ]
        EmergencyNumbers =3D 118 110 08= 911 000 112 999 119
    [ org.ofono.AllowedAccessPoin= ts ]
    [ org.ofono.SimManager ]
  &nbs= p;     Present =3D 1
     = ;   CardIdentifier =3D 89883030000055775206
  &nbs= p;     SubscriberIdentity =3D 295050901033049
&nbs= p;       ServiceProviderName =3D EMnify
=         FixedDialing =3D 0
 &n= bsp;      BarredDialing =3D 0
  &nb= sp;     MobileCountryCode =3D 295
  &nbs= p;     MobileNetworkCode =3D 05
   =      SubscriberNumbers =3D
   &nbs= p;    LockedPins =3D
     &nb= sp;  PreferredLanguages =3D de en
     =    PinRequired =3D none
      =   Retries =3D [pin =3D 3] [pin2 =3D 3] [puk =3D 10] [puk2 =3D 10]
        CardSlotCount =3D 1
 = ;       ActiveCardSlot =3D 1



--BBBMvg0DkfnojuIUqnZF--