I recently bought a USB stick model Huawei E3531 that I want to connect to a Raspberry Pi B+ running Kernel 3.18.7+
My project is to send telemetry data to the internet. Everything works fine through my cable modem. Now I would like to replace these cables by a E3531.
I need some advise how to proceed.
This is what I have done so far:
- Compiled usb_modeswitch from the source. I am running Version 2.2.3
- Created a config file "12d1_15d2" in /etc/usb_modeswitch.d with the following content:
Code: Select all
# Huawei E3531
DefaultVendor= 0x12d1
DefaultProduct= 0x15d2
TargetVendor= 0x12d1
TargetProduct= 0x15d3
MessageContent"55534243123456780000000000000011062000000100000000000000000000"The results of running "lsusb -v -d 12d1:15d2" before switching and "lsusb -v -d 12d1:15d3" after switching are the same as in thread http://www.draisberghof.de/usb_modeswit ... f=3&t=2347# Huawei E3531
ATTR{idVendor}=="12d1", ATTR{idProduct}=="15d3", RUN+="usb_modeswitch '%b/%k'"
"lsusb" before switching:
Code: Select all
Bus 001 Device 005: ID 12d1:15d2 Huawei Technologies Co., Ltd.Code: Select all
sudo usb_modeswitch -v 12d1 -p 15d2 -M '55534243123456780000000000000011062000000100000000000000000000'Code: Select all
Look for default devices ...
product ID matched
Found devices in default mode (1)
Access device 005 on bus 001
Current configuration number is 1
Use interface number 0
Use endpoints 0x01 (out) and 0x81 (in)
USB description data (for identification)
-------------------------
Manufacturer: HUAWEI
Product: HUAWEI Mobile
Serial No.: FFFFFFFFFFFFFFFF
-------------------------
Looking for active driver ...
OK, driver detached
Set up interface 0
Use endpoint 0x01 for message sending ...
Trying to send message 1 to endpoint 0x01 ...
OK, message successfully sent
Reset response endpoint 0x81
Reset message endpoint 0x01
-> Run lsusb to note any changes. Bye!
Code: Select all
Bus 001 Device 006: ID 12d1:15d3 Huawei Technologies Co., Ltd.Code: Select all
wwan0 Link encap:Ethernet HWaddr 00:1e:10:1f:00:00
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 lg file transmission:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)My question is what should be done next to switch this modem automatically while booting?
Thanks for your help.
Walter