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

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
hungryhippo
29 posts

Geek


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

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



manhinli
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!

manhinli
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

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)

manhinli
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





News and reviews »

Air New Zealand Starts AI adoption with OpenAI
Posted 24-Jul-2025 16:00


eero Pro 7 Review
Posted 23-Jul-2025 12:07


BeeStation Plus Review
Posted 21-Jul-2025 14:21


eero Unveils New Wi-Fi 7 Products in New Zealand
Posted 21-Jul-2025 00:01


WiZ Introduces HDMI Sync Box and other Light Devices
Posted 20-Jul-2025 17:32


RedShield Enhances DDoS and Bot Attack Protection
Posted 20-Jul-2025 17:26


Seagate Ships 30TB Drives
Posted 17-Jul-2025 11:24


Oclean AirPump A10 Water Flosser Review
Posted 13-Jul-2025 11:05


Samsung Galaxy Z Fold7: Raising the Bar for Smartphones
Posted 10-Jul-2025 02:01


Samsung Galaxy Z Flip7 Brings New Edge-To-Edge FlexWindow
Posted 10-Jul-2025 02:01


Epson Launches New AM-C550Z WorkForce Enterprise printer
Posted 9-Jul-2025 18:22


Samsung Releases Smart Monitor M9
Posted 9-Jul-2025 17:46


Nearly Half of Older Kiwis Still Write their Passwords on Paper
Posted 9-Jul-2025 08:42


D-Link 4G+ Cat6 Wi-Fi 6 DWR-933M Mobile Hotspot Review
Posted 1-Jul-2025 11:34


Oppo A5 Series Launches With New Levels of Durability
Posted 30-Jun-2025 10:15









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.