Hello you all... I'm new with OpenWRT and I have to use it to program an embedded system... I have to use a GSM/GPRS or UMTS module to send and receive data through the phone net, do you know if there are some modules supported by OpenWRT or with binary drivers? Have you ever done something like this?
Topic: UMTS or GSM/GPRS module
The content of this topic has been archived on 30 Mar 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.
You may want to read this Use 3g/UMTS USB Dongle for WAN connection.
I'm trying to make my unlocked Huawei UMG 1691 to work as a wan for testing, but I can't find the solution...
The hardware I'm using is:
Router TP-Link MR3420 (AR7xxx),
USB powered hub
USB flash drive 4gb, for extroot
USB wireless adapter Tplink wn722n (Atheros AR9271) running as wan2 interface / wireless client
USB 3G Dongle Huawi UMG 1691, that I'm trying to put as another wan (wan3).
Openwrt version =I have no idea. How to know???
This is what I found:
Via Luci: OpenWrt Attitude Adjustment (r27832)
Via SSH: ATTITUDE ADJUSTMENT (bleeding edge, r27797)
LuCI Trunk (v0.10+svn7335)
This is the kernel log:
option 1-1.4.2:1.0: GSM modem (1-port) converter detected
usb 1-1.4.2: GSM modem (1-port) converter now attached to ttyUSB0
option 1-1.4.2:1.3: GSM modem (1-port) converter detected
usb 1-1.4.2: GSM modem (1-port) converter now attached to ttyUSB1
option 1-1.4.2:1.4: GSM modem (1-port) converter detected
usb 1-1.4.2: GSM modem (1-port) converter now attached to ttyUSB2
scsi26 : usb-storage 1-1.4.2:1.5
scsi27 : usb-storage 1-1.4.2:1.6
scsi 26:0:0:0: CD-ROM HUAWEI Mass Storage 2.31 PQ: 0 ANSI: 2
scsi 27:0:0:0: Direct-Access HUAWEI SD Storage 2.31 PQ: 0 ANSI: 2
sd 27:0:0:0: [sdb] Attached SCSI removable disk
option: option_instat_callback: error -71
option: option_instat_callback: error -71
The device is detected, but it doesnt switch to gsm-modem mode. I believe the USB_ModeSwitch isn't working or isn't running, but it's installed...
The command huaweiAktBbo returns an error:
"Searching modem...No supported modem found"
What do I need to do to make it work?
option 1-1.4.2:1.0: GSM modem (1-port) converter detected
usb 1-1.4.2: GSM modem (1-port) converter now attached to ttyUSB0
option 1-1.4.2:1.3: GSM modem (1-port) converter detected
usb 1-1.4.2: GSM modem (1-port) converter now attached to ttyUSB1
option 1-1.4.2:1.4: GSM modem (1-port) converter detected
usb 1-1.4.2: GSM modem (1-port) converter now attached to ttyUSB2
This means it did switch to GSM mode and the option driver detected the modem. You don't need to use huaweiAktBbo with USB Modeswitch.
Well... almost getting it... the device is in ttyUSB0
Command gcom results:
----------------
root@OpenWrt:~# gcom -d /dev/ttyUSB0
Trying list of devices
SIM ready
Waiting for Registration..(120 sec max)
Registered on Home network: "72404",0
Signal Quality: 18,99
It means that the modem is recognized and it got attached to mobile telecom network...
but when I try to connect the interface, I got this results in system log:
Aug 10 21:59:19 OpenWrt local2.info chat[5633]: send (ATD*99#^M)
Aug 10 21:59:19 OpenWrt local2.info chat[5633]: expect (CONNECT)
Aug 10 21:59:19 OpenWrt local2.info chat[5633]: ^M
Aug 10 21:59:19 OpenWrt local2.info chat[5633]: ATD*99#^M^M
Aug 10 21:59:19 OpenWrt local2.info chat[5633]: NO CARRIER
Aug 10 21:59:19 OpenWrt local2.info chat[5633]: -- failed
Aug 10 21:59:19 OpenWrt local2.info chat[5633]: Failed (NO CARRIER)
Aug 10 21:59:19 OpenWrt daemon.err pppd[5611]: Connect script failed
--------------------------------------
*99# is the dial number used in Brazil, but anyway I even tried to change the number to *99***1#, but got the same result.
This is the chat script, I just changed the dial number:
ABORT BUSY
ABORT 'NO CARRIER'
ABORT ERROR
REPORT CONNECT
TIMEOUT 10
"" "AT&F"
OK "ATE1"
OK 'AT+CGDCONT=1,"IP","$USE_APN"'
SAY "Calling UMTS/GPRS"
TIMEOUT 30
OK "ATD*99#"
CONNECT ' '
What's your /etc/config/network look like? Did you set an APN?
config 'interface' '3G0'
option 'ifname' '3G0'
option 'proto' '3g'
option 'service' 'umts'
option 'apn' 'tim.br'
option 'username' 'tim'
option 'password' 'tim'
option 'maxwait' '0'
option 'device' '/dev/ttyUSB0'
I think the "NO CARRIER" you are receiving indicates a failure to connect to the APN. I would try a different APN. Also, make sure you are using the network your SIM is registered for... unless you have an unlocked SIM.
Other things to try:
- Try a different tty (e.g. ttyUSB1 or ttyUSB2).
- Remove the 'max wait' option. I don't think you want this set to 0.
- Remove the username/password. I don't know about your carrier, but I have never had to use these.
Ill post a short how to from eko.one.pl - I found it the most straightforward method to use 3G (IMHO that is...).
Basically, at first you need to check if You have required packages installed. Than You configure new lan interface and start it.
If Youll only use 3G modem to connect to internet issue following command in terminal window:
# opkg update
# opkg install kmod-usb-core kmod-usb2 kmod-usb-serial kmod-usb-serial-option usb-modeswitch usb-modeswitch-data libusb
# opkg install chat comgt
# uci del network.wan
# uci set network.wan=interface
# uci set network.wan.proto=3g
# uci set network.wan.service=umts
# uci set network.wan.device=/dev/ttyUSB0
# uci set network.wan.pincode=1234
# uci set network.wan.apn=internet
# uci set network.wan.username=''
# uci set network.wan.password=''
# uci commit network
# ifup wan
Your /etc/config/network should have :
config 'interface' 'wan'
option 'device' '/dev/ttyUSB0'
option 'apn' 'internet'
option 'service' 'umts'
option 'proto' '3g'
option 'pincode' '1234'
option 'username' ''
option 'password' ''
Thats it. You should have working internet connection.
IF You already use WAN as internet connection and want to add additional interface Wan interface should be replaced with new interface name, like ie: HDSPA.
Remember: You need to use different interface name (change WAN to HDSPA) prior to put abovementioned commands or Youll remove existing WAN settings.
Now You need to put following command to firewall /etc/config/firewall:
config zone
option name HSDPA
option input REJECT
option output ACCEPT
option forward REJECT
option masq 1
config forwarding
option src lan
option dest HSDPA
Than run in terminal:
ifup HDSPA
After few seconds you should have message:
SIM ready
PIN set successfully
This will work if Your modem has been recognized by openwrt and modemswitch change its mode from cd/memoty to modem.
If your router isnt connected anywhere Youll need to download all packages locally through another computer and put all required pacjages into the router through SSH and install them locally.
Cezary from eko.one.pl maintain newest images with preconfigured support for newest 3g modems.
Images are at: http://ecco.selfip.net/backfire/ar71xx
PAckets for those images are : http://ecco.selfip.net/backfire/ar71xx/packages/
(Last edited by janptak on 15 Aug 2011, 06:14)
One more thing : try switch modem with following command
usb_modeswitch -I -c /etc/usb_modeswitch.d/12d1:1446
Its taken from http://www.draisberghof.de/usb_modeswit … .php?t=641 and its tailored to your specific modem
The discussion might have continued from here.