• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login
Netgate Discussion Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login

PPP chat-script

General pfSense Questions
2
6
2.8k
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H
    hAh0L13
    last edited by Dec 8, 2016, 2:51 AM Dec 8, 2016, 2:40 AM

    Hello.

    I'm trying to use USB 4G modem Huawei e3372h in HiLink as simple 4G modem on my pfsense 2.3.2. Succesfully create PPP interface on cuau0.0, but can't connect. System Logs > PPP shows error:

    ppp: [wan_link0] CHAT: ATDT*99#
    ppp: [wan_link0] CHAT: Invalid dial init string.
    

    I know about replace ATDT to ATD in /etc/inc/interfaces.inc, but my question is where I can change whole chat-script permanently? From support of Huawei e3372h, I should use this script:

    ABORT BUSY
    ABORT 'NO CARRIER'
    ABORT ERROR
    REPORT CONNECT
    TIMEOUT 10
    "" "ATE1"
    OK 'AT+CGDCONT=1,"IP","home.beeline.ru"'
    SAY "Calling UMTS/GPRS"
    TIMEOUT 30
    OK "ATD*99#"
    CONNECT ' '
    

    OpenWRT use /etc/chatscripts/3g.chat for this, but i can't find this file, /etc/ppp/ppp.conf didn't change script too.

    Sorry for my bad-bad english and if question already answered, but i can't find anything.

    1 Reply Last reply Reply Quote 0
    • A
      AndrewZ
      last edited by Dec 8, 2016, 9:02 AM

      https://forum.pfsense.org/index.php?topic=105842.msg590398#msg590398

      1 Reply Last reply Reply Quote 0
      • H
        hAh0L13
        last edited by Dec 8, 2016, 2:04 PM Dec 8, 2016, 2:01 PM

        @AndrewZ:

        https://forum.pfsense.org/index.php?topic=105842.msg590398#msg590398

        I already know about correct init strings like ATZ or AT&F (without M1), but my question isn't about it. I'm try to locate where i can change chat script, which config files system using.

        I can connect with my modem - dialing ok, receive ip address. but i haven't internet. I think it's because default route is absent - maybe command 'add default HISADDR' didn't apply in dialing.

        Logs:

        
        Dec  8 18:23:18 infinite ppp: Multi-link PPP daemon for FreeBSD
        Dec  8 18:23:18 infinite ppp:
        Dec  8 18:23:18 infinite ppp: process 40646 started, version 5.8 (root@pfSense_v2_3_2_amd64-pfSense_v2_3_2-job-04 16:03 19-Jul-2016)
        Dec  8 18:23:18 infinite ppp: web: web is not running
        Dec  8 18:23:18 infinite ppp: [wan] Bundle: Interface ng0 created
        Dec  8 18:23:18 infinite ppp: [wan_link0] Link: OPEN event
        Dec  8 18:23:18 infinite ppp: [wan_link0] LCP: Open event
        Dec  8 18:23:18 infinite ppp: [wan_link0] LCP: state change Initial --> Starting
        Dec  8 18:23:18 infinite ppp: [wan_link0] LCP: LayerStart
        Dec  8 18:23:19 infinite ppp: [wan_link0] CHAT: Detected Custom modem.
        Dec  8 18:23:19 infinite ppp: [wan_link0] CHAT: Dialing server at *99#...
        Dec  8 18:23:19 infinite ppp: [wan_link0] CHAT: ATD*99#
        Dec  8 18:23:19 infinite ppp: [wan_link0] CHAT: Connected at an unknown speed.
        Dec  8 18:23:19 infinite ppp: [wan_link0] MODEM: chat script succeeded
        Dec  8 18:23:19 infinite ppp: [wan_link0] Link: UP event
        Dec  8 18:23:19 infinite ppp: [wan_link0] LCP: Up event
        Dec  8 18:23:19 infinite ppp: [wan_link0] LCP: state change Starting --> Req-Sent
        Dec  8 18:23:19 infinite ppp: [wan_link0] LCP: SendConfigReq #1
        Dec  8 18:23:19 infinite ppp: [wan_link0]   ACFCOMP
        Dec  8 18:23:19 infinite ppp: [wan_link0]   PROTOCOMP
        Dec  8 18:23:19 infinite ppp: [wan_link0]   ACCMAP 0x000a0000
        Dec  8 18:23:19 infinite ppp: [wan_link0]   MRU 1500
        Dec  8 18:23:19 infinite ppp: [wan_link0]   MAGICNUM 0xcb343ccc
        Dec  8 18:23:19 infinite ppp: [wan_link0] LCP: rec'd Configure Request #1 (Req-Sent)
        Dec  8 18:23:19 infinite ppp: [wan_link0]   ACFCOMP
        Dec  8 18:23:19 infinite ppp: [wan_link0]   PROTOCOMP
        Dec  8 18:23:19 infinite ppp: [wan_link0]   ACCMAP 0x00000000
        Dec  8 18:23:19 infinite ppp: [wan_link0]   MRU 1500
        Dec  8 18:23:19 infinite ppp: [wan_link0]   MAGICNUM 0x00000543
        Dec  8 18:23:19 infinite ppp: [wan_link0]   AUTHPROTO CHAP MD5
        Dec  8 18:23:19 infinite ppp: [wan_link0] LCP: SendConfigAck #1
        Dec  8 18:23:19 infinite ppp: [wan_link0]   ACFCOMP
        Dec  8 18:23:19 infinite ppp: [wan_link0]   PROTOCOMP
        Dec  8 18:23:19 infinite ppp: [wan_link0]   ACCMAP 0x00000000
        Dec  8 18:23:19 infinite ppp: [wan_link0]   MRU 1500
        Dec  8 18:23:19 infinite ppp: [wan_link0]   MAGICNUM 0x00000543
        Dec  8 18:23:19 infinite ppp: [wan_link0]   AUTHPROTO CHAP MD5
        Dec  8 18:23:19 infinite ppp: [wan_link0] LCP: state change Req-Sent --> Ack-Sent
        Dec  8 18:23:19 infinite ppp: [wan_link0] LCP: rec'd Configure Ack #1 (Ack-Sent)
        Dec  8 18:23:19 infinite ppp: [wan_link0]   ACFCOMP
        Dec  8 18:23:19 infinite ppp: [wan_link0]   PROTOCOMP
        Dec  8 18:23:19 infinite ppp: [wan_link0]   ACCMAP 0x000a0000
        Dec  8 18:23:19 infinite ppp: [wan_link0]   MRU 1500
        Dec  8 18:23:19 infinite ppp: [wan_link0]   MAGICNUM 0xcb343ccc
        Dec  8 18:23:19 infinite ppp: [wan_link0] LCP: state change Ack-Sent --> Opened
        Dec  8 18:23:19 infinite ppp: [wan_link0] LCP: auth: peer wants CHAP, I want nothing
        Dec  8 18:23:19 infinite ppp: [wan_link0] LCP: LayerUp
        Dec  8 18:23:19 infinite ppp: [wan_link0] CHAP: rec'd CHALLENGE #1 len: 37
        Dec  8 18:23:19 infinite ppp: [wan_link0]   Name: "HUAWEI_CHAP_SRVR"
        Dec  8 18:23:19 infinite ppp: [wan_link0] CHAP: Using authname "beeline"
        Dec  8 18:23:19 infinite ppp: [wan_link0] CHAP: sending RESPONSE #1 len: 28
        Dec  8 18:23:19 infinite ppp: [wan_link0] CHAP: rec'd SUCCESS #1 len: 13
        Dec  8 18:23:19 infinite ppp: [wan_link0]   MESG: Welcome!!
        Dec  8 18:23:19 infinite ppp: [wan_link0] LCP: authorization successful
        Dec  8 18:23:19 infinite ppp: [wan_link0] Link: Matched action 'bundle "wan" ""'
        Dec  8 18:23:19 infinite ppp: [wan_link0] Link: Join bundle "wan"
        Dec  8 18:23:19 infinite ppp: [wan] Bundle: Status update: up 1 link, total bandwidth 28800 bps
        Dec  8 18:23:19 infinite ppp: [wan] IPCP: Open event
        Dec  8 18:23:19 infinite ppp: [wan] IPCP: state change Initial --> Starting
        Dec  8 18:23:19 infinite ppp: [wan] IPCP: LayerStart
        Dec  8 18:23:19 infinite ppp: [wan] IPV6CP: Open event
        Dec  8 18:23:19 infinite ppp: [wan] IPV6CP: state change Initial --> Starting
        Dec  8 18:23:19 infinite ppp: [wan] IPV6CP: LayerStart
        Dec  8 18:23:19 infinite ppp: [wan] IPCP: Up event
        Dec  8 18:23:19 infinite ppp: [wan] IPCP: state change Starting --> Req-Sent
        Dec  8 18:23:19 infinite ppp: [wan] IPCP: SendConfigReq #1
        Dec  8 18:23:19 infinite ppp: [wan]   IPADDR 0.0.0.0
        Dec  8 18:23:19 infinite ppp: [wan]   COMPPROTO VJCOMP, 16 comp. channels, no comp-cid
        Dec  8 18:23:19 infinite ppp: [wan] IPV6CP: Up event
        Dec  8 18:23:19 infinite ppp: [wan] IPV6CP: state change Starting --> Req-Sent
        Dec  8 18:23:19 infinite ppp: [wan] IPV6CP: SendConfigReq #1
        Dec  8 18:23:19 infinite ppp: [wan] IPCP: rec'd Configure Request #1 (Req-Sent)
        Dec  8 18:23:19 infinite ppp: [wan] IPCP: SendConfigAck #1
        Dec  8 18:23:19 infinite ppp: [wan] IPCP: state change Req-Sent --> Ack-Sent
        Dec  8 18:23:19 infinite ppp: [wan] IPCP: rec'd Configure Nak #1 (Ack-Sent)
        Dec  8 18:23:19 infinite ppp: [wan] IPCP: Up event
        Dec  8 18:23:19 infinite ppp: [wan] IPCP: state change Starting --> Req-Sent
        Dec  8 18:23:19 infinite ppp: [wan] IPCP: SendConfigReq #1
        Dec  8 18:23:19 infinite ppp: [wan]   IPADDR 0.0.0.0
        Dec  8 18:23:19 infinite ppp: [wan]   COMPPROTO VJCOMP, 16 comp. channels, no comp-cid
        Dec  8 18:23:19 infinite ppp: [wan] IPV6CP: Up event
        Dec  8 18:23:19 infinite ppp: [wan] IPV6CP: state change Starting --> Req-Sent
        Dec  8 18:23:19 infinite ppp: [wan] IPV6CP: SendConfigReq #1
        Dec  8 18:23:19 infinite ppp: [wan] IPCP: rec'd Configure Request #1 (Req-Sent)
        Dec  8 18:23:19 infinite ppp: [wan] IPCP: SendConfigAck #1
        Dec  8 18:23:19 infinite ppp: [wan] IPCP: state change Req-Sent --> Ack-Sent
        Dec  8 18:23:19 infinite ppp: [wan] IPCP: rec'd Configure Nak #1 (Ack-Sent)
        Dec  8 18:23:19 infinite ppp: [wan] IPCP: SendConfigReq #2
        Dec  8 18:23:19 infinite ppp: [wan]   IPADDR 0.0.0.0
        Dec  8 18:23:19 infinite ppp: [wan]   COMPPROTO VJCOMP, 16 comp. channels, no comp-cid
        Dec  8 18:23:19 infinite ppp: [wan_link0] LCP: rec'd Protocol Reject #2 (Opened)
        Dec  8 18:23:19 infinite ppp: [wan_link0] LCP: protocol IPV6CP was rejected
        Dec  8 18:23:19 infinite ppp: [wan] IPV6CP: protocol was rejected by peer
        Dec  8 18:23:19 infinite ppp: [wan] IPV6CP: state change Req-Sent --> Stopped
        Dec  8 18:23:19 infinite ppp: [wan] IPV6CP: LayerFinish
        Dec  8 18:23:20 infinite ppp: [wan] IPCP: rec'd Configure Reject #2 (Ack-Sent)
        Dec  8 18:23:20 infinite ppp: [wan]   COMPPROTO VJCOMP, 16 comp. channels, no comp-cid
        Dec  8 18:23:20 infinite ppp: [wan] IPCP: SendConfigReq #3
        Dec  8 18:23:20 infinite ppp: [wan]   IPADDR 0.0.0.0
        Dec  8 18:23:20 infinite ppp: [wan] IPCP: rec'd Configure Nak #3 (Ack-Sent)
        Dec  8 18:23:20 infinite ppp: [wan]   IPADDR 10.50.105.175
        Dec  8 18:23:20 infinite ppp: [wan]     10.50.105.175 is OK
        Dec  8 18:23:20 infinite ppp: [wan] IPCP: SendConfigReq #4
        Dec  8 18:23:20 infinite ppp: [wan]   IPADDR 10.50.105.175
        Dec  8 18:23:20 infinite ppp: [wan] IPCP: rec'd Configure Ack #4 (Ack-Sent)
        Dec  8 18:23:20 infinite ppp: [wan]   IPADDR 10.50.105.175
        Dec  8 18:23:20 infinite ppp: [wan] IPCP: state change Ack-Sent --> Opened
        Dec  8 18:23:20 infinite ppp: [wan] IPCP: LayerUp
        Dec  8 18:23:20 infinite ppp: [wan]   10.50.105.175 -> 10.64.64.0
        Dec  8 18:23:20 infinite ppp: [wan] IFACE: Up event
        Dec  8 18:23:20 infinite ppp: [wan] IFACE: Rename interface ng0 to ppp0 [wan_link0]
        
        

        ifconfig:

        ppp0: flags=88d1 <up,pointopoint,running,noarp,simplex,multicast>metric 0 mtu 1492
                inet 10.50.105.175 --> 10.64.64.0 netmask 0xffffffff
                inet6 fe80::21b:21ff:fe2d:f344%ppp0 prefixlen 64 scopeid 0x8
                nd6 options=21<performnud,auto_linklocal></performnud,auto_linklocal></up,pointopoint,running,noarp,simplex,multicast>
        

        GUI status:

        Status	up
        PPP	up 
        Uptime	00:04:08
        Cell Signal (RSSI)	rssi:24 level:-65dBm percent:77%
        Cell Mode	None, No Service Mode
        Cell SIM State	Invalid SIM/locked State
        Cell Service	No Service
        MAC Address	00:00:00:00:00:00
        IPv4 Address	10.50.105.175
        Subnet mask IPv4	255.255.255.255
        Gateway IPv4	10.64.64.0
        IPv6 Link Local	fe80::21b:21ff:fe2d:f344%ppp0
        DNS servers	127.0.0.1
        			8.8.8.8
        			8.8.4.4
        MTU	1492
        In/out packets	0/16 (0 B/1 KiB)
        In/out packets (pass)	0/16 (0 B/1 KiB)
        In/out packets (block)	0/0 (0 B/0 B)
        In/out errors	0/0
        Collisions	0
        

        routes when ppp active:

        IPv4 Routes
        Destination	Gateway	Flags	Use	Mtu	Netif	Expire
        10.52.138.115	link#8	UHS	0	16384	lo0	
        10.64.64.0	link#8	UH	103	1492	ppp0	
        127.0.0.1	link#7	UH	470	16384	lo0	
        192.168.1.0/24	link#1	U	14425741	1500	em0	
        192.168.1.1	link#1	UHS	0	16384	lo0	
        
        1 Reply Last reply Reply Quote 0
        • A
          AndrewZ
          last edited by Dec 8, 2016, 3:02 PM Dec 8, 2016, 2:53 PM

          You don't need to touch any script.
          Think of gateways and NAT.

          @hAh0L13:

          I'm trying to use USB 4G modem Huawei e3372h in HiLink
          Succesfully create PPP interface

          BTW, if you are able to create a PPP interface, your modem may not be in HiLink mode. I suspect it's a regular stick running 21.X firmware.

          1 Reply Last reply Reply Quote 0
          • H
            hAh0L13
            last edited by Dec 9, 2016, 4:05 AM Dec 9, 2016, 1:33 AM

            @AndrewZ:

            You don't need to touch any script.
            Think of gateways and NAT.

            OK, i understand this. I have another modem, 3G SimTech Sim 5216. With it, i can create PPP and receive IP address too, but can't ping 8.8.8.8 - no route to host. Similarly to e3372.

            NAT in auto outbound mode. BTW, pinging from PPP interface say no route to host too. I can add default route manually (and i think all will work fine), but maybe this should be done automatically?

            @AndrewZ:

            BTW, if you are able to create a PPP interface, your modem may not be in HiLink mode. I suspect it's a regular stick running 21.X firmware.

            HiLink with modded firmware, able to change composition between RNDIS/CDC/Gateway/Gateway(with NIC). In gateway it has 3 u3g ports - modem interface, PC UI interface and another one command interface. Now I use it in CDC composition, but internet works unsatisfactory - opening sites often say "timed out", Steam say "no connection", etc. However, when connection achieved, it may be up to 50-60 Mbps down and 10-11 Mbps up. In gateway mode huawei works fine with Win7 (standard win utility), Fedora 23 and CentOS 7 (ModemManager, part of NetworkManager) - no delay, no timed out.

            UPD Found this bug - https://redmine.pfsense.org/issues/6495 and linked thread - https://forum.pfsense.org/index.php?topic=113750.30
            will try this evening

            1 Reply Last reply Reply Quote 0
            • H
              hAh0L13
              last edited by Dec 12, 2016, 1:43 AM Dec 11, 2016, 1:27 PM

              I don't know how, but now all works fine. All what has been changed - removed swap for increasing / - my / is overfilled (free 1% or 9 MB). Now used 73% and PPP connection up and works fine

              1 Reply Last reply Reply Quote 0
              1 out of 6
              • First post
                1/6
                Last post
              Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.