Mac OS与/dev/ttyUSBxx类似 [英] Mac OS analog to /dev/ttyUSBxx

查看:262
本文介绍了Mac OS与/dev/ttyUSBxx类似的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我曾经使用过Linux USB端口命名,也就是/dev/ttyUSBxx,目前正在尝试编写一些测试软件以将原始数据读/写到iMac上的USB端口,但是我发现很难检测到我的USB硬件是哪个端口连接的.我已经尝试使用/dev/ttys"x",但是没有运气.

I used to linux USB port naming, aka /dev/ttyUSBxx and currently trying to write some test software to read/wrtie raw data to USB ports on iMac, but i find it hard to detect to which port my usb hardware is connected. I have tried up to a using /dev/ttys"x" but no luck.

在系统信息中,我看到位置ID:0xfa120000/6附带的硬件 也许这可以有所帮助吗?

In the system information i see the hardware attached at Location ID: 0xfa120000 / 6 maybe this can help somehow?

推荐答案

OS X不会为原始访问USB设备创建/dev条目,因此无法将它们作为TTY设备访问.

OS X doesn't create a /dev entry for raw access to USB devices, and there's no way to access them as TTY devices.

部分原因是Linux和BSD在哲学上有所不同,部分原因是驱动程序编写技术的不同,部分原因是已经具有必须映射到的明确定义的层次结构(IOKit注册中心)/dev层次结构以某种复杂的方式.

Partly this is a different in philosophy between Linux and BSD, partly it's a difference in driver-writing technology, and partly it's a matter of already having a well-defined hierarchy (the IOKit Registry) that would have to be mapped to the /dev hierarchy in some complicated way.

无论如何,如果您想了解如何应该在Mac上访问USB设备,请从

At any rate, if you want to learn how you should access USB devices on a Mac, start with QA1370. If you're looking to do a quick port of some linux code without actually learning IOKit/IOUSB, it's probably going to be impossible. If you're looking for something else, you'll need to give more info about what you're trying to do.

这篇关于Mac OS与/dev/ttyUSBxx类似的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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