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 »

FUJIFILM introduces X-E3 mirrorless camera with wireless connectivity
Posted 18-Sep-2017 13:53


Vodafone announces new plans with bigger data bundles
Posted 15-Sep-2017 10:51


Skinny launches phone with support for te reo Maori
Posted 14-Sep-2017 08:39


If Vodafone dropping mail worries you, you’re doing online wrong
Posted 11-Sep-2017 13:54


Vodafone New Zealand deploy live 400 gigabit system
Posted 11-Sep-2017 11:07


OPPO camera phones now available at PB Tech
Posted 11-Sep-2017 09:56


Norton Wi-Fi Privacy — Easy, flawed VPN
Posted 11-Sep-2017 09:48


Lenovo reveals new ThinkPad A Series
Posted 8-Sep-2017 14:37


Huawei passes Apple for the first time to capture the second spot globally
Posted 8-Sep-2017 10:45


Vodafone initiative enhances te reo Maori pronunciation on Google Maps
Posted 8-Sep-2017 10:40


Voyager Internet expand local internet phone services company with Conversant acquisition
Posted 6-Sep-2017 18:27


NOW Expands in to Tauranga
Posted 5-Sep-2017 18:16


Windows 10 Fall Creators Update coming Oct. 17
Posted 4-Sep-2017 14:10


Garmin introduce Garmin vivoactive 3
Posted 1-Sep-2017 18:38


Kiwibank wastes $90 million on software – Reseller News
Posted 1-Sep-2017 13:45



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.