iPhone 耳机插孔 - 读取数据?
我有一个连接到电池供电监视器的小型设备。当我转动设备上的滚轮时,监视器会显示信息,例如您开始转动滚轮的时间以及滚轮转动的速度。我相信该设备正在通过 3.5 毫米音频插孔发送某种磁脉冲或其他东西。
我不想将设备连接到其原始显示器,而是想将其连接到我的 iPhone 并读取相同的数据。该线的末端有一个 3.5 毫米音频插孔,通常可以像耳机一样插入 iPhone。
我研究过像 HiJack 这样的项目,但我不确定如何使用我收到的数据(或者当我收到数据时数据实际上来自哪里),或者我是否可以在这种情况下使用它。
我可以通过 iPhone 的音频插孔从外部设备读取数据(到 iPhone)吗?
如果可以,您建议我研究哪些框架/库?
我有研究AurioTouch,但它看起来相当复杂,而且不是很简单。
I have a small device which connects to a battery powered monitor. When I turn the wheel on the device, the monitor displays information such as when you started turning the wheel and how fast the wheel is turning. I believe the device is sending some sort of magnetic pulse or something through the 3.5 mm audio jack.
Instead of connecting the device to its original monitor, I want to connect it to my iPhone and read in the same data. The cord has a 3.5 mm audio jack at the end and fits in the iPhone normally like a headphone.
I have looked into projects like HiJack but am unsure of how to use the data I receive (or where the data is actually coming from when I do receive it), or if I can even use it in this circumstance.
Can I read data in (to the iPhone) from an external device through the iPhone's audio jack?
If yes, what frameworks/libraries do you suggest I look into?
I have looked into AurioTouch by Apple, but it seems rather complicated and isn't very straightforward.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
是的,可以使用 iPhone 3.5 毫米(1/8 英寸)耳机/麦克风插孔作为数据输入,正如 HiJack 项目所演示的那样 - 该项目还为输入设备供电。
正如 Dominik Selbold 指出的那样,关键是值得注意的是,传入的数据必须在 iPhone 麦克风输入的通带内的频率进行调制,尽管许多人认为这限制了数据速率,但实际上 19 kHz 音频是一种非常宽带的信号,能够达到数十千比特。 。
例如,2008 年,Jonti Olds 演示了如何使用音频正交幅度调制在两台计算机之间传输电视声音和图像,而 iPhone 上需要的是开发 QAM 解调器 音频输入 - 使用 FFT 库 - 将 QAM 音频调制视频解调回数字视频 - 如 H.264 - 可能为 1/4 VGA 分辨率 复合视频已经是 QAM,但是。带宽更高;大约 5 MHz
如果您在网上搜索 JQAM,您可以找到 Olds 先生的项目和代码。恕我直言,这将是一个在 iPhone 或 Android 上处理的非常酷的项目。
Yes, it is possible to use the iPhone 3.5 mm (1/8") headphone/mic jack as a data input, as has been demonstrated by the HiJack project - which also powers the input device.
The key, as Dominik Selbold has pointed out, is that the incoming data must be modulated at frequencies within the passband of the iPhone microphone input. Although many have suggested that this limits the data rate, in fact 19 kHz audio is a very wideband signal, capable of dozens of kilobits per second.
For example, in 2008, Jonti Olds demonstrated how using Quadrature Amplitude Modulation at audio frequencies could stream TV sound and picture between two computers,using their audio cards. What would be needed on the iPhone would be to develop a QAM demodulator for the audio input - using the FFT library - to demodulate QAM audio modulated video back into digital video - like H.264 - probably at 1/4 VGA resolution. NTSC Composite video is already QAM, but at a much higher bandwidth; about 5 MHz.
If you search the web for JQAM, you can find Mr. Olds project and code. IMHO, this would be a very cool project to tackle on iPhone or Android.
如果信号的带宽适合 iPhone 的 A/D 转换器的带宽(大约为 20Hz 到 20kHz),您就可以通过 iPhone 的耳机插孔读取任何数据。
You can read any data through the iPhone's headjack, if the bandwidth of the signal fits into the bandwidth of the iPhone's A/D-converter, which is about 20Hz to 20kHz.
请留意 SpeakHere 应用程序是否有帮助发现任何复杂性...因为这也与 AurioTouch 相同,但比那更简单..
如果您只需要录制音频,这将比您正在谈论的更加简单...最好运气好...
Look out for SpeakHere application if it helps and not finding any complexity... because this also works same as AurioTouch but somewhat simpler than that..
This will be much more straightforward that you are talking about if you only need to record audio.... best of luck...
如果有任何相关性的话,我正在使用密歇根大学的 HiJack 项目。您可以在此处找到源代码。该代码主要是用 C++ 编写的,它有一些错误,是的,它是 0.1 版本,但是如果你深入研究代码,你会发现一些关于此事的有趣信息。
If it is of any relevance, I am using the HiJack project from the University of Michigan. You can find the source here. The code is mainly written in C++, it has some bugs and yes, it is version 0.1, but if you dig in the code, you will find some interesting information regardng this matter.
我找到了一个框架 http://www.crudebyte.com/jack-ios/sdk/ 但说实话没有尝试过。
似乎他们在二进制文件中有一些示例代码,并且该库的最后更新日期是 2013 年 6 月 7 日,所以看起来工作正在进行中。
I found one framework http://www.crudebyte.com/jack-ios/sdk/ but to be honest didn't try it.
Seems like they have some sample code inside of binary and the last update date of the lib was in 2013-06-07, so seems like the work is going there.
检查 ArduCom 项目。它通过 iPhone 耳机插孔传输串行数据。
www.youtube.com/watch?v=ROMvwrd0Au8
Check ArduCom project. Its transfering serial data over iPhone headjack.
www.youtube.com/watch?v=ROMvwrd0Au8