www.zeroshell.org Forum Index www.zeroshell.org
Linux Distribution for server and embedded devices
 
 SearchSearch  RegisterRegister  UsergroupsUsergroups 
 ProfileProfile  Log inLog in  Log in to check your private messagesPrivate Message 

Solution for Huawei E367 3G dongle on Zeroshell

 
Post new topic   Reply to topic    www.zeroshell.org Forum Index -> ZeroShell
View previous topic :: View next topic  
Author Message
gcams



Joined: 11 Jan 2009
Posts: 20

PostPosted: Mon Jun 06, 2011 2:42 pm    Post subject: Solution for Huawei E367 3G dongle on Zeroshell Reply with quote

Hi All,

I've received a lot of help over the past couple of years on these forums so I thought I'd post this solution in the hope that it assists somebody else.

ThreeUK have recently released a new "Premium" HSPA+ dongle; model Huawei E367. This is an excellent quality dongle with external antenna connector, so I was keen to get it going on Zeroshell to replace my ZTE dongles.

Here's how I did it:

Step 1 - Add the required usb_modeswitch config for the E367:

Add the following lines to the end of the /etc/usb_modeswitch.conf file:

Code:
########################################################
# Huawei E367

EnableLogging=1

DefaultVendor= 0x12d1
DefaultProduct=0x1446

TargetVendor=  0x12d1
TargetProductList="1001,1406,140b,140c,1412,141b,14ac,1506"

CheckSuccess=20

MessageEndpoint= 0x01
MessageContent="55534243123456780000000000000011062000000100000000000000000000"



Step 2:

Run the usb_modeswitch command:

Code:
root@zeroshell root> usb_modeswitch



Step 3 (May not be required):

If you have another USB serial device connected to your Zeroshell appliance, you will need to unload the usbserial module by running "rmmod usbserial" or even easier, just unplug the other serial device device to unload the usbserial driver.

You can confirm this has been done successfully, by running the "lsmod" command and seeing if the usbserial module is in the list. As long as it's not present, you can proceed.


Step 4:
Run the modprobe command to insert the usbserial module and bind to the E367's serial ports:

Code:
root@zeroshell root> modprobe usbserial vendor=0x12d1 product=0x1506

Step 5:
Confirm the driver has loaded and created the ttyUSB* devices by running "ls /udev/ttyUSB*

If you're successful, you should get output similar to the below:

Code:
root@zeroshell root> ll /udev/ttyUSB*
crw-rw----    1 root     root     188,   0 Jun  6 14:53 /udev/ttyUSB0
crw-rw----    1 root     root     188,   1 Jun  6 14:51 /udev/ttyUSB1
crw-rw----    1 root     root     188,   2 Jun  6 14:51 /udev/ttyUSB2
crw-rw----    1 root     root     188,   3 Jun  6 14:53 /udev/ttyUSB3


Step 6:

Finally, configure your new PPP device as normal through the web interface. You will need to use /udev/ttyUSB0 as the actual modem device for establishing the PPP connection. ttyUSB1 and 2 appear to have no functionality (you cannot communicate with the modem via them) and ttyUSB3 is the "management" interface. This allows you to query signal strength (at+csq, etc) while the modem is online.


I hope the above is of assistance to somebody. Maybe the above changes could be incorporated into the next release, to avoid having to take the above steps on each boot? I now use a small bash script to automate the above steps:


Code:
#!/bin/bash

cd /Database/extradata

# Copy modeswitch config file to /etc
echo '########################################################
# Huawei E367

EnableLogging=1

DefaultVendor= 0x12d1
DefaultProduct=0x1446

TargetVendor=  0x12d1
TargetProductList="1001,1406,140b,140c,1412,141b,14ac,1506"

CheckSuccess=20

MessageEndpoint= 0x01
MessageContent="55534243123456780000000000000011062000000100000000000000000000"' >> /etc/usb_modeswitch.conf


# Run modeswitch command
usb_modeswitch

# Run modprobe command
modprobe usbserial vendor=0x12d1 product=0x1506
Back to top
View user's profile Send private message
Zeqro



Joined: 24 Sep 2011
Posts: 6

PostPosted: Sat Sep 24, 2011 5:24 pm    Post subject: Reply with quote

fluvio could just update the version of usb_modeswitch to a new version Smile

If only I was a bit more adapt at Linux I could have probably compiled and added the updated module myself :'(

Thanks for the post btw. The Huawei settings you posted are valid for a number of their modems and worked fine with two I used (e175 and the e363).
Back to top
View user's profile Send private message
gcams



Joined: 11 Jan 2009
Posts: 20

PostPosted: Sat Sep 24, 2011 10:30 pm    Post subject: Reply with quote

I'm glad the post was helpful Zeqro. Yes it would be good to have an updated version of usb_modeswitch in zeroshell, which would support the new dongles natively.

Good to hear that my fix works with the new E175 too though! That's handy to know!
Back to top
View user's profile Send private message
Zeqro



Joined: 24 Sep 2011
Posts: 6

PostPosted: Sat Sep 24, 2011 11:06 pm    Post subject: Reply with quote

gcams, I don't know how silly this sounds but can you help me with the following?

When I create a post boot script and save my profile it's not loaded up on restart. In fact the script is deleted and the files saved inside the Database are deleted.

I understand that this is happening because my files / settings aren't being saved. But where do I need to set the option to save them then?

What I tried to do is do all the settings and then save the profile but this didn't seem to do anything useful. On the main page (zeroshell.net) the FAQ say you need to go to Setup -> Storage on the web interface but I cannot find that anywhere...

Hope you can help.
Back to top
View user's profile Send private message
Dave.R



Joined: 29 Sep 2011
Posts: 9

PostPosted: Thu Sep 29, 2011 2:03 pm    Post subject: Re: Solution for Huawei E367 3G dongle on Zeroshell Reply with quote

[quote="gcams"]Hi All,

I've received a lot of help over the past couple of years on these forums so I thought I'd post this solution in the hope that it assists somebody else.

ThreeUK have recently released a new "Premium" HSPA+ dongle; model Huawei E367. This is an excellent quality dongle with external antenna connector, so I was keen to get it going on Zeroshell to replace my ZTE dongles.

Here's how I did it:

[b]Step 1 - Add the required usb_modeswitch config for the E367:[/b]

Add the following lines to the end of the /etc/usb_modeswitch.conf file:

[code]########################################################
# Huawei E367

EnableLogging=1

DefaultVendor= 0x12d1
DefaultProduct=0x1446

TargetVendor= 0x12d1
TargetProductList="1001,1406,140b,140c,1412,141b,14ac,1506"

CheckSuccess=20

MessageEndpoint= 0x01
MessageContent="55534243123456780000000000000011062000000100000000000000000000"[/code]


[b]Step 2:[/b]

Run the usb_modeswitch command:

[code]root@zeroshell root> usb_modeswitch[/code]


[b]Step 3 (May not be required): [/b]

If you have another USB serial device connected to your Zeroshell appliance, you will need to unload the usbserial module by running "rmmod usbserial" or even easier, just unplug the other serial device device to unload the usbserial driver.

You can confirm this has been done successfully, by running the "lsmod" command and seeing if the usbserial module is in the list. As long as it's not present, you can proceed.


[b]Step 4: [/b]
Run the modprobe command to insert the usbserial module and bind to the E367's serial ports:

[code]root@zeroshell root> modprobe usbserial vendor=0x12d1 product=0x1506
[/code]
Step 5:
Confirm the driver has loaded and created the ttyUSB* devices by running "ls /udev/ttyUSB*

If you're successful, you should get output similar to the below:

[code]root@zeroshell root> ll /udev/ttyUSB*
crw-rw---- 1 root root 188, 0 Jun 6 14:53 /udev/ttyUSB0
crw-rw---- 1 root root 188, 1 Jun 6 14:51 /udev/ttyUSB1
crw-rw---- 1 root root 188, 2 Jun 6 14:51 /udev/ttyUSB2
crw-rw---- 1 root root 188, 3 Jun 6 14:53 /udev/ttyUSB3[/code]

[b]Step 6: [/b]

Finally, configure your new PPP device as normal through the web interface. You will need to use /udev/ttyUSB0 as the actual modem device for establishing the PPP connection. ttyUSB1 and 2 appear to have no functionality (you cannot communicate with the modem via them) and ttyUSB3 is the "management" interface. This allows you to query signal strength (at+csq, etc) while the modem is online.


I hope the above is of assistance to somebody. Maybe the above changes could be incorporated into the next release, to avoid having to take the above steps on each boot? I now use a small bash script to automate the above steps:


[code]#!/bin/bash

cd /Database/extradata

# Copy modeswitch config file to /etc
echo '########################################################
# Huawei E367

EnableLogging=1

DefaultVendor= 0x12d1
DefaultProduct=0x1446

TargetVendor= 0x12d1
TargetProductList="1001,1406,140b,140c,1412,141b,14ac,1506"

CheckSuccess=20

MessageEndpoint= 0x01
MessageContent="55534243123456780000000000000011062000000100000000000000000000"' >> /etc/usb_modeswitch.conf


# Run modeswitch command
usb_modeswitch

# Run modprobe command
modprobe usbserial vendor=0x12d1 product=0x1506[/code][/quote]



Hi man you said you used ZTE can you please name the model you used and the way you configured it to work with zeroshell .
thanks allot ,
Back to top
View user's profile Send private message
Zeqro



Joined: 24 Sep 2011
Posts: 6

PostPosted: Fri Sep 30, 2011 8:40 pm    Post subject: Reply with quote

Dave you can find updated lists for a lot of models on http://www.draisberghof.de/usb_modeswitch/device_reference.txt

This is where gcams got his info from I presume as well.

Which model are you looking for? I use both the ZTE K3850-Z and the K3570-Z.

Do you need configuration details for those?
Back to top
View user's profile Send private message
gcams



Joined: 11 Jan 2009
Posts: 20

PostPosted: Sat Oct 01, 2011 1:32 pm    Post subject: Re: Solution for Huawei E367 3G dongle on Zeroshell Reply with quote

[quote="Dave.R"]
Hi man you said you used ZTE can you please name the model you used and the way you configured it to work with zeroshell .
thanks allot ,[/quote]

Hi Dave, the model of ZTE I have is an MF112 HSUPA dongle. It was very simple to setup.. you just need to eject the virtual CD-ROM device that mounts when the dongle is plugged in, to get it to modeswitch (i.e. on mine I need to eject /dev/sr0). This causes the USB serial ports to show up.

The only trick was I needed to copy the eject command from a linux distro, as Zeroshell doesn't have it installed by default. I think I used the eject binary from one of the later fedora distributions and it worked fine.

I hope that is of some help??

Cheers,
Graham
Back to top
View user's profile Send private message
gcams



Joined: 11 Jan 2009
Posts: 20

PostPosted: Sat Oct 01, 2011 1:33 pm    Post subject: Reply with quote

[quote="Zeqro"]gcams, I don't know how silly this sounds but can you help me with the following?

When I create a post boot script and save my profile it's not loaded up on restart. In fact the script is deleted and the files saved inside the Database are deleted.

I understand that this is happening because my files / settings aren't being saved. But where do I need to set the option to save them then?

What I tried to do is do all the settings and then save the profile but this didn't seem to do anything useful. On the main page (zeroshell.net) the FAQ say you need to go to Setup -> Storage on the web interface but I cannot find that anywhere...

Hope you can help.[/quote]

Really not too sure what would be causing this!? I haven't seen this behaviour on my Alix setup running off a compact flash card and I don't really know enough about how Zeroshell deals with it's filesystems to be able to troubleshoot it for you. Sorry! Hope you manage to get it sorted.
Back to top
View user's profile Send private message
Zeqro



Joined: 24 Sep 2011
Posts: 6

PostPosted: Sat Oct 01, 2011 9:48 pm    Post subject: Reply with quote

Yeah it is weird. It works fine when booting from a USB stick.

Seems that it writes fine when loading off a medium to which you can actually save your profile to.

But I've also got it to work on a machine with a CD bootable system as well, at times that is. I guess I'm just not familiar enough with how Linux works in this aspect.

I know this is the wrong place to ask, but I seem to be stuck on my VPN lan to lan. I've got my VPN server connected to my router and portforwarded all ports to the VPN server.
The bonds at both ends are on a different subnet from the router subnet but when I create a static route on the VPN server to route all traffic from the bond subnet to the router subnet I can't access the client from another machine connected to a router on the VPN server side. But I can see the client from the VPN server only...

I hope that didn't sound confusing?...
Back to top
View user's profile Send private message
rfkiki



Joined: 09 Oct 2011
Posts: 1

PostPosted: Sun Oct 09, 2011 3:26 pm    Post subject: Kindness Reply with quote

Useful and great ,thank u !
Back to top
View user's profile Send private message Send e-mail
tracys



Joined: 08 Mar 2014
Posts: 2

PostPosted: Sat Mar 08, 2014 2:52 pm    Post subject: Need ZTE K3570-Z and mf631 setting. Reply with quote

Hello All,

I am looking ZTE K3570-Z and mf631 setting.

Anyone can help me

Tracy
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    www.zeroshell.org Forum Index -> ZeroShell All times are GMT
Page 1 of 1

 
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 vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group