# mpd5 for LTE modem connection issue



## IPTRACE (Mar 19, 2020)

I've got an issue to connect to mobile LTE using mpd5 due to the following error.
Standard PPP conenction works but is slow (up to 30 Mb/s).

`root@server:~ # usbconfig ugen0.3
ugen0.3: <SimTech, Incorporated SimTech, Incorporated> at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (500mA)`


```
root@server:~ # cat /var/log/mpd.log
Mar 19 09:20:04 server mpd[78750]: Multi-link PPP daemon for FreeBSD
Mar 19 09:20:04 server mpd[78750]:
Mar 19 09:20:04 server mpd[78750]: process 78750 started, version 5.8 (root@121amd64-quarterly-job-12 08:16  4-Mar-2020)
Mar 19 09:20:04 server mpd[78750]: [tm] Bundle: Interface ng0 created
Mar 19 09:20:04 server mpd[78750]: [B-link] Link: OPEN event
Mar 19 09:20:04 server mpd[78750]: [B-link] LCP: Open event
Mar 19 09:20:04 server mpd[78750]: [B-link] LCP: state change Initial --> Starting
Mar 19 09:20:04 server mpd[78750]: [B-link] LCP: LayerStart
Mar 19 09:20:04 server mpd[78750]: [B-link] MODEM: chat script succeeded
Mar 19 09:20:04 server mpd[78750]: [B-link] Link: UP event
Mar 19 09:20:04 server mpd[78750]: [B-link] LCP: Up event
Mar 19 09:20:04 server mpd[78750]: [B-link] LCP: state change Starting --> Req-Sent
Mar 19 09:20:04 server mpd[78750]: [B-link] LCP: SendConfigReq #1
Mar 19 09:20:04 server mpd[78750]: [B-link]   ACFCOMP
Mar 19 09:20:04 server mpd[78750]: [B-link]   PROTOCOMP
Mar 19 09:20:04 server mpd[78750]: [B-link]   ACCMAP 0x000a0000
Mar 19 09:20:04 server mpd[78750]: [B-link]   MRU 1500
Mar 19 09:20:04 server mpd[78750]: [B-link]   MAGICNUM 0x7982f9b0
Mar 19 09:20:06 server mpd[78750]: [B-link] LCP: SendConfigReq #2
Mar 19 09:20:06 server mpd[78750]: [B-link]   ACFCOMP
Mar 19 09:20:06 server mpd[78750]: [B-link]   PROTOCOMP
Mar 19 09:20:06 server mpd[78750]: [B-link]   ACCMAP 0x000a0000
Mar 19 09:20:06 server mpd[78750]: [B-link]   MRU 1500
Mar 19 09:20:06 server mpd[78750]: [B-link]   MAGICNUM 0x7982f9b0
Mar 19 09:20:08 server mpd[78750]: [B-link] LCP: SendConfigReq #3
Mar 19 09:20:08 server mpd[78750]: [B-link]   ACFCOMP
Mar 19 09:20:08 server mpd[78750]: [B-link]   PROTOCOMP
Mar 19 09:20:08 server mpd[78750]: [B-link]   ACCMAP 0x000a0000
Mar 19 09:20:08 server mpd[78750]: [B-link]   MRU 1500
Mar 19 09:20:08 server mpd[78750]: [B-link]   MAGICNUM 0x7982f9b0
Mar 19 09:20:10 server mpd[78750]: [B-link] LCP: SendConfigReq #4
Mar 19 09:20:10 server mpd[78750]: [B-link]   ACFCOMP
Mar 19 09:20:10 server mpd[78750]: [B-link]   PROTOCOMP
Mar 19 09:20:10 server mpd[78750]: [B-link]   ACCMAP 0x000a0000
Mar 19 09:20:10 server mpd[78750]: [B-link]   MRU 1500
Mar 19 09:20:10 server mpd[78750]: [B-link]   MAGICNUM 0x7982f9b0
Mar 19 09:20:12 server mpd[78750]: [B-link] LCP: SendConfigReq #5
Mar 19 09:20:12 server mpd[78750]: [B-link]   ACFCOMP
Mar 19 09:20:12 server mpd[78750]: [B-link]   PROTOCOMP
Mar 19 09:20:12 server mpd[78750]: [B-link]   ACCMAP 0x000a0000
Mar 19 09:20:12 server mpd[78750]: [B-link]   MRU 1500
Mar 19 09:20:12 server mpd[78750]: [B-link]   MAGICNUM 0x7982f9b0
Mar 19 09:20:14 server mpd[78750]: [B-link] LCP: SendConfigReq #6
Mar 19 09:20:14 server mpd[78750]: [B-link]   ACFCOMP
Mar 19 09:20:14 server mpd[78750]: [B-link]   PROTOCOMP
Mar 19 09:20:14 server mpd[78750]: [B-link]   ACCMAP 0x000a0000
Mar 19 09:20:14 server mpd[78750]: [B-link]   MRU 1500
Mar 19 09:20:14 server mpd[78750]: [B-link]   MAGICNUM 0x7982f9b0
Mar 19 09:20:16 server mpd[78750]: [B-link] LCP: SendConfigReq #7
Mar 19 09:20:16 server mpd[78750]: [B-link]   ACFCOMP
Mar 19 09:20:16 server mpd[78750]: [B-link]   PROTOCOMP
Mar 19 09:20:16 server mpd[78750]: [B-link]   ACCMAP 0x000a0000
Mar 19 09:20:16 server mpd[78750]: [B-link]   MRU 1500
Mar 19 09:20:16 server mpd[78750]: [B-link]   MAGICNUM 0x7982f9b0
Mar 19 09:20:18 server mpd[78750]: [B-link] LCP: SendConfigReq #8
Mar 19 09:20:18 server mpd[78750]: [B-link]   ACFCOMP
Mar 19 09:20:18 server mpd[78750]: [B-link]   PROTOCOMP
Mar 19 09:20:18 server mpd[78750]: [B-link]   ACCMAP 0x000a0000
Mar 19 09:20:18 server mpd[78750]: [B-link]   MRU 1500
Mar 19 09:20:18 server mpd[78750]: [B-link]   MAGICNUM 0x7982f9b0
Mar 19 09:20:20 server mpd[78750]: [B-link] LCP: SendConfigReq #9
Mar 19 09:20:20 server mpd[78750]: [B-link]   ACFCOMP
Mar 19 09:20:20 server mpd[78750]: [B-link]   PROTOCOMP
Mar 19 09:20:20 server mpd[78750]: [B-link]   ACCMAP 0x000a0000
Mar 19 09:20:20 server mpd[78750]: [B-link]   MRU 1500
Mar 19 09:20:20 server mpd[78750]: [B-link]   MAGICNUM 0x7982f9b0
Mar 19 09:20:22 server mpd[78750]: [B-link] LCP: SendConfigReq #10
Mar 19 09:20:22 server mpd[78750]: [B-link]   ACFCOMP
Mar 19 09:20:22 server mpd[78750]: [B-link]   PROTOCOMP
Mar 19 09:20:22 server mpd[78750]: [B-link]   ACCMAP 0x000a0000
Mar 19 09:20:22 server mpd[78750]: [B-link]   MRU 1500
Mar 19 09:20:22 server mpd[78750]: [B-link]   MAGICNUM 0x7982f9b0
Mar 19 09:20:24 server mpd[78750]: [B-link] LCP: parameter negotiation failed
Mar 19 09:20:24 server mpd[78750]: [B-link] LCP: state change Req-Sent --> Stopped
Mar 19 09:20:24 server mpd[78750]: [B-link] LCP: LayerFinish
Mar 19 09:20:24 server mpd[78750]: [B-link] Link: DOWN event
Mar 19 09:20:24 server mpd[78750]: [B-link] LCP: Close event
Mar 19 09:20:24 server mpd[78750]: [B-link] LCP: state change Stopped --> Closed
Mar 19 09:20:24 server mpd[78750]: [B-link] LCP: Down event
Mar 19 09:20:24 server mpd[78750]: [B-link] LCP: state change Closed --> Initial
Mar 19 09:20:32 server mpd[78750]: caught fatal signal TERM
Mar 19 09:20:32 server mpd[78750]: [tm] IFACE: Close event
Mar 19 09:20:32 server mpd[78750]: [tm] IPCP: Close event
Mar 19 09:20:32 server mpd[78750]: [tm] CCP: Close event
Mar 19 09:20:32 server mpd[78750]: [tm] ECP: Close event
Mar 19 09:20:34 server mpd[78750]: [tm] Bundle: Shutdown
Mar 19 09:20:35 server mpd[78750]: [B-link] Link: Shutdown
Mar 19 09:20:35 server mpd[78750]: process 78750 terminated
```

Below is my mpd5 configuration.


```
root@server:~ # cat /usr/local/etc/mpd5/mpd.conf
startup:
        # configure mpd users
        #set user foo bar admin
        #set user foo1 bar1
        # configure the console
        #set console self 127.0.0.1 5005
        #set console open
        # configure the web server
        #set web self 0.0.0.0 5006
        #set web open

default:
        load tm

tm:
        create bundle static tm
        set bundle links B-Link
        set bundle enable ipcp
        set bundle enable compression
        set bundle enable encryption
        set iface route default
        set ipcp ranges 0.0.0.0/0 10.0.0.1/32
        set ipcp enable req-pri-dns
        set ipcp enable req-sec-dns
        set iface enable nat
        create link static B-link modem
        set link action bundle tm
        set modem device /dev/cuaU0.2
        set modem speed 921600
        set modem script dial-tm
        set modem watch -cd
        set modem watch -dsr
        set link keep-alive 6 60
        #set link max-redial 0
        open

root@server:~ # cat /usr/local/etc/mpd5/mpd.script
dial-tm:
        print 'AT+CGDCONT=1,"IP","data"\r\n'
        match OK
        print "ATDT*99#\r\n"
        match CONNECTED
        success
        print 'AT'
        match OK
        print 'ATZ'
        match OK
        print 'AT+CFUN=1'
        match OK
        print 'AT+CMEE=2'
        match OK
        print 'AT+CSQ'
        match OK
        print 'AT+CGDCONT=1,\\\"IP\\\",\\\"data\\\"'
        match OK
        print 'AT+CGACT?'
        match OK
        print 'AT+CGATT?'
        match OK
        print 'ATCGCLASS?'
        match OK
        print 'AT+COPS?'
        match OK
        print 'ATD*99#'
        match OK Connected
        failure

Connected:
        success
```


----------



## Phishfry (Mar 19, 2020)

I posted my config in this post:








						FreeBSD and SmartCard adapter
					

I have laptop HP 8460p with smart Card adapter, and I have mobile (sim Card) network connection. If exist any way to use SC adapter to connection to network?




					forums.freebsd.org


----------



## IPTRACE (Mar 19, 2020)

Yes, I used it as you have already seen. It does not work.


----------

