Author Message

<  Setup Discussion  ~  SOLVED : Manual works, Automatic Don't Huawei K3770

PostPosted: Sat Jul 02, 2011 10:33 pm Reply with quote
Posts: 3Location: Clanwilliam, South AfricaJoined: Sat Jul 02, 2011 12:33 am
I have Ubuntu 11.04, I can manually switch my Huawei K3770 modem with the command:

sudo usb_modeswitch -v 0x12d1 -p 0x14d1 -c /home/USER/12d1:14d1

Then I need to do the command:

sudo modprobe usbserial vendor=0x12d1 product=0x14c9

And the modem works fine. I would like it to work automatically when I plug in the modem. I have followed various Forum posts and this is what I have done:

1. My config file "12d1:14d1" is in the /usr/share/usb_modeswitch directory as part of the compressed file configpack.tar.gz

2. I have modified the /lib/udev/ruled.d/40-usb_modeswitch.rules with the following line

# Vodafone (Huawei) K3770
ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="14d1", RUN+="usb_modeswitch '%b/%k'"

3. I have enabled logging on both udev.conf and /etc/usb_modeswitch.conf. This is what the logfile says for /var/log/usb_modeswitch_1-7:1.0 :


USB_ModeSwitch log from Sat Jul 02 16:59:31 SAST 2011

raw args from udev: /1-7:1.0

Using global config file: /etc/usb_modeswitch.conf
Bus ID for device not given by udev.
Trying to determine it from kernel name (1-7:1.0) ...
USB dir exists: /sys/bus/usb/devices/1-7
Warning: USB attribute "serial" not found.
----------------
USB values from sysfs:
manufacturer HUAWEI
product Vodafone Mobile Broadband (Huawei)
serial
----------------
Found packed config collection /usr/share/usb_modeswitch/configPack.tar.gz
Searching overriding entries named: /etc/usb_modeswitch.d/12d1:14d1*
SCSI attributes not needed, moving on
checking config: 12d1:14d1/etc/usb_modeswitch.d/12d1:14d1
Extracting config 12d1:14d1/etc/usb_modeswitch.d/12d1:14d1 from collection /usr/share/usb_modeswitch/configPack.tar.gz

These are the relevant lines from /var/log/syslog:


Jul 2 16:59:31 Simon udevd-work[534]: RUN 'usb_modeswitch '%b/%k'' /lib/udev/rules.d/40-usb_modeswitch.rules:329
Jul 2 16:59:31 Simon udevd-work[534]: RUN '/sbin/modprobe -bv $env{MODALIAS}' /lib/udev/rules.d/80-drivers.rules:5
Jul 2 16:59:31 Simon udevd-work[534]: 'usb_modeswitch '/1-7:1.0'' started
Jul 2 16:59:31 Simon udevd-work[534]: '/lib/udev/usb_modeswitch' (stderr) '/lib/udev/usb_modeswitch: 33: '
Jul 2 16:59:31 Simon udevd-work[534]: '/lib/udev/usb_modeswitch' (stderr) 'arithmetic expression: expecting EOF: "0x"'
Jul 2 16:59:31 Simon udevd-work[534]: '/lib/udev/usb_modeswitch' (stderr) '/lib/udev/usb_modeswitch: 33: '
Jul 2 16:59:31 Simon udevd-work[534]: '/lib/udev/usb_modeswitch' (stderr) 'arithmetic expression: expecting EOF: "0x"'
Jul 2 16:59:32 Simon udevd-work[534]: 'usb_modeswitch '/1-7:1.0'' returned with exitcode 0


Thanks.


Last edited by SimonJ on Sun Jul 03, 2011 3:43 pm, edited 1 time in total.

Offline Profile
PostPosted: Sun Jul 03, 2011 9:30 am Reply with quote
Site AdminPosts: 6239Joined: Sat Nov 03, 2007 12:30 am
There is a little bug in a Debian patch for usb_modeswitch (version 1.1.7).

I suggest that you use the current source version from this site (1.1.8) with the current data package (20110619) which includes the K3770. It's easy to install; if you should need instructions, see the main doc page.



Offline Profile
PostPosted: Sun Jul 03, 2011 3:42 pm Reply with quote
Posts: 3Location: Clanwilliam, South AfricaJoined: Sat Jul 02, 2011 12:33 am
uninstalled version 1.1.7
compiled 1.1.8

Everything works! Thanks.

Just a note : 12d1:14d1config file wasn't yet included in the /usr/share/usb_modeswitch/ directory.

I also still needed to modify the /lib/udev/rules.d/40-usb_modeswitch.rules file

Regards


Offline Profile
PostPosted: Sun Jul 03, 2011 4:09 pm Reply with quote
Site AdminPosts: 6239Joined: Sat Nov 03, 2007 12:30 am
Did you install the data package as well?

As I said, the current version is 20110619.


Offline Profile
PostPosted: Sun Jul 03, 2011 7:04 pm Reply with quote
Posts: 3Location: Clanwilliam, South AfricaJoined: Sat Jul 02, 2011 12:33 am
Yes, downloaded the usb-modeswitch-data-20110619 and did a:

sudo make install

after uninstalling the original "usb-modeswitch-data" via Synaptic


If you want the 12d1:14d1 file I can email

thanks


Offline Profile
PostPosted: Sun Jul 03, 2011 8:06 pm Reply with quote
Site AdminPosts: 6239Joined: Sat Nov 03, 2007 12:30 am
Turns out you are right. Somehow this device has escaped.

I know I have prepared it for inclusion ... Oh well ...

Thanks for the notice.


Offline Profile

Display posts from previous:  Sort by:

All times are UTC + 1 hour [ DST ]
Page 1 of 1
6 posts
Users browsing this forum: No registered users and 1 guest
Search for:
Post new topic  Reply to topic
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum