[英]What is best way to communicate GPIO state from one linux machine to another
I'm running a beaglebone and a raspberry pi. 我正在运行一个beaglebone和一个树莓派。 I can read gpio easily on both in the path /sys/class/gpio. 我可以在路径/ sys / class / gpio上轻松阅读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. 我可以轻松地使用Web服务器从一台计算机读取gpio状态,但是我想知道是否有更好的底层方法可以在网络上映射gpio文件夹。 I tried NFS but I got this warning on the raspberry pi running debian wheezy image: 我尝试了NFS,但在运行debian wheezy图像的树莓派上得到了这个警告:
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. 因此,看起来gpio不支持通过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. 我从未尝试过使用NFS,但是我可以使用sshfs进行操作。 See my post Set GPIO remotely 参阅我的文章远程设置GPIO
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.