USB Broadband

I booted up Linux Debian on my ThinkPad T420 earlier, inserted a VodaFone USB Broadband stick, clicked on Broadband connection and it connected automatically, and a PPP connection was set up. I've never figured out how to do this on FreeBSD. I've spent many hours pouring over this but never figured it out. I know it's supposed to be straightforward, but I'm missing something.

Any step by step guide would be appreciated.
 
Well it sounds easy enough... but....

From what I can make out I just need to run ppp -ddial 3g where 3g is a section in /etc/ppp/ppp.conf
Code:
3g:
  set device /dev/cuaU0
  set speed 921600
  set dial "ABORT BUSY ABORT NO\\sCARRIER TIMEOUT 5 \
   \"\" AT OK-AT-OK \
   AT+CFUN=1 OK \
   AT+COPS=0 OK \
   AT+CGDCONT=1,\\\"IP\\\",\\\"www.plusgsm.pl\\\" OK \
   \dATDT\\T TIMEOUT 80 CONNECT"
  set logout "ABORT BUSY ABORT ERROR TIMEOUT 60 \"\" +++ATH O ATH OK"
  set phone *99\#
  set timeout 300
  set ifaddr 10.64.64.64/0 10.64.64.64/0 255.255.255.255 0.0.0.0
  add default HISADDR
  enable dns
  disable ipv6cp
as per Thread 61889

So I run ppp -ddial 3g and then see this from ifconfig:-
Code:
tun0: flags=8050<POINTOPOINT,RUNNING,MULTICAST> metric 0 mtu 1500
   options=80000<LINKSTATE>
   nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
   groups: tun
   Opened by PID 1135
Seems like something is missing....

lsusb:-
Code:
Bus /dev/usb Device /dev/ugen1.3: ID 12d1:1001 Huawei Technologies Co., Ltd. E161/E169/E620/E800 HSDPA Modem
The modem emits a blue flash every 5 seconds, although I don't know what this signifies.

Any comments appreciated.
 
Have you checked the logs to see what its doing?
/var/log/ppp.log

You may have to enable logging with this line in /etc/ppp/ppp.conf
Code:
set log Phase Chat LCP IPCP CCP tun command
 
/var/log/ppp.log
Code:
Jan 21 10:25:10 Test ppp[1047]: tun0: Phase: deflink: opening -> dial
Jan 21 10:25:10 Test ppp[1047]: tun0: Chat: Send: AT^M
Jan 21 10:25:10 Test ppp[1047]: tun0: Chat: Expect(2): OK
Jan 21 10:25:10 Test ppp[1047]: tun0: Chat: Received: AT^M^M
Jan 21 10:25:10 Test ppp[1047]: tun0: Chat: Received: OK^M
Jan 21 10:25:10 Test ppp[1047]: tun0: Chat: Send: AT+CFUN=1^M
Jan 21 10:25:10 Test ppp[1047]: tun0: Chat: Expect(2): OK
Jan 21 10:25:10 Test ppp[1047]: tun0: Chat: Received: AT+CFUN=1^M^M
Jan 21 10:25:10 Test ppp[1047]: tun0: Chat: Received: OK^M
Jan 21 10:25:10 Test ppp[1047]: tun0: Chat: Send: AT+CMEE=2^M
Jan 21 10:25:10 Test ppp[1047]: tun0: Chat: Expect(2): OK
Jan 21 10:25:10 Test ppp[1047]: tun0: Chat: Received: AT+CMEE=2^M^M
Jan 21 10:25:10 Test ppp[1047]: tun0: Chat: Received: OK^M
Jan 21 10:25:10 Test ppp[1047]: tun0: Chat: Send: AT+CSQ^M
Jan 21 10:25:10 Test ppp[1047]: tun0: Chat: Expect(2): OK
Jan 21 10:25:10 Test ppp[1047]: tun0: Chat: Received: AT+CSQ^M^M
Jan 21 10:25:10 Test ppp[1047]: tun0: Chat: Received: +CSQ: 9,99^M
Jan 21 10:25:10 Test ppp[1047]: tun0: Chat: Received: ^M
Jan 21 10:25:10 Test ppp[1047]: tun0: Chat: Received: OK^M
Jan 21 10:25:10 Test ppp[1047]: tun0: Chat: Send: AT+CGDCONT=1,"IP","internet"^M
Jan 21 10:25:10 Test ppp[1047]: tun0: Chat: Expect(2): OK
Jan 21 10:25:10 Test ppp[1047]: tun0: Chat: Received: AT+CGDCONT=1,"IP","internet"^M^M
Jan 21 10:25:10 Test ppp[1047]: tun0: Chat: Received: OK^M
Jan 21 10:25:10 Test ppp[1047]: tun0: Chat: Send: ATD*99#^M
Jan 21 10:25:10 Test ppp[1047]: tun0: Chat: Expect(2): CONNECT
Jan 21 10:25:10 Test ppp[1047]: tun0: Chat: Received: ATD*99#^M^M
Jan 21 10:25:10 Test ppp[1047]: tun0: Chat: Received: NO CARRIER^M
Jan 21 10:25:12 Test ppp[1047]: tun0: Chat: Expect timeout
Jan 21 10:25:12 Test ppp[1047]: tun0: Warning: Chat script failed
Jan 21 10:25:12 Test ppp[1047]: tun0: Phase: deflink: dial -> hangup
Jan 21 10:25:12 Test ppp[1047]: tun0: Phase: deflink: Disconnected!
Jan 21 10:25:12 Test ppp[1047]: tun0: Phase: deflink: Connect time: 2 secs: 0 octets in, 0 octets out
Jan 21 10:25:12 Test ppp[1047]: tun0: Phase: deflink: 0 packets in, 0 packets out
Jan 21 10:25:12 Test ppp[1047]: tun0: Phase:  total 0 bytes/sec, peak 0 bytes/sec on Sun Jan 21 10:25:10 2018
Jan 21 10:25:12 Test ppp[1047]: tun0: Phase: deflink: hangup -> opening
Jan 21 10:25:12 Test ppp[1047]: tun0: Phase: deflink: Enter pause (30) for redialing.

This is the /etc/ppp/ppp.conf that was used:-
Code:
default:
 set log Phase Chat LCP IPCP CCP tun command
 set device /dev/cuaU0.0
 set speed 921600
 set timeout 0
 set authname wapuser1
 set authkey wap
 set dial "ABORT BUSY TIMEOUT 2 \
    \"\" \
    AT OK-AT-OK \
    AT+CFUN=1 OK-AT-OK \
    AT+CMEE=2 OK-AT-OK \
    AT+CSQ OK \
    AT+CGDCONT=1,\\\"IP\\\",\\\"internet\\\" OK \
    ATD*99# CONNECT"
 enable dns
 resolv writable
 set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.255 0.0.0.0
 add default HISADDR

Not sure about device or speed.

I did try this on TrueOS and it worked which is confusing...

 
tun0: Warning: Chat script failed
This is your problem.

Try removing these lines(sims do not require auth)
Code:
 set authname wapuser1
 set authkey wap

Also note in the thread you posted. My setup puts a timeout up top where you have zero.
https://forums.freebsd.org/threads/61889/#post-358754

There is also the possibility that your modem uses a different AT commands for connection.
Mine is Sierra based.
The Extended Command set is not official and varies from vendor. Huawei might be different.
 
When I run ppp a second time it uses tun1 and I don't know if the com port is still in use, so I have to reboot before a retest....

Also I get
Code:
root@Test:~/ # ppp -ddial default
Working in ddial mode
Warning: Add route failed: 0.0.0.0: errno: Value too large to be stored in data type
Warning: Add route failed: 0.0.0.0: errno: Value too large to be stored in data type
Using interface: tun1

Is this an error?
 
/etc/ppp/ppp.conf:-
Code:
default:
 set log Phase Chat LCP IPCP CCP tun command
 set device /dev/cuaU0.0
 set speed 921600
 set timeout 180
 set dial "ABORT BUSY TIMEOUT 2 \
    \"\" \
    AT OK-AT-OK \
    AT+CFUN=1 OK-AT-OK \
    AT+CMEE=2 OK-AT-OK \
    AT+CSQ OK \
    AT+CGDCONT=1,\\\"IP\\\",\\\"internet\\\" OK \
    ATD*99# CONNECT"
 enable dns
 resolv writable
 set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.255 0.0.0.0
 add default HISADDR

/var/log/ppp.log:-
Code:
Jan 21 11:54:42 Test newsyslog[710]: logfile first created
Jan 21 11:55:55 Test ppp[1067]: Phase: Using interface: tun0
Jan 21 11:55:55 Test ppp[1067]: Phase: deflink: Created in closed state
Jan 21 11:55:55 Test ppp[1067]: tun0: Command: default: set device /dev/cuaU0.0
Jan 21 11:55:55 Test ppp[1067]: tun0: Command: default: set speed 921600
Jan 21 11:55:55 Test ppp[1067]: tun0: Command: default: set timeout 180
Jan 21 11:55:55 Test ppp[1067]: tun0: Command: default: set dial ABORT BUSY TIMEOUT 2     ""     AT OK-AT-OK     AT+CFUN=1 OK-AT-OK     AT+CMEE=2 OK-AT-OK     AT+CSQ OK     AT+CGDCONT=1,\"IP\",\"internet\" OK     ATD*99# CONNECT
Jan 21 11:55:55 Test ppp[1067]: tun0: Command: default: enable dns
Jan 21 11:55:55 Test ppp[1067]: tun0: Command: default: resolv writable
Jan 21 11:55:55 Test ppp[1067]: tun0: Command: default: set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.255 0.0.0.0
Jan 21 11:55:55 Test ppp[1067]: tun0: Command: default: add default HISADDR
Jan 21 11:55:55 Test ppp[1067]: tun0: Warning: Add route failed: 0.0.0.0: errno: Value too large to be stored in data type
Jan 21 11:55:55 Test ppp[1067]: tun0: Command: default: set log Phase Chat LCP IPCP CCP tun command
Jan 21 11:55:55 Test ppp[1067]: tun0: Command: default: set device /dev/cuaU0.0
Jan 21 11:55:55 Test ppp[1067]: tun0: Command: default: set speed 921600
Jan 21 11:55:55 Test ppp[1067]: tun0: Command: default: set timeout 180
Jan 21 11:55:55 Test ppp[1067]: tun0: Command: default: set dial ABORT BUSY TIMEOUT 2     ""     AT OK-AT-OK     AT+CFUN=1 OK-AT-OK     AT+CMEE=2 OK-AT-OK     AT+CSQ OK     AT+CGDCONT=1,\"IP\",\"internet\" OK     ATD*99# CONNECT
Jan 21 11:55:55 Test ppp[1067]: tun0: Command: default: enable dns
Jan 21 11:55:55 Test ppp[1067]: tun0: Command: default: resolv writable
Jan 21 11:55:55 Test ppp[1067]: tun0: Command: default: set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.255 0.0.0.0
Jan 21 11:55:55 Test ppp[1067]: tun0: Command: default: add default HISADDR
Jan 21 11:55:55 Test ppp[1067]: tun0: Warning: Add route failed: 0.0.0.0: errno: Value too large to be stored in data type
Jan 21 11:55:55 Test ppp[1069]: tun0: Phase: PPP Started (ddial mode).
Jan 21 11:55:55 Test ppp[1069]: tun0: Phase: bundle: Establish
Jan 21 11:55:55 Test ppp[1069]: tun0: Phase: deflink: closed -> opening
Jan 21 11:55:55 Test ppp[1069]: tun0: Phase: deflink: Connected!
Jan 21 11:55:55 Test ppp[1069]: tun0: Phase: deflink: opening -> dial
Jan 21 11:55:55 Test ppp[1069]: tun0: Chat: Send: AT^M
Jan 21 11:55:55 Test ppp[1069]: tun0: Chat: Expect(2): OK
Jan 21 11:55:55 Test ppp[1069]: tun0: Chat: Received: AT^M^M
Jan 21 11:55:55 Test ppp[1069]: tun0: Chat: Received: OK^M
Jan 21 11:55:55 Test ppp[1069]: tun0: Chat: Send: AT+CFUN=1^M
Jan 21 11:55:55 Test ppp[1069]: tun0: Chat: Expect(2): OK
Jan 21 11:55:55 Test ppp[1069]: tun0: Chat: Received: AT+CFUN=1^M^M
Jan 21 11:55:55 Test ppp[1069]: tun0: Chat: Received: OK^M
Jan 21 11:55:55 Test ppp[1069]: tun0: Chat: Send: AT+CMEE=2^M
Jan 21 11:55:55 Test ppp[1069]: tun0: Chat: Expect(2): OK
Jan 21 11:55:55 Test ppp[1069]: tun0: Chat: Received: AT+CMEE=2^M^M
Jan 21 11:55:55 Test ppp[1069]: tun0: Chat: Received: OK^M
Jan 21 11:55:55 Test ppp[1069]: tun0: Chat: Send: AT+CSQ^M
Jan 21 11:55:55 Test ppp[1069]: tun0: Chat: Expect(2): OK
Jan 21 11:55:55 Test ppp[1069]: tun0: Chat: Received: AT+CSQ^M^M
Jan 21 11:55:55 Test ppp[1069]: tun0: Chat: Received: +CSQ: 9,99^M
Jan 21 11:55:55 Test ppp[1069]: tun0: Chat: Received: ^M
Jan 21 11:55:55 Test ppp[1069]: tun0: Chat: Received: OK^M
Jan 21 11:55:55 Test ppp[1069]: tun0: Chat: Send: AT+CGDCONT=1,"IP","internet"^M
Jan 21 11:55:55 Test ppp[1069]: tun0: Chat: Expect(2): OK
Jan 21 11:55:55 Test ppp[1069]: tun0: Chat: Received: AT+CGDCONT=1,"IP","internet"^M^M
Jan 21 11:55:55 Test ppp[1069]: tun0: Chat: Received: OK^M
Jan 21 11:55:55 Test ppp[1069]: tun0: Chat: Send: ATD*99#^M
Jan 21 11:55:55 Test ppp[1069]: tun0: Chat: Expect(2): CONNECT
Jan 21 11:55:55 Test ppp[1069]: tun0: Chat: Received: ATD*99#^M^M
Jan 21 11:55:55 Test ppp[1069]: tun0: Chat: Received: NO CARRIER^M
Jan 21 11:55:57 Test ppp[1069]: tun0: Chat: Expect timeout
Jan 21 11:55:57 Test ppp[1069]: tun0: Warning: Chat script failed
Jan 21 11:55:57 Test ppp[1069]: tun0: Phase: deflink: dial -> hangup
Jan 21 11:55:57 Test ppp[1069]: tun0: Phase: deflink: Disconnected!
Jan 21 11:55:57 Test ppp[1069]: tun0: Phase: deflink: Connect time: 2 secs: 0 octets in, 0 octets out
Jan 21 11:55:57 Test ppp[1069]: tun0: Phase: deflink: 0 packets in, 0 packets out
Jan 21 11:55:57 Test ppp[1069]: tun0: Phase:  total 0 bytes/sec, peak 0 bytes/sec on Sun Jan 21 11:55:55 2018
Jan 21 11:55:57 Test ppp[1069]: tun0: Phase: deflink: hangup -> opening
Jan 21 11:55:57 Test ppp[1069]: tun0: Phase: deflink: Enter pause (30) for redialing.
Jan 21 11:56:27 Test ppp[1069]: tun0: Chat: deflink: Redial timer expired.
Jan 21 11:56:27 Test ppp[1069]: tun0: Phase: deflink: Connected!
Jan 21 11:56:27 Test ppp[1069]: tun0: Phase: deflink: opening -> dial
Jan 21 11:56:27 Test ppp[1069]: tun0: Chat: Send: AT^M
Jan 21 11:56:27 Test ppp[1069]: tun0: Chat: Expect(2): OK
Jan 21 11:56:27 Test ppp[1069]: tun0: Chat: Received: AT^M^M
Jan 21 11:56:27 Test ppp[1069]: tun0: Chat: Received: OK^M
Jan 21 11:56:27 Test ppp[1069]: tun0: Chat: Send: AT+CFUN=1^M
Jan 21 11:56:27 Test ppp[1069]: tun0: Chat: Expect(2): OK
Jan 21 11:56:27 Test ppp[1069]: tun0: Chat: Received: AT+CFUN=1^M^M
Jan 21 11:56:27 Test ppp[1069]: tun0: Chat: Received: OK^M
Jan 21 11:56:27 Test ppp[1069]: tun0: Chat: Send: AT+CMEE=2^M
Jan 21 11:56:27 Test ppp[1069]: tun0: Chat: Expect(2): OK
Jan 21 11:56:27 Test ppp[1069]: tun0: Chat: Received: AT+CMEE=2^M^M
Jan 21 11:56:27 Test ppp[1069]: tun0: Chat: Received: OK^M
Jan 21 11:56:27 Test ppp[1069]: tun0: Chat: Send: AT+CSQ^M
Jan 21 11:56:27 Test ppp[1069]: tun0: Chat: Expect(2): OK
Jan 21 11:56:27 Test ppp[1069]: tun0: Chat: Received: AT+CSQ^M^M
Jan 21 11:56:27 Test ppp[1069]: tun0: Chat: Received: +CSQ: 9,99^M
Jan 21 11:56:27 Test ppp[1069]: tun0: Chat: Received: ^M
Jan 21 11:56:27 Test ppp[1069]: tun0: Chat: Received: OK^M
Jan 21 11:56:27 Test ppp[1069]: tun0: Chat: Send: AT+CGDCONT=1,"IP","internet"^M
Jan 21 11:56:27 Test ppp[1069]: tun0: Chat: Expect(2): OK
Jan 21 11:56:27 Test ppp[1069]: tun0: Chat: Received: AT+CGDCONT=1,"IP","internet"^M^M
Jan 21 11:56:27 Test ppp[1069]: tun0: Chat: Received: OK^M
Jan 21 11:56:27 Test ppp[1069]: tun0: Chat: Send: ATD*99#^M
Jan 21 11:56:27 Test ppp[1069]: tun0: Chat: Expect(2): CONNECT
Jan 21 11:56:27 Test ppp[1069]: tun0: Chat: Received: ATD*99#^M^M
Jan 21 11:56:27 Test ppp[1069]: tun0: Chat: Received: NO CARRIER^M
Jan 21 11:56:29 Test ppp[1069]: tun0: Chat: Expect timeout
Jan 21 11:56:29 Test ppp[1069]: tun0: Warning: Chat script failed
Jan 21 11:56:29 Test ppp[1069]: tun0: Phase: deflink: dial -> hangup
Jan 21 11:56:29 Test ppp[1069]: tun0: Phase: deflink: Disconnected!
Jan 21 11:56:29 Test ppp[1069]: tun0: Phase: deflink: Connect time: 2 secs: 0 octets in, 0 octets out
Jan 21 11:56:29 Test ppp[1069]: tun0: Phase: deflink: 0 packets in, 0 packets out
Jan 21 11:56:29 Test ppp[1069]: tun0: Phase:  total 0 bytes/sec, peak 0 bytes/sec on Sun Jan 21 11:56:27 2018
Jan 21 11:56:29 Test ppp[1069]: tun0: Phase: deflink: hangup -> opening
Jan 21 11:56:29 Test ppp[1069]: tun0: Phase: deflink: Enter pause (30) for redialing.
Jan 21 11:56:59 Test ppp[1069]: tun0: Chat: deflink: Redial timer expired.
ifconfig:-
Code:
tun0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> metric 0 mtu 1500
   options=80000<LINKSTATE>
   nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
   groups: tun
   Opened by PID 1069
 
Yes you need to reboot on each try. I see that even on mine. If I disconnect then reconnect it makes a new tunnel and fails.Needs to be tun0.
Probably need to destroy the old tunnel first at disconnect. Reboot does the trick.
 
TrueOS - uname -a:-
Code:
FreeBSD S06 12.0-CURRENT FreeBSD 12.0-CURRENT #10 d26791952(trueos-stable-17.12): Sat Dec  9 18:10:09 UTC 2017     root@chimera:/usr/obj/usr/src/amd64.amd64/sys/GENERIC  amd64

/etc/ppp/ppp.conf
Code:
default:
 set log Phase Chat LCP IPCP CCP tun command
 set device /dev/cuaU0.0
 set speed 921600
 set timeout 180
 set dial "ABORT BUSY TIMEOUT 2 \
    \"\" \
    AT OK-AT-OK \
    AT+CFUN=1 OK-AT-OK \
    AT+CMEE=2 OK-AT-OK \
    AT+CSQ OK \
    AT+CGDCONT=1,\\\"IP\\\",\\\"internet\\\" OK \
    ATD*99# CONNECT"
 enable dns
 resolv writable
 set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.255 0.0.0.0
 add default HISADDR

Code:
ppp -ddial default
Working in ddial mode
Using interface: tun0

ifconfig:-
Code:
tun0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> metric 0 mtu 1500
        options=80000<LINKSTATE>
        inet 10.77.47.203 --> 10.0.0.2 netmask 0xffffffff
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
        groups: tun
        Opened by PID 28603

/var/log/ppp.log
Code:
Jan 21 15:24:58  ppp[28598]: Phase: Using interface: tun0
Jan 21 15:24:58  ppp[28598]: Phase: deflink: Created in closed state
Jan 21 15:24:58  ppp[28598]: tun0: Command: default: set device /dev/cuaU0.0
Jan 21 15:24:58  ppp[28598]: tun0: Command: default: set speed 921600
Jan 21 15:24:58  ppp[28598]: tun0: Command: default: set timeout 180
Jan 21 15:24:58  ppp[28598]: tun0: Command: default: set dial ABORT BUSY TIMEOUT 2     ""     AT OK-AT-OK     AT+CFUN=1 OK-AT-OK     AT+CMEE=2 OK-AT-OK     AT+CSQ OK     AT+CGDCONT=1,\"IP\",\"internet\" OK     ATD*99# CONNECT
Jan 21 15:24:58  ppp[28598]: tun0: Command: default: enable dns
Jan 21 15:24:58  ppp[28598]: tun0: Command: default: resolv writable
Jan 21 15:24:58  ppp[28598]: tun0: Command: default: set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.255 0.0.0.0
Jan 21 15:24:58  ppp[28598]: tun0: Command: default: add default HISADDR
Jan 21 15:24:58  ppp[28598]: tun0: Command: default: set log Phase Chat LCP IPCP CCP tun command
Jan 21 15:24:58  ppp[28598]: tun0: Command: default: set device /dev/cuaU0.0
Jan 21 15:24:58  ppp[28598]: tun0: Command: default: set speed 921600
Jan 21 15:24:58  ppp[28598]: tun0: Command: default: set timeout 180
Jan 21 15:24:58  ppp[28598]: tun0: Command: default: set dial ABORT BUSY TIMEOUT 2     ""     AT OK-AT-OK     AT+CFUN=1 OK-AT-OK     AT+CMEE=2 OK-AT-OK     AT+CSQ OK     AT+CGDCONT=1,\"IP\",\"internet\" OK     ATD*99# CONNECT
Jan 21 15:24:58  ppp[28598]: tun0: Command: default: enable dns
Jan 21 15:24:58  ppp[28598]: tun0: Command: default: resolv writable
Jan 21 15:24:58  ppp[28598]: tun0: Command: default: set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.255 0.0.0.0
Jan 21 15:24:58  ppp[28598]: tun0: Command: default: add default HISADDR
Jan 21 15:24:58  ppp[28603]: tun0: Phase: PPP Started (ddial mode).
Jan 21 15:24:58  ppp[28603]: tun0: Phase: bundle: Establish
Jan 21 15:24:58  ppp[28603]: tun0: Phase: deflink: closed -> opening
Jan 21 15:24:58  ppp[28603]: tun0: Phase: deflink: Connected!
Jan 21 15:24:58  ppp[28603]: tun0: Phase: deflink: opening -> dial
Jan 21 15:24:58  ppp[28603]: tun0: Chat: Send: AT^M
Jan 21 15:24:58  ppp[28603]: tun0: Chat: Expect(2): OK
Jan 21 15:24:58  ppp[28603]: tun0: Chat: Received: AT^M^M
Jan 21 15:24:58  ppp[28603]: tun0: Chat: Received: OK^M
Jan 21 15:24:58  ppp[28603]: tun0: Chat: Send: AT+CFUN=1^M
Jan 21 15:24:58  ppp[28603]: tun0: Chat: Expect(2): OK
Jan 21 15:24:58  ppp[28603]: tun0: Chat: Received: AT+CFUN=1^M^M
Jan 21 15:24:58  ppp[28603]: tun0: Chat: Received: OK^M
Jan 21 15:24:58  ppp[28603]: tun0: Chat: Send: AT+CMEE=2^M
Jan 21 15:24:58  ppp[28603]: tun0: Chat: Expect(2): OK
Jan 21 15:24:58  ppp[28603]: tun0: Chat: Received: AT+CMEE=2^M^M
Jan 21 15:24:58  ppp[28603]: tun0: Chat: Received: OK^M
Jan 21 15:24:58  ppp[28603]: tun0: Chat: Send: AT+CSQ^M
Jan 21 15:24:58  ppp[28603]: tun0: Chat: Expect(2): OK
Jan 21 15:24:58  ppp[28603]: tun0: Chat: Received: AT+CSQ^M^M
Jan 21 15:24:58  ppp[28603]: tun0: Chat: Received: +CSQ: 8,99^M
Jan 21 15:24:58  ppp[28603]: tun0: Chat: Received: ^M
Jan 21 15:24:58  ppp[28603]: tun0: Chat: Received: OK^M
Jan 21 15:24:58  ppp[28603]: tun0: Chat: Send: AT+CGDCONT=1,"IP","internet"^M
Jan 21 15:24:58  ppp[28603]: tun0: Chat: Expect(2): OK
Jan 21 15:24:58  ppp[28603]: tun0: Chat: Received: AT+CGDCONT=1,"IP","internet"^M^M
Jan 21 15:24:58  ppp[28603]: tun0: Chat: Received: OK^M
Jan 21 15:24:58  ppp[28603]: tun0: Chat: Send: ATD*99#^M
Jan 21 15:24:58  ppp[28603]: tun0: Chat: Expect(2): CONNECT
Jan 21 15:24:58  ppp[28603]: tun0: Chat: Received: ATD*99#^M^M
Jan 21 15:24:58  ppp[28603]: tun0: Chat: Received: CONNECT^M
Jan 21 15:24:58  ppp[28603]: tun0: Phase: deflink: dial -> carrier
Jan 21 15:24:59  ppp[28603]: tun0: Phase: deflink: /dev/cuaU0.0: CD detected
Jan 21 15:24:59  ppp[28603]: tun0: Phase: deflink: carrier -> login
Jan 21 15:24:59  ppp[28603]: tun0: Phase: deflink: login -> lcp
Jan 21 15:24:59  ppp[28603]: tun0: LCP: FSM: Using "deflink" as a transport
Jan 21 15:24:59  ppp[28603]: tun0: LCP: deflink: State change Initial --> Closed
Jan 21 15:24:59  ppp[28603]: tun0: LCP: deflink: State change Closed --> Stopped
Jan 21 15:25:00  ppp[28603]: tun0: LCP: deflink: LayerStart
Jan 21 15:25:00  ppp[28603]: tun0: LCP: deflink: SendConfigReq(1) state = Stopped
Jan 21 15:25:00  ppp[28603]: tun0: LCP:  ACFCOMP[2]
Jan 21 15:25:00  ppp[28603]: tun0: LCP:  PROTOCOMP[2]
Jan 21 15:25:00  ppp[28603]: tun0: LCP:  ACCMAP[6] 0x00000000
Jan 21 15:25:00  ppp[28603]: tun0: LCP:  MRU[4] 1500
Jan 21 15:25:00  ppp[28603]: tun0: LCP:  MAGICNUM[6] 0x965ffbdf
Jan 21 15:25:00  ppp[28603]: tun0: LCP: deflink: State change Stopped --> Req-Sent
Jan 21 15:25:00  ppp[28603]: tun0: LCP: deflink: RecvConfigReq(0) state = Req-Sent
Jan 21 15:25:00  ppp[28603]: tun0: LCP:  ACCMAP[6] 0x00000000
Jan 21 15:25:00  ppp[28603]: tun0: LCP:  AUTHPROTO[5] 0xc223 (CHAP 0x05)
Jan 21 15:25:00  ppp[28603]: tun0: LCP:  MAGICNUM[6] 0x017e8f83
Jan 21 15:25:00  ppp[28603]: tun0: LCP:  PROTOCOMP[2]
Jan 21 15:25:00  ppp[28603]: tun0: LCP:  ACFCOMP[2]
Jan 21 15:25:00  ppp[28603]: tun0: LCP: deflink: SendConfigAck(0) state = Req-Sent
Jan 21 15:25:00  ppp[28603]: tun0: LCP:  ACCMAP[6] 0x00000000
Jan 21 15:25:00  ppp[28603]: tun0: LCP:  AUTHPROTO[5] 0xc223 (CHAP 0x05)
Jan 21 15:25:00  ppp[28603]: tun0: LCP:  MAGICNUM[6] 0x017e8f83
Jan 21 15:25:00  ppp[28603]: tun0: LCP:  PROTOCOMP[2]
Jan 21 15:25:00  ppp[28603]: tun0: LCP:  ACFCOMP[2]
Jan 21 15:25:00  ppp[28603]: tun0: LCP: deflink: State change Req-Sent --> Ack-Sent
Jan 21 15:25:00  ppp[28603]: tun0: LCP: deflink: RecvConfigAck(1) state = Ack-Sent
Jan 21 15:25:00  ppp[28603]: tun0: LCP:  ACFCOMP[2]
Jan 21 15:25:00  ppp[28603]: tun0: LCP:  PROTOCOMP[2]
Jan 21 15:25:00  ppp[28603]: tun0: LCP:  ACCMAP[6] 0x00000000
Jan 21 15:25:00  ppp[28603]: tun0: LCP:  MRU[4] 1500
Jan 21 15:25:00  ppp[28603]: tun0: LCP:  MAGICNUM[6] 0x965ffbdf
Jan 21 15:25:00  ppp[28603]: tun0: LCP: deflink: State change Ack-Sent --> Opened
Jan 21 15:25:00  ppp[28603]: tun0: LCP: deflink: LayerUp
Jan 21 15:25:00  ppp[28603]: tun0: Phase: bundle: Authenticate
Jan 21 15:25:00  ppp[28603]: tun0: Phase: deflink: his = CHAP 0x05, mine = none
Jan 21 15:25:00  ppp[28603]: tun0: LCP: deflink: RecvDiscardReq(1) state = Opened
Jan 21 15:25:00  ppp[28603]: tun0: Phase: Chap Input: CHALLENGE (16 bytes from UMTS_CHAP_SRVR)
Jan 21 15:25:00  ppp[28603]: tun0: Phase: Chap Output: RESPONSE ()
Jan 21 15:25:03  ppp[28603]: tun0: Phase: Chap Input: CHALLENGE (16 bytes from UMTS_CHAP_SRVR)
Jan 21 15:25:03  ppp[28603]: tun0: Phase: Chap Output: RESPONSE ()
Jan 21 15:25:03  ppp[28603]: tun0: Phase: Chap Input: SUCCESS
Jan 21 15:25:03  ppp[28603]: tun0: IPCP: Using trigger address 0.0.0.0
Jan 21 15:25:03  ppp[28603]: tun0: CCP: FSM: Using "deflink" as a transport
Jan 21 15:25:03  ppp[28603]: tun0: CCP: deflink: State change Initial --> Closed
Jan 21 15:25:03  ppp[28603]: tun0: CCP: deflink: LayerStart.
Jan 21 15:25:03  ppp[28603]: tun0: CCP: MPPE: Not usable without CHAP81
Jan 21 15:25:03  ppp[28603]: tun0: CCP: deflink: SendConfigReq(1) state = Closed
Jan 21 15:25:03  ppp[28603]: tun0: CCP:  DEFLATE[4] win 15
Jan 21 15:25:03  ppp[28603]: tun0: CCP:  PRED1[2]
Jan 21 15:25:03  ppp[28603]: tun0: CCP: deflink: State change Closed --> Req-Sent
Jan 21 15:25:03  ppp[28603]: tun0: Phase: deflink: lcp -> open
Jan 21 15:25:03  ppp[28603]: tun0: Phase: bundle: Network
Jan 21 15:25:03  ppp[28603]: tun0: IPCP: FSM: Using "deflink" as a transport
Jan 21 15:25:03  ppp[28603]: tun0: IPCP: deflink: State change Initial --> Closed
Jan 21 15:25:03  ppp[28603]: tun0: IPCP: deflink: LayerStart.
Jan 21 15:25:03  ppp[28603]: tun0: IPCP: deflink: SendConfigReq(1) state = Closed
Jan 21 15:25:03  ppp[28603]: tun0: IPCP:  IPADDR[6] 0.0.0.0
Jan 21 15:25:03  ppp[28603]: tun0: IPCP:  COMPPROTO[6] 16 VJ slots with slot compression
Jan 21 15:25:03  ppp[28603]: tun0: IPCP:  PRIDNS[6] 89.108.195.20
Jan 21 15:25:03  ppp[28603]: tun0: IPCP:  SECDNS[6] 255.255.255.255
Jan 21 15:25:03  ppp[28603]: tun0: IPCP: deflink: State change Closed --> Req-Sent
Jan 21 15:25:03  ppp[28603]: tun0: LCP: deflink: RecvProtocolRej(2) state = Opened
Jan 21 15:25:03  ppp[28603]: tun0: LCP: deflink: -- Protocol 0x80fd (Compression Control Protocol) was rejected!
Jan 21 15:25:03  ppp[28603]: tun0: CCP: deflink: State change Req-Sent --> Stopped
Jan 21 15:25:04  ppp[28603]: tun0: IPCP: deflink: RecvConfigNak(1) state = Req-Sent
Jan 21 15:25:04  ppp[28603]: tun0: IPCP:  PRIDNS[6] 10.11.12.13
Jan 21 15:25:04  ppp[28603]: tun0: IPCP:  SECDNS[6] 10.11.12.14
Jan 21 15:25:04  ppp[28603]: tun0: IPCP:  PRINBNS[6] 10.11.12.13
Jan 21 15:25:04  ppp[28603]: tun0: IPCP: MS NBNS req 130 - NAK??
Jan 21 15:25:04  ppp[28603]: tun0: IPCP:  SECNBNS[6] 10.11.12.14
Jan 21 15:25:04  ppp[28603]: tun0: IPCP: MS NBNS req 132 - NAK??
Jan 21 15:25:04  ppp[28603]: tun0: IPCP: Primary nameserver set to 10.11.12.13
Jan 21 15:25:04  ppp[28603]: tun0: IPCP: Secondary nameserver set to 10.11.12.14
Jan 21 15:25:04  ppp[28603]: tun0: IPCP: deflink: SendConfigReq(2) state = Req-Sent
Jan 21 15:25:04  ppp[28603]: tun0: IPCP:  IPADDR[6] 0.0.0.0
Jan 21 15:25:04  ppp[28603]: tun0: IPCP:  COMPPROTO[6] 16 VJ slots with slot compression
Jan 21 15:25:04  ppp[28603]: tun0: IPCP:  PRIDNS[6] 10.11.12.13
Jan 21 15:25:04  ppp[28603]: tun0: IPCP:  SECDNS[6] 10.11.12.14
Jan 21 15:25:05  ppp[28603]: tun0: IPCP: deflink: RecvConfigNak(2) state = Req-Sent
Jan 21 15:25:05  ppp[28603]: tun0: IPCP:  PRIDNS[6] 10.11.12.13
Jan 21 15:25:05  ppp[28603]: tun0: IPCP:  SECDNS[6] 10.11.12.14
Jan 21 15:25:05  ppp[28603]: tun0: IPCP:  PRINBNS[6] 10.11.12.13
Jan 21 15:25:05  ppp[28603]: tun0: IPCP: MS NBNS req 130 - NAK??
Jan 21 15:25:05  ppp[28603]: tun0: IPCP:  SECNBNS[6] 10.11.12.14
Jan 21 15:25:05  ppp[28603]: tun0: IPCP: MS NBNS req 132 - NAK??
Jan 21 15:25:05  ppp[28603]: tun0: IPCP: Primary nameserver set to 10.11.12.13
Jan 21 15:25:05  ppp[28603]: tun0: IPCP: Secondary nameserver set to 10.11.12.14
Jan 21 15:25:05  ppp[28603]: tun0: IPCP: deflink: SendConfigReq(3) state = Req-Sent
Jan 21 15:25:05  ppp[28603]: tun0: IPCP:  IPADDR[6] 0.0.0.0
Jan 21 15:25:05  ppp[28603]: tun0: IPCP:  COMPPROTO[6] 16 VJ slots with slot compression
Jan 21 15:25:05  ppp[28603]: tun0: IPCP:  PRIDNS[6] 10.11.12.13
Jan 21 15:25:05  ppp[28603]: tun0: IPCP:  SECDNS[6] 10.11.12.14
Jan 21 15:25:06  ppp[28603]: tun0: IPCP: deflink: RecvConfigReq(0) state = Req-Sent
Jan 21 15:25:06  ppp[28603]: tun0: IPCP:   [EMPTY]
Jan 21 15:25:06  ppp[28603]: tun0: IPCP: deflink: SendConfigNak(0) state = Req-Sent
Jan 21 15:25:06  ppp[28603]: tun0: IPCP:  IPADDR[6] 10.0.0.2
Jan 21 15:25:06  ppp[28603]: tun0: IPCP: deflink: RecvConfigRej(3) state = Req-Sent
Jan 21 15:25:06  ppp[28603]: tun0: IPCP:  COMPPROTO[6] 16 VJ slots with slot compression
Jan 21 15:25:06  ppp[28603]: tun0: IPCP: deflink: SendConfigReq(4) state = Req-Sent
Jan 21 15:25:06  ppp[28603]: tun0: IPCP:  IPADDR[6] 0.0.0.0
Jan 21 15:25:06  ppp[28603]: tun0: IPCP:  PRIDNS[6] 10.11.12.13
Jan 21 15:25:06  ppp[28603]: tun0: IPCP:  SECDNS[6] 10.11.12.14
Jan 21 15:25:06  ppp[28603]: tun0: IPCP: deflink: RecvConfigNak(4) state = Req-Sent
Jan 21 15:25:06  ppp[28603]: tun0: IPCP:  IPADDR[6] 10.77.47.203
Jan 21 15:25:06  ppp[28603]: tun0: IPCP:  IPADDR[6] changing address: 0.0.0.0  --> 10.77.47.203
Jan 21 15:25:06  ppp[28603]: tun0: IPCP:  PRIDNS[6] 89.108.202.21
Jan 21 15:25:06  ppp[28603]: tun0: IPCP:  SECDNS[6] 89.108.195.20
Jan 21 15:25:06  ppp[28603]: tun0: IPCP: Primary nameserver set to 89.108.202.21
Jan 21 15:25:06  ppp[28603]: tun0: IPCP: Secondary nameserver set to 89.108.195.20
Jan 21 15:25:06  ppp[28603]: tun0: IPCP: deflink: SendConfigReq(5) state = Req-Sent
Jan 21 15:25:06  ppp[28603]: tun0: IPCP:  IPADDR[6] 10.77.47.203
Jan 21 15:25:06  ppp[28603]: tun0: IPCP:  PRIDNS[6] 89.108.202.21
Jan 21 15:25:06  ppp[28603]: tun0: IPCP:  SECDNS[6] 89.108.195.20
Jan 21 15:25:06  ppp[28603]: tun0: IPCP: deflink: RecvConfigAck(5) state = Req-Sent
Jan 21 15:25:06  ppp[28603]: tun0: IPCP:  IPADDR[6] 10.77.47.203
Jan 21 15:25:06  ppp[28603]: tun0: IPCP:  PRIDNS[6] 89.108.202.21
Jan 21 15:25:06  ppp[28603]: tun0: IPCP:  SECDNS[6] 89.108.195.20
Jan 21 15:25:06  ppp[28603]: tun0: IPCP: deflink: State change Req-Sent --> Ack-Rcvd
Jan 21 15:25:07  ppp[28603]: tun0: IPCP: deflink: RecvConfigReq(1) state = Ack-Rcvd
Jan 21 15:25:07  ppp[28603]: tun0: IPCP:   [EMPTY]
Jan 21 15:25:07  ppp[28603]: tun0: IPCP: deflink: SendConfigAck(1) state = Ack-Rcvd
Jan 21 15:25:07  ppp[28603]: tun0: IPCP:   [EMPTY]
Jan 21 15:25:07  ppp[28603]: tun0: IPCP: deflink: State change Ack-Rcvd --> Opened
Jan 21 15:25:07  ppp[28603]: tun0: IPCP: deflink: LayerUp.
Jan 21 15:25:07  ppp[28603]: tun0: IPCP: myaddr 10.77.47.203 hisaddr = 10.0.0.2
Jan 21 15:25:07  ppp[28603]: tun0: Warning: ff02::/: Change route failed: errno: Network is unreachable
netstat -r:-
Code:
Routing tables

Internet:
Destination        Gateway            Flags     Netif Expire
default            10.0.0.2           US         tun0
10.0.0.2           link#3             UHS        tun0
10.77.47.203       link#3             UHS         lo0
localhost          link#2             UH          lo0

Internet6:
Destination        Gateway            Flags     Netif Expire
::/96              localhost          UGRS        lo0
localhost          link#2             UH          lo0
::ffff:0.0.0.0/96  localhost          UGRS        lo0
fe80::/10          localhost          UGRS        lo0
fe80::%lo0/64      link#2             U           lo0
fe80::1%lo0        link#2             UHS         lo0
ff02::/16          localhost          UGRS        lo0
ff02::%tun0/32     fe80::221:ccff:fec UGS        tun0

I'm even accessing the forum via my USB Broadband modem.

It looks to me as though I'm doing exactly the same on FreeBSD 11.1 and TrueOS - which is based on 12.0-Current on the same system

What could cause the differences?
 
SUCCESS!!!!!! (On FreeBSD 11.1-RELEASE)

/etc/ppp/ppp.conf
Code:
default:

saf:
 set device /dev/cuaU0.0
 set timeout 0
 set dial "ABORT BUSY ABORT NO\\sCARRIER TIMEOUT 5 \
        \"\" \
        AT OK-AT-OK \
        AT+CPIN="" OK-AT-OK \
        ATH OK-AT-OK \
        ATE1 OK-AT-OK \
        AT+CGDCONT=1,\\\"IP\\\",\\\"internet\\\" OK \
        \\dATD*99# TIMEOUT 40 CONNECT"
 set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.255 0.0.0.0
 add default HISADDR
/var/log/ppp.log
Code:
Jan 22 06:42:19 Test ppp[2327]: Phase: Using interface: tun0
Jan 22 06:42:19 Test ppp[2327]: Phase: deflink: Created in closed state
Jan 22 06:42:19 Test ppp[2327]: Warning: Add route failed: 0.0.0.0: errno: Value too large to be stored in data type
Jan 22 06:42:19 Test ppp[2329]: Phase: PPP Started (ddial mode).
Jan 22 06:42:19 Test ppp[2329]: Phase: bundle: Establish
Jan 22 06:42:19 Test ppp[2329]: Phase: deflink: closed -> opening
Jan 22 06:42:19 Test ppp[2329]: Phase: deflink: Connected!
Jan 22 06:42:19 Test ppp[2329]: Phase: deflink: opening -> dial
Jan 22 06:42:27 Test ppp[2329]: Phase: deflink: dial -> carrier
Jan 22 06:42:28 Test ppp[2329]: Phase: deflink: /dev/cuaU0.0: CD detected
Jan 22 06:42:28 Test ppp[2329]: Phase: deflink: carrier -> login
Jan 22 06:42:28 Test ppp[2329]: Phase: deflink: login -> lcp
Jan 22 06:42:29 Test ppp[2329]: Phase: bundle: Authenticate
Jan 22 06:42:29 Test ppp[2329]: Phase: deflink: his = CHAP 0x05, mine = none
Jan 22 06:42:29 Test ppp[2329]: Phase: Chap Input: CHALLENGE (16 bytes from UMTS_CHAP_SRVR)
Jan 22 06:42:29 Test ppp[2329]: Phase: Chap Output: RESPONSE ()
Jan 22 06:42:32 Test ppp[2329]: Phase: Chap Input: CHALLENGE (16 bytes from UMTS_CHAP_SRVR)
Jan 22 06:42:32 Test ppp[2329]: Phase: Chap Output: RESPONSE ()
Jan 22 06:42:32 Test ppp[2329]: Phase: Chap Input: SUCCESS
Jan 22 06:42:32 Test ppp[2329]: Phase: deflink: lcp -> open
Jan 22 06:42:32 Test ppp[2329]: Phase: bundle: Network
Jan 22 06:42:35 Test ppp[2329]: Warning: ff02::: Change route failed: errno: Value too large to be stored in data type
ifconfig
Code:
tun0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> metric 0 mtu 1500
   options=80000<LINKSTATE>
   inet 10.175.81.66 --> 10.0.0.2  netmask 0xffffffff
   nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
   groups: tun
   Opened by PID 2329

Many thanks to KBob Thread 60130.

I haven't yet figured out specifically what is different in this script, but it gets the job done.
 
Make sure you slap a firewall on that puppy. There are more nasties on wireless networks over here then on fixed wire.
 
Back
Top