[英]How to send data from Windows to embedded linux over USB
My setup looks like this: A 64-bit box running Windows 7 Professional is connected to a Beaglebone running Angstrom Linux. 我的设置如下:将运行Windows 7 Professional的64位设备连接到运行Angstrom Linux的Beaglebone。
I'm currently controlling the beaglebone via a putty command line on the windows box. 我目前正在通过Windows框上的腻子命令行控制beaglebone。
What I'd like to do is run an OpenCV script to pull some vision information, process it on the windows box, and send some lightweight data (eg a True
or False
, a triplet, etc.) over the (or another) USB connection to the beaglebone. 我想做的是运行一个OpenCV脚本以获取一些视觉信息,在Windows框上对其进行处理,然后通过(或另一个)USB发送一些轻量级数据(例如
True
或False
,Triplet等)。与长骨的联系。
My OpenCV program is running using Python bindings, so any piping I can do with python would be preferable. 我的OpenCV程序正在使用Python绑定运行,因此,我可以使用python做的任何管道操作都比较可取。 I've played around with pyserial to receive data on a windows box via a COM port, so it seems like I could use that on the windows side... at a total loss though on the embedded linux front
我一直在玩pyserial来通过COM端口在Windows盒子上接收数据,所以看来我可以在Windows上使用它……尽管在嵌入式linux前端却完全不知所措
Normally on the linux front, if the usb dongle is of the right type, you will see something like /dev/usbserial or similar device. 通常,在Linux前端,如果USB加密狗的类型正确,您会看到类似/ dev / usbserial或类似设备的信息。 Maybe check dmesg after plugging the cable.
也许在插入电缆后检查dmesg。 (on linux you can run
find /dev | grep usb
to list all usb related devices) (在Linux上,您可以运行
find /dev | grep usb
列出所有与USB相关的设备)
Just a side note, I've seen the beaglebone has an ethernet port, why not just using a network socket? 只是附带说明,我已经看到beaglebone具有以太网端口,为什么不仅仅使用网络套接字呢? It's all easier than reinventing a protocol on usb.
这比在USB上重新发明协议要容易得多。
If you want to use python, take a look o PyUSB , as you can see for example in Sending data via USB using PyUSB . 如果要使用python,请看一下PyUSB ,例如您可以在使用PyUSB通过USB发送数据中看到的那样。 A related post is PyUSB for the Raspberry Pi .
相关文章是Raspberry Pi的PyUSB 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.