Geekzone: technology news, blogs, forums
Guest
Welcome Guest.
You haven't logged in yet. If you don't have an account you can register now.


pdc



22 posts

Geek


#54271 16-Dec-2009 22:11
Send private message

using the method that worked with mandriva


http://www.geekzone.co.nz/forums.asp?forumid=46&topicid=54050


I tried a live CD of Ubuntu 9.10 downloaded last week, so I suspect with kernel updates since the release in Oct 09


1) if you want to watch the action, load a terminal and type lsusb modem will have vendor ID of 2000
2) as with Mandriva 2010, icon on desktop for ZTE: right-click and select "eject"
3) wait and after 15secs? type lsusb in terminal again
4) vendor ID should now be 0031
5) with ethernet cable plugged in, type in terminal sudo apt-get install wvdial and approve the requests; when finished ..
6) terminal: sudo gedit /etc/wvdial.conf
7) paste in the following and replace what ubuntu offers as default into wvdial.conf
[Dialer Defaults]
Modem = /dev/ttyUSB2
Modem Type = Analog Modem
ISDN = 0
Baud = 460800
Dial Attempts = 1
Username = user
Password = pass
Init1 = ATZ
Init2 = AT&F &D2 &C1
Init3 = ATS7=60 S30=0 S0=0
Init4 = AT+CGDCONT=1,"IP","wap.telecom.co.nz"
Phone = *99#
Stupid Mode = 1

8) save and exit 
9) sudo wvdial
10) you should be on line in 1-2 secs
11) load firefox or whatever
12) turn off connection with control-c


for future uses:
1) insert modem and right-click and select "eject"
2) open terminal and select sudo wvdial as it should be there already


and you should be on line in future


doubtless linux experts could suggest further ways to automate the two-step process detailed above


the speed of access and download speed seems very good in suburban AKL with this


Create new topic
29 posts

Geek


  #283287 16-Dec-2009 23:43
Send private message

thanks..will try and see how it goes.. cheers

2483 posts

Uber Geek

Trusted

  #283369 17-Dec-2009 10:38
Send private message

I'll try it when I get the time - but basically, an eject is required as the modem acts as a virtual drive where all the install stuff is stored.

On a usual system, the installed software will recognise the modem and switch it from the virtual drive to an actual modem.

I could possibly play around and make a bash script to automate the process :)




Find me on Twitter!

I posted 1, 2 x 10^3 times!

 
 
 
 


2483 posts

Uber Geek

Trusted

  #283496 17-Dec-2009 17:49
Send private message

Well - there's a better way...

This is how I connected the MF626 (should be the same for the 636 I hope) on a Ubuntu 9.10 Live CD system

1. Eject "Telecom Modem" when it comes up
2. Go to System > Preferences > Network Connections
3. Go to Mobile Broadband, and "Add"
4. You should be able to see that there is an item "ZTE Incorporated ZTE CDMA Technologies MSM" - then just follow the prompts
5. You're done!

You'll have to eject the virtual drive device every time you plug it in.

Much easier than using a terminal though :)




Find me on Twitter!

I posted 1, 2 x 10^3 times!

pdc



22 posts

Geek


  #283507 17-Dec-2009 19:04
Send private message

thanks for this; as I said, I used a liveCD; just tried again; and I had the same problem I remember having before; after "eject" for the icon; I configure using network manager; select telecom XT; but when I close the configure and then LEFT-CLICK on network manager, I do NOT get the mobile broadband option to select: do you get that? (would be marvellous if it happened)

2483 posts

Uber Geek

Trusted

  #283521 17-Dec-2009 19:50
Send private message

pdc: thanks for this; as I said, I used a liveCD; just tried again; and I had the same problem I remember having before; after "eject" for the icon; I configure using network manager; select telecom XT; but when I close the configure and then LEFT-CLICK on network manager, I do NOT get the mobile broadband option to select: do you get that? (would be marvellous if it happened)


It worked for me - the Network Manager pop up menu from the taskbar had a "Mobile Broadband" item. And this is with the Live CD and not an install.

Here's a rough bash script for Ubuntu 9.10. Copy, save as [anyname].sh, and mark as executable.

Run after plugging modem in.

Don't bash me about my bash skills (pun? Smile) - my last bash script was over 5 years ago.

#!/bin/bash

# Change these Product IDs if necessary to detect modem.
DEFAULTID=2000
TARGETID=0031

VENDORID=19d2
LSUSB_1=$(lsusb | grep $VENDORID);
LSUSB_COUNT_LINES=$(lsusb | grep $VENDORID | grep -c "\n");


clear

echo "===== ZTE MF626 USB switching script for Ubuntu 9.10 =====";
echo

if [[ $LSUSB_COUNT_LINES == 1 ]]
then
    LSUSB_1=${LSUSB_1:28:4};

elif [[ $LSUSB_COUNT_LINES == 0 ]]
then
    echo "No device detected. Try again later.";
    echo
    echo "Exiting."
    exit 0;

else
    echo "More than one device with Vendor ID \""$VENDORID"\" detected.";
    echo
    echo "Exiting."
    exit 1;
fi

if [[ $LSUSB_1 == $DEFAULTID ]]
then
    echo "If a prompt appears after, please enter your password.";
    echo

    $(sudo eject sr1)

    echo
    printf "Waiting for modem to restart";

    LOOPCOUNT=1;
  
    until [[ $LSUSB_2 == $TARGETID ]]
    do
        sleep 1
        printf ".";
        LSUSB_2=$(lsusb | grep $VENDORID);
        LSUSB_2=${LSUSB_2:28:4};

        let LOOPCOUNT++;

        if (( $LOOPCOUNT > 30 ))
        then
            printf "\n\n"
            echo "Taking too long. Either there was an issue with the restart or ID was not set right.";
            echo
            echo "Exiting."
            exit 1;
        fi
    done

    printf "\n\n";
    echo "Modem restarted.";
    echo
    echo "You may now connect or set up your connection once the modem is ready (when either a green or blue steady light appears)";
    echo "Usually the device can be found at /dev/ttyUSB2.";
    echo
    echo
    echo "Do you wish to set up a udev rule to make your modem switch automatically in the future? [y/n]"
    read UDEVACTION;

    echo

    if [[ $UDEVACTION == "y" ]]
    then
        $(echo "SYSFS{idVendor}==\""$VENDORID"\", SYSFS{idProduct}==\""$DEFAULTID"\", RUN+=\"/usr/bin/eject %k\", OPTIONS+=\"last_rule\"" | sudo tee /etc/udev/rules.d/ZTEMF626.rules &> /dev/null);
    fi

    echo "Done."
else
    echo "Looks like you've already used the script or have altered configuration, or ID is incorrect.";
fi

echo
echo "Exiting."
exit 0




Find me on Twitter!

I posted 1, 2 x 10^3 times!

Create new topic



Twitter and LinkedIn »



Follow us to receive Twitter updates when new discussions are posted in our forums:



Follow us to receive Twitter updates when news items and blogs are posted in our frontpage:



Follow us to receive Twitter updates when tech item prices are listed in our price comparison site:





News »

New Vodafone mobile data plans with unlimited data
Posted 26-Feb-2020 06:55


Vodafone launches innovation initiatives to help businesses use 5G
Posted 26-Feb-2020 05:00


Ultimate Ears HYPERBOOM brings massive sound and extreme bass
Posted 25-Feb-2020 09:00


Withings launches three new devices to help monitor heart health from home
Posted 13-Feb-2020 20:05


Auckland start-up Yourcar matches new car buyers with dealerships
Posted 13-Feb-2020 18:05


School gardens go high tech to teach kids the importance of technology
Posted 13-Feb-2020 11:10


Malwarebytes finds Mac threats outpace Windows for the first time
Posted 13-Feb-2020 08:01


Amazon launches Echo Show 8 in Australia and New Zealand
Posted 8-Feb-2020 20:36


Vodafone New Zealand starts two year partnership with LetsPlay.Live
Posted 28-Jan-2020 11:24


Ring launches indoor-only security camera
Posted 23-Jan-2020 17:26


New report findings will help schools implement the digital technologies curriculum content
Posted 23-Jan-2020 17:25


N4L to upgrade & support wireless internet inside schools
Posted 23-Jan-2020 17:22


Netflix releases 21 Studio Ghibli works
Posted 22-Jan-2020 11:42


Vodafone integrates eSIM into device and wearable roadmap
Posted 17-Jan-2020 09:45


Do you need this camera app? Group investigates privacy implications
Posted 16-Jan-2020 03:30



Geekzone Live »

Try automatic live updates from Geekzone directly in your browser, without refreshing the page, with Geekzone Live now.


Support Geekzone »

Our community of supporters help make Geekzone possible. Click the button below to join them.

Support Geezone on PressPatron



Are you subscribed to our RSS feed? You can download the latest headlines and summaries from our stories directly to your computer or smartphone by using a feed reader.

Alternatively, you can receive a daily email with Geekzone updates.