需要帮助Linux中的USB编程 [英] Need help with USB programming in Linux

查看:67
本文介绍了需要帮助Linux中的USB编程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我正在尝试使用C程序将文件写入USB设备..

当我尝试打开USB端口时,我发现了foll错误


" open_port:无法打开usbdev2.1_ep81:没有这样的文件或目录"


打开USB端口的命令:

展开 | 选择 | Wrap | 行号

解决方案

请阅读您的PM',可通过右上角的链接访问页面。


你试图从/ dev /访问设备,这意味着你有没安装它。在Linux中,设备需要先安装才能访问。你在跑什么味道(发行)?我知道Debian将自动挂载并将其放在/ media / usbdisk /中,因此您可以尝试在/或/ mnt目录中查找媒体或usb文件夹。


< blockquote>


请阅读你的PM',可以通过页面右上角的链接访问。


你正在尝试从/ dev /访问设备,这意味着您没有安装它。在Linux中,设备需要先安装才能访问。你在跑什么味道(发行)?我知道Debian将自动挂载并将其放在/ media / usbdisk /中,因此您可以尝试在/或/ mnt目录中查找媒体或usb文件夹。





我使用的是Debian风味。

我试图做的是使用C程序访问USB设备,就像在串行通信中访问COM端口一样。

谢谢





我正在使用Debian风味。

我想要做的是使用C程序访问USB设备,就像在串行通信中访问COM端口一样。

谢谢



仅仅因为它是一个不同的设备意味着你将无法像访问串行通信那样访问它。我的意思是,可以编写包装器和所有内容来创建该功能,但是您需要以不同的方式访问它,因为它是USB设备而不是串行设备。


什么版本的Debian?你检查了/ media文件夹吗?


Hi
I am trying to write a file to a USB device using C program..
When i try to open the USB port, i find the foll error

"open_port: unable to open usbdev2.1_ep81: No such file or directory"

The command to open the USB port:

Expand|Select|Wrap|Line Numbers

解决方案

Please read your PM''s, accessible via the link in the top right corner of the page.

You are trying to access the device from /dev/, which means you have not mounted it. In Linux the device needs to be mounted before it can be accessed. What flavor (distribution) are you running? I know Debian will automount and put it in /media/usbdisk/ so you might try looking around your / or /mnt directory for a ''media'' or ''usb'' folder.


Please read your PM''s, accessible via the link in the top right corner of the page.

You are trying to access the device from /dev/, which means you have not mounted it. In Linux the device needs to be mounted before it can be accessed. What flavor (distribution) are you running? I know Debian will automount and put it in /media/usbdisk/ so you might try looking around your / or /mnt directory for a ''media'' or ''usb'' folder.

Hi
I am using Debian flavor.
What i m trying to do is use a C program to access USB device in the same way as the COM port are accessed in Serial Communication.
Thanks


Hi
I am using Debian flavor.
What i m trying to do is use a C program to access USB device in the same way as the COM port are accessed in Serial Communication.
Thanks

Just because it is a different device will mean that you will not be able to access it the same way you would access a serial communication. I mean, it''s possible to write wrappers and everything to create that functionality, but you will need to access it differently, just because it is a USB device and not a serial device.

What version of Debian? Did you check the /media folder?


这篇关于需要帮助Linux中的USB编程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆