twine-rs / spinel

Control networking devices using the Spinel protocol.
Mozilla Public License 2.0
0 stars 0 forks source link

bug: framing error in `PropertyValueGet` #1

Open jdswensen opened 5 months ago

jdswensen commented 5 months ago

There appears to be a framing error when using the following line in spinel-cli:

let proto_version_frame = spinel::Frame::new(Header::new(0, 3), Command::PropertyValueGet(Property::ProtocolVersion));
host.send_frame(proto_version_frame).await;
Frame { header: Header { flag: 2, iid: 0, tid: 0 }, command: PropertyValueIs(Stream(Debug), b"Framing error 6: [") }
Frame { header: Header { flag: 2, iid: 0, tid: 0 }, command: PropertyValueIs(Stream(Debug), b"83 02 01 27]\n") }

Hook up a logic analyzer to the physical UART to determine what's going on. The encoder is probably incorrectly setting up the frame as this same packet formation works if the TID is set to 4.

jdswensen commented 4 months ago

I also set up a socat script so that a logic analyzer isn't strictly required.