Menu

Problems with Sierra Wireless EM7421

Help
2024-09-13
2024-09-18
  • Ari Suutari

    Ari Suutari - 2024-09-13

    Hi,

    I have a FreeBSD 13.3 machine with Sierra Wireless EM7421 LTE/4G modem. I have been trying to get mpd5 (mpd5-5.9_18) working with without much success. The configuration I'm using is the same which works with older devices having SimTech modems.

    My configuration looks like this:

    mobile:
            create bundle static mobile
            set bundle links B-Link
            set bundle enable ipcp
            set bundle enable compression
            set iface route default
            set ipcp ranges 0.0.0.0/0 10.0.0.1/0
            set ipcp enable req-pri-dns
            set ipcp enable req-sec-dns
            set iface enable nat
            set iface up-script /usr/local/etc/mpd5/up.script
            set iface down-script /usr/local/etc/mpd5/down.script
            log +chat +link2 +phys2 +lcp255 +ipcp2 +frame +fsm2 +bund2 +ccp2 +chat2
            create link static B-Link modem
            set link action bundle mobile
            set modem device /dev/cuaU0.2
            set modem speed 921600
            set modem script dial-mobile
            set modem watch -cd
            set modem watch -dsr
            set auth authname dummy
            set auth password dummy
            set link keep-alive 6 60
            set link max-redial 0
            open
    

    When started, everything seems to come up but immediately after that I see this in log:

    mpd[3393]: [B-Link] LCP: rec'd Terminate Request #66 (Opened)
    mpd[3393]: [B-Link] LCP: state change Opened --> Stopping
    

    and the connection closes. I'll attach the complete logfile.

    The modem itself seems to work, because when I try to use it with user-level ppp in FreeBSD, connection comes up and stays up. However, I would prefer to use mpd, but don't understand what is wrong with my configuration.

    If I disable ipcp then lcp stays up, but the connection is obviously quite useless then.

     
  • Eugene Grosbein

    Eugene Grosbein - 2024-09-14

    First, disable IPCP vjcomp option as remote side rejects it anyway:

    set ipcp disable vjcomp

    And retry. If it does not help, please collect similar log of user-level ppp that includes IPCP negotiation to compare, and post it.

     
  • Eugene Grosbein

    Eugene Grosbein - 2024-09-14

    Also, remote side rejects CCP protocol, so change "set bundle enable compression" to "set bundle disable compression"

     
  • Ari Suutari

    Ari Suutari - 2024-09-16

    Disabling vjcomp and CCP didn't help. Here is mpd2.log from connection attempt with those disabled. I'll attach also ppp.log from user-level ppp which contains successful negotiation.

     
    • Eugene Grosbein

      Eugene Grosbein - 2024-09-16

      The only notable difference left is accmap option, try to add this:
      set link accmap 0

       
      • Ari Suutari

        Ari Suutari - 2024-09-16

        Unfortunately, with this change, it still behaves same as before.

         
        • Eugene Grosbein

          Eugene Grosbein - 2024-09-16

          Anyway, please post latest mpd log.

           
  • Ari Suutari

    Ari Suutari - 2024-09-16

    Here is the latest log.

     
    • Eugene Grosbein

      Eugene Grosbein - 2024-09-16

      The log shows the following:

      Sep 16 12:08:38 box-174 mpd[6329]: [B-Link] LCP: SendIdent #1
      Sep 16 12:08:38 box-174 mpd[6329]: [B-Link]   MESG: synciot
      Sep 16 12:08:38 box-174 mpd[6329]: [B-Link] xmit frame to link proto=0xc021
      Sep 16 12:08:38 box-174 mpd[6329]:     ff 03 c0 21 0c 01 00 10 21 10 f1 31 73 79 6e 63  ...!....!..1sync
      Sep 16 12:08:38 box-174 mpd[6329]:     69 6f 74 00
      

      The documentation https://mpd.sourceforge.net/doc5/mpd20.html#20 tells:

      set link ident string
      
          This enables the sending of an identification string
      to the peer via the LCP Ident code. The Ident string is sent when
      the link is brought up. This is useful for debugging, etc. and is
      meant to be human-readable. However, it confuses some broken
      PPP implementations.
      
          Setting an empty string disables this feature; this is the default.
      

      Your configuration above does not include "set link ident" but you seem to have it really. Comment it out and retry.

       

      Last edit: Eugene Grosbein 2024-09-16
      • Ari Suutari

        Ari Suutari - 2024-09-16

        Oh yes, I tried to add it because there was something similar in ppp.log. Removed now, fresh log and config attached.

         
        • Eugene Grosbein

          Eugene Grosbein - 2024-09-16

          OTOH, maybe other side wants to serve only "known" PPP clients. Try to pretend this is user-ppp:

          set link ident "user-ppp 3.4.2"

           

          Last edit: Eugene Grosbein 2024-09-16
          • Ari Suutari

            Ari Suutari - 2024-09-16

            Tried that. Unfortunately no luck.

             
            • Eugene Grosbein

              Eugene Grosbein - 2024-09-16

              Perhaps, your ISP somehow detects you are "sharing" the connection among multiple devices while it does not permit that? Try filtering all IP traffic running over ng0 interface for some time to see if termination delays, too?

               
              • Ari Suutari

                Ari Suutari - 2024-09-17

                It's not ISP I'm talking to. It's LTE/4G modem, which uses PPP between it and host system. This is very common with such devices, but there is now PPP going out from modem's radio!

                https://source.sierrawireless.com/resources/airprime/minicard/75xx/41111748-airprime-em75xx-at-command-reference/

                Section 13 in manual "GSM/WCDMA AT COMMANDS", page 131.

                As these modems can achive quite high network speeds, we have been preferring mpd5 instead FreeBSD's user mode ppp (which pushes all the traffic thru user mode process).

                 
                • Eugene Grosbein

                  Eugene Grosbein - 2024-09-17

                  Make sure that your AT-commands script for the modem initializes it exactly same way as one for user-ppp.

                   
                  • Ari Suutari

                    Ari Suutari - 2024-09-17

                    There is only one relevant initialization setting in mpd.script (AT+CGDCONT), which is same for both.

                     
  • Ari Suutari

    Ari Suutari - 2024-09-17

    Is it possible to have mpd5 log serial line data ? Something like this in user-mode ppp:

    Sep 17 10:00:59 synciot-174 ppp[28658]: tun1: Debug: proto_LayerPush: Using 0xc021
    Sep 17 10:00:59 synciot-174 ppp[28658]: tun1: HDLC: hdlc_Output
    Sep 17 10:00:59 synciot-174 ppp[28658]: tun1: HDLC:  ff 03 c0 21 01 01 00 18 08 02 07 02 02 06 00 00  ...!............
    Sep 17 10:00:59 synciot-174 ppp[28658]: tun1: HDLC:  00 00 01 04 05 dc 05 06 8f d7 8c 75 33 58        ...........u3X
    
     
    • Eugene Grosbein

      Eugene Grosbein - 2024-09-17

      Your logs already have it, for example:

      Sep 16 12:08:38 box-174 mpd[6329]: [B-Link] rec'd 27 bytes frame from link proto=0xc021
      Sep 16 12:08:38 box-174 mpd[6329]:     c0 21 01 06 00 19 02 06 00 00 00 00 03 05 c2 23  .!.............#
      Sep 16 12:08:38 box-174 mpd[6329]:     05 05 06 3a 14 eb db 07 02 08 02                 ...:.......
      
       
    • Eugene Grosbein

      Eugene Grosbein - 2024-09-17

      You could find useful ktrace(1) kernel facility to record system calls and sent/received data of mpd5 process:

      ktrace -i mpd5 ...
      kdump
      
       
  • Ari Suutari

    Ari Suutari - 2024-09-18

    I'm starting to suspect that problem is not in mpd5, but in ng_ kernel modules that are being used here. If I disable ipcp the link stays up. And ipcp happens in ng_ module (as far as I understand).

     
  • Ari Suutari

    Ari Suutari - 2024-09-18

    Upgraded to FreeBSD 14.1 and now it works.

     

Log in to post a comment.

MongoDB Logo MongoDB