iPhone 3G 中的 ANT 版本是什么?如何访问它?
我想建立一个 ANT 网络(例如,参见 维基百科文章 )并开发运动使用带有集成 ANT 控制器(Apple 用于 Nike+iPod 设备)的 iPhone 3G 的配件与其进行通信。我需要知道控制器的 ANT 版本(ANT 或 ANT+)、它的功能(接收器/收发器)以及如何使用 iPhone 上的软件访问控制器。直到知道我能够访问串行接口并通过 WLAN 打开套接字,但此主题的唯一信息是 这个。距离集成 ANT 和外部配件框架的 3G 发布已有一年了。改变了一些东西吗?其他团体是否有新的努力?每个信息都会有帮助。谢谢。
I want to build up an ANT network (e.g. see wikipedia article ) and develop sport accessories using the iPhone 3Gs with integrated ANT Controller (used by Apple for Nike+iPod devices) to communicate with them. I need to know which ANT version the controller is (ANT or ANT+), what it's able to do (receiver/transeiver) and how I can acces the controller with software on iPhone. Until know I was able to access the serial interface and open a socket over WLAN but the only information for this topic was this one. It's one year old before the 3Gs with integrated ANT and External Accessory Framework was released. Changed that something? Are there new efforts of other groups? Every information would be helpful. Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
apple/nike footpod 不是 ANT 兼容设备。它与 Nordic 收发器 nRF2402 配合使用,但协议不同。我对其进行了逆向工程:
Apple 足部传感器与 nRF2402 发射器和 PIC16F688 微控制器配合使用。
重复率:1000ms
配置字节数:2
地址字节数:2
原始数据字节数:28
备注:配置是在掉电前发送的,即当时发送2 个字节,先是0xe7,然后是0x99。检测到脚步后,设备将保持活动状态大约 5 秒。该设备与一个简单的压电传感器配合使用来检测脚步声。
完整的交易是通过发送 3 个 9 字节的块,然后是 11 字节,然后是 10 字节(块内每个字节之间几乎没有间隙,位时钟低于 2us)来完成的,每个块之间的间隙为 1.5ms。与接收器配置帧的交叉检查显示以下内容:
0x00 0xe0 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0xc2 0xbd 0x43 0x4f 0x33
这意味着(参见nRF2401的数据表;配置):
- 通道 0x19 -> 2425兆赫
- 最大射频功率; 16MHz时钟;冲击爆发; 250kbps; 1 个 RX 通道处于活动状态
- 启用CRC; CRC 16 位;地址长度16位
- 通道 1 的地址:0xc2bd(高字节在前)
- 通道2的地址:全0x00
- 0xe0->通道 1 224 个数据位
- 0x00 - >通道 2 0 个数据位
地址长度为 16 位,传输 224 位原始数据。标准设备地址是 0xc2 0xbd 无论如何,通过链接发送的数据以以下模式开头:
地址:0xC2 1. 块 1 的字节
0xBD 2. 块 1 的字节
数据:0x0D 3. 块 1 的字节
0x01 4. 块 1 的字节
0x47 5. 块 1 的字节
0xA0 6. 块 1 的字节
0x54 7. 块 1 的字节
0x22 8. 块 1 的字节
0xA0 9. 块 1 的字节
。块2的10.字节
。 11.块2的字节
。
希望这有一点帮助
the apple / nike footpod is not an ANT compatible device. It works with a nordic transceiver nRF2402 but with a different protocol. I reverse engineered it:
The Apple foot pod works with a nRF2402 transmitter and a PIC16F688 microcontroller.
Repetition rate: 1000ms
Number of configuration bytes: 2
Number of address bytes: 2
Number of raw data bytes: 28
Remark: the configuring is sent just before power down, i.e. 2 bytes are transmitted at that time, first 0xe7 then 0x99. The device remains active for approximately 5 seconds after a step has been detected. The device works with a simple piezo sensor to detect footsteps.
A fully transaction is made by sending 3 blocks of 9 bytes, then 11bytes then 10 bytes (almost no gap between each byte within a block, bit clock is below 2us) with a gap of 1.5ms between each block. A crosscheck with the configuration frame of the receiver shows the following:
0x00 0xe0 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0xc2 0xbd 0x43 0x4f 0x33
This means (see datasheet of nRF2401; configuration):
- channel 0x19 -> 2425MHz
- RF power max; 16MHz clk; shock burst; 250kbps; 1 RX channel active
- CRC enabled; CRC 16bit; address length 16bit
- Address for channel 1: 0xc2bd (high byte first)
- Address for channel 2: all 0x00
- 0xe0 -> 224 data bits for channel 1
- 0x00 -> 0 data bits for channel 2
The address length is 16 bit, and 224 bits of raw data are transmitted. The standard device address is 0xc2 0xbd anyway the data sent via link starts with the following pattern:
Address: 0xC2 1. byte of block 1
0xBD 2. byte of block 1
Data: 0x0D 3. byte of block 1
0x01 4. byte of block 1
0x47 5. byte of block 1
0xA0 6. byte of block 1
0x54 7. byte of block 1
0x22 8. byte of block 1
0xA0 9. byte of block 1
. 10.byte of block 2
. 11.byte of block 2
.
hope this helps a little
是什么让您确定 iPhone (3GS) 使用 Nordic 收发器?我在 ifixit 的拆解中似乎看不到它。我们假设 BCM4325 也用于“ANT”通信。
What makes you sure the iPhone (3GS) uses a nordic transceiver? It seems not visible to me on the tear down at ifixit. We assumed the BCM4325 is used for the "ANT" communication as well.
顺便说一句,ANT 和 ANT+ 协议以全速 1MBit/秒工作,而不是较低的 footpod 速度 250kBit/秒。与 ANT 协议相比,nike footpod 中的帧长度也有所不同。从硬件的角度来看,无需任何外部硬件,就可以在 iPhone 上运行 ANT 甚至 ANT+ 协议!收发器已经集成。如果能够访问 iPhone 内的 nRF2401 收发器,编写 ANT 协议处理程序是小菜一碟,那么 ANT 协议就是一件非常愚蠢的事情,而且很容易实现! ANT+ 使用 8 字节密钥加密。我猜他们使用了更安全的算法,但我不确定。另请参阅:SAFER(安全快速加密例程)是主要由 James Massey 在维基百科上设计的一系列分组密码的名称(源代码可在苏黎世的 ETH 下载,或者直接问我...祝你好运
by the way, the ANT and ANT+ protocol works with full speed 1MBit/sec instead of the lower footpod speed of 250kBit/sec. The length of a frame in the nike footpod is also different compared to the ANT protocol. From a HW point of view, it is possible to run an ANT or even ANT+ protocol on an i-phone without any external HW! The transceiver is already integrated. If one had access to the nRF2401 transceiver within the i-phone writing an ANT protocol handler is a piece of cake, the ANT protocol is a pretty stupid thing and easy to implement! The ANT+ is encrypted with an 8 byte key. I guess they use the safer algorithm but I'm not sure. See also: SAFER (Secure And Fast Encryption Routine) is the name of a family of block ciphers designed primarily by James Massey on wikipedia (source code downloadable at ETH in zürich or just ask me... good luck