I've been saying the same thing for years. 9p makes for a great control protocol that presents a simple way to present data, a tree of files.

Charles Forsyth wrote an Atmega compiler for plan 9. That could be used as the basis for a plan 9 Arduino thing. We likely need a mulibc.h or whatever and a loader to send the binary to the Arduino micro controller. Someone patched 9front usbserial to recognize Arduino USB boards as usbeia devices. (I think Miller's pi and labs does too?). Out of the box microcontroller support with 9p libs would be a really nice thing to have.

Echoline wrote ninepea, an Arduino 9p library. This currently works and can be mounted on a plan 9 machine and you can talk to your Arduino though files. Though this uses the official Arduino library and compiler which does not work on plan 9 (on 9front you can use vmx to run a Linux vm)

One compiler that we really need is an arm thumb 2 compiler for cortex-m/r microcontrollers. Inferno has a very old and very incomplete arm thumb 1 compiler, tc. I don't know if it's worth salvaging.

Personally, I'm (sloooowly)working on using Plan 9 for personal industrial automation projects. I have some crude modbus stuff working.

At work I've used it on a RasPi to tie a PLC to an HDMI heads up display that uses ASCII commands. Dumb easy to write a C  program for that on Plan 9.


On Thu, Jan 27, 2022, 5:58 PM Bakul Shah <bakul@iitbombay.org> wrote:
The idea:
- make it very easy to create hardware gadgets by
  providing a firmware/hardware building block that
  talks 9p on the host interface side & interfaces
  with device specific hardware.

- use a "universal" 9p driver on the host side that
  allows access to any such 9p device even from a shell.

- provide a standard way to find out device capabilities.

- together they provide a plug-and-play setup.

Example: connect an LED and a current sensor to this
9p device, other necessary hardware, add a few config
bits and plug this device kn]]into a host. Now you should
be able to turn on/off the light or sense its state.

Similarly you should be able to control a stepper motor
servo, cameras, microphones, other actuators, sensors,
IO etc. Eventually you should be able to snap together
enough of these components to build larger assemblies
such as a 3D printer.

Another example: a "hub" to multiplex such downstream
devices and make them available to a host.

This will probably have to ride on USB first. A verilog
implementation would be useful in an FPGA!

Would this be a useful component? If such a thing were
available, what would you want to build with it?

Do you think 9p is the right protocol for this?

Ideally
- connect anything to anything
- authenticated connections
- drive the device through a shell script
- no new low level drivers
- self-identifying devices with help and command syntax
- signicantly eases the task of creating new h/w devices.

------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/Ta4e584a373b05553-M35165d4278d95e41fd95b8f7
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription