Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Getting a 3G USB dongle to connect using Linux

16 views
Skip to first unread message

dx...@albury.nospam.net.au

unread,
Mar 13, 2014, 7:45:01 AM3/13/14
to
In the interests of completeness, this, as you can see, is a long post.
Sorry!!

*History*
Because of 'Phone cable problems, in about mid-2009 my ISP set up my
Desktop Computer, dual booting Win 98 and MD2009.0, to connect via an
Huawei E169 3G USB dongle (e.g.
http://www.ebay.com.au/itm/HUAWEI-E169-HSDPA-USB-Stick-Modem-Dongle-used-in-box-/171265057733
).

To connect, I would start Network Centre, and click on the GPRS/Edge/3G
selection, *but not on the Connect button* , then I would start a
Terminal and run the ppp.sh script that my ISP wrote and, among other
things, it copied over another file, called chat-ppp0.rhw.

Both ppp.sh and chat-ppp0.rhw are shown in this file
http://www.albury.net.au/~dxmm/Connections.txt

At the end of 2009, I brought this HP 6730b laptop and installed MD2009
and copied my ISP's files onto the HD, which already had WIN7 installed.

I have since installed MD2010, MD2011, MG2 and MG3 into additional
partitions on this laptop but never succeeded to get the dongle to
connect, but, as I had MD2009 (and Win7) that could connect, never
really worried about it!!

*Recent Events*
MD2009 is getting a bit long in the tooth, so I'm making a more
concerted attempt to get MG4 to connect. Coping over the two files
mentioned above to the appropriate locations in MG4 didn't get me
connected. And my ISP, who uses a Mac (Unix) laptop to run his system,
thinks Linux is a #$%^% of a system so is not thrilled/interested in
having another go at setting up my system. (Aren't Unix and Linux sort
of similar??)

So I started a thread in alt.os.linux.magiea called "Getting 3G USB
Internet working on MG4" and from that, Doug Laidlaw (who lives about
200km/120mls away) took me to e-mail and over the next fortnight or so,
suggested various things starting with running through the MCC's
GPRS/Edge/3G Set-Up, where we got as far as the last step where the
dongle tries to connect.

Doug just leaves "Connect" as the Access Point Names on the GPRS/Edge/3G
screen of the set-up and Doug's dongle connects to his Pre-Paid account.
In my (Pay-by-the-Month account) set-up, clicking the "next" - the MCC
screen basically goes blank and a small "Please Wait" screen pops up -
"Testing your connection - and wait and wait and ...

In the set-up of my Win7 dial up agent, there are three values shown, a
Profile Name, an APN and an Access Number. Entering the values in all
combinations into the available spots in the set-up doesn't work any better.

Further direction from Doug found that his system used the file
/etc/rc.d/rc.local and he said to insert the single line of code
"modprobe usbserial vendor=0x12d1 product=0x1001" into that file ....
But I don't have the file, so Doug suggested that, as it was an old
file, it may have been superseded and suggested executing that one line
in a terminal prior to running the Network Centre, but it did no good.

We did lsusb and got the same response ... Bus 001 Device 005: ID
12d1:1001 Huawei Technologies Co., Ltd. E169/E620/E800 HSDPA Modem

Finally, Doug suggested mentioned "comgt" so then I entered that as SU, ...

[root@localhost daniel]# comgt
Trying list of devices
SIM ready
Waiting for Registration..(120 sec max)
Registered on Home network: "YES OPTUS",2
Signal Quality: 7,99
[root@localhost daniel]#

All the same as Doug, except he got 11.99 for Signal Quality.

That was where I seemed to run out of Doug's knowledge/expertise!! I
hope someone has made it this far, has understood what Doug suggested,
and the results I obtained *AND* can give me more suggestions to try.

Thanks if you got this far.

Daniel

Bit Twister

unread,
Mar 13, 2014, 8:40:54 AM3/13/14
to
On Thu, 13 Mar 2014 22:45:01 +1100, Dani...@teranews.com wrote:
>
> Further direction from Doug found that his system used the file
> /etc/rc.d/rc.local and he said to insert the single line of code
> "modprobe usbserial vendor=0x12d1 product=0x1001" into that file ....
> But I don't have the file,

Ok, create one of your own with the following:
------8<------8<------8<-cut below this line -----8<------8<
#!/bin/bash
#*******************************************************
#* /etc/rc.d/rc.local - user system customization file
#*******************************************************

export PATH=/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin

modprobe usbserial vendor=0x12d1 product=0x1001

#******* end of /etc/rc.d/rc.local *************************
------8<------8<------8<-cut above this line -----8<------8<

And do a
chmod +x /etc/rc.d/rc.local
systemctl enable rc-local
systemctl start rc-local

Then go back in the network center and try what Doug does to set his
connection.

I assume you will put that file in your backups, and add the
systemctl enable rc-local
to your install procedure. :)

Bit Twister

unread,
Mar 13, 2014, 10:28:08 AM3/13/14
to
On Thu, 13 Mar 2014 12:40:54 +0000 (UTC), Bit Twister wrote:
> On Thu, 13 Mar 2014 22:45:01 +1100, Dani...@teranews.com wrote:

I read the "man pppd" documentaiton.
I looked at http://www.albury.net.au/~dxmm/Connections.txt
looked at http://www.linuxtopia.org/online_books/opensolaris_2008/SYSADV4/html/pppsvrconfig.dialin-52.html#ppp.dialin-55
and I think you should be able to do the following, assuming you can get the
usb/doggle device name (example ttyUSB0).

All this is done in a root terminal so click up a terminal
su - root
cp /etc/sysconfig/network-scripts/chat-ppp0 /etc/ppp/chat-isp

I am not sure you need the "ipparam ppp0 linkname ppp0" line so I left it out.
Launch an editor to create /etc/ppp/peers/isp with the following:
-----8<-----8<-----8<--cut below this line ---8<-----8<-----8<
ttyUSB0 460800 debug
lock modem crtscts asyncmap 00000000 defaultroute usepeerdns
connect '/usr/sbin/chat -v -f /etc/ppp/chat-isp'
noauth
-----8<-----8<-----8<--cut above this line ---8<-----8<-----8<

Bring up your editor to change /etc/nsswitch.conf "hosts:" to look like
# hosts: mdns4_minimal files nis dns myhostname mdns4
hosts: mdns4_minimal files dns myhostname mdns4


I assume you have
o done the above
o created /etc/rc.d/rc.local from my earlier post,
o set execute bit on /etc/rc.d/rc.local
o doggle is installed, you have rebooted.

As I misunderstand it, all you have to do now is run the command

pppd call isp

Might not hurt to have another root terminal running
journalctl -fa --no-pager
before running "pppd call isp"

You can stop the root terminal pppd with a Control c

If that works, try it from a user terminal with the command
pppd call isp

Once that works, you can create /usr/local/bin/call_isp which has the following:
-----8<-----8<-----8<--cut below this line ---8<-----8<-----8<
#!/bin/bash
#****************************************************
#* call_isp - calls pppd to connedt to isp
#*
#* Usage: call_isp
#*
#* Install: cp call_isp /usr/local/bin/call_isp
#* chmod +x /usr/local/bin/call_isp
#*
#****************************************************

export PATH=/usr/sbin:/usr/bin

pppd call isp
if [ $(id --user) = 0 ] ; then
read -p "Press enter to terminate connection."
killall pppd
else
read -p "Press enter Ctrl c to terminate connection."
fi

#************* end of /usr/local/bin/call_isp *******************
-----8<-----8<-----8<--cut above this line ---8<-----8<-----8<


I assume you have modified your install procedure to support all the above
and added all the created files to your backup scrip.

dx...@albury.nospam.net.au

unread,
Mar 14, 2014, 8:09:41 AM3/14/14
to
Again, thank you for sticking with me, Bit Twister.

You bueatie!!!

Yesterday you suggested I copy my ISP-provided ppp.sh and edit it to include

#!/bin/bash
PATH=/sbin:/usr/sbin:/bin:/usr/bin
export PATH

I tried doing that but was unable to start kWrite as root and, now, it
seems that was because I was switching to root using just "su" followed
by my password.

Just know I tried "su - root" and then the password and kWrite started
correctly, .... so, I'll be back, ........ tomorrow, maybe!!

Daniel (who's trying to remember "su - root"!!)

Bit Twister

unread,
Mar 14, 2014, 8:59:29 AM3/14/14
to
On Fri, 14 Mar 2014 23:09:41 +1100, Dani...@teranews.com wrote:

> Just know I tried "su - root" and then the password and kWrite started
> correctly, .... so, I'll be back, ........ tomorrow, maybe!!
>
> Daniel (who's trying to remember "su - root"!!)

Yup, if you do not follow my instructions carefully it is going to be
a long process to debug what went wrong. After you fixed
/etc/rc.d/rc.local and rebooted, I would like to see the results of

ls -al /dev/tty* | grep -i usb

dx...@albury.nospam.net.au

unread,
Oct 19, 2014, 9:10:10 AM10/19/14
to
On 13/03/14 22:45, Dani...@teranews.com wrote:
> In the interests of completeness, this, as you can see, is a long post.
> Sorry!!
>
> *History*
> Because of 'Phone cable problems, in about mid-2009 my ISP set up my
> Desktop Computer, dual booting Win 98 and MD2009.0, to connect via an
> Huawei E169 3G USB dongle (e.g.
> http://www.ebay.com.au/itm/HUAWEI-E169-HSDPA-USB-Stick-Modem-Dongle-used-in-box-/171265057733
> ).
>
> To connect, I would start Network Centre, and click on the GPRS/Edge/3G
> selection, *but not on the Connect button* , then I would start a
> Terminal and run the ppp.sh script that my ISP wrote and, among other
> things, it copied over another file, called chat-ppp0.rhw.
>
> Both ppp.sh and chat-ppp0.rhw are shown in this file
> http://www.albury.net.au/~dxmm/Connections.txt

With assistance from a member of the Linux Users Victoria group,
http://luv.asn.au/front-page, over this week-end, my MG4 is now
connecting to the Internet. Just took three alterations to the scripts
(Connections.txt) shown in the link above.

Yeah ... just in time for MG5!!

Daniel


0 new messages