Full disclosure - there are several . The good news is we’ve got a team that is highly motivated to write a lot of stuff down, and some ambitious plans to make great strides in the overall realm of “Bristlemouth Developer Accessibility & Support” this quarter (and beyond).
Comment one is just that I’ve been finding firmware compilation and upload to be fussy in ways I haven’t been able to explain.
There have been several stability improvements in firmware updates in recent versions since 0.5.0, specifically around prevent some edge cases where updates would annoyingly hang and timeout. But, the “invalid param” issue doesn’t ring a bell. If you come across a particular image that reliable results in this error, could you send it our way?
I had been proceeding on the assumption that the two pairs of bm connection terminals on the devkit are completely interchangeable, but my experiences are challenging that assumption.
The ports should be interchangeable, and this is another issue we haven’t come across ourselves. There is an ordering dependency - for the Mote to create a USB serial connection, the USB cable must be plugged into the Mote and host before power is applied to the Mote. Do you think that could be at play here?
Another question - are you able to reproduce this issue when powering the Mote from the Wall-wart, or only from the Ebox?
We’ll try out a few systems here and see if we can reproduce this on our end.
Seems like I’ll need to forego line-oriented input in favor of something that reads character by character.
Yep - there’s a feature in the payload_uart
library to support this. You need to setUseByteStreamBuffer(true)
, then you can do something like:
// Read a cluster of bytes if available
// -- A timer is used to try to keep clusters of bytes (say from lines) in the same output.
static int64_t readingBytesTimer = -1;
// Note - PLUART::setUseByteStreamBuffer must be set true in setup to enable bytes.
if (readingBytesTimer == -1 && PLUART::byteAvailable()) {
// Get the RTC if available
RTCTimeAndDate_t time_and_date = {};
rtcGet(&time_and_date);
char rtcTimeBuffer[32];
rtcPrint(rtcTimeBuffer, &time_and_date);
printf("[payload-bytes] | tick: %" PRIu64 ", rtc: %s, bytes:", uptimeGetMs(),
rtcTimeBuffer);
// not very readable, but it's a compact trick to overload our timer variable with a -1 flag
readingBytesTimer = (int64_t)((u_int32_t)uptimeGetMs());
}
while (PLUART::byteAvailable()) {
readingBytesTimer = (int64_t)((u_int32_t)uptimeGetMs());
uint8_t byte_read = PLUART::readByte();
printf("%02X ", byte_read);
}
if (readingBytesTimer > -1 &&
(u_int32_t)uptimeGetMs() - (u_int32_t)readingBytesTimer >= BYTES_CLUSTER_MS) {
printf("\n");
readingBytesTimer = -1;
}
Note: For reference, there’s an example of this in the HEAD of develop
branch of the RBR Coda example app [here].