简体   繁体   English

打开USB中继-Android

[英]Open USB Relay - Android

I have KMtronics USB relay which I want to control with my Android device. 我有要使用Android设备控制的KMtronics USB继电器。 Is it possible to run the following Linux command: 是否可以运行以下Linux命令:

#!/bin/sh
# sends on signal to the USB relay
echo -e '\xff\x01\x01' > /dev/ttyUSB0

I tried to execute same command with some Shell Executor apps but always either getting Permission Denied or Unable to create file/folder . 我尝试对某些Shell Executor应用程序执行相同的命令,但始终会被Permission DeniedUnable to create file/folder Even I tried to run it on Rooted device too. 甚至我也尝试在Rooted设备上运行它。

权限问题可以这样解决:

echo -e '\xff\x01\x01' | sudo dd of=/dev/ttyUSB0

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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