sci-bots / base-node-rpc

Base classes for Arduino RPC node/device
0 stars 2 forks source link

bug(dropbot): [ERROR:dropbot_plugin.DropBotPlugin._attempt_connect]: need more than 1 value to unpack #20

Closed cfobel closed 6 years ago

cfobel commented 6 years ago

Problem

For example:

image

Cause

The cause of this issue is that the base-node-rpc==0.51 _read_device_id() assumes the next incoming packet after writing a ID_REQUEST packet is a ID_RESPONSE packet. However, this may not be true if the device is writing, e.g., streaming packets (i.e., packets with STREAM type).

Proposed fix

Discard any incoming packets that are not of type ID_RESPONSE.