9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: sergey.kish@gmail.com
To: 9fans@9fans.net
Subject: Re: [9fans] how to make hardware work?
Date: Tue, 18 Jan 2011 08:27:26 -0500	[thread overview]
Message-ID: <125317bb829b1e9a2afe41e7a8ce02f6@gmail.com> (raw)
In-Reply-To: <871v4bih5j.wl%slawmaster@gmail.com>

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?




  parent reply	other threads:[~2011-01-18 13:27 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-17 15:23 sergey.kish
2011-01-17 17:17 ` John Floren
2011-01-17 18:11   ` Nick LaForge
2011-01-17 18:37     ` lsub
2011-01-17 18:52       ` lsub
2011-01-17 19:09   ` Lyndon Nerenberg (VE6BBM/VE7TFX)
2011-01-17 19:35     ` Nick LaForge
2011-01-17 23:27       ` John Floren
2011-01-18  0:01         ` Francisco J Ballesteros
2011-01-18  3:29           ` Nick LaForge
2011-01-18 13:27   ` sergey.kish [this message]
2011-01-18 13:53     ` erik quanstrom
2011-01-18 19:23     ` Lyndon Nerenberg (VE6BBM/VE7TFX)
  -- strict thread matches above, loose matches on Subject: below --
2011-01-16  6:21 [9fans] plan9 go output faults on 9vx but ok on cpu kokamoto
2011-01-17 15:20 ` [9fans] how to make hardware work? sergey.kish

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=125317bb829b1e9a2afe41e7a8ce02f6@gmail.com \
    --to=sergey.kish@gmail.com \
    --cc=9fans@9fans.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).