Instalare modem USB 3G orice model

Instalare modem USB 3G orice model.

Tutorialul de mai jos este pentru OpenWrt BackFire 10.03
http://backfire.openwrt.org/10.03/br...4-squashfs.trx
Modemul trebuie sa fie conectat la internet pe interfata de wan.


root@balauru:/#opkg update

root@balauru:/#opkg install kmod-usb-uhci kmod-usb-serial

In acest moment modemul este vazut ca flash stick usb mass storage

root@balauru:/# dmesg|tail
usb.c: new USB bus registered, assigned bus number 1
hub.c: USB hub found
hub.c: 2 ports detected
PCI: Enabling device 01:03.1 (0000 -> 0001)
uhci.c: USB UHCI at I/O 0x120, IRQ 2
usb.c: new USB bus registered, assigned bus number 2
hub.c: USB hub found
hub.c: 2 ports detected
hub.c: new USB device 01:03.0-1, assigned address 2
usb.c: USB device 2 (vend/prod 0x12d1/0x1446) is not claimed by any active driver. <<<<<<<<<<< asta-i
root@balauru:/#

root@balauru:/#opkg install usb-modeswitch

root@balauru:/# cd /etc
root@balauru:/# wget http://www.draisberghof.de/usb_modeswit ... erence.txt
root@balauru:/# mv device_reference.txt usb-modeswitch.conf

Listati cu

root@balauru:/#cat usb-modeswitch.conf
si cautati daca este listat modemul vostru sau cautati vend/prod 0x12d1/0x1446
Editati cu vi

root@balauru:/#vi usb-modeswitch.conf

si stergeti ; din dreptul

; DefaultVendor= 0x12d1
; DefaultProduct= 0x1446

root@balauru:/#vi usb-modeswitch.conf
Trebuie sa stegeti ; dupa cum se vede mai jos
########################################################
# Huawei E1550
# Huawei E1750
#
# Contributor: Anders Blomdell, Ahmed Soliman

DefaultVendor= 0x12d1
DefaultProduct= 0x1446

TargetVendor= 0x12d1
TargetProduct= 0x1001

MessageContent="55534243123456780000000000000011060000000000000000000000000000"

########################################################

In mod USB mass storage are vendor 0x12d1 si product 0x1446
In mod modem 3G are vendor 0x12d1 si product 0x1001
root@balauru:/#reboot

Se verifica daca a schimbat stikul din usb mass storage in modem :

root@balauru:/# usb_modeswitch

Looking for target devices ...
No devices in target mode or class found
Looking for default devices ...
Found default devices (1)
Accessing device 002 on bus 002 ...
Using endpoints 0x01 (out) and 0x81 (in)
Inquiring device details; driver will be detached ...
Looking for active driver ...
No driver found. Either detached before or never attached

SCSI inquiry data (for identification)
-------------------------
Vendor String: Orange
Model String: CD ROM (Huawei)
Revision String: 2.31
-------------------------

USB description data (for identification)
-------------------------
Manufacturer: HUAWEI Technology
Product: HUAWEI Mobile
Serial No.: 0123456789ABCDEF
-------------------------
Setting up communication with interface 0 ...
Trying to send the message to endpoint 0x01 ...
OK, message successfully sent
Device is gone, skipping any further commands
-> Run lsusb to note any changes. Bye.


Configurati usb-modeswitch sa schimbe stickul din mass storage in modem inainte de a initia driverele dupa fiecare reboot astfel :

root@balaurul:~# cat>/etc/init.d/usb-modeswitch
#!/bin/sh /etc/rc.common
#

START=50
start() {

usb_modeswitch

}
^D <<<<<<<<<< apasati CTRL+D
root@balaurul:/etc/rc.d# chmod +x /etc/init.d/usb-modeswitch
root@balaurul:/etc/rc.d# /etc/init.d/usb-modeswitch enable
root@balaurul:/etc/rc.d#reboot

Asociem modemul cu product/vendor :

root@balaurul:~# cat>/etc/modules.d/60-usb-serial
usbserial vendor=0x12d1 product=0x1001 maxSize=4096
^D
root@balaurul:~# reboot

In log ar trebui sa vedem asa ceva :

hub.c: USB hub found
hub.c: 2 ports detected
usb.c: registered new driver serial
usbserial.c: USB Serial support registered for Generic
usbserial.c: USB Serial Driver core v1.4
hub.c: new USB device 01:02.0-2, assigned address 2
usb.c: USB device 2 (vend/prod 0x12d1/0x1446) is not claimed by any active driver.
device wl0 entered promiscuous mode
wl0: attempt to add interface with same source address.
br-lan: port 2(wl0) entering learning state
br-lan: port 2(wl0) entering forwarding state
br-lan: topology change detected, propagating
usbdevfs: process 642 (usb_modeswitch) did not claim interface 0 before use
usb.c: USB disconnect on device 01:02.0-2 address 2
hub.c: new USB device 01:02.0-2, assigned address 3
usbserial.c: Generic converter detected
usbserial.c: Generic converter now attached to ttyUSB0 (or usb/tts/0 for devfs)
usbserial.c: Generic converter detected
usbserial.c: Generic converter now attached to ttyUSB1 (or usb/tts/1 for devfs)
usbserial.c: Generic converter detected
usbserial.c: Generic converter now attached to ttyUSB2 (or usb/tts/2 for devfs)
usbserial.c: Generic converter detected
usbserial.c: Generic converter now attached to ttyUSB3 (or usb/tts/3 for devfs)
usbserial.c: Generic converter detected
usbserial.c: Generic converter now attached to ttyUSB4 (or usb/tts/4 for devfs)
usbserial.c: Generic converter detected
usbserial.c: Generic converter now attached to ttyUSB5 (or usb/tts/5 for devfs)
root@balaurul:~#

Instalam comgt
root@balaurul:~# opkg update
root@balaurul:~# opkg install comgt


Din interfata grafica la Network interface wan
Atentie la APN !!! Pentru internet public Orange acesta este ¨internet¨ fara unsername si parola.

Pentru Vodafone:
APN:internet.vodafone.ro
Username:internet.vodafone.ro
Password:internet

http://modmyi.com/wiki/index.php/Car..._.28Romania.29

Configuram wan-ul , de obicei este : /dev/usb/tts/0

Ridicam interfata wan daca avem succes mesajul trebuie sa fie acesta :

root@balaurul:~# ifup wan
Trying to set PIN
PIN set successfully
root@balaurul:~#

Si in acest moment modemul 3g trebuie sa beculeasca continuu.

Se scrie script de initializare interfata wan.

root@balaurul:/etc/rc.d# cat>/etc/init.d/wan
#!/bin/sh /etc/rc.common
# Written by Simon Josefsson 2009-03-05. Released into the public domain.

START=90
start() {
ifup wan
}
^D
root@balaurul:/etc/rc.d# chmod +x /etc/init.d/wan
root@balaurul:/etc/rc.d# /etc/init.d/wan enable
root@balaurul:/etc/rc.d# reboot

SURSA: http://www.elforum.ro/viewtopic.php?f=73&t=59878&start=120

0 comentarii:

Trimiteți un comentariu