Posts: 101
Joined: Tue Dec 06, 2011 4:13 pm

GPIO with Plan 9?

Mon Dec 24, 2012 12:11 am

How do you access the GPIO ports with plan 9? I would presume they are some sort of file somewhere (as is everything)

Posts: 46
Joined: Sat Aug 11, 2012 6:14 pm

Re: GPIO with Plan 9?

Mon Dec 24, 2012 9:16 am

Bakul Shah has been working on a gpio driver, which I hope will be available soon. I think it's safe to predict that access to gpio ports will be presented as a set of files - that's the Plan 9 Way.

Posts: 1
Joined: Mon Jul 15, 2013 9:37 pm

Re: GPIO with Plan 9?

Tue Jul 16, 2013 2:04 pm

I posted this to a different thread, then I found this thread so I moved it here....
I did a search for GPIO -- I do not see anyone mentioning using it. I have read the Plan 9 papers, etc, never tried it yet. One of the advantages of Plan 9 as I see it, is to have the Rpi and another computer running Plan 9, connected by a network, and then the second computer can access the Rpi's GPIO, just as easily as the Rpi does. If this works at all, and it works with some timeliness in data transfer, and it can be done with several RPi's and one or more computers then, there is no limit to the multiprocessor / centralized / distributed hardware control possibilities, where the cluster communication details are seamlessly handled by an advanced operating system. I have not read enough about Plan 9 yet, but I am assuming a Plan 9 program can create a synthetic device file for use by other programs, ideally used by a higher level program for hierarchical control ?

The Rpi as part of a Plan 9 network would seem to be an automation / robotics student's dream.

Can the GPIO be handled as a file, and if so, what is the format ? Can anyone give example code to turn a light on and off by writing to a 9P file ?

I can see now that a device driver for the GPIO is in the works... So the question is, can we get access to an Alpha, one that does only the most basic things ? Eventually, someone will want to try I2C, or SPI or UART, but how about a preliminary version that can do simple bit input or output on a GPIO pin as a start ?

Also, if the source code for that could be made available, perhaps community members with an itch to scratch could help expand the driver, under Bakul Shah's management ? At least one would learn more about Plan 9 device drivers by examining that code.

Even a very basic device driver would open a very large door for Plan 9 and the Raspberry Pi.

Posts: 1
Joined: Thu Feb 20, 2014 1:32 pm

Re: GPIO with Plan 9?

Thu Feb 20, 2014 1:37 pm

i found this in the mail archive of 9fans:

https://www.mail-archive.com/9fans@9fan ... 29679.html


looks promising

Return to “Plan 9”