Connection problems with 3G dongel
-
I am trying to setup a pfsense box to share my 3G connection (Huawei E3131 dongle) with the rest of my network. I'm using pfsense 2.1.3 and I'm following the guides and forum posts to the best of my knowledge but can not get it to work any way. Now I'm all out of ideas and hope that someone here have seen the same issue and can help me in the right direction.
My first guess at the problem after some googling was that I needed to use usb_modeswitch since the modem has a memory card slot and build in driver area that shows up as a CD-ROM. But from what I can see the latest PFsense version already does this for me since it recognizes 3 modem devices and gives me cuaU0 - cuaU2 when the modem is plugged in.
dmesg:
re0: link state changed to UP ugen1.2: <huawei>at usbus1 ugen1.2: <huawei>at usbus1 (disconnected) ugen1.2: <huawei>at usbus1 umodem0: <huawei 0="" 2="" huawei="" mobile,="" class="" 0,="" rev="" 2.00="" 1.02,="" addr="">on usbus1 umodem0: data interface 0, has no CM over data, has no break umodem1: <huawei 0="" 2="" huawei="" mobile,="" class="" 0,="" rev="" 2.00="" 1.02,="" addr="">on usbus1 umodem1: data interface 1, has no CM over data, has no break umodem2: <huawei 0="" 2="" huawei="" mobile,="" class="" 0,="" rev="" 2.00="" 1.02,="" addr="">on usbus1 umodem2: data interface 2, has no CM over data, has no break umass0: <huawei 0="" 2="" huawei="" mobile,="" class="" 0,="" rev="" 2.00="" 1.02,="" addr="">on usbus1 umass0: SCSI over Bulk-Only; quirks = 0x0000 umass0:0:0:-1: Attached to scbus0 umass1: <huawei 0="" 2="" huawei="" mobile,="" class="" 0,="" rev="" 2.00="" 1.02,="" addr="">on usbus1 umass1: SCSI over Bulk-Only; quirks = 0x0000 umass1:1:1:-1: Attached to scbus1 cd0 at umass-sim0 bus 0 scbus0 target 0 lun 0 cd0: <huawei mass="" storage="" 2.31="">Removable CD-ROM SCSI-2 device cd0: 40.000MB/s transfers cd0: cd present [65536 x 2048 byte records] (probe1:umass-sim1:1:0:0): TEST UNIT READY. CDB: 0 0 0 0 0 0 (probe1:umass-sim1:1:0:0): CAM status: SCSI Status Error (probe1:umass-sim1:1:0:0): SCSI status: Check Condition (probe1:umass-sim1:1:0:0): SCSI sense: NOT READY asc:3a,0 (Medium not present) da0 at umass-sim1 bus 1 scbus1 target 0 lun 0 da0: <huawei sd="" storage="" 2.31="">Removable Direct Access SCSI-2 device da0: 40.000MB/s transfers da0: Attempt to query device size failed: NOT READY, Medium not present</huawei></huawei></huawei></huawei></huawei></huawei></huawei></huawei></huawei></huawei>
[2.1.3-RELEASE][admin@pfsense.lan]/root(8): ls -l /dev/cua* crw-rw---- 1 uucp dialer 0, 121 Jun 16 14:03 /dev/cuaU0 crw-rw---- 1 uucp dialer 0, 122 Jun 16 14:03 /dev/cuaU0.init crw-rw---- 1 uucp dialer 0, 123 Jun 16 14:03 /dev/cuaU0.lock crw-rw---- 1 uucp dialer 0, 127 Jun 16 14:03 /dev/cuaU1 crw-rw---- 1 uucp dialer 0, 128 Jun 16 14:03 /dev/cuaU1.init crw-rw---- 1 uucp dialer 0, 129 Jun 16 14:03 /dev/cuaU1.lock crw-rw---- 1 uucp dialer 0, 133 Jun 16 14:03 /dev/cuaU2 crw-rw---- 1 uucp dialer 0, 134 Jun 16 14:03 /dev/cuaU2.init crw-rw---- 1 uucp dialer 0, 135 Jun 16 14:03 /dev/cuaU2.lock
[2.1.3-RELEASE][admin@pfsense.lan]/root(11): usbconfig -d ugen1.2 dump_device_desc ugen1.2: <huawei mobile="" huawei="">at usbus1, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON bLength = 0x0012 bDescriptorType = 0x0001 bcdUSB = 0x0200 bDeviceClass = 0x0000 bDeviceSubClass = 0x0000 bDeviceProtocol = 0x0000 bMaxPacketSize0 = 0x0040 idVendor = 0x12d1 idProduct = 0x1c05 bcdDevice = 0x0102 iManufacturer = 0x0002 <huawei>iProduct = 0x0001 <huawei mobile="">iSerialNumber = 0x0000 <no string="">bNumConfigurations = 0x0001</no></huawei></huawei></huawei>
In the web GUI I get the WAN interface to be configured as ppp0 connected to /dev/cuaU0 and the little green arrow shows up but the ip does not change from 0.0.0.0.
In the PPP log I see this ERROR when PFsense tries to connect the modem. From googling and reading several bug-reports on PFsense I saw that many users had problems with letting PFsense unlock the SIM. This should not be my problem since I deactivated the PIN and still have the same ERROR.
ppp-log
Jun 16 14:36:18 ppp: [wan_link0] Link: reconnection attempt 62 Jun 16 14:36:18 ppp: [wan_link0] CHAT: +CPIN? Jun 16 14:36:18 ppp: [wan_link0] CHAT: +CPIN: READY Jun 16 14:36:18 ppp: [wan_link0] CHAT: +CGDCONT=1,"IP","online.telia.se" Jun 16 14:36:18 ppp: [wan_link0] CHAT: Detected Hayes compatible modem. Jun 16 14:36:18 ppp: [wan_link0] CHAT: The modem responded with "ERROR" to the command "AT&F&C1&D2E0S0=0M1" at ModemCmd: label. Jun 16 14:36:18 ppp: [wan_link0] MODEM: chat script failed Jun 16 14:36:18 ppp: [wan_link0] Link: DOWN event Jun 16 14:36:18 ppp: [wan_link0] LCP: Down event
I'm really stuck here and hope that somebody might have some pointers to what could solve this for me.
-
Have you tried the other USB serial ports?
You may need a custom init string of some sort since that one is showing an error.
If it is correctly switching I expect it to be recognised by u3g and appear as a u3g device in the logs. A quick Google seems to suggest this modem may appear as an ethernet device, some modem can be either ethernet or serial depending how they are switched though.Steve
-
The USB IDs you have appear to correspond to a correctly switched E173s:
https://usb-ids.gowdy.us/read/UD/12d1/1c05Or maybe an E303:
http://www.draisberghof.de/usb_modeswitch/bb/viewtopic.php?f=3&t=18971c05 appears to be a mode with everything exposed. Check that cdc0 or ue0 are not present as NICs.
This thread appears relevant:
http://www.draisberghof.de/usb_modeswitch/bb/viewtopic.php?f=6&t=1465Steve
-
Thank you Steve for the help. It got me a little bit further. The key problem was the modem init-string. It was the default provided by pfsense and I just assumed it was the correct one, since I'm no master of modem AT commands. When I set the modem init string in the GUI to "I" (to get rid of the default) it connected as expected.
Any ideas of better init-string choices?
The next issue that showed up in the ppp log is this (full log below):
ppp: [wan] IFACE: Add route 0.0.0.0/0 10.64.64.0 failed: No such processI get an IP address for a short while and then the connection is terminated. What does this mean? When googling it appears that "No such process" is a problem showing up when deleting routes for PPPoE connections but I assume that is not related to this problem?
Jun 17 15:26:16 pfSense ppp: [wan] Bundle: Interface ng0 created Jun 17 15:26:16 pfSense ppp: [wan_link0] Link: OPEN event Jun 17 15:26:16 pfSense ppp: [wan_link0] LCP: Open event Jun 17 15:26:16 pfSense ppp: [wan_link0] LCP: state change Initial --> Starting Jun 17 15:26:16 pfSense ppp: [wan_link0] LCP: LayerStart Jun 17 15:26:17 pfSense ppp: [wan_link0] CHAT: Detected Custom modem. Jun 17 15:26:17 pfSense ppp: [wan_link0] CHAT: Dialing server at *99#... Jun 17 15:26:17 pfSense ppp: [wan_link0] CHAT: ATDT*99# Jun 17 15:26:17 pfSense ppp: [wan_link0] CHAT: Connected at an unknown speed. Jun 17 15:26:17 pfSense ppp: [wan_link0] MODEM: chat script succeeded Jun 17 15:26:17 pfSense ppp: [wan_link0] Link: UP event Jun 17 15:26:17 pfSense ppp: [wan_link0] LCP: Up event Jun 17 15:26:17 pfSense ppp: [wan_link0] LCP: state change Starting --> Req-Sent Jun 17 15:26:17 pfSense ppp: [wan_link0] LCP: SendConfigReq #1 Jun 17 15:26:17 pfSense ppp: [wan_link0] ACFCOMP Jun 17 15:26:17 pfSense ppp: [wan_link0] PROTOCOMP Jun 17 15:26:17 pfSense ppp: [wan_link0] ACCMAP 0x000a0000 Jun 17 15:26:17 pfSense ppp: [wan_link0] MRU 1500 Jun 17 15:26:17 pfSense ppp: [wan_link0] MAGICNUM 48ef76cf Jun 17 15:26:17 pfSense ppp: [wan_link0] LCP: rec'd Configure Request #1 (Req-Sent) Jun 17 15:26:17 pfSense ppp: [wan_link0] ACFCOMP Jun 17 15:26:17 pfSense ppp: [wan_link0] PROTOCOMP Jun 17 15:26:17 pfSense ppp: [wan_link0] ACCMAP 0x00000000 Jun 17 15:26:17 pfSense ppp: [wan_link0] MRU 1500 Jun 17 15:26:17 pfSense ppp: [wan_link0] MAGICNUM 00000547 Jun 17 15:26:17 pfSense ppp: [wan_link0] AUTHPROTO CHAP MD5 Jun 17 15:26:17 pfSense ppp: [wan_link0] LCP: SendConfigAck #1 Jun 17 15:26:17 pfSense ppp: [wan_link0] ACFCOMP Jun 17 15:26:17 pfSense ppp: [wan_link0] PROTOCOMP Jun 17 15:26:17 pfSense ppp: [wan_link0] ACCMAP 0x00000000 Jun 17 15:26:17 pfSense ppp: [wan_link0] MRU 1500 Jun 17 15:26:17 pfSense ppp: [wan_link0] MAGICNUM 00000547 Jun 17 15:26:17 pfSense ppp: [wan_link0] AUTHPROTO CHAP MD5 Jun 17 15:26:17 pfSense ppp: [wan_link0] LCP: state change Req-Sent --> Ack-Sent Jun 17 15:26:17 pfSense ppp: [wan_link0] LCP: rec'd Configure Ack #1 (Ack-Sent) Jun 17 15:26:17 pfSense ppp: [wan_link0] ACFCOMP Jun 17 15:26:17 pfSense ppp: [wan_link0] PROTOCOMP Jun 17 15:26:17 pfSense ppp: [wan_link0] ACCMAP 0x000a0000 Jun 17 15:26:17 pfSense ppp: [wan_link0] MRU 1500 Jun 17 15:26:17 pfSense ppp: [wan_link0] MAGICNUM 48ef76cf Jun 17 15:26:17 pfSense ppp: [wan_link0] LCP: state change Ack-Sent --> Opened Jun 17 15:26:17 pfSense ppp: [wan_link0] LCP: auth: peer wants CHAP, I want nothing Jun 17 15:26:17 pfSense ppp: [wan_link0] LCP: LayerUp Jun 17 15:26:17 pfSense ppp: [wan_link0] CHAP: rec'd CHALLENGE #1 len: 37 Jun 17 15:26:17 pfSense ppp: [wan_link0] Name: "HUAWEI_CHAP_SRVR" Jun 17 15:26:17 pfSense ppp: [wan_link0] CHAP: Using authname "user" Jun 17 15:26:17 pfSense ppp: [wan_link0] CHAP: sending RESPONSE #1 len: 25 Jun 17 15:26:17 pfSense ppp: [wan_link0] CHAP: rec'd SUCCESS #1 len: 13 Jun 17 15:26:17 pfSense ppp: [wan_link0] MESG: Welcome!! Jun 17 15:26:17 pfSense ppp: [wan_link0] LCP: authorization successful Jun 17 15:26:17 pfSense ppp: [wan_link0] Link: Matched action 'bundle "wan" ""' Jun 17 15:26:17 pfSense ppp: [wan_link0] Link: Join bundle "wan" Jun 17 15:26:17 pfSense ppp: [wan] Bundle: Status update: up 1 link, total bandwidth 28800 bps Jun 17 15:26:17 pfSense ppp: [wan] IPCP: Open event Jun 17 15:26:17 pfSense ppp: [wan] IPCP: state change Initial --> Starting Jun 17 15:26:17 pfSense ppp: [wan] IPCP: LayerStart Jun 17 15:26:17 pfSense ppp: [wan] IPV6CP: Open event Jun 17 15:26:17 pfSense ppp: [wan] IPV6CP: state change Initial --> Starting Jun 17 15:26:17 pfSense ppp: [wan] IPV6CP: LayerStart Jun 17 15:26:17 pfSense ppp: [wan] IPCP: Up event Jun 17 15:26:17 pfSense ppp: [wan] IPCP: state change Starting --> Req-Sent Jun 17 15:26:17 pfSense ppp: [wan] IPCP: SendConfigReq #1 Jun 17 15:26:17 pfSense ppp: [wan] IPADDR 0.0.0.0 Jun 17 15:26:17 pfSense ppp: [wan] COMPPROTO VJCOMP, 16 comp. channels, no comp-cid Jun 17 15:26:17 pfSense ppp: [wan] PRIDNS 0.0.0.0 Jun 17 15:26:17 pfSense ppp: [wan] SECDNS 0.0.0.0 Jun 17 15:26:17 pfSense ppp: [wan] IPV6CP: Up event Jun 17 15:26:17 pfSense ppp: [wan] IPV6CP: state change Starting --> Req-Sent Jun 17 15:26:17 pfSense ppp: [wan] IPV6CP: SendConfigReq #1 Jun 17 15:26:17 pfSense ppp: [wan] IPCP: rec'd Configure Request #1 (Req-Sent) Jun 17 15:26:17 pfSense ppp: [wan] IPCP: SendConfigAck #1 Jun 17 15:26:17 pfSense ppp: [wan] IPCP: state change Req-Sent --> Ack-Sent Jun 17 15:26:17 pfSense ppp: [wan] IPCP: rec'd Configure Ack #1 (Ack-Sent) Jun 17 15:26:17 pfSense ppp: [wan] IPCP: state change Ack-Sent --> Opened Jun 17 15:26:17 pfSense ppp: [wan] IPCP: LayerUp Jun 17 15:26:17 pfSense ppp: [wan] 0.0.0.0 -> 10.64.64.0 Jun 17 15:26:17 pfSense ppp: [wan] IFACE: Add route 0.0.0.0/0 10.64.64.0 failed: No such process Jun 17 15:26:18 pfSense ppp: [wan] IFACE: Up event Jun 17 15:26:18 pfSense ppp: [wan] IFACE: Rename interface ng0 to ppp0 Jun 17 15:26:19 pfSense ppp: [wan] IPV6CP: SendConfigReq #2 Jun 17 15:26:21 pfSense ppp: [wan] IPV6CP: SendConfigReq #3 Jun 17 15:26:23 pfSense ppp: [wan] IPV6CP: SendConfigReq #4 Jun 17 15:26:25 pfSense ppp: [wan] IPV6CP: SendConfigReq #5 Jun 17 15:26:27 pfSense ppp: [wan] IPV6CP: SendConfigReq #6 Jun 17 15:26:29 pfSense ppp: [wan] IPV6CP: SendConfigReq #7 Jun 17 15:26:31 pfSense ppp: [wan] IPV6CP: SendConfigReq #8 Jun 17 15:26:33 pfSense ppp: [wan] IPV6CP: SendConfigReq #9 Jun 17 15:26:35 pfSense ppp: [wan] IPV6CP: SendConfigReq #10 Jun 17 15:26:37 pfSense ppp: [wan] IPV6CP: parameter negotiation failed Jun 17 15:26:37 pfSense ppp: [wan] IPV6CP: state change Req-Sent --> Stopped Jun 17 15:26:37 pfSense ppp: [wan] IPV6CP: LayerFinish Jun 17 15:26:47 pfSense ppp: [wan_link0] LCP: no reply to 1 echo request(s) Jun 17 15:26:57 pfSense ppp: [wan_link0] LCP: no reply to 2 echo request(s) Jun 17 15:27:07 pfSense ppp: [wan_link0] LCP: no reply to 3 echo request(s) Jun 17 15:27:17 pfSense ppp: [wan_link0] NEW FRAME ERRS: FCS 1 RUNT 0 OVFL 0 Jun 17 15:27:17 pfSense ppp: [wan_link0] LCP: no reply to 4 echo request(s) Jun 17 15:27:27 pfSense ppp: [wan_link0] LCP: no reply to 5 echo request(s) Jun 17 15:27:27 pfSense ppp: [wan_link0] LCP: peer not responding to echo requests Jun 17 15:27:27 pfSense ppp: [wan_link0] LCP: state change Opened --> Stopping Jun 17 15:27:27 pfSense ppp: [wan_link0] Link: Leave bundle "wan" Jun 17 15:27:27 pfSense ppp: [wan] Bundle: Status update: up 0 links, total bandwidth 9600 bps Jun 17 15:27:27 pfSense ppp: [wan] IPCP: Close event
Conny
-
Hmm, not really sure here.
If you look in the main system logs do you see any apinger entries at the same time? It could be the gateway doesn't respond to pings causing apinger to mark it as down.Steve