This is the old SliTaz forum - Please use the main forum.slitaz.org

3g broadband
  • stefstef October 2009
    has anybody out there come across mobile broadband configuration on slitaz?
    I have tried wvdial but it wouldnt recognise a modem. lsusb is not available so I dont know how to determine what port is dongle hooked on.
    it is three.co.uk and it is recognised as cdrom and usb storage in window manager.

    any help is highly appreciated
  • kultexkultex November 2009
    which modem do you have?
  • stefstef November 2009
    it is huawei e160g on 3 network
  • kultexkultex November 2009
    Here is a howto:

    http://www.review-ninja.com/2009/05/huawei-e160-and-ubuntu-e160-linux-howto.html

    you need usb_modeswitch to detect the modem - dont forget to load it on startup

    for bringing the modem up - I prefer it to configure this with ivman

    in this thread you will find a lot of useful informations:

    http://www.murga-linux.com/puppy/viewtopic.php?t=37828&sid=490bd8f30f169455cd6830b55d17f152

  • jozeejozee November 2009
    @stef: I have cooked usb_modeswitch pkg for you. Can you give it a try: http://people.slitaz.org/~jozee/packages/

    Then, follow instructions for .conf file in the first link provided by kultex.
  • kultexkultex November 2009
    @jozee - thanks for cooking usb_modeswich.pkg - I will give it a try with my Huawei E220 on the weekend
    will the support of 3G modems be part of slitaz 3.0? - if you want I could perhaps help a little bit...
  • jozeejozee November 2009
    @kultex : You are welcome to help. I don't have a 3G modem but if you can provide more info on 3G modems, we can definitely create a pkg.
  • kultexkultex November 2009
    ok I am just trying it on the new cooking and I have seen, that there is no more ivman - with ivman it would have been very simple - with udev there could be some troubles.

    But I try it without.

    So first hill: when running :

    usb_modeswitch -v 12d1 -p 1003 -d 1

    I get:

    Looking for default devices ...
    Found default devices (1)
    Accessing device 004 on bus 002 ...
    libusb couldn't open USB device /dev/bus/usb/002/004: Permission denied.
    libusb requires write access to USB device nodes.
    Using endpoints 0x02 (out) and 0x82 (in)
    Not a storage device, skipping SCSI inquiry
    Segmentation fault

    is this a problem of permissions in udev? -

  • kultexkultex November 2009
    sorry - stupid - I have to run this as root
  • kultexkultex November 2009
    ok - the modem ist working with: modprobe usbserial vendor=0x12d1 product=0x1003 and you can connect to the Internet with wvdial or ppp ....
    but this is the old way and it is not working well - connection is slow and breaking quite often.

    for usb_modswitch there is missing the modul option: http://www.pharscape.org/option.ko.html

    for the newer modems, there should be also the modul hso: http://www.pharscape.org/hso.html , but it is recommended to use not 1.2 - better 1.9 http://www.pharscape.org/forum/index.php?topic=648

    and sometimes for the hso driver you need the "Zero-CD-Off" Utility, to switch the UMTS-modem from cd-rom-mode to modem-mode: http://www.pharscape.org/forum/index.php?topic=545

    this would be needed for UMTS support - is it possible, to get this?

    All the UMTS-modems named here - http://www.draisberghof.de/usb_modeswitch/ - should be then supported
  • kultexkultex November 2009
    and I forgot comgt would be also useful
  • kultexkultex November 2009
    to get the options.ko modul, I found:

    from here: http://www.pharscape.org/datacards-option.ko.html

    Since kernel 2.6.12 there is built in support for Fusion devices. Apparently you just need to set the kernel configuration to:

    CONFIG_USB_SERIAL_OPTION=m

    and a german howto, to get the E160 working on a fritzbox 7170: http://ting.ip-phone-forum.de/showthread.php?t=201519

    config FREETZ_MODULE_option
    bool "option.ko"
    select FREETZ_MODULE_usbserial
    default n
  • kultexkultex November 2009
    @jozee are you making a pkg? - I thought, perhaps I could learn how to make pkgs, but due to a heavy illness of a friend, I have no time for this - the only thing I can do is to make the udev or ivman rules

  • jozeejozee November 2009
    @kultex: not yet; i m also spending my free time in hospital these days; family friend was in ICU.

    CONFIG_USB_SERIAL_OPTION=m is already set in kernel .config. Install linux-dialup package for options.ko.
  • kultexkultex December 2009
    as I see here http://labs.slitaz.org/issues/show/149 all the driver stuff seems to be done - are there any plans to make it userfriendly (switch it automatic, make a wvdial script...?) - is there a group or Dominique working on it? I have a little bit of time now.
  • jozeejozee December 2009
    no, i don't think that anybody is working on it. Your contributions would be welcome!! But, first do check out slitaz netbox (ppp) functionality and see what needs to be added (if any?)
  • kultexkultex December 2009
    - yes there are needs - at least pin and apn - who is maintaining slitaz netbox?
  • kultexkultex December 2009
    jozee,

    I am a bit stuck in my efforts to automatize switching and integration in netbox

    1) automatize switching: I think I found the problem - there are two ways of installation of usb_modeswitch: "For manual use (e.g. testing purposes) run "make install" - For system integration run "make integrated_install"".
    Installing your usb-modeswitch.tazpkg I am missing some files and usb_modeswitch is on the wrong place (it should be in /usr/sbin and not in usr/bin) - is it possible, to get the whole usb_modeswitch package?

    2) integration in netbox: with ppp I did it as two years ago, when I got my modem.

    1) /etc/ppp/peers/ppp:
    hide-password

    noauth

    connect "/usr/sbin/chat -f /etc/ppp/scripts/ppp"

    debug

    /dev/ttyUSB0

    460800

    defaultroute

    noipdefault

    noccp

    nobsdcomp

    user USER

    password PASS

    usepeerdns

    connect-delay 10000


    2) /etc/ppp/scripts/ppp

    ABORT BUSY ABORT 'NO CARRIER' ABORT VOICE ABORT 'NO DIALTONE' ABORT 'NO DIAL TONE' ABORT 'NO ANSWER' ABORT DELAYED

    # modeminit

    '' 'ATZ'

    TIMEOUT 5

    OK AT+CPIN?

    'READY-AT+CPIN=PIN-' ''

    TIMEOUT 20

    'OK' 'AT+cgdcont=1,"IP","APN"'

    'OK' 'ATDTTEL'

    CONNECT \d\c

    # end of pppconfig stuff

    the red letters are different for every provider (if somebody wants to integrate this in netbox)

    normally I could run this with pppd call ppp nodetach as user - in slitaz I can run pppd only as root???

    running pppd as root, I get the connection, but firefox is not able to open any page. Is this a firewall problem???

    would be nice to get any help

    kultex
  • kultexkultex December 2009
    I found one more problem - usb_modeswitch.tcl is based on libusb 0.1.12, but slitaz version is 1.0.0 - Josh - in the usb_modeswitch forum - asks all the time, if you have libusb 0.1.12
    downloadable here: http://sourceforge.net/projects/libusb/files/libusb-0.1%20%28LEGACY%29/0.1.12/libusb-0.1.12.tar.gz/download
  • kultexkultex December 2009
    sorry one more post - it took me quite a long time to understand this:

    until usb-modeswitch 1.02 there was no wrapper (usb_modeswitch.tcl) - this method needs no libusb package. Puppy works still with usb_modeswitch 1.02 - rerwin, who is developing this in puppy, wrote:

    NOTE: I have not upgraded to usb_modeswitch-1.0.3 because it no longer appears to support command-line parameters, which Puppy uses. It stops with a segmentation fault.


    so perhaps - to save energy and time, it would be the best to ask him, if we just could import his work to slitaz - this would be also the small solution, because there is no need for libusb, only the place for some udev ruls.

    So I think, you have to decide, which way to take......
  • jozeejozee December 2009
    kultex,

    usb_modeswitch pkg is updated using integrated_install. This pkg is a bit strange. install and integrated_install seems to copy different files. integrated_install seems to automate udev and related information such that usb_modeswitch.conf does not seem to be needed. Anyways, in the pkg, I have included /etc/usb_modeswitch.conf file.Please test if we need it.

    BTW, libusb is dependend on libusb-compat which makes it compatible with 0.1.12, so we have taken care of that. Also, I have added "tcl" as an optional dependency in usb_modeswitch. Please see if its correct.

    Second thing, I have uploaded gnome_ppp dialer (lightweight wvdial frontend). Please see if it helps. Maybe we don't need to improve netbox if gnome_ppp works nicely.

    Third, I have rebuilt linux-dialup pkg. We seem to have everything we need for 3G modems. If you do find any modem-specific module missing thats in kernel 30.6, please let me know.

    You can use "tazhw detec-usb" to autodetect any modem modules to be loaded.

    All the packages are loaded at http://people.slitaz.org/~jozee/packages/3G_modem/

    Do we need anything else??



    PS: Thanks for all your information. They are very useful.

    EDIT: thanks for pointing to rerwin's puppy thread. I read some of it and it seems we already have all the things in Slitaz (thanks mainly to domcox). Domcox also wrote a nice tutorial in getting 3G dialup, which we have unfortunately lost. I don't have a 3G modem, so we are really dependent on people possessing one.

    Cheers,

    --Rohit
  • jozeejozee December 2009
    Also try adding yourself to group "dialout" for your permission problem (cat /etc/group)
  • jozeejozee December 2009
    kultex, 3G modem article on the archwiki seems to be simple and relevant: http://wiki.archlinux.org/index.php/USB_3G_Modem

    Hope this helps.
  • kultexkultex December 2009
    ok - for today:

    it seems, that we do not need usb_modeswitch - at least for my Huawei E220 it is not needed. because I just have to load option and than it works.

    but still I want to get usb_modeswitch get to work, because it does not - I think this is a udev problem. How do I get udev to log????

    Normally it is in /dev/.udev/udev.log, when I turn on logging ........ when I turn it on in slitaz, I do not find anything.....

    and I have still troubles with permission:

    tux@slitaz:~$ ls -l /usr/bin/wvdial

    -rwsr-x--- 1 root dialout 93976 Sep 25 15:40 /usr/bin/wvdial

    tux@slitaz:~$ cat /etc/group

    root:x:0:

    lp:x:10:

    audio:x:20:tux

    nogroup:x:99:

    www:x:80:

    messagebus:x:25:

    camera:x:1:

    cdrom:x:2:

    dialout:x:3:tux

    disk:x:4:

    floppy:x:5:

    kmem:x:6:

    scanner:x:7:

    tape:x:8:

    tty:x:9:

    vboxusers:x:11:

    video:x:12:

    haldaemon:x:26:

    tux:x:1000:

    tux@slitaz:~$ wvdial pin

    -sh: wvdial: Permission denied

    tux@slitaz:~$


    by the way - gnome-ppp is useless, because you cannot save the pin - there is a nice script from fluxflux for dialing umts - I will post it tomorrow

  • jozeejozee December 2009
    @kultex: long time back I wrote a tutorial on how to debug udev rules on wiki but now we have lost it. I need to write it again (sometime later). Basically you need to use "udevadm" to see which rule is triggering.

    First thing is: can you upgrade just your udev pkg? It should fix the permission problems that we are having with any usb device. I had filed a bug report: http://labs.slitaz.org/issues/show/134 which just recently got fixed by Pankso (http://hg.slitaz.org/wok/rev/3f1ebca13b4f). So, hopefully all the udev permission problems we were having with usb devices should be solved.

    This bug report also contains command for debugging and explains it in detail. So this may be helpful .

    BTW, do you know how to compile pkgs for slitaz. Slitaz really has a very simple to learn build system. The usb_modeswitch receipt is contained in the pkg. So, you can compile it easily at your end in case you need to do it.
  • jozeejozee December 2009
    I think there is a problem with this fix :http://hg.slitaz.org/wok/rev/3f1ebca13b4f. I need to inform Pankso. I just realized that the fix adds rule to 90-permissions.rules file which would be given lower priority to 50-udev-default.rules. The file no. should be less than 50. So, I think you need to create 40-permissions.rules as I have suggested in the solution in the bug report. Only then udev priortizes this rule. This is what works for me. After upgrading the udev pkg, can you help to test this too.

    Please help. This is a very important fix. This small change will fix the problems with printers, cameras, modems or any other usb device. Otherwise udev is playing an unnecessary havoc.
  • jozeejozee December 2009
    tux@slitaz:~$ ls -l /usr/bin/wvdial

    -rwsr-x--- 1 root dialout 93976 Sep 25 15:40 /usr/bin/wvdial

    wvdial pin


    I am guessing "wvdial pin" needs a write permission, which dialout group does not have. Correct this. I hope it works

  • kultexkultex December 2009
    first the script from fluxflux-sl/umtsscript/part1 - i know with xenity, but perhaps it can be transformed....

    #!/bin/bash
    #
    # umts-connect 0.3
    #
    # Script to connect UMTS modems
    # via comgt (PIN activation) and wvdial
    #
    # - icon with established connection
    # - used volume is shown after the connection is closed
    # - choice of the device (modem, handy via usb or bluetooth
    #
    # Thomas Schönhütl
    # 22. September 2008
    # 20. April 2009
    # 20. Juli 2009
    #
    # Lizenz: GPL, Version 2
    #
    DEVICE=$(zenity --title "Modem/Handy" --width=400 --height=200 --radiolist --text "Which device shall be used?" --list --column Choice --column Device TRUE "UMTS-Modem (USB/PCMCIA/Express34)" FALSE "Handy/PDA via USB connection" FALSE "Handy/PDA via bluetooth")
    if [ -z "`echo $DEVICE`" ]; then
    zenity --title "UMTS connection" --info --text "The script will finish now ..."
    exit
    fi
    #
    #
    #
    if [ "`echo $DEVICE`" = "UMTS-Modem (USB/PCMCIA/Express34)" ]; then
    #
    if [ -z "`/bin/ls /dev/ttyUSB*`" -a -z "`/bin/ls /dev/ttyACM*`" ]; then
    zenity --title "UMTS connection" --info --text "No UMTS modem available!\n\nThe script will finish now ..."
    exit
    fi
    #
    PIN=$(zenity --title "PIN" --entry --text "Please insert the PIN of the SIM card:" --hide-text)
    #
    export COMGTPIN=$PIN
    /usr/local/bin/comgt PIN -d /dev/ttyUSB0
    #
    WAHL=$(zenity --title "UMTS connection" --list --radiolist --text "Use the last configuration?" --column Choice --column Action TRUE "Yes, use it." FALSE "No, configure a new one.")
    #
    if [ -z "`echo $WAHL`" ]; then
    zenity --title "UMTS connection" --info --text "The script will finish now ..."
    exit
    fi
    #
    if [ "`echo $WAHL`" = "Yes, use it." ]; then
    sed -i "s:ttyACM:ttyUSB:" /etc/wvdial.conf
    sed -i "s:rfcomm0:ttyUSB0:" /etc/wvdial.conf
    export MAIN_DIALOG="








    "
    {
    sleep 15
    killall gtkdialog



  • kultexkultex December 2009
    umtsscript/part2
    } | gtkdialog -c --program MAIN_DIALOG
    (xterm -title "Please do NOT close this window during the connection ..." -e wvdial && ERG=$(echo "`tail /var/log/messages | grep Sent | tr " " "\n" | grep bytes -1 | sed -e '2,3d' | sed -e '2,3d'`+`tail /var/log/messages | grep Sent | tr " " "\n" | grep bytes -1 | sed -e '2,3d' | sed -e '1d' | sed -e '2d'`" | bc -l) && ERG1=$(echo "`echo $ERG`/1024" | bc -l) && ERG2=$(echo $ERG1 | cut -d "." -f1) && zenity --info --text "Used data volume:\n\n`echo $ERG2` Kb" && killall zenity) &
    sleep 45
    rm /etc/resolv.conf
    echo "nameserver `tail -30 /var/log/messages | grep DNS | sed -e '2d'| rev | cut -d " " -f1 | rev`" > /etc/resolv.conf
    while [ "`ps -e | grep wvdial`" ]; do zenity --notification --window-icon=/usr/share/icons/Tango/scalable/devices/network-wireless.svg --text "UMTS connection: activ; local IP: `ifconfig | grep P-t-P | tr " " "\n" | grep addr | cut -b 6-`; DNS: `cat /etc/resolv.conf`" && zenity --info --text "UMTS connection: activ; local IP: `ifconfig | grep P-t-P | tr " " "\n" | grep addr | cut -b 6-`; DNS: `cat /etc/resolv.conf`"; continue; done
    else
    TEL=$(zenity --title "UMTS connection" --entry --text "Insert telefonnumber or accept:" --entry-text *99#)
    if [ -z "`echo $TEL`" ]; then
    zenity --title "UMTS connection" --info --text "The script will finish now ..."
    exit
    fi
    NETZ=$(zenity --title "UMTS connection" --entry --text "Please insert APN of the provider:")
    if [ -z "`echo $NETZ`" ]; then
    zenity --title "UMTS connection" --info --text "The script will finish now ..."
    exit
    fi
    USER=$(zenity --title "UMTS connection" --entry --text "Please insert username:")
    if [ -z "`echo $USER`" ]; then
    zenity --title "UMTS connection" --info --text "The script will finish now ..."
    exit
    fi
    PASSWD=$(zenity --title "UMTS connection" --entry --text "Please insert password:")
    if [ -z "`echo $PASSWD`" ]; then
    zenity --title "UMTS connection" --info --text "The script will finish now ..."
    exit
    fi
    #
  • kultexkultex December 2009
    umtsscript/part3
    tac /etc/wvdial.conf | sed -e '1,4d' | tac > /tmp/wvdial.conf
    echo "Init3 = AT+CGDCONT=1,\"IP\",\"`echo $NETZ`\"" >> /tmp/wvdial.conf
    echo "Password = `echo $PASSWD`" >> /tmp/wvdial.conf
    echo "Username = `echo $USER`" >> /tmp/wvdial.conf
    echo "Phone = `echo $TEL`" >> /tmp/wvdial.conf
    rm -f /etc/wvdial.conf
    mv /tmp/wvdial.conf /etc/
    sed -i "s:ttyACM:ttyUSB:" /etc/wvdial.conf
    sed -i "s:rfcomm0:ttyUSB0:" /etc/wvdial.conf
    (xterm -title "Please do NOT close this window during the connection ..." -e wvdial && ERG=$(echo "`tail /var/log/messages | grep Sent | tr " " "\n" | grep bytes -1 | sed -e '2,3d' | sed -e '2,3d'`+`tail /var/log/messages | grep Sent | tr " " "\n" | grep bytes -1 | sed -e '2,3d' | sed -e '1d' | sed -e '2d'`" | bc -l) && ERG1=$(echo "`echo $ERG`/1024" | bc -l) && ERG2=$(echo $ERG1 | cut -d "." -f1) && zenity --info --text "Used data volume:\n\n`echo $ERG2` Kb" && killall zenity) &
    sleep 45
    rm /etc/resolv.conf
    echo "nameserver `tail -30 /var/log/messages | grep DNS | sed -e '2d'| rev | cut -d " " -f1 | rev`" > /etc/resolv.conf
    while [ "`ps -e | grep wvdial`" ]; do zenity --notification --window-icon=/usr/share/icons/Tango/scalable/devices/network-wireless.svg --text "UMTS connection: activ; local IP: `ifconfig | grep P-t-P | tr " " "\n" | grep addr | cut -b 6-`; DNS: `cat /etc/resolv.conf`" && zenity --info --text "UMTS connection: activ; local IP: `ifconfig | grep P-t-P | tr " " "\n" | grep addr | cut -b 6-`; DNS: `cat /etc/resolv.conf`"; continue; done
    fi
    killall zenity
    fi
    #
    #
    #
    if [ "`echo $DEVICE`" = "Handy/PDA via USB connection" ]; then
    if [ -z "`/bin/ls /dev/ttyUSB*`" -a -z "`/bin/ls /dev/ttyACM*`" ]; then
    zenity --title "UMTS connection" --info --text "No UMTS modem available!\n\nThe script will finish now ..."
    exit
    fi
    #
    #
    WAHL=$(zenity --title "UMTS connection" --list --radiolist --text "Use the last configuration?" --column Choice --column Action TRUE "Yes, use it." FALSE "No, configure a new one.")
    #
    if [ -z "`echo $WAHL`" ]; then
    zenity --title "UMTS connection" --info --text "The script will finish now ..."
    exit
    fi
    #
    if [ "`echo $WAHL`" = "Yes, use it." ]; then
    sed -i "s:ttyUSB:ttyACM:" /etc/wvdial.conf
    sed -i "s:rfcomm0:ttyACM0:" /etc/wvdial.conf
    export MAIN_DIALOG="








    "
    {
    sleep 4
    killall gtkdialog
    } | gtkdialog -c --program MAIN_DIALOG
    (xterm -title "Please do NOT close this window during the connection ..." -e wvdial && ERG=$(echo "`tail /var/log/messages | grep Sent | tr " " "\n" | grep bytes -1 | sed -e '2,3d' | sed -e '2,3d'`+`tail /var/log/messages | grep Sent | tr " " "\n" | grep bytes -1 | sed -e '2,3d' | sed -e '1d' | sed -e '2d'`" | bc -l) && ERG1=$(echo "`echo $ERG`/1024" | bc -l) && ERG2=$(echo $ERG1 | cut -d "." -f1) && zenity --info --text "Used data volume:\n\n`echo $ERG2` Kb" && killall zenity) &
    sleep 45
    rm /etc/resolv.conf
    echo "nameserver `tail -30 /var/log/messages | grep DNS | sed -e '2d'| rev | cut -d " " -f1 | rev`" > /etc/resolv.conf
    while [ "`ps -e | grep wvdial`" ]; do zenity --notification --window-icon=/usr/share/icons/Tango/scalable/devices/network-wireless.svg --text "UMTS connection: activ; local IP: `ifconfig | grep P-t-P | tr " " "\n" | grep addr | cut -b 6-`; DNS: `cat /etc/resolv.conf`" && zenity --info --text "UMTS connection: activ; local IP: `ifconfig | grep P-t-P | tr " " "\n" | grep addr | cut -b 6-`; DNS: `cat /etc/resolv.conf`"; continue; done
    else
    TEL=$(zenity --title "UMTS connection" --entry --text "Insert telefonnumber or accept:" --entry-text *99#)
    if [ -z "`echo $TEL`" ]; then
    zenity --title "UMTS connection" --info --text "The script will finish now ..."
    exit
    fi
    NETZ=$(zenity --title "UMTS connection" --entry --text "Please insert APN of the provider:")
    if [ -z "`echo $NETZ`" ]; then
    zenity --title "UMTS connection" --info --text "The script will finish now ..."
    exit
    fi
    USER=$(zenity --title "UMTS connection" --entry --text "Please insert username:")
    if [ -z "`echo $USER`" ]; then
    zenity --title "UMTS connection" --info --text "The script will finish now ..."
    exit
    fi
    PASSWD=$(zenity --title "UMTS connection" --entry --text "Please insert password:")
    if [ -z "`echo $PASSWD`" ]; then
    zenity --title "UMTS connection" --info --text "The script will finish now ..."
    exit
    fi
    #
    tac /etc/wvdial.conf | sed -e '1,4d' | tac > /tmp/wvdial.conf
    echo "Init3 = AT+CGDCONT=1,\"IP\",\"`echo $NETZ`\"" >> /tmp/wvdial.conf
    echo "Password = `echo $PASSWD`" >> /tmp/wvdial.conf
    echo "Username = `echo $USER`" >> /tmp/wvdial.conf
    echo "Phone = `echo $TEL`" >> /tmp/wvdial.conf
    rm -f /etc/wvdial.conf
    mv /tmp/wvdial.conf /etc/
    sed -i "s:ttyUSB:ttyACM:" /etc/wvdial.conf
    sed -i "s:rfcomm0:ttyACM0:" /etc/wvdial.conf
    (xterm -title "Please do NOT close this window during the connection ..." -e wvdial && ERG=$(echo "`tail /var/log/messages | grep Sent | tr " " "\n" | grep bytes -1 | sed -e '2,3d' | sed -e '2,3d'`+`tail /var/log/messages | grep Sent | tr " " "\n" | grep bytes -1 | sed -e '2,3d' | sed -e '1d' | sed -e '2d'`" | bc -l) && ERG1=$(echo "`echo $ERG`/1024" | bc -l) && ERG2=$(echo $ERG1 | cut -d "." -f1) && zenity --info --text "Used data volume:\n\n`echo $ERG2` Kb" && killall zenity) &
    sleep 45
    rm /etc/resolv.conf
    echo "nameserver `tail -30 /var/log/messages | grep DNS | sed -e '2d'| rev | cut -d " " -f1 | rev`" > /etc/resolv.conf
    while [ "`ps -e | grep wvdial`" ]; do zenity --notification --window-icon=/usr/share/icons/Tango/scalable/devices/network-wireless.svg --text "UMTS connection: activ; local IP: `ifconfig | grep P-t-P | tr " " "\n" | grep addr | cut -b 6-`; DNS: `cat /etc/resolv.conf`" && zenity --info --text "UMTS connection: activ; local IP: `ifconfig | grep P-t-P | tr " " "\n" | grep addr | cut -b 6-`; DNS: `cat /etc/resolv.conf`"; continue; done
    fi
    killall zenity
    fi
    #
    #
    #
    if [ "`echo $DEVICE`" = "Handy/PDA via bluetooth" ]; then
    zenity --title "UMTS connection" --info --text "Some handies must be paired with the pc before this script will work, just try it!\n\nPair the handy with the pc and make the pc known in the handy as allowed device ..."
    #
    if [ "`hcitool dev | awk '{ print $2 $3 }'`" = "" ]; then
    zenity --title "UMTS connection" --info --text "No bluetooth device available!\n\nThe script will finish now!"
    /etc/rc.d/rc.bluetooth stop
    /etc/rc.d/rc.bluetooth start
    exit
    fi
    #
    #
    OLD=$(cat /etc/bluetooth/hcid.conf | grep passkey | cut -d " " -f2 | sed -e 's/\";//' -e 's/\"//')
    PIN=$(zenity --title "UMTS connection" --entry --text "The actual PIN of the pc is `echo $OLD`. It can be changed now:" --entry-text `echo $OLD`)
    echo $PIN > /etc/bluetooth/passkeys/default
    if [ -z "`echo $PIN`" ]; then
    /etc/rc.d/rc.bluetooth stop
    /etc/rc.d/rc.bluetooth start
    exit
    fi
    sed -i "s/`echo $OLD`/`echo $PIN`/" /etc/bluetooth/hcid.conf
    zenity --title "UMTS connection" --info --text "The actual PIN of the pc is `echo $PIN`!"
    #
    #
    zenity --title "UMTS connection" --progress --text "Scanning for bluetooth devices in range ..." --pulsate --auto-close &
    hcitool scan > ERG
    EMPF=`cat ERG | sed -e '1d' -e 's/ //g'`
    rm -f ERG
    killall zenity
    #
    if [ "`echo $EMPF | awk '{ print $1 }'`" = "" ]; then
    zenity --title "UMTS connection" --info --text "No bluetooth devices in range!\n\nThe script will finish now!"
    /etc/rc.d/rc.bluetooth stop
    /etc/rc.d/rc.bluetooth start
    exit
    fi
    #
    EMPFWAHL=$(zenity --title "UMTS connection" --list --radiolist --text "Choose the bluetooth device:" --column Choice --column Device TRUE "`echo $EMPF | cut -d " " -f1,2`" FALSE "`echo $EMPF | cut -d " " -f3,4`" FALSE "`echo $EMPF | cut -d " " -f5,6`")
    if [ -z "`echo $EMPFWAHL`" ]; then
    /etc/rc.d/rc.bluetooth stop
    /etc/rc.d/rc.bluetooth start
    exit
    fi
    #
    #
    KANAL=$(sdptool search dun | grep -i "`echo $EMPFWAHL | cut -d " " -f1`" -A 9 | grep Channel | cut -d ":" -f2 | sed -e 's: ::g')
    rfcomm connect 0 "`echo $EMPFWAHL | cut -d " " -f1`" "`echo $KANAL`" &
    #

  • kultexkultex December 2009
    umtsscript/part4
    #
    WAHL=$(zenity --title "UMTS connection" --list --radiolist --text "Use the last configuration?" --column Choice --column Action TRUE "Yes, use it." FALSE "No, configure a new one.")
    #
    if [ -z "`echo $WAHL`" ]; then
    zenity --title "UMTS connection" --info --text "The script will finish now ..."
    exit
    fi
    #
    if [ "`echo $WAHL`" = "Yes, use it." ]; then
    sed -i "s:ttyUSB0:rfcomm0:" /etc/wvdial.conf
    sed -i "s:ttyACM0:rfcomm0:" /etc/wvdial.conf
    export MAIN_DIALOG="








    "
    {
    sleep 30
    killall gtkdialog
    } | gtkdialog -c --program MAIN_DIALOG
    (xterm -title "Please do NOT close this window during the connection ..." -e wvdial && ERG=$(echo "`tail /var/log/messages | grep Sent | tr " " "\n" | grep bytes -1 | sed -e '2,3d' | sed -e '2,3d'`+`tail /var/log/messages | grep Sent | tr " " "\n" | grep bytes -1 | sed -e '2,3d' | sed -e '1d' | sed -e '2d'`" | bc -l) && ERG1=$(echo "`echo $ERG`/1024" | bc -l) && ERG2=$(echo $ERG1 | cut -d "." -f1) && zenity --info --text "Used data volume:\n\n`echo $ERG2` Kb" && killall zenity) &
    #sleep 30 && tail /var/log/messages | grep DNS | sed 's/ primary //' | sed 's/ secondary//' \ | cut -d" " -f8 | while read line; do echo "nameserver $line" > /etc/resolv.conf; done
    sleep 45
    rm /etc/resolv.conf
    echo "nameserver `tail -30 /var/log/messages | grep DNS | sed -e '2d'| rev | cut -d " " -f1 | rev`" > /etc/resolv.conf
    while [ "`ps -e | grep wvdial`" ]; do zenity --notification --window-icon=/usr/share/icons/Tango/scalable/devices/network-wireless.svg --text "UMTS connection: activ; local IP: `ifconfig | grep P-t-P | tr " " "\n" | grep addr | cut -b 6-`; DNS: `cat /etc/resolv.conf`" && zenity --info --text "UMTS connection: activ; local IP: `ifconfig | grep P-t-P | tr " " "\n" | grep addr | cut -b 6-`; DNS: `cat /etc/resolv.conf`"; continue; done
    else
    TEL=$(zenity --title "UMTS connection" --entry --text "Insert telefonnumber or accept:" --entry-text *99#)
    if [ -z "`echo $TEL`" ]; then
    zenity --title "UMTS connection" --info --text "The script will finish now ..."
    exit
    fi
    NETZ=$(zenity --title "UMTS connection" --entry --text "Please insert APN of the provider:")
    if [ -z "`echo $NETZ`" ]; then
    zenity --title "UMTS connection" --info --text "The script will finish now ..."
    exit
    fi
    USER=$(zenity --title "UMTS connection" --entry --text "Please insert username:")
    if [ -z "`echo $USER`" ]; then
    zenity --title "UMTS connection" --info --text "The script will finish now ..."
    exit
    fi
    PASSWD=$(zenity --title "UMTS connection" --entry --text "Please insert password:")
    if [ -z "`echo $PASSWD`" ]; then
    zenity --title "UMTS connection" --info --text "The script will finish now ..."
    exit
    fi
    #
    tac /etc/wvdial.conf | sed -e '1,4d' | tac > /tmp/wvdial.conf
    echo "Init3 = AT+CGDCONT=1,\"IP\",\"`echo $NETZ`\"" >> /tmp/wvdial.conf
    echo "Password = `echo $PASSWD`" >> /tmp/wvdial.conf
    echo "Username = `echo $USER`" >> /tmp/wvdial.conf
    echo "Phone = `echo $TEL`" >> /tmp/wvdial.conf
    rm -f /etc/wvdial.conf
    mv /tmp/wvdial.conf /etc/
    sed -i "s:ttyUSB0:rfcomm0:" /etc/wvdial.conf
    sed -i "s:ttyACM0:rfcomm0:" /etc/wvdial.conf
    (xterm -title "Please do NOT close this window during the connection ..." -e wvdial && ERG=$(echo "`tail /var/log/messages | grep Sent | tr " " "\n" | grep bytes -1 | sed -e '2,3d' | sed -e '2,3d'`+`tail /var/log/messages | grep Sent | tr " " "\n" | grep bytes -1 | sed -e '2,3d' | sed -e '1d' | sed -e '2d'`" | bc -l) && ERG1=$(echo "`echo $ERG`/1024" | bc -l) && ERG2=$(echo $ERG1 | cut -d "." -f1) && zenity --info --text "Used data volume:\n\n`echo $ERG2` Kb" && killall zenity) &
    #sleep 30 && tail /var/log/messages | grep DNS | sed 's/ primary //' | sed 's/ secondary//' \ | cut -d" " -f8 | while read line; do echo "nameserver $line" > /etc/resolv.conf; done
    sleep 45
    rm /etc/resolv.conf
    echo "nameserver `tail -30 /var/log/messages | grep DNS | sed -e '2d'| rev | cut -d " " -f1 | rev`" > /etc/resolv.conf
    while [ "`ps -e | grep wvdial`" ]; do zenity --notification --window-icon=/usr/share/icons/Tango/scalable/devices/network-wireless.svg --text "UMTS connection: activ; local IP: `ifconfig | grep P-t-P | tr " " "\n" | grep addr | cut -b 6-`; DNS: `cat /etc/resolv.conf`" && zenity --info --text "UMTS connection: activ; local IP: `ifconfig | grep P-t-P | tr " " "\n" | grep addr | cut -b 6-`; DNS: `cat /etc/resolv.conf`"; continue; done
    fi
    killall zenity
    killall rfcomm
    fi
    #

  • kultexkultex December 2009
    what I like on this script is, that the pin-code of the simcard is not saved on the computer / makes much sense, when the laptop is stolen abroad, because the roaming fees are quite high ....
    and quite unique - it includes also handy connection
  • kultexkultex December 2009
    ok - success, I am writing from slitaz and my huawei E220

    the permission problem is no problem, I connected as root, but as you thought jozee, wvdial.conf needs write permission for dialout.

    but first there was a routing problem - when you connect to the internet before with lan (eth0), you have to manually bring the connection down - ifconfig eth0 down - it is not enough to unplug the cable

    and you have to edit the /etc/resolve.conf and enter the DNS adress of the provider - in my case it was

    nameserver 213.94.78.16


    I think, all this does the abouve script automatic
  • kultexkultex December 2009
    jozee, can you please delete this post - I cant do it by myself
  • jozeejozee December 2009
    Hi kultex,

    by the way - gnome-ppp is useless, because you cannot save the pin


    I think gnome-ppp can save Init strings. As i understand, pin in wvdial is enocded as :

    Init3 = AT+CPIN=nnnn (<= replace nnnn with your PIN)


    Don't worry about coding. I think your motivation to solve this thing is what counts most.
    Just summarize the commands that you need to get this stuff working, one of us can easily code and improve this stuff.

    Let me summarize what I understand about UMTS modems now (with your help :-) ). Please help to improve this.


    tazpkg get-install wvdial
    tazpkg get-install usb_modeswitch
    tazhw detect-usb (for autoloading modules)
    lsusb (to get the vendor id, product id of your usb modem)
    addgroup tux dialout (for permissions)
    ls -l /usr/bin/wvdial
    wvdialconf (for auto-writing of configuration file)
    geany /etc/wvdial.conf (for setting username, password, pin and guration)
    usb_modeswitch -v $VENDOR_ID -p $PRODUCT_ID -d 1 (when is this necessary?)
    wvdial pin (to set the pin)
    wvdial umts (<= Replace umts with your provider name in wvdial.conf)<br />


    An example for wvdial.conf could be found at http://mybroadband.co.za/vb/archive/index.php/t-20602.html

    Please help to improve the above commands. I really appreciate your help!!
  • kultexkultex December 2009
    I think gnome-ppp can save Init strings. As i understand, pin in wvdial is enocded as : Init3 = AT+CPIN=nnnn (<= replace nnnn with your PIN) </blockquote>

    I tried this, but did not succeed

    ok - I try to improve, but I will split it

    1) packages

    tazpkg get-install wvdial 
    tazpkg get-install usb_modeswitch
    tazpkg get-install linux-dialup
    tazpgk get-install comgt (if you want the pin not be stored)


    2) switching the modem

    this should do normally usb_modeswitch by itself, if it is compiled with integrated_install


    but there is a problem with newer kernels, because it seems, that kernels bigger than 2.6.29 or 30 handle the modems, using the option module, by itself and do not pass them to udev.

    Like fluxflux-sl with kernel 2.6.30.9 is switching the Huawei E220 even when I delete the udev usb_modeswitch80.rules. (normal mode with udev 80 rule shows, when I log udev, that it is not matching the rule). In slitaz it seems to work the same, but it does not load the option driver - I have to do this with modprobe option, before I plug in the E220. Until now I do not know, what is the difference, perhaps only the kernel.

    3) dial

    check the modem if it is /dev/ttyUSB* or /dev/ttyACM*
    addgroup tux dialout (for permissions)
    ls -l /usr/bin/wvdial
    write access for dialout on /etc/wvdialconf (for auto-writing of configuration file)
    geany or leafpad /etc/wvdial.conf (for setting 7dev/ttyXXXX, pin, Tel, username, password, and APN)
    ifconfig eth0 down - perhaps the same with wifi otherwise you have problems with route
    /usr/local/bin/comgt PIN -d /dev/ttyUSB0 (if you do not want to save the pin on the hd) or
    wvdial pin
    wvdial umts
    edit /etc/resov.conf with DNS number you get from pppd

    (wvdial does not show the DNS, but you get it with ifconfig - or thats the line of the umts script: echo "nameserver `tail -30 /var/log/messages | grep DNS | sed -e '2d'| rev | cut -d " " -f1 | rev`" > /etc/resolv.conf)

    thats my wvdial.conf

    [Dialer pin]

    Modem = /dev/ttyUSB0

    Init1 = AT+CPIN=1234



    [Dialer umts]

    Modem = /dev/ttyUSB0

    ISDN = off

    Modem Type = USB Modem

    Baud = 460800

    Init = ATZ

    Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0

    Init4 =

    Phone1 =

    Dial Prefix =

    Dial Attempts = 1

    Dial Command = ATM1L3DT

    Ask Password = off

    Auto Reconnect = off

    Abort on Busy = off

    Carrier Check = on

    Check Def Route = on

    Abort on No Dialtone = on

    Stupid Mode = off

    Idle Seconds = 0

    Init3 = AT+CGDCONT=1,"IP","drei.at"

    Password = drei.at

    Username = drei.at

    Phone = *99#


    You could set Ask Password=on, but then you have trouble on reconnection, if you do not unplug the modem (BTW puupy has a nice lightwight fontend for wvdial, but there you have this problem - you have to do the pin out, before you connect a second time - like in the train)

    I hope its clear and more complete

  • kultexkultex December 2009
    ok - I found how fluxflux-sl is switching the modems - with hal rules /usr/share/hal/fdi/information/10freedesktop/10-modem.fdi and also important /usr/share/hal/fdi/preprobe/10osvendor/20-broken-usb-sticks.fdi

    but I do not post this, because in fluxflux there are no more udev rules - everything is done by hal

    this might also be a solution for your udev problem, because no more needed - the only remaining udev rule in fluxflux is the usb_modeswitch80.rule, fore those devices, who are not in the hal rules. And so I think, we could forget usb-modeswitch with all its depends when updating 10-modem.fdi regularly.

    the whole hal rules are 1,3MB (uncompressed), but I think, they are worth - so I sent you my mail on your personal account - you send me yours and I send you everything as attachment or you download fluxflux and take it from there.

    Edit: it is here in: http://hal.freedesktop.org/releases/hal-info-20091130.tar.gz


  • jozeejozee March 2010
    Hi Kultex,

    We are working on an easy tool for 3g-modem. Can you help in testing it?
    Please download from here: http://labs.slitaz.org/projects/show/setup

    As you know, I don't have a 3g-modem. So, I am completely relying on you and the information that you have given.

    Just install the package. Then you can either use the tazhw box gui:
     tazhw box 

    or command line:
     tazhw setup 3g-modem

    It will download the packages like hal-info, wvdial, linux-dialup etc and try to set up the 3g-modem automatically. Please test it.

    There is a gui interface wvdialbox. You can also call wvdialbox for testing by typing:
     tazhw wvdial 

    I have not included the "pin" encryption as the related pkg is not in slitaz repos yet. Other thing is the DNS. I feel it should be automatically associated. If not, can you post your:
    dmesg|tail

  • kultexkultex March 2010
    Hi jozee,

    the download is not working
  • jozeejozee March 2010
    updated
  • kultexkultex March 2010
    I am signd in - I just get 404 The page you were trying to access doesn't exist or has been removed.
  • jozeejozee March 2010
    Yes, I updated it. It works for me now without signing in. Try again.
  • kultexkultex March 2010
    ok - first I am impressed - until wvdial everything works fine

    the config file has some errors - I had to edit it by hand and restart

    [Dialer slitaz]
    Phone = *99#
    Username = drei.at
    Password = drei.at
    Stupid Mode = 1
    Dial Command = ATDT
    Modem = /dev/ttyUSB0
    Baud = 460800
    Init1 = AT+CPIN=9624
    Init2 = ATZ
    Init3 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
    Init4 = AT+CGDCONT=1,"IP", "drei.at"
    ISDN = 0
    Modem Type = Analog Modem

    Pin was saved like this: Init1 = AT+CPIN= 9624 one empty space to much
    The APN was not changed and there was two Init1 - I will post the original output later

    then you did not close eth0 - at least I did not see it in resolve.conf

    and I had to edit DNS in resolf.conf by hand

    tux@slitaz:~$ dmesg|tail
    option 2-2:1.0: device disconnected
    option1 ttyUSB1: GSM modem (1-port) converter now disconnected from ttyUSB1
    option 2-2:1.1: device disconnected
    usb 2-2: new full speed USB device using uhci_hcd and address 6
    usb 2-2: configuration #1 chosen from 1 choice
    option 2-2:1.0: GSM modem (1-port) converter detected
    usb 2-2: GSM modem (1-port) converter now attached to ttyUSB0
    option 2-2:1.1: GSM modem (1-port) converter detected
    usb 2-2: GSM modem (1-port) converter now attached to ttyUSB1
    usb-storage: probe of 2-2:1.2 failed with error -1
    tux@slitaz:~$

    but in dmesg you dont see - its normally in /var/log/messages

    Mar 12 21:11:01 (none) user.info kernel: usb 2-2: new full speed USB device using uhci_hcd and address 6
    Mar 12 21:11:01 (none) user.info kernel: usb 2-2: configuration #1 chosen from 1 choice
    Mar 12 21:11:01 (none) user.info kernel: option 2-2:1.0: GSM modem (1-port) converter detected
    Mar 12 21:11:01 (none) user.info kernel: usb 2-2: GSM modem (1-port) converter now attached to ttyUSB0
    Mar 12 21:11:01 (none) user.info kernel: option 2-2:1.1: GSM modem (1-port) converter detected
    Mar 12 21:11:01 (none) user.info kernel: usb 2-2: GSM modem (1-port) converter now attached to ttyUSB1
    Mar 12 21:11:01 (none) user.warn kernel: usb-storage: probe of 2-2:1.2 failed with error -1
    Mar 12 21:12:12 (none) auth.notice su: + none tux:root
    Mar 12 21:13:42 (none) daemon.notice pppd[3439]: pppd 2.4.4 started by root, uid 0
    Mar 12 21:13:42 (none) daemon.info pppd[3439]: Using interface ppp0
    Mar 12 21:13:42 (none) daemon.notice pppd[3439]: Connect: ppp0 <--> /dev/ttyUSB0
    Mar 12 21:13:42 (none) daemon.warn pppd[3439]: Warning - secret file /etc/ppp/pap-secrets has world and/or group access
    Mar 12 21:13:42 (none) daemon.warn pppd[3439]: Warning - secret file /etc/ppp/chap-secrets has world and/or group access
    Mar 12 21:13:42 (none) daemon.info pppd[3439]: CHAP authentication succeeded
    Mar 12 21:13:42 (none) daemon.notice pppd[3439]: CHAP authentication succeeded
    Mar 12 21:13:49 (none) daemon.warn pppd[3439]: Could not determine remote IP address: defaulting to 10.64.64.64
    Mar 12 21:13:49 (none) daemon.notice pppd[3439]: local IP address 77.119.81.241
    Mar 12 21:13:49 (none) daemon.notice pppd[3439]: remote IP address 10.64.64.64
    Mar 12 21:14:50 (none) auth.notice su: + none tux:root

    but in SliTaz the DNS is missing



  • kultexkultex March 2010
    the original changed wvdial.conf done by Wvdial Box

    [Dialer slitaz]
    Phone = *99#
    Username = drei.at
    Password = drei.at
    Stupid Mode = 1
    Dial Command = ATDT
    Modem = /dev/ttyUSB0
    Baud = 460800
    Init1 = ATZ
    Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
    Init3 = AT+CGDCONT=1,"IP", "apn.yournet.net"
    Init1 = AT+CPIN= 9624
    ISDN = 0
    Modem Type = Analog Modem
  • kultexkultex March 2010
    I have not much idea about the resolv.conf, but looking in my slackware its like this

    thats the last entrys from /var/log/messages

    Mar 12 23:02:54 ff-sl pppd[22529]: pppd 2.4.4 started by root, uid 0
    Mar 12 23:02:54 ff-sl pppd[22529]: Using interface ppp0
    Mar 12 23:02:54 ff-sl pppd[22529]: Connect: ppp0 <--> /dev/ttyUSB0
    Mar 12 23:02:54 ff-sl pppd[22529]: CHAP authentication succeeded
    Mar 12 23:02:54 ff-sl pppd[22529]: CHAP authentication succeeded
    Mar 12 23:02:56 ff-sl pppd[22529]: local IP address 77.116.237.167
    Mar 12 23:02:56 ff-sl pppd[22529]: remote IP address 10.64.64.64
    Mar 12 23:02:56 ff-sl pppd[22529]: primary DNS address 213.94.78.17
    Mar 12 23:02:56 ff-sl pppd[22529]: secondary DNS address 213.94.78.16

    and my resolve.conf has all the time

    nameserver 213.94.78.16

    - only when I plug in the network cable and connect it with wicd it is

    # Generated by dhcpcd for interface eth0
    search lan
    nameserver 192.168.2.1
  • kultexkultex March 2010
    Hi Jozee,

    I found something here in Arch, which could be useful

    http://www.splitbrain.org/blog/2009-03/10-huawai_3g_umts_stick_on_arch_linux

    Unlike other distros Arch doesn't ship any ip-up or ip-down scripts. So we need at least two very simple files to make DNS work correctly.

    /etc/ppp/ip-up:

    #!/bin/sh
    # This script is run by pppd when there's a successful ppp connection.
    if [ -e /etc/ppp/resolv.conf ]; then
    cp -f /etc/resolv.conf /etc/resolv.conf.pre-ppp
    cp -f /etc/ppp/resolv.conf /etc/resolv.conf
    chmod 644 /etc/resolv.conf
    fi

    /etc/ppp/ip-down:

    #!/bin/sh
    # This script is run by pppd after the connection has ended.
    if [ -e /etc/resolv.conf.pre-ppp ]; then
    mv /etc/resolv.conf.pre-ppp /etc/resolv.conf
    chmod 644 /etc/resolv.conf
    fi

    but still the problem, that there is no /etc/ppp/resolv.conf

    And if you want me to test something - it should be before Wendsday, because afterwards I am on tour (unti eastern) with most of the time no Internet and time and no Huawei (to expensive)
  • kultexkultex March 2010
    ok found something that works - with Google Public DNS: 8.8.8.8 and 8.8.4.4

    http://www.linuxscrew.com/2009/12/03/google-public-dns-8888-and-8844/

    echo nameserver 8.8.8.8 > /etc/resolv.conf

    but it is slower as the nameserver of the provider
  • kultexkultex March 2010
    exploring in the afternoon a bit with /etc/ppp/options and it seems that SliTaz ppp eaven it is the same Version - 2.4.4 is totally different to the Salckware ppp - I never get the DNS Address - even I use the Slackware options in SliTaz - when I use them - there the connection breaks immediatly
    man pppd gives that I could add to options

    dns-addr 213.94.78.16

    the same here - the connection breaks immediatly
  • erniaernia March 2010
    I had some issues dialing with a nokia n78 and slitaz's wvdial, everytime pppd died after a correct pap autentication with exit code = 16.
    The problem is gone installing debian's wvdial and some of his dependencies:
    http://packages.debian.org/lenny/wvdial
    I get domain names server but they're not put in /etc/resolv.conf,
    i'll investigate tomorrow.
  • jozeejozee March 2010
    Hi Kultex,

    You can download the new version. You also need to download the updated wvdial,ppp, rp-pppoe pkgs.
    Following changes were done:
    Pin was saved like this: Init1 = AT+CPIN= 9624 one empty space to much
    The APN was not changed and there was two Init1 - I will post the original output later
    Fixed all the typos.
    then you did not close eth0 - at least I did not see it in resolve.conf
    The script did close eth0 but the function was not invoked in the wvdial gui. Now, its fixed.

    /etc/ppp/ip-up:
    ...
    /etc/ppp/ip-down:
    ...
    Similar scripts are now part of ppp pkgs. I have upgraded and updated all the relevant packages.
    http://hg.slitaz.org/wok/rev/e30d1487cb38
    http://hg.slitaz.org/wok/rev/b315a2103f94
    http://hg.slitaz.org/wok/rev/2be24e406c2b
    I hope DNS now gets correctly configured in /etc/resolv.conf.

    Let me know.
  • kultexkultex March 2010
    now nothing is working any more

    first on tazhw box - if I try to set up the modem from there, its not working (did not try it until now) tazhw setup 3g-modem works

    then tazhw setup 3g-modems

    Detected USB devices Kernel modules
    ================================================================================
    HUAWEI Mobile
    > Module in use: option
    ================================================================================


    ====================================
    list detected devices
    ls: /dev/ttyACM*: No such file or directory
    Do you want to configure wvdial (y/N) ? y

    --------until here evrythings seems to be ok----------------

    Editing `/etc/wvdial.conf'.

    Scanning your serial ports for a modem.

    ttyS0<*1>: ATQ0 V1 E1 -- failed with 2400 baud, next try: 9600 baud
    ttyS0<*1>: ATQ0 V1 E1 -- failed with 9600 baud, next try: 115200 baud
    ttyS0<*1>: ATQ0 V1 E1 -- and failed too at 115200, giving up.
    ttyS1<*1>: ATQ0 V1 E1 -- failed with 2400 baud, next try: 9600 baud
    ttyS1<*1>: ATQ0 V1 E1 -- failed with 9600 baud, next try: 115200 baud
    ttyS1<*1>: ATQ0 V1 E1 -- and failed too at 115200, giving up.
    ttyS2<*1>: ATQ0 V1 E1 -- failed with 2400 baud, next try: 9600 baud
    ttyS1<*1>: ATQ0 V1 E1 -- failed with 9600 baud, next try: 115200 baud
    ttyS1<*1>: ATQ0 V1 E1 -- and failed too at 115200, giving up.
    ttyS2<*1>: ATQ0 V1 E1 -- failed with 2400 baud, next try: 9600 baud
    ttyS2<*1>: ATQ0 V1 E1 -- failed with 9600 baud, next try: 115200 baud
    ttyS2<*1>: ATQ0 V1 E1 -- and failed too at 115200, giving up.
    ttyS3<*1>: ATQ0 V1 E1 -- failed with 2400 baud, next try: 9600 baud
    ttyS3<*1>: ATQ0 V1 E1 -- failed with 9600 baud, next try: 115200 baud
    ttyS3<*1>: ATQ0 V1 E1 -- and failed too at 115200, giving up.
    WvModem<*1>: Cannot get information for serial port.
    ttyUSB0<*1>: ATQ0 V1 E1 -- OK
    ttyUSB0<*1>: ATQ0 V1 E1 Z -- OK
    ttyUSB0<*1>: ATQ0 V1 E1 S0=0 -- OK
    ttyUSB0<*1>: ATQ0 V1 E1 S0=0 &C1 -- OK
    ttyUSB0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 -- OK
    ttyUSB0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 -- +CME ERROR: SIM PIN required
    ttyUSB0<*1>: Modem Identifier: ATI -- Manufacturer: huawei
    ttyUSB0<*1>: Speed 9600: AT -- OK
    ttyUSB0<*1>: Max speed is 9600; that should be safe.
    ttyUSB0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 -- OK
    WvModem<*1>: Cannot get information for serial port.
    ttyUSB1<*1>: ATQ0 V1 E1 -- OK
    ttyUSB1<*1>: ATQ0 V1 E1 Z -- OK
    ttyUSB1<*1>: ATQ0 V1 E1 S0=0 -- OK
    ttyUSB1<*1>: ATQ0 V1 E1 S0=0 &C1 -- OK
    ttyUSB1<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 -- OK
    ttyUSB1<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 -- +CME ERROR: SIM PIN required
    ttyUSB1<*1>: Modem Identifier: ATI -- Manufacturer: huawei
    ttyUSB1<*1>: Speed 9600: AT -- OK
    ttyUSB1<*1>: Max speed is 9600; that should be safe.
    ttyUSB1<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 -- OK

    Found a modem on /dev/ttyUSB0.
    Modem configuration written to /etc/wvdial.conf.
    ttyUSB0: Speed 9600; init "ATQ0 V1 E1 S0=0 &C1 &D2"
    ttyUSB1: Speed 9600; init "ATQ0 V1 E1 S0=0 &C1 &D2"
    ====================================
    Edit /etc/wvdial.conf for phone number, login name, password and pin

    perhaps here its dangerous to ask for the pin, because after 3 times without or the wrong pin you have to unlock with puk

    and this wvdial.conf was created, editing the wvdial box

    [Dialer slitaz]
    Init2 = ATQ0 V1 E1 S0=0 &C1 &D2
    Modem Type = Analog Modem
    ; Phone =
    ISDN = 0
    ; Username =
    Init1 = ATZ
    ; Password =
    Modem = /dev/ttyUSB0
    Baud = 9600


Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In Apply for Membership

SliTaz Social