9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] How to setup wifi on raspberry pi 4
@ 2021-08-10 12:58 Олег Бахарев
  2021-08-10 13:50 ` hiro
  2021-08-10 14:13 ` Richard Miller
  0 siblings, 2 replies; 12+ messages in thread
From: Олег Бахарев @ 2021-08-10 12:58 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

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

I have Raspberry Pi 4B (1 Gb RAM) and how to run wifi (and setup wifi) on
it ?

------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T3464a8c7bad3062a-Ma5977126b1ba0d38ddf8aceb
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

[-- Attachment #2: Type: text/html, Size: 762 bytes --]

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

* Re: [9fans] How to setup wifi on raspberry pi 4
  2021-08-10 12:58 [9fans] How to setup wifi on raspberry pi 4 Олег Бахарев
@ 2021-08-10 13:50 ` hiro
  2021-08-10 14:13 ` Richard Miller
  1 sibling, 0 replies; 12+ messages in thread
From: hiro @ 2021-08-10 13:50 UTC (permalink / raw)
  To: 9fans

it seems you can insert it in one of these :P

https://blue.kumparan.com/image/upload/fl_progressive,fl_lossy,c_fill,q_auto:best,w_1024/v1570694310/odslztpch4twsoteof8r.jpg

On 8/10/21, Олег Бахарев <disconnectix@gmail.com> wrote:
> I have Raspberry Pi 4B (1 Gb RAM) and how to run wifi (and setup wifi) on
> it ?

------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T3464a8c7bad3062a-M692b7ffb66f11b03b5e2835c
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

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

* Re: [9fans] How to setup wifi on raspberry pi 4
  2021-08-10 12:58 [9fans] How to setup wifi on raspberry pi 4 Олег Бахарев
  2021-08-10 13:50 ` hiro
@ 2021-08-10 14:13 ` Richard Miller
  2021-08-11  5:13   ` a
  1 sibling, 1 reply; 12+ messages in thread
From: Richard Miller @ 2021-08-10 14:13 UTC (permalink / raw)
  To: 9fans

> I have Raspberry Pi 4B (1 Gb RAM) and how to run wifi (and setup wifi) on
> it ?

Assuming you're running with root fs on SD card, and
no ethernet connected.

Assume your wifi ssid is MYSSID and uses wpa2 authentication,
and your wifi passwd is MYPASSWORD.

In cmdline.txt on the DOS partition, make sure the command line
contains ether1=type=4330 and doesn't contain ipconfig=.

Then it goes like this:

term% cat /net/ipselftab
127.0.0.0                                    01 6b  
127.0.0.1                                    01 6u  
255.255.255.255                              01 6b  
127.255.255.255                              01 6b  
term% bind -a '#l1' /net
term% aux/wpa -2p -s MYSSID /net/ether1

!Adding key: essid=MYSSID proto=wpapsk
password: MYPASSWORD
term% ip/ipconfig ether /net/ether1
term% cat /net/ipselftab
192.168.23.0                                 01 6b  
127.0.0.0                                    01 6b  
127.0.0.1                                    01 6u  
192.168.23.110                               01 6u  
192.168.23.255                               01 6b  
255.255.255.255                              02 6b  
127.255.255.255                              01 6b  
term% ndb/dns -r
term% ip/ping www.google.com
sending 32 64 byte messages 1000 ms apart to icmp!www.google.com!1
1: rtt 119714 µs, avg rtt 119714 µs, ttl = 117
2: rtt 15776 µs, avg rtt 67745 µs, ttl = 117
3: rtt 12913 µs, avg rtt 49467 µs, ttl = 117
...


------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T3464a8c7bad3062a-M12b5ad87e46b22c5f742ba6a
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

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

* Re: [9fans] How to setup wifi on raspberry pi 4
  2021-08-10 14:13 ` Richard Miller
@ 2021-08-11  5:13   ` a
  2021-08-11  5:31     ` Олег Бахарев
  0 siblings, 1 reply; 12+ messages in thread
From: a @ 2021-08-11  5:13 UTC (permalink / raw)
  To: 9fans

An example of automating what Richard said:

My system name is 'syrup' and my local SSID is 'Ranch'. I
have a plain file, $home/lib/wpa/Ranch, which has the WPA
password in it. Then in /cfg/syrup/termrc, I have this:

bind -a '#l1' /net
echo 'key proto=wpapsk essid=Ranch !password='^`{cat $home/lib/wpa/Ranch} > /mnt/factotum/ctl
aux/wpa -p2s Ranch /net/ether1
ip/ipconfig -g 10.1.20.1 ether /net/ether1 add 10.1.20.120 255.255.255.0

If you want to do DHCP instead, replace that last line with
"ip/ipconfig ether /net/ether1" like Richard had.

------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T3464a8c7bad3062a-M71cc133debb25bd65c2dc63a
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

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

* Re: [9fans] How to setup wifi on raspberry pi 4
  2021-08-11  5:13   ` a
@ 2021-08-11  5:31     ` Олег Бахарев
  2021-08-11  8:17       ` Richard Miller
  0 siblings, 1 reply; 12+ messages in thread
From: Олег Бахарев @ 2021-08-11  5:31 UTC (permalink / raw)
  To: 9fans

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

Thanks. Each of proposed variants works.
there is a question of such a plan: if there is a usb wifi adapter, how can
it be run in plan 9?

ср, 11 авг. 2021 г., 8:14 <a@9srv.net>:

> An example of automating what Richard said:
>
> My system name is 'syrup' and my local SSID is 'Ranch'. I
> have a plain file, $home/lib/wpa/Ranch, which has the WPA
> password in it. Then in /cfg/syrup/termrc, I have this:
>
> bind -a '#l1' /net
> echo 'key proto=wpapsk essid=Ranch !password='^`{cat $home/lib/wpa/Ranch}
> > /mnt/factotum/ctl
> aux/wpa -p2s Ranch /net/ether1
> ip/ipconfig -g 10.1.20.1 ether /net/ether1 add 10.1.20.120 255.255.255.0
> 
> If you want to do DHCP instead, replace that last line with
> "ip/ipconfig ether /net/ether1" like Richard had.

------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T3464a8c7bad3062a-M16b8281e4dbdf2118fe749a1
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

[-- Attachment #2: Type: text/html, Size: 2349 bytes --]

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

* Re: [9fans] How to setup wifi on raspberry pi 4
  2021-08-11  5:31     ` Олег Бахарев
@ 2021-08-11  8:17       ` Richard Miller
  2021-08-11  9:07         ` Олег Бахарев
  0 siblings, 1 reply; 12+ messages in thread
From: Richard Miller @ 2021-08-11  8:17 UTC (permalink / raw)
  To: 9fans

> if there is a usb wifi adapter, how can
> it be run in plan 9?

By writing a driver to go in /sys/src/cmd/usb/ether ☺


------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T3464a8c7bad3062a-M1c77c726db10ebeba6260989
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

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

* Re: [9fans] How to setup wifi on raspberry pi 4
  2021-08-11  8:17       ` Richard Miller
@ 2021-08-11  9:07         ` Олег Бахарев
  2021-08-11 19:48           ` Richard Miller
  2021-08-11 21:03           ` Skip Tavakkolian
  0 siblings, 2 replies; 12+ messages in thread
From: Олег Бахарев @ 2021-08-11  9:07 UTC (permalink / raw)
  To: 9fans

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

Of course I haven't done this yet, but is there any information on how to
write drivers in Plan 9?  And the second question: if there is a second
raspberry already connected to the Internet, how can you distribute the
Internet for the current raspberry from it?

ср, 11 авг. 2021 г., 11:18 Richard Miller <9fans@hamnavoe.com>:

> > if there is a usb wifi adapter, how can
> > it be run in plan 9?
> 
> By writing a driver to go in /sys/src/cmd/usb/ether ☺
> 

------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T3464a8c7bad3062a-Mdd50f95fa5ead480f3fb27e0
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

[-- Attachment #2: Type: text/html, Size: 1969 bytes --]

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

* Re: [9fans] How to setup wifi on raspberry pi 4
  2021-08-11  9:07         ` Олег Бахарев
@ 2021-08-11 19:48           ` Richard Miller
  2021-08-11 20:37             ` Stuart Morrow
  2021-08-11 21:03           ` Skip Tavakkolian
  1 sibling, 1 reply; 12+ messages in thread
From: Richard Miller @ 2021-08-11 19:48 UTC (permalink / raw)
  To: 9fans

> Of course I haven't done this yet, but is there any information on how to
> write drivers in Plan 9?  

Reading the source code of existing drivers is a good way to learn.

> And the second question: if there is a second
> raspberry already connected to the Internet, how can you distribute the
> Internet for the current raspberry from it?

'man 3 ip' should give you what you need to know, /sys/doc/net/net.pdf
will help to understand how it all works.


------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T3464a8c7bad3062a-M36479334c7aefbbd44fc22a4
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

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

* Re: [9fans] How to setup wifi on raspberry pi 4
  2021-08-11 19:48           ` Richard Miller
@ 2021-08-11 20:37             ` Stuart Morrow
  2021-08-11 20:53               ` Dan Cross
  0 siblings, 1 reply; 12+ messages in thread
From: Stuart Morrow @ 2021-08-11 20:37 UTC (permalink / raw)
  To: 9fans

On 11/08/2021, Richard Miller <9fans@hamnavoe.com> wrote:
> /sys/doc/net/net.pdf

Heads up: spends alot of time on STREAMS, which are not a part of Plan 9.

The FQA also links to that paper with no such forewarning.

------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T3464a8c7bad3062a-Mbdf2471ea7ae8dfd9af9c03b
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

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

* Re: [9fans] How to setup wifi on raspberry pi 4
  2021-08-11 20:37             ` Stuart Morrow
@ 2021-08-11 20:53               ` Dan Cross
  0 siblings, 0 replies; 12+ messages in thread
From: Dan Cross @ 2021-08-11 20:53 UTC (permalink / raw)
  To: 9fans

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

On Wed, Aug 11, 2021 at 4:38 PM Stuart Morrow <morrow.stuart@gmail.com>
wrote:

> On 11/08/2021, Richard Miller <9fans@hamnavoe.com> wrote:
> > /sys/doc/net/net.pdf
>
> Heads up: spends alot of time on STREAMS, which are not a part of Plan 9.
>
> The FQA also links to that paper with no such forewarning.
>

The mentions of IL are perhaps a little more galling, but this criticism is
spot on: the networking paper as written describes the 2nd edition system.
3rd edition removed streams; 4th ed removed IL.

Still, the bones of the system with respect to how the different pieces fit
together are still very similar to what the paper describes.

        - Dan C.

------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T3464a8c7bad3062a-M229c2a7cffd6a848c7322a22
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

[-- Attachment #2: Type: text/html, Size: 1797 bytes --]

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

* Re: [9fans] How to setup wifi on raspberry pi 4
  2021-08-11  9:07         ` Олег Бахарев
  2021-08-11 19:48           ` Richard Miller
@ 2021-08-11 21:03           ` Skip Tavakkolian
  2021-08-11 21:13             ` Steve Simon
  1 sibling, 1 reply; 12+ messages in thread
From: Skip Tavakkolian @ 2021-08-11 21:03 UTC (permalink / raw)
  To: 9fans

Second question: if the second raspberry pi is running plan9, then you
can use import(4); look at the first example in its man page.

On Wed, Aug 11, 2021 at 2:09 AM Олег Бахарев <disconnectix@gmail.com> wrote:
>
> Of course I haven't done this yet, but is there any information on how to write drivers in Plan 9?  And the second question: if there is a second raspberry already connected to the Internet, how can you distribute the Internet for the current raspberry from it?
>
> ср, 11 авг. 2021 г., 11:18 Richard Miller <9fans@hamnavoe.com>:
>> > if there is a usb wifi adapter, how can
>> > it be run in plan 9?
>> 
>> By writing a driver to go in /sys/src/cmd/usb/ether ☺
>> 
>
> 9fans / 9fans / see discussions + participants + delivery options Permalink

------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T3464a8c7bad3062a-M197d74d7e48dfab04ec1029a
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

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

* Re: [9fans] How to setup wifi on raspberry pi 4
  2021-08-11 21:03           ` Skip Tavakkolian
@ 2021-08-11 21:13             ` Steve Simon
  0 siblings, 0 replies; 12+ messages in thread
From: Steve Simon @ 2021-08-11 21:13 UTC (permalink / raw)
  To: 9fans


if the second raspberry pi is *not* running plan9 sshnet allows you to use its network interfaces (via ssh) for tcp connections.

-Steve


------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T3464a8c7bad3062a-M6fb3318c9ffecf7d59c88c82
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

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

end of thread, other threads:[~2021-08-11 21:14 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-10 12:58 [9fans] How to setup wifi on raspberry pi 4 Олег Бахарев
2021-08-10 13:50 ` hiro
2021-08-10 14:13 ` Richard Miller
2021-08-11  5:13   ` a
2021-08-11  5:31     ` Олег Бахарев
2021-08-11  8:17       ` Richard Miller
2021-08-11  9:07         ` Олег Бахарев
2021-08-11 19:48           ` Richard Miller
2021-08-11 20:37             ` Stuart Morrow
2021-08-11 20:53               ` Dan Cross
2021-08-11 21:03           ` Skip Tavakkolian
2021-08-11 21:13             ` Steve Simon

9fans - fans of the OS Plan 9 from Bell Labs

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.vuxu.org/9fans

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 9fans 9fans/ https://inbox.vuxu.org/9fans \
		9fans@9fans.net
	public-inbox-index 9fans

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.archive.9fans


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git