-
Hi Everyone,
I am trying to setup a backup connection using a huawei k5160 4g mobile broadband usb doungle and i am getting some issues.
I set up an PPP interface :
/dev/cuau0 to /dev/cuau5
selectec /dev/cuau0
and added the country and so on.
In the logs of PPP i keep getting :
ppp: process 40749 started, version 5.7 (root@pfSense_RELENG_2_2_amd64_amd64-pfSense_RELENG_2_2-job-03 20:05 21-Aug-2015)
ppp: web: web is not running
ppp: [opt3] Bundle: Interface ng1 created
ppp: [opt3_link0] Link: OPEN event
ppp: [opt3_link0] LCP: Open event
ppp: [opt3_link0] LCP: state change Initial –> Starting
ppp: [opt3_link0] LCP: LayerStart
ppp: [opt3_link0] CHAT: The modem is not responding to "AT" at ModemCmd: label.
ppp: [opt3_link0] MODEM: chat script failed
ppp: Multi-link PPP daemon for FreeBSDThe interface is up but no ip address:
Status up
PPP
up
Uptime 00:00:0
MAC address 00:00:00:00:00:00
IPv6 Link Local fe80::2e8:4cff:fe68:2248
MTU 1500
In/out packets 0/5 (0 bytes/476 bytes)
In/out packets (pass) 0/5 (0 bytes/476 bytes)
In/out packets (block) 0/0 (0 bytes/0 bytes)
In/out errors 0/0
Collisions 0Here is the mpd_opt3.conf
startup:
configure the console
set console close
configure the web server
set web close
default:
pppclient:
create bundle static opt3
set bundle enable ipv6cp
set iface name ppp1
set iface disable on-demand
set iface idle 0
set iface enable tcpmssfix
set iface up-script /usr/local/sbin/ppp-linkup
set iface down-script /usr/local/sbin/ppp-linkdown
set ipcp ranges 0.0.0.0/0 10.64.64.1/0
set ipcp enable req-pri-dns
set ipcp enable req-sec-dns
#log -bund -ccp -chat -iface -ipcp -lcp -linkcreate link static opt3_link0 modem
set link action bundle opt3
set link disable multilink
set link keep-alive 10 60
set link max-redial 0
set link disable chap pap
set link accept chap pap eap
set link disable incoming
set link mtu 1492
set auth authname "web"
set auth password web
set modem device /dev/cuau0
set modem script DialPeer
set modem idle-script Ringback
set modem watch -cd
set modem var $DialPrefix "DT"
set modem var $Telephone "*99#"
set modem var $APN "internet"
set modem var $APNum "1"
openI am running :
2.2.6-RELEASE (amd64)
built on Mon Dec 21 14:50:08 CST 2015
FreeBSD 10.1-RELEASE-p25Can anyone help please
Regards,
Raj
-
anyone any ideas please
-
Hi Team,
I got a different modem this time a Huawei E5372 which is on the list of supported devices but still can not get it to work.
This is what I have in the logs:
usbus0: 5.0Gbps Super Speed USB v3.0
usbus1: 480Mbps High Speed USB v2.0
usbus2: 480Mbps High Speed USB v2.0
ugen1.1: <intel>at usbus1
uhub0: <intel 1="" 9="" ehci="" root="" hub,="" class="" 0,="" rev="" 2.00="" 1.00,="" addr="">on usbus1
ugen0.1: <0x8086> at usbus0
uhub1: <0x8086 XHCI root HUB, class 9/0, rev 3.00/1.00, addr 1> on usbus0
ugen2.1: <intel>at usbus2
uhub2: <intel 1="" 9="" ehci="" root="" hub,="" class="" 0,="" rev="" 2.00="" 1.00,="" addr="">on usbus2
uhub1: 8 ports with 8 removable, self powered
uhub0: 2 ports with 2 removable, self powered
uhub2: 2 ports with 2 removable, self powered
ugen1.2: <vendor 0x8087="">at usbus1
uhub3: <vendor 2="" 9="" 0x8087="" product="" 0x0024,="" class="" 0,="" rev="" 2.00="" 0.00,="" addr="">on usbus1
ugen2.2: <vendor 0x8087="">at usbus2
uhub4: <vendor 2="" 9="" 0x8087="" product="" 0x0024,="" class="" 0,="" rev="" 2.00="" 0.00,="" addr="">on usbus2
ugen0.2: <vodafone group="" huawei="">at usbus0
umass0: <vodafone 0="" 1="" group="" huawei="" vodafone="" mobile="" broadband="" huawei,="" class="" 0,="" rev="" 2.00="" 1.02,="" addr="">on usbus0
umass1: <vodafone 0="" 1="" group="" huawei="" vodafone="" mobile="" broadband="" huawei,="" class="" 0,="" rev="" 2.00="" 1.02,="" addr="">on usbus0
uhub3: 6 ports with 6 removable, self powered
uhub4: 8 ports with 8 removable, self powered
ada0 at ahcich0 bus 0 scbus0 target 0 lun 0
cd0 at umass-sim0 bus 0 scbus2 target 0 lun 0
cd0: <vodafone cd="" rom="" (huawei)="" 2.31="">Removable CD-ROM SCSI-2 device
cd0: 40.000MB/s transfers
cd0: cd present [65536 x 2048 byte records]
cd0: quirks=0x10<10_BYTE_ONLY>
ada0: <axns381e-64gm-b 2.9f="">ATA-9 SATA 3.x device
ada0: Serial Number 2D5120007334
ada0: 600.000MB/s transfers (SATA 3.x, UDMA5, PIO 8192bytes)
ada0: Command Queueing enabled
ada0: 61057MB (125045424 512 byte sectors: 16H 63S/T 16383C)
ada0: Previously was known as ad4
ses0 at ahciem0 bus 0 scbus1 target 0 lun 0
ses0: <ahci sgpio="" enclosure="" 1.00="" 0001="">SEMB S-E-S 2.00 device
ses0: SEMB SES Device
SMP: AP CPU #1 Launched!
Timecounter "TSC" frequency 1795955188 Hz quality 1000
da0 at umass-sim1 bus 1 scbus3 target 0 lun 0
da0: <vodafone sd="" storage="" 2.31="">Removable Direct Access SCSI-2 device
da0: 40.000MB/s transfers
da0: Attempt to query device size failed: ILLEGAL REQUEST, Invalid field in CDB
da0: quirks=0x2 <no_6_byte>(cd0:umass-sim0:0:0:0): READ(10). CDB: 28 00 00 00 ff ff 00 00 01 00
(cd0:umass-sim0:0:0:0): CAM status: SCSI Status Error
(cd0:umass-sim0:0:0:0): SCSI status: Check Condition
(cd0:umass-sim0:0:0:0): SCSI sense: MEDIUM ERROR asc:11,0 (Unrecovered read error)
(cd0:umass-sim0:0:0:0): Info: 0xffff
(cd0:umass-sim0:0:0:0): Error 5, Unretryable error
(cd0:umass-sim0:0:0:0): cddone: got error 0x5 back
(cd0:umass-sim0:0:0:0): READ(10). CDB: 28 00 00 00 ff ff 00 00 01 00
(cd0:umass-sim0:0:0:0): CAM status: SCSI Status Error
(cd0:umass-sim0:0:0:0): SCSI status: Check Condition
(cd0:umass-sim0:0:0:0): SCSI sense: MEDIUM ERROR asc:11,0 (Unrecovered read error)
(cd0:umass-sim0:0:0:0): Info: 0xffff
(cd0:umass-sim0:0:0:0): Error 5, Unretryable error
(cd0:umass-sim0:0:0:0): cddone: got error 0x5 back
(cd0:umass-sim0:0:0:0): READ(10). CDB: 28 00 00 00 ff fe 00 00 01 00
(cd0:umass-sim0:0:0:0): CAM status: SCSI Status Error
(cd0:umass-sim0:0:0:0): SCSI status: Check Condition
(cd0:umass-sim0:0:0:0): SCSI sense: MEDIUM ERROR asc:11,0 (Unrecovered read error)
(cd0:umass-sim0:0:0:0): Info: 0xfffe
(cd0:umass-sim0:0:0:0): Error 5, Unretryable error
(cd0:umass-sim0:0:0:0): cddone: got error 0x5 back
(cd0:umass-sim0:0:0:0): READ(10). CDB: 28 00 00 00 ff c1 00 00 04 00
(cd0:umass-sim0:0:0:0): CAM status: SCSI Status ErrorCan anyone please help.
I am willing to send some beer money £50.00 via paypal to the person able to get this sorted.
Regards,
Raj</no_6_byte></vodafone></ahci></axns381e-64gm-b></vodafone></vodafone></vodafone></vodafone></vendor></vendor></vendor></vendor></intel></intel></intel></intel>
-
Here is a usbconfig
ugen1.1: <ehci root="" hub="" intel="">at usbus1, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=S AVE (0mA)
ugen0.1: <xhci root="" hub="" 0x8086="">at usbus0, cfg=0 md=HOST spd=SUPER (5.0Gbps) pwr =SAVE (0mA)
ugen2.1: <ehci root="" hub="" intel="">at usbus2, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=S AVE (0mA)
ugen1.2: <product 0x0024="" vendor="" 0x8087="">at usbus1, cfg=0 md=HOST spd=HIGH (480Mb ps) pwr=SAVE (0mA)
ugen2.2: <product 0x0024="" vendor="" 0x8087="">at usbus2, cfg=0 md=HOST spd=HIGH (480Mb ps) pwr=SAVE (0mA)
ugen0.2: <vodafone mobile="" broadband="" huawei="" vodafone="" group="">at usbus0, cfgusbconfig -d ugen0.2 dump_device_desc
ugen0.2: <vodafone mobile="" broadband="" huawei="" vodafone="" group="">at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (500mA)
bLength = 0x0012
bDescriptorType = 0x0001
bcdUSB = 0x0200
bDeviceClass = 0x0000
bDeviceSubClass = 0x0000
bDeviceProtocol = 0x0000
bMaxPacketSize0 = 0x0040
idVendor = 0x12d1
idProduct = 0x1582
bcdDevice = 0x0102
iManufacturer = 0x0002 <vodafone group="" (huawei)="">iProduct = 0x0001 <vodafone mobile="" broadband="" (huawei)="">iSerialNumber = 0x0000 <no string="">bNumConfigurations = 0x0001and the modem is a Vodafone R215 4G Mobile Broadband WiFi WLAN which is a Huawei E5372
Hope this helps
Regards,
Raj</no></vodafone></vodafone></vodafone></vodafone></product></product></ehci></xhci></ehci>
-
I will reply to the issue with E5372 here and will probably move this later to a separate topic dedicated to Huawei modems.
In short - the main issue is with "idProduct = 0x1582". This modem does not have a "4G MODEM" in it's composition (check with AT^SETPORT=?), so the only option is to use it as a network card (NCM), but it seems that pfSense will not detect "cdce0" on the modem with unknown PID.
But first I will post a WARNING:
At some point a new interface ue0 will be created. If for some reasons the router will reboot while the modem is off or disconnected you will be trapped with the following message during boot:Warning: Configuration references interfaces that do not exist: ue0
Network interface mismatch – Running interface assignment option.Have your console ready!
Now the process:
1. Flash the modem with the generic software like 21.290.21.00.00 (this is what I use)
I cannot tell this is a mandatory, but most likely this is very important. Check the corresponding forums before flashing your modem if you don't need a brick :)
You may need a flash code which is generated from IMEI.2. make sure the modem has the right composition, you should have a proper one after flashing. Checking from any terminal:
Send:AT^SETPORT? Recieve: ^SETPORT:A1,A2;12,16,A1,A2 Recieve: OK
Setting the values if necessary:
Send:AT^SETPORT="A1,A2;12,16,A1,A2" Recieve: OK
3. Now it's time to plug it into the router. Checking with dmesg:
ugen1.2: <huawei technology="">at usbus1 u3g0: <huawei 0="" 2="" technology="" huawei="" mobile,="" class="" 0,="" rev="" 2.00="" 1.02,="" addr="">on usbus1 u3g0: Found 1 port. followed by a lot of garbage about SCSI</huawei></huawei>
We can have CD-ROM component disabled, this will remove the garbage but will give as wrong "idProduct".
4. checking "idProduct="
/root: usbconfig -d ugen1.2 dump_device_desc ugen1.2: <huawei mobile="" huawei="" technology="">at usbus1, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (500mA) bLength = 0x0012 bDescriptorType = 0x0001 bcdUSB = 0x0200 bDeviceClass = 0x0000 bDeviceSubClass = 0x0000 bDeviceProtocol = 0x0000 bMaxPacketSize0 = 0x0040 idVendor = 0x12d1 idProduct = 0x1c1e bcdDevice = 0x0102 iManufacturer = 0x0002 <huawei technology="">iProduct = 0x0001 <huawei mobile="">iSerialNumber = 0x0000 <no string="">bNumConfigurations = 0x0001</no></huawei></huawei></huawei>
5. pfSense 'knows' about "idProduct = 0x1c1e" and now we should have ue0 interface created. Checking:
dmesg ue0: <usb ethernet=""> on cdce0 ifconfig ... ue0: flags=8843 <up,broadcast,running,simplex,multicast>metric 0 mtu 1500 ...</up,broadcast,running,simplex,multicast></usb>
6. From the browser: Interfaces - (assign) - add new (OPT2) or take an existing and choose ue0 from dropdown.
7. Enable OPT2 and set it to DHCP
8. System - Gateways - set the new one as Default and check:/root: netstat -r Routing tables Internet: Destination Gateway Flags Netif Expire default 192.168.8.1 UGS ue0
The modem will assign an IP to OPT2, in this example 192.168.8.1 is a LAN address of the modem.
Modem will connect to the Internet automatically if configured on the modem.9. Navigate to NAT - Outbound - pick the rule for LAN subnet and configure the Interface (==gateway)
10. make sure everything works
-
Hi AndrewZ
Thanks for the guide.
Still have a few questions, sorry if they are silly but never done it before.
"In short - the main issue is with "idProduct = 0x1582". This modem does not have a "4G MODEM" in it's composition (check with AT^SETPORT=?), so the only option is to use it as a network card (NCM), but it seems that pfSense will not detect "cdce0" on the modem with unknown PID."
I do get a 4G signal with this modem
"But first I will post a WARNING:
At some point a new interface ue0 will be created. If for some reasons the router will reboot while the modem is off or disconnected you will be trapped with the following message during boot:
QuoteWarning: Configuration references interfaces that do not exist: ue0
Network interface mismatch – Running interface assignment option.Have your console ready!"
is there a way to avoid this, I think no but had to ask
"Now the process:
1. Flash the modem with the generic software like 21.290.21.00.00 (this is what I use)
I cannot tell this is a mandatory, but most likely this is very important. Check the corresponding forums before flashing your modem if you don't need a brick :)
You may need a flash code which is generated from IMEI."where can i get the firmware, this is a vodaphone one and if I go on the website of huawei, there is no firmware for this model
Also as its usb connected and its going via productID, if i connect it to a different port, it should not be a problem should it. I think no again had to ask
Regards,
Raj
-
The whole story has no relation to the radio part (3G, 4G, signal level, etc).
To avoid boot issues I suggest to always use the same USB port and keep the modem on. Alternatively you can have a backup configuration file with or without ue0 and load it then necessary.
idProduct or PID depends on the modem itself, on it's branding and composition (CD-ROM + Network card). You should see the same PID regardless of port your modem is plugged in.I can send you some links to firmware files as well as a flash code. Please PM me with IMEI of the modem. Please be careful with upgrade - I heard that some people had issues loading generic/unbranded firmware on Vodafone branded 5372. Just search what people say.
Few other possibilities to complete the picture:
- on some modems it is possible to change a PID directly, never tried on 5372
- having support for the modern PIDs in the kernel will significantly simplify our lifes; at the moment people are patching/recompiling a kernel to their needs
-
Hi AndrewZ,
Just send you a PM with the IMEI as requested.
Regards,
Raj
-
Hello
i would like to plug my Huawei E5372 to my virtual pfsense build on my esxi. But Esxi don't recognize it. (Generic firmware upgrade OK)
The AT commands AT^SETPORT? returns:
^SETPORT:A1,A2;12,16,A1,A2
Do you know the AT commands to resolve my problems?
Regards
-
Hi igloox, just noticed your question
Please correct me if I'm wrong - you have an operator branded modem and you already loaded universal/generic firmware?
Could you please show the result of AT^NVRD=50071Prior to that you need to unlock some commands with AT^DATALOCK="v201 code"
If you don't have the code - please PM me your IMEI. -
Post 5, step 5, USB is seen by pfSense 2.4.4, however the interface ue0 does not appear?
-
Is there any news about the K5160? Now on FreeBSD14 it's still recognized as an usb mass device and not as an LTE mode. I think before buying a new LTE modem it's worth a shot.
In the system log i find this:Sep 16 23:56:05 ppp 40698 [opt1_link0] LCP: Down event Sep 16 23:56:05 ppp 40698 [opt1_link0] Link: DOWN event Sep 16 23:56:05 ppp 40698 [opt1_link0] MODEM: chat script failed Sep 16 23:56:05 ppp 40698 [opt1_link0] CHAT: The modem is not responding to "AT" at ModemCmd: label. Sep 16 23:55:52 ppp 40698 [opt1_link0] Link: reconnection attempt 5 Sep 16 23:55:49 ppp 40698 [opt1_link0] Link: reconnection attempt 5 in 3 seconds Sep 16 23:55:49 ppp 40698 [opt1_link0] LCP: Down event Sep 16 23:55:49 ppp 40698 [opt1_link0] Link: DOWN event Sep 16 23:55:49 ppp 40698 [opt1_link0] MODEM: chat script failed Sep 16 23:55:49 ppp 40698 [opt1_link0] CHAT: The modem is not responding to "AT" at ModemCmd: label. Sep 16 23:55:36 ppp 40698 [opt1_link0] Link: reconnection attempt 4 Sep 16 23:55:33 ppp 40698 [opt1_link0] Link: reconnection attempt 4 in 3 seconds Sep 16 23:55:33 ppp 40698 [opt1_link0] LCP: Down event Sep 16 23:55:33 ppp 40698 [opt1_link0] Link: DOWN event Sep 16 23:55:33 ppp 40698 [opt1_link0] MODEM: chat script failed Sep 16 23:55:33 ppp 40698 [opt1_link0] CHAT: The modem is not responding to "AT" at ModemCmd: label. Sep 16 23:55:18 ppp 40698 [opt1_link0] Link: reconnection attempt 3 Sep 16 23:55:16 ppp 40698 [opt1_link0] Link: reconnection attempt 3 in 2 seconds Sep 16 23:55:16 ppp 40698 [opt1_link0] LCP: Down event Sep 16 23:55:16 ppp 40698 [opt1_link0] Link: DOWN event Sep 16 23:55:16 ppp 40698 [opt1_link0] MODEM: chat script failed Sep 16 23:55:16 ppp 40698 [opt1_link0] CHAT: The modem is not responding to "AT" at ModemCmd: label. Sep 16 23:55:01 ppp 40698 [opt1_link0] Link: reconnection attempt 2 Sep 16 23:55:00 ppp 40698 [opt1_link0] Link: reconnection attempt 2 in 1 seconds Sep 16 23:55:00 ppp 40698 [opt1_link0] LCP: Down event Sep 16 23:55:00 ppp 40698 [opt1_link0] Link: DOWN event Sep 16 23:55:00 ppp 40698 [opt1_link0] MODEM: chat script failed
-
I also add that if i create a PPP the Huawei LED starts blinking until it reaches purple which should mean that it's connected but you should check the connection if it's active
-
@GiaNN said in Huawei k5160 4g usb mobile broadband:
if i create a PPP the Huawei LED starts blinking
Create it how?
There's a good chance there are multiple versions of that modem and that they behave differently, Many modems do.
Steve
-
-
@stephenw10 through the interfaces GUI, in the section PPP.
Then if i enable the interface the LED starts blinking but it cannot properly start PPP -
So you see USB serial ports created? Like cuaU0-3?
-
@stephenw10 i don't remember, where i see that?
I used as device the /dev/cuau0 and then it started blinking if enabled. -
/dev/cuau0 is one of the on-board com ports not the modem. The ports created by a modem are shown with an uppercase 'U' to indicate they are USB connected.
Plug in the modem and then check the system log. If it's recognised you will see log entries showing the new ports created.
-
@stephenw10 in dmesg shows this:
ugen2.2: <Vodafone (Huawei) Vodafone (Huawei)> at usbus2 umass0 on uhub0 umass0: <Mass Storage> on usbus2 cd0 at umass-sim0 bus 0 scbus2 target 0 lun 0 cd0: <HUAWEI Mass Storage 2.31> Removable CD-ROM SCSI-2 device cd0: Serial Number 0123456789ABCDEF cd0: 40.000MB/s transfers cd0: Attempt to query device size failed: NOT READY, Medium not present cd0: quirks=0x10<10_BYTE_ONLY> da0 at umass-sim0 bus 0 scbus2 target 0 lun 1 da0: <HUAWEI TF CARD Storage 2.31> Removable Direct Access SCSI-2 device da0: Serial Number 0123456789ABCDEF da0: 40.000MB/s transfers da0: Attempt to query device size failed: NOT READY, Medium not present da0: quirks=0x2<NO_6_BYTE>
-
Ok, so u3g doesn't recognise it. You should see something like:
uhub0: 8 ports with 8 removable, self powered ugen0.2: <Huawei Technologies Co., Ltd. HUAWEI Mobile> at usbus0 u3g0 on uhub0 u3g0: <Huawei Mobile Connect - Modem> on usbus0 u3g0: Found 5 ports.
If it can work at all it probably needs to be modeswitched. Or reflashed with different firmware.
Note that the OP here never got this modem working, they switched to a different device. And I don't see an entry for it in u3g:
https://github.com/pfsense/FreeBSD-src/blob/devel-main/sys/dev/usb/serial/u3g.c#L339Steve