PPP
---

> If ethernet works fine, why
> not just plug into a wired connection to your local network?

Because ethernet isn't the only choice to connect.
It is good to have working wifi and 3g modem.

> What exactly do you mean, PPP over USB?
Google "PPP over USB". I've googled, red 9fans archive,
wiki and docs before posting here.

I've even posted gist with lspci, lsusb, logs etc 
(https://gist.github.com/782904).
Device support CDC. There is interface for AT commands.

        bInterfaceSubClass 2 Abstract (modem)
        bInterfaceProtocol 1 AT-commands (v.25ter)
        iInterface 8 CDC Comms Interface

Then I plug it to Linux box it creates /dev/ttyACM0

        usb 2-1: new full speed USB device using uhci_hcd and address 2
        cdc_acm 2-1:1.8: ttyACM0: USB ACM device
        cdc_acm 2-1:1.10: ttyACM1: USB ACM device
        usbcore: registered new interface driver cdc_acm
        cdc_acm: v0.26:USB Abstract Control Model driver for USB modems and 
ISDN adapters
        NET: Registered protocol family 35
        usbcore: registered new interface driver cdc_ether

PPPD use it to create ppp0 network interface.

        # wvdial
        --> WvDial: Internet dialer version 1.61
        --> Cannot get information for serial port.
        --> Initializing modem.
        --> Sending: ATZ
        ATZ
        OK
        --> Sending: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
        ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
        OK
        --> Sending: AT+CGDCONT=1,"IP","unlim.utel.ua"
        AT+CGDCONT=1,"IP","unlim.utel.ua"
        OK
        --> Modem initialized.
        --> Sending: ATDT*99#
        --> Waiting for carrier.
        ATDT*99#
        CONNECT
        ~[7f]}#@!}!} } }2}#}$@#}!}$}%\}"}&} }*} } g}%~
        --> Carrier detected. Waiting for prompt.
        ~[7f]}#@!}!} } }2}#}$@#}!}$}%\}"}&} }*} } g}%~
        --> PPP negotiation detected.
        --> Starting pppd at Sat Jan 15 22:03:16 2011
        --> Pid of pppd: 8915
        --> Using interface ppp0
        --> pppd: e[08]c[08]xg[08]
        --> pppd: e[08]c[08]xg[08]
        --> pppd: e[08]c[08]xg[08]
        --> pppd: e[08]c[08]xg[08]
        --> local IP address 91.124.241.232
        --> pppd: e[08]c[08]xg[08]
        --> remote IP address 10.6.6.6
        --> pppd: e[08]c[08]xg[08]
        --> primary DNS address 213.179.249.151
        --> pppd: e[08]c[08]xg[08]
        --> secondary DNS address 213.179.249.152
        --> pppd: e[08]c[08]xg[08]

There is ppp in Plan 9. I need something like /dev/ttyACM0.

Audio
-----

Served in Linux by snd-hda-intel. I've recompiled kernel
with contribs mason/ac97. Still no /dev/audio

        term% cat '#A'
        cat: can't open #A: no free devices

Media card
----------

>From lsusb

        Bus 001 Device 004: ID 0bda:0159 Realtek Semiconductor Corp. Digital 
Media Card Reader

I use it to boot. It contain /386/^(mbr pbslba 9load 9pcf)
and plan9.ini as described in prep(8).
But usb/disk doesn't see it 'usb/disk: no device found'

Mobile usb disk
---------------

Formated by Nokia 6120c phone. Plan 9 founds it

        ep6.0 enabled control rw speed full maxpkt 64 pollival 0 samplesz 0 hz 
0 hub 1 port 2 buzy
        storage czp 0x500608 vid 0x0421 did 0x002d Nokia 'Nokia 6120 classic' 
uhci
        ep6.4 enabled bulk r speed full maxpkt 64 pollival 0 samplesz 0 hz 0 
hub 1 port 2 busy
        ep6.1 enabled bulk w speed full maxpkt 64 pollival 0 samplesz 0 hz 0 
hub 1 port 2 busy

And starts usb/disk

        term% ls /dev/*u*
        /dev/sdU6.0/ctl
        /dev/sdU6.0/data
        /dev/sdU6.0/raw
        term% cat /dev/sdU6.0/ctl
        /dev/usb/ep6.0 lun0: inquiry geometry 1990407 512

No partitions. Checked in Linux

        # fdisk -l /dev/sdb
        
        Disk /dev/sdb: 1019 MB, 1019215872 bytes
        14 heads, 45 sectors/track, 3159 cylinders, total 1990656 sectors
        Units = sectors of 1 * 512 = 512 bytes
        Sector size (logical/physical): 512 bytes / 512 bytes
        I/O size (minimum/optimal): 512 bytes / 512 bytes
        Disk identifier: 0x00000000
        
           Device Boot      Start         End      Blocks   Id  System
        /dev/sdb1             249     1990655      995203+   6  FAT16

Put back, no device apperead in /dev/usb/
and phone says 'unable start data transfer mode'.
Back in Linux

        # fdisk /dev/sdb
        
        Unable to open /dev/sdb

Ok, it is broken. One problem less.

Writing
-------

> If you have neither, you'll have to write the driver yourself.
> ...
> 2. Write your own driver.
> I don't think we have WPA support, either, so take that into consideration.

Howto? Is there a tutorial like in FreeBSD handbook
http://www.freebsd.org/doc/en/books/arch-handbook/driverbasics.html ?
How to port driver from FreeBSD or Linux or ...? Which is better source?
How to debug them?


Reply via email to