3's trådløse IP på FreeBSD

From: Poul-Henning Kamp (none@phk--phk.freebsd.dk.lh.bsd-dk.dk)
Date: Wed 24 Sep 2008 - 20:37:03 CEST


To: bsd-dk@bsd-dk.dk
Subject: 3's trådløse IP på FreeBSD
From: Poul-Henning Kamp <none@phk--phk.freebsd.dk.lh.bsd-dk.dk>
Date: Wed, 24 Sep 2008 18:37:03 +0000


Dette er en "it works for me" beskrivelse, forbedringer findes
utvivlsomt og modtages med kyshånd.

Min radio er en HUAWEI E169, hvorvidt dette virker med andre
radioer må folk selv finde ud af.

1. Installer libusb fra ports

2. Hent software fra
        http://www.draisberghof.de/usb_modeswitch

3. Ret compile.sh til:
        gcc -I/usr/local/include -L/usr/local/lib -l usb \
                -o usb_modeswitch usb_modeswitch.c

4. Lav /etc/usb_modeswitch.conf fil med flg: indhold:

        ########################################################
        # Huawei E169
        #
        # Contributor: Dale Lane

        DefaultVendor= 0x12d1
        DefaultProduct= 0x1001

        # choose one of these:
        DetachStorageOnly=1
        HuaweiMode=1

6. I /etc/ppp/ppp.conf indsæt flg entry, med din egen PIN istedet for
    9999 i authkey:

        tre:

          # If you don't want to mess up your /etc/resolv.conf
          resolv readonly
          disable dns
          deny dns

          set device /dev/cuaU0
          set speed 921600
          set authname "ligegyldigt"
          set authkey "9999"

          # FreeBSD needs a destination address for the route, anything goes.
          set ifaddr 0 1.1.1.1

          # Get MRU right to avoid a negotiation step
          set mru 1440

          # CPP protocols is rejected, don't even try.
          disable deflate
          disable pred1
          disable vjcomp
          disable mppe

          # They're probably not interested
          ident ""

          # Default route
          add default HISADDR

          set dial " \
                TIMEOUT 1 \
                \"\" ATZ OK-ATZ-OK \
                ATE0 OK \
                AT+CPIN? +CPIN:\\sREADY-AT+CPIN=\\P\\r\\d\\d\\d-\\c \"x\" OK \
                AT+CGDCONT=1,\\\"IP\\\",\\\"bredband.tre.dk\\\" OK \
                ATE0V1&D2&C1S0=0+IFC=2,2 OK \
                ATDT*99# TIMEOUT 10 CONNECT \
                "

Når du skal bruge dit netværk:

A. Flip det magiske bit:

        kldunload ubsa
        kldunload umass
        (indsæt radio)
        kldload ubsa
        usb_modeswitch -W

    Hvis kernen siger
        ucom0: Could not find interrupt in
        device_attach: ucom0 attach returned 6
    Virkede det ikke, prøv igen.

B. Start PPP

    ppp tre
    dial

Noter: Der er seks sekunders pause efter PIN koden er sendt (\\d\\d\\d)
det er muligvis ikke nok, forlæng evt. ved at tilføje flere "\\d"

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk@FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.



This archive was generated by hypermail 2b30 : Tue 30 Sep 2008 - 23:00:01 CEST