奥林巴斯相机套件蓝牙唤醒
Olympus camera kit bluetooth wakeup
我正在编写一个 Python 脚本,该脚本用于 Raspberry Pi 上的 运行,它通过 WiFi 远程控制 Olympus Air A01 相机。 WiFi 控制工作正常,但我也希望脚本能够远程打开相机。
据我所知,这只能通过蓝牙 LE 完成,但 OPC SDK 没有提供有关如何完成的详细信息。我认为在 iOS/Android 下开发时,"wakeup" Java 方法用于此目的,但同样没有详细信息说明此方法究竟将什么传输到相机以获取它加电。
我一直在试验 Bluez/Gatttool 并且有一个相机服务和句柄的列表,但不知道哪个句柄做什么以及我应该写入什么值来唤醒相机。
有没有人能够在不使用 OPC SDK 的情况下通过蓝牙 LE 打开此相机?
谢谢!
所以我最终在打开相机时模拟了奥林巴斯 Android 应用程序和相机之间的流量,现在我可以使用 Gatttool 发送相同的值来唤醒相机。
这是唤醒相机的最小 Gatttool 序列:
sudo gatttool -b 90:B6:86:XX:YY:ZZ -I
connect
primary
char-desc
char-write-req 0x0013 0001
char-write-req 0x0016 0001
char-write-req 0x0019 0001
char-write-req 0x0012 0101090c01023132333435364400
char-write-req 0x0015 0202000000
char-write-req 0x0012 0102040f0101021300
char-write-req 0x0015 0203000000
exit
编辑:
同样可以在 python 中实现,如下所示:
import os
os.system('gatttool -b 90:B6:86:XX:YY:ZZ --primary')
os.system('gatttool -b 90:B6:86:XX:YY:ZZ --char-desc')
os.system('gatttool -b 90:B6:86:XX:YY:ZZ --char-write-req --handle 0x0013 -n 0001')
os.system('gatttool -b 90:B6:86:XX:YY:ZZ --char-write-req --handle 0x0016 -n 0001')
os.system('gatttool -b 90:B6:86:XX:YY:ZZ --char-write-req --handle 0x0019 -n 0001')
os.system('gatttool -b 90:B6:86:XX:YY:ZZ --char-write-req --handle 0x0012 -n 0101090c01023132333435364400')
os.system('gatttool -b 90:B6:86:XX:YY:ZZ --char-write-req --handle 0x0015 -n 0202000000')
os.system('gatttool -b 90:B6:86:XX:YY:ZZ --char-write-req --handle 0x0012 -n 0102040f0101021300')
os.system('gatttool -b 90:B6:86:XX:YY:ZZ --char-write-req --handle 0x0015 -n 02030000000; sleep 5')
os.system('gatttool -b 90:B6:86:XX:YY:ZZ --char-write-req --handle 0x0012 -n 010304140101011700')
os.system('gatttool -b 90:B6:86:XX:YY:ZZ --char-write-req --handle 0x0015 -n 02040000000')
正在用您自己的 MAC 地址替换 90:B6:86:XX:YY:ZZ...
起初我尝试使用 Pygatt,但无法从 Gatttool 执行主要和 char-desc 操作,所以我恢复到直接通过其非交互模式调用 Gatttool。
我正在编写一个 Python 脚本,该脚本用于 Raspberry Pi 上的 运行,它通过 WiFi 远程控制 Olympus Air A01 相机。 WiFi 控制工作正常,但我也希望脚本能够远程打开相机。
据我所知,这只能通过蓝牙 LE 完成,但 OPC SDK 没有提供有关如何完成的详细信息。我认为在 iOS/Android 下开发时,"wakeup" Java 方法用于此目的,但同样没有详细信息说明此方法究竟将什么传输到相机以获取它加电。
我一直在试验 Bluez/Gatttool 并且有一个相机服务和句柄的列表,但不知道哪个句柄做什么以及我应该写入什么值来唤醒相机。
有没有人能够在不使用 OPC SDK 的情况下通过蓝牙 LE 打开此相机?
谢谢!
所以我最终在打开相机时模拟了奥林巴斯 Android 应用程序和相机之间的流量,现在我可以使用 Gatttool 发送相同的值来唤醒相机。
这是唤醒相机的最小 Gatttool 序列:
sudo gatttool -b 90:B6:86:XX:YY:ZZ -I
connect
primary
char-desc
char-write-req 0x0013 0001
char-write-req 0x0016 0001
char-write-req 0x0019 0001
char-write-req 0x0012 0101090c01023132333435364400
char-write-req 0x0015 0202000000
char-write-req 0x0012 0102040f0101021300
char-write-req 0x0015 0203000000
exit
编辑:
同样可以在 python 中实现,如下所示:
import os
os.system('gatttool -b 90:B6:86:XX:YY:ZZ --primary')
os.system('gatttool -b 90:B6:86:XX:YY:ZZ --char-desc')
os.system('gatttool -b 90:B6:86:XX:YY:ZZ --char-write-req --handle 0x0013 -n 0001')
os.system('gatttool -b 90:B6:86:XX:YY:ZZ --char-write-req --handle 0x0016 -n 0001')
os.system('gatttool -b 90:B6:86:XX:YY:ZZ --char-write-req --handle 0x0019 -n 0001')
os.system('gatttool -b 90:B6:86:XX:YY:ZZ --char-write-req --handle 0x0012 -n 0101090c01023132333435364400')
os.system('gatttool -b 90:B6:86:XX:YY:ZZ --char-write-req --handle 0x0015 -n 0202000000')
os.system('gatttool -b 90:B6:86:XX:YY:ZZ --char-write-req --handle 0x0012 -n 0102040f0101021300')
os.system('gatttool -b 90:B6:86:XX:YY:ZZ --char-write-req --handle 0x0015 -n 02030000000; sleep 5')
os.system('gatttool -b 90:B6:86:XX:YY:ZZ --char-write-req --handle 0x0012 -n 010304140101011700')
os.system('gatttool -b 90:B6:86:XX:YY:ZZ --char-write-req --handle 0x0015 -n 02040000000')
正在用您自己的 MAC 地址替换 90:B6:86:XX:YY:ZZ...
起初我尝试使用 Pygatt,但无法从 Gatttool 执行主要和 char-desc 操作,所以我恢复到直接通过其非交互模式调用 Gatttool。