简体   繁体   English

从一台Linux机器到另一台Linux机器传达GPIO状态的最佳方法是什么

[英]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.

相关问题 在Linux中定期采样gpio-pin的最佳方法是什么? - What is the best way to sample periodicaly gpio-pins in Linux? 从一台linux机器到另一台linux机器的远程文件传输 - Remote File Transfer from one linux machine to another linux machine 将ssh密钥(用于GIT)从一台Linux计算机复制到另一台计算机的最简单方法 - Easiest way to copy ssh key (Used for GIT) from one linux machine to another 如何在Linux中将git存储库从一台计算机克隆到另一台计算机? - How to clone git repository from one machine to another in linux? 使用Jenkins将文件从一台linux机器复制到另一台linux机器 - Copying a file from one linux machine to another using Jenkins 使用Java将文件从Windows计算机复制到Linux计算机的最佳方法 - Best way to copy a file from Windows machine to Linux machine using java 在Linux机器上指定软件包位置的最佳方法 - best way to specify packages location on linux machine 在 Linux 上获取机器 ID 的最佳方法? - Best way to get machine id on Linux? 将内核模块与用户空间程序通信的最佳方式是什么? - What is the best way to communicate a kernel module with a user space program? 无法从一个 Docker 容器与同一台机器上的暴露容器进行通信 - Unable to communicate from one Docker container to an exposed container on the same machine
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM