9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] how to make hardware work?
@ 2011-01-17 15:23 sergey.kish
  2011-01-17 17:17 ` John Floren
  0 siblings, 1 reply; 14+ messages in thread
From: sergey.kish @ 2011-01-17 15:23 UTC (permalink / raw)
  To: 9fans

I've installed Plan 9 on my netbook. There are two things I can't leave
without - internet and music.

My system information collected in Linux and Plan 9, usb/ether output
https://gist.github.com/782904

Ethernet works ok, how to make PPP over USB?  I've found ppp(8),
usb/ether and cinap_lenrek/usbether, zwansch/usbuart in contrib.

    term% usb/ether -D
    usb/ether: fsioproc pid 471
    <- Tversion tag 65535 msize 8216 version '9P2000'
    -> Rversion tag 65535 msize 8192 version '9P2000'
    <- Tauth tag 4 afid 219 uname sergeykish aname
    -> Rerror tag 4 ename permission denied
    <- Tattach tag 4 fid 219 afid -1 uname sergeykish aname
    -> Rattach tag 4 qid (0000000000000000 0 d)
    usb/ether: startdevs: opening #0 [2]
    usb/ether: [2]: can't open endpoint [2]: '[2]' file does not exist
    usb/ether: no device found

I have no idea what to do.
There is no /dev/audio, cat '#A' says hardware isn't soundblaster.

Not so important issues:

* There is no plugged usb disk (which I use to boot)
* I'd like to have wifi
* and accelerated graphics (it is hard to get poulsbo working even on Linux)

How to make it work? Is there tutorials, books? Ruby, Python, JavaScript
and Sh are my primary languages today. Used to program windows
applications on C++ (shame on me).




^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [9fans] how to make hardware work?
  2011-01-17 15:23 [9fans] how to make hardware work? sergey.kish
@ 2011-01-17 17:17 ` John Floren
  2011-01-17 18:11   ` Nick LaForge
                     ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: John Floren @ 2011-01-17 17:17 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

At Mon, 17 Jan 2011 10:23:37 -0500,
sergey.kish@gmail.com wrote:
>
> I've installed Plan 9 on my netbook. There are two things I can't leave
> without - internet and music.
>
> My system information collected in Linux and Plan 9, usb/ether output
> https://gist.github.com/782904
>
> Ethernet works ok, how to make PPP over USB?  I've found ppp(8),
> usb/ether and cinap_lenrek/usbether, zwansch/usbuart in contrib.
>
>     term% usb/ether -D
>     usb/ether: fsioproc pid 471
>     <- Tversion tag 65535 msize 8216 version '9P2000'
>     -> Rversion tag 65535 msize 8192 version '9P2000'
>     <- Tauth tag 4 afid 219 uname sergeykish aname
>     -> Rerror tag 4 ename permission denied
>     <- Tattach tag 4 fid 219 afid -1 uname sergeykish aname
>     -> Rattach tag 4 qid (0000000000000000 0 d)
>     usb/ether: startdevs: opening #0 [2]
>     usb/ether: [2]: can't open endpoint [2]: '[2]' file does not exist
>     usb/ether: no device found
>
> I have no idea what to do.

What exactly do you mean, PPP over USB? If ethernet works fine, why
not just plug into a wired connection to your local network?

> There is no /dev/audio, cat '#A' says hardware isn't soundblaster.

Sound support is extremely limited, unfortunately. There's some AC'97
drivers, and drivers for a few USB audio devices, but that's basically
it. If you have neither, you'll have to write the driver yourself.

>
> Not so important issues:
>
> * There is no plugged usb disk (which I use to boot)
> * I'd like to have wifi

Again, if it's not already supported, your options are basically
1. Buy a supported wifi card 2. Write your own driver.

I don't think we have WPA support, either, so take that into
consideration.

> * and accelerated graphics (it is hard to get poulsbo working even on Linux)
>
> How to make it work? Is there tutorials, books? Ruby, Python, JavaScript
> and Sh are my primary languages today. Used to program windows
> applications on C++ (shame on me).
>
>

The documentation is on the wiki, such as it is, and in the 9fans
archives. Working with Plan 9 as your desktop OS can be a challenge,
but it's also rewarding.

Good luck!

John



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [9fans] how to make hardware work?
  2011-01-17 17:17 ` John Floren
@ 2011-01-17 18:11   ` Nick LaForge
  2011-01-17 18:37     ` lsub
  2011-01-17 19:09   ` Lyndon Nerenberg (VE6BBM/VE7TFX)
  2011-01-18 13:27   ` sergey.kish
  2 siblings, 1 reply; 14+ messages in thread
From: Nick LaForge @ 2011-01-17 18:11 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

> drivers for a few USB audio devices, but that's basically
> it. If you have neither, you'll have to write the driver yourself.

John,

You asked about this here:

http://9fans.net/archive/2010/10/464

Did you ever settle on a usb audio device yourself?  I'll try to get
mine to work.

Should there even be different usb audio drivers?  I thought audio was
part of the usb standard.

Nick



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [9fans] how to make hardware work?
  2011-01-17 18:11   ` Nick LaForge
@ 2011-01-17 18:37     ` lsub
  2011-01-17 18:52       ` lsub
  0 siblings, 1 reply; 14+ messages in thread
From: lsub @ 2011-01-17 18:37 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

afaik, there is a single usb audio device.

On Jan 17, 2011, at 7:11 PM, Nick LaForge <nicklaforge@gmail.com> wrote:

>> drivers for a few USB audio devices, but that's basically
>> it. If you have neither, you'll have to write the driver yourself.
>
> John,
>
> You asked about this here:
>
> http://9fans.net/archive/2010/10/464
>
> Did you ever settle on a usb audio device yourself?  I'll try to get
> mine to work.
>
> Should there even be different usb audio drivers?  I thought audio was
> part of the usb standard.
>
> Nick
>



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [9fans] how to make hardware work?
  2011-01-17 18:37     ` lsub
@ 2011-01-17 18:52       ` lsub
  0 siblings, 0 replies; 14+ messages in thread
From: lsub @ 2011-01-17 18:52 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

device driver, i mean.

On Jan 17, 2011, at 7:37 PM, lsub <nemo@lsub.org> wrote:

> afaik, there is a single usb audio device.
>
> On Jan 17, 2011, at 7:11 PM, Nick LaForge <nicklaforge@gmail.com> wrote:
>
>>> drivers for a few USB audio devices, but that's basically
>>> it. If you have neither, you'll have to write the driver yourself.
>>
>> John,
>>
>> You asked about this here:
>>
>> http://9fans.net/archive/2010/10/464
>>
>> Did you ever settle on a usb audio device yourself?  I'll try to get
>> mine to work.
>>
>> Should there even be different usb audio drivers?  I thought audio was
>> part of the usb standard.
>>
>> Nick
>>
>



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [9fans] how to make hardware work?
  2011-01-17 17:17 ` John Floren
  2011-01-17 18:11   ` Nick LaForge
@ 2011-01-17 19:09   ` Lyndon Nerenberg (VE6BBM/VE7TFX)
  2011-01-17 19:35     ` Nick LaForge
  2011-01-18 13:27   ` sergey.kish
  2 siblings, 1 reply; 14+ messages in thread
From: Lyndon Nerenberg (VE6BBM/VE7TFX) @ 2011-01-17 19:09 UTC (permalink / raw)
  To: 9fans

> The documentation is on the wiki, such as it is, and in the 9fans
> archives.

And /sys/doc/*.  Read *everything* under that directory.




^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [9fans] how to make hardware work?
  2011-01-17 19:09   ` Lyndon Nerenberg (VE6BBM/VE7TFX)
@ 2011-01-17 19:35     ` Nick LaForge
  2011-01-17 23:27       ` John Floren
  0 siblings, 1 reply; 14+ messages in thread
From: Nick LaForge @ 2011-01-17 19:35 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

> afaik, there is a single usb audio device driver.

usb/audio works well, I just plugged in this ($5 plus shipping)

http://www.amazon.com/Syba-SD-CM-UAUD-Adapter-C-Media-Chipset/dp/B001MSS6CS

and it sounds great.

Nick



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [9fans] how to make hardware work?
  2011-01-17 19:35     ` Nick LaForge
@ 2011-01-17 23:27       ` John Floren
  2011-01-18  0:01         ` Francisco J Ballesteros
  0 siblings, 1 reply; 14+ messages in thread
From: John Floren @ 2011-01-17 23:27 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

[-- Attachment #1: Type: text/plain, Size: 407 bytes --]

At Mon, 17 Jan 2011 14:35:43 -0500,
Nick LaForge wrote:
>
> > afaik, there is a single usb audio device driver.
>
> usb/audio works well, I just plugged in this ($5 plus shipping)
>
> http://www.amazon.com/Syba-SD-CM-UAUD-Adapter-C-Media-Chipset/dp/B001MSS6CS
>
> and it sounds great.
>
> Nick
>

Playback, recording, and volume changing all work? If so, I may just
order one tonight.

John

[-- Attachment #2: Type: application/pgp-signature, Size: 501 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [9fans] how to make hardware work?
  2011-01-17 23:27       ` John Floren
@ 2011-01-18  0:01         ` Francisco J Ballesteros
  2011-01-18  3:29           ` Nick LaForge
  0 siblings, 1 reply; 14+ messages in thread
From: Francisco J Ballesteros @ 2011-01-18  0:01 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

recording may not work. I dont know if anyone tried.
volume should work fine.

On Tuesday, January 18, 2011, John Floren <john@jfloren.net> wrote:
> At Mon, 17 Jan 2011 14:35:43 -0500,
> Nick LaForge wrote:
>>
>> > afaik, there is a single usb audio device driver.
>>
>> usb/audio works well, I just plugged in this ($5 plus shipping)
>>
>> http://www.amazon.com/Syba-SD-CM-UAUD-Adapter-C-Media-Chipset/dp/B001MSS6CS
>>
>> and it sounds great.
>>
>> Nick
>>
>
> Playback, recording, and volume changing all work? If so, I may just
> order one tonight.
>
> John



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [9fans] how to make hardware work?
  2011-01-18  0:01         ` Francisco J Ballesteros
@ 2011-01-18  3:29           ` Nick LaForge
  0 siblings, 0 replies; 14+ messages in thread
From: Nick LaForge @ 2011-01-18  3:29 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

I think recording could work.  However, right now reading
'#u'/usb/$inputendpoint/data gives wave audio that is encoded at the
wrong speed (and frequency) and is truncated.

Nick

On 1/17/11, Francisco J Ballesteros <nemo@lsub.org> wrote:
> recording may not work. I dont know if anyone tried.
> volume should work fine.
>
> On Tuesday, January 18, 2011, John Floren <john@jfloren.net> wrote:
>> At Mon, 17 Jan 2011 14:35:43 -0500,
>> Nick LaForge wrote:
>>>
>>> > afaik, there is a single usb audio device driver.
>>>
>>> usb/audio works well, I just plugged in this ($5 plus shipping)
>>>
>>> http://www.amazon.com/Syba-SD-CM-UAUD-Adapter-C-Media-Chipset/dp/B001MSS6CS
>>>
>>> and it sounds great.
>>>
>>> Nick
>>>
>>
>> Playback, recording, and volume changing all work? If so, I may just
>> order one tonight.
>>
>> John
>
>



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [9fans] how to make hardware work?
  2011-01-17 17:17 ` John Floren
  2011-01-17 18:11   ` Nick LaForge
  2011-01-17 19:09   ` Lyndon Nerenberg (VE6BBM/VE7TFX)
@ 2011-01-18 13:27   ` sergey.kish
  2011-01-18 13:53     ` erik quanstrom
  2011-01-18 19:23     ` Lyndon Nerenberg (VE6BBM/VE7TFX)
  2 siblings, 2 replies; 14+ messages in thread
From: sergey.kish @ 2011-01-18 13:27 UTC (permalink / raw)
  To: 9fans

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?




^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [9fans] how to make hardware work?
  2011-01-18 13:27   ` sergey.kish
@ 2011-01-18 13:53     ` erik quanstrom
  2011-01-18 19:23     ` Lyndon Nerenberg (VE6BBM/VE7TFX)
  1 sibling, 0 replies; 14+ messages in thread
From: erik quanstrom @ 2011-01-18 13:53 UTC (permalink / raw)
  To: 9fans

> 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

this one's easy.  unlike the braindamage in linux, plan 9
allows you to partition the drive when and if you wish.
the kernel doesn't have partition table reading software.
you have to partition this disk with

	d=/dev/sdU6.0
	disk/fdisk -p $d/data>$d/ctl
	for(i in $d/plan9*)
		disk/prep -p $i>$d/ctl
this is all distilled into a script diskparts  (sic.).

- erik



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [9fans] how to make hardware work?
  2011-01-18 13:27   ` sergey.kish
  2011-01-18 13:53     ` erik quanstrom
@ 2011-01-18 19:23     ` Lyndon Nerenberg (VE6BBM/VE7TFX)
  1 sibling, 0 replies; 14+ messages in thread
From: Lyndon Nerenberg (VE6BBM/VE7TFX) @ 2011-01-18 19:23 UTC (permalink / raw)
  To: 9fans

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

In theory, your 3G data stick should export a serial device interface,
and therefore usb/serial should map it to /dev/eiaUx/eiaUx (where x is
a small integer).  (See usb(4)).

You would then run, e.g.,  'ip/ppp -p /dev/eiaU0/eiaU0 ...' (see ppp(8)).

--lyndon




^ permalink raw reply	[flat|nested] 14+ messages in thread

* [9fans] how to make hardware work?
  2011-01-16  6:21 [9fans] plan9 go output faults on 9vx but ok on cpu kokamoto
@ 2011-01-17 15:20 ` sergey.kish
  0 siblings, 0 replies; 14+ messages in thread
From: sergey.kish @ 2011-01-17 15:20 UTC (permalink / raw)
  To: 9fans

I've installed Plan 9 on my netbook. There are several things I can't
leave without - internet and music.

My system information collected in Linux and Plan 9, usb/ether output
https://gist.github.com/782904

Ethernet works ok, how to make PPP over USB?  I've found ppp(8),
usb/ether and cinap_lenrek/usbether, zwansch/usbuart in contrib.

    term% usb/ether -D
    usb/ether: fsioproc pid 471
    <- Tversion tag 65535 msize 8216 version '9P2000'
    -> Rversion tag 65535 msize 8192 version '9P2000'
    <- Tauth tag 4 afid 219 uname sergeykish aname
    -> Rerror tag 4 ename permission denied
    <- Tattach tag 4 fid 219 afid -1 uname sergeykish aname
    -> Rattach tag 4 qid (0000000000000000 0 d)
    usb/ether: startdevs: opening #0 [2]
    usb/ether: [2]: can't open endpoint [2]: '[2]' file does not exist
    usb/ether: no device found

I have no idea what to do.
There is no /dev/audio, cat '#A' says hardware isn't soundblaster.

Not so important issues:

* There is no plugged usb disk (which I use to boot)
* I'd like to have wifi
* and accelerated graphics (it is hard to get poulsbo working even on
Linux)

How to make it work? Is there tutorials, books? Ruby, Python,
JavaScript and Sh are my primary languages today. Used to program
windows applications on C++ (shame on me).




^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2011-01-18 19:23 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-17 15:23 [9fans] how to make hardware work? 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
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

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).