简体   繁体   中英

What is best way to communicate GPIO state from one linux machine to another

I'm running a beaglebone and a raspberry pi. I can read gpio easily on both in the path /sys/class/gpio. I could use a web server easily to read a gpio state from one machine to the other, but I was wondering if there was a better lower level way to map the gpio folder over the network. I tried NFS but I got this warning on the raspberry pi running debian wheezy image:

pi@raspberrypi ~ $ sudo service nfs-kernel-server restart
[ ok ] Stopping NFS kernel daemon: mountd nfsd.
[ ok ] Unexporting directories for NFS kernel daemon....
[....] Exporting directories for NFS kernel daemon...exportfs: /etc/exports [1]:     Neither 'subtree_check' or 'no_subtree_check' specified for export     "192.168.1.178:/sys/class/gpio".
  Assuming default behaviour ('no_subtree_check').
  NOTE: this default has changed since nfs-utils version 1.0.x

exportfs: /sys/class/gpio does not support NFS export
. ok
[....] Starting NFS kernel daemon: nfsd
[warn] Not starting: portmapper is not running ... (warning).

So it doesn't look like gpio supports being mapped over NFS. Does anyone know of another way to do it?

thanks! Justin

I never tried with NFS but I was able to do it with sshfs. See my post Set GPIO remotely

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM