6

我面临着 spherojs npm 包的问题,​​一旦发出命令,OSX 就无法从 BB8 获得响应:

Unhandled rejection Error: Command sync response was lost.
    at Sphero.handler (/Users/shah/projects/node/ai8/node_modules/sphero/lib/sphero.js:252:21)
From previous event:
    at Sphero.command (/Users/shah/projects/node/ai8/node_modules/sphero/lib/sphero.js:180:10)
    at Sphero.device.setRgbLed    (/Users/shah/projects/node/ai8/node_modules/sphero/lib/devices/sphero.js:369:12)
    at Sphero.device.color (/Users/shah/projects/node/ai8/node_modules/sphero/lib/devices/custom.js:168:19)
    at file:///Users/shah/projects/node/ai8/js/orb.js:7:7[0m

我现在的环境是:

ProductName:    Mac OS X
ProductVersion: 10.11.6
BuildVersion:   15G31

node -v
v6.9.5

npm -v 
3.10.10

 system_profiler SPBluetoothDataType | sed -n "/Apple Bluetooth Software Version\:/,/Manufacturer\:/p" | tr -s "    [\n]" "[ ]" | sed "s:.*Address\: ::g" | sed "s: Manufacturer\:.*::g" | grep "[[:graph:]]"

80-E6-50-1B-50-31 Bluetooth Low Energy Supported: Yes Handoff Supported: Yes Instant Hot Spot Supported:        Yes

任何可能导致这种情况的想法,Nodejs 应用程序能够连接到机器人并发送命令,命令被执行,然后与 bb8 的连接丢失,Nodejs 应用程序没有得到命令同步的响应。

提前感谢您的投入!

4

0 回答 0