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


Topic # 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


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

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

2483 posts

Uber Geek
+1 received by user: 4

Trusted

  Reply # 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
+1 received by user: 4

Trusted

  Reply # 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


  Reply # 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
+1 received by user: 4

Trusted

  Reply # 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 »

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 »

Why I'm not an early adopter
Posted 21-Nov-2017 10:39


Netatmo launches smart home products in New Zealand
Posted 20-Nov-2017 20:06


Huawei Mate 10: Punchy, long battery life, artificial intelligence
Posted 20-Nov-2017 16:30


Propel launch Disney Star Wars Laser Battle Drones
Posted 19-Nov-2017 21:26


UFB killer app: Speed
Posted 17-Nov-2017 17:01


The case for RSS — MacSparky
Posted 13-Nov-2017 14:35


WordPress and Indieweb: Take control of your online presence — 6:30 GridAKL Nov 30
Posted 11-Nov-2017 13:43


Chorus reveals technology upgrade for schools, students
Posted 10-Nov-2017 10:28


Vodafone says Internet of Things (IoT) crucial for digital transformation
Posted 10-Nov-2017 10:06


Police and Facebook launch AMBER Alerts system in NZ
Posted 9-Nov-2017 10:49


Amazon debuts Fire TV Stick Basic Edition in over 100 new countries
Posted 8-Nov-2017 05:34


Vodafone VoIP transition to start this month
Posted 7-Nov-2017 12:33


Spark enhances IoT network capability
Posted 7-Nov-2017 11:33


Vocus NZ sale and broadband competition
Posted 6-Nov-2017 14:36


Hawaiki reaches key milestone in landmark deep-sea fibre project
Posted 4-Nov-2017 13:53



Geekzone Live »

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



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.