Hello,
I recently got a Blues Wireless for Opta device and it was working great with the basic program sending data to NoteHub. But after some testing and changing power supplies a couple of times my Arduino Opta can’t communicate with the Blues module anymore. The debug console is just spitting out tons of errors about I2C transmissions.
Notecard Firmware: Tested with v7.4.1.16848, v8.1.4.17149, and v9.1.1.17181
Blues Wireless Notecard (Arduino Library): v1.6.6
I am using the basic tempature/voltage program found on the Wireless for Opta Quick Start Guide.
#include <Notecard.h>
#define usbSerial Serial
Notecard notecard;
void setup() {
usbSerial.begin(115200);
const size_t usb_timeout_ms = 3000;
for (const size_t start_ms = millis(); !usbSerial && (millis() - start_ms) < usb_timeout_ms;)
;
notecard.setDebugOutputStream(usbSerial);
notecard.begin();
}
void loop() {
takeReading();
delay(15 * 1000);
}
void takeReading() {
double temperature = 0;
{
J *rsp = notecard.requestAndResponse(notecard.newRequest("card.temp"));
if (rsp != NULL)
{
temperature = JGetNumber(rsp, "value");
notecard.deleteResponse(rsp);
}
}
double voltage = 0;
{
J *rsp = notecard.requestAndResponse(notecard.newRequest("card.voltage"));
if (rsp != NULL)
{
voltage = JGetNumber(rsp, "value");
notecard.deleteResponse(rsp);
}
}
{
J *req = notecard.newRequest("note.add");
if (req != NULL)
{
JAddBoolToObject(req, "sync", true);
J *body = JAddObjectToObject(req, "body");
if (body != NULL)
{
JAddNumberToObject(body, "temp", temperature);
JAddNumberToObject(body, "voltage", voltage);
}
notecard.sendRequest(req);
}
}
}
And after I upload the program it constantly spits out these errors, sometimes with a 15 second gap (which should be the 15s delay in the loop().)
15:00:14.235 -> [ERROR] i2c: received NACK on transmit of address {io}
15:00:14.235 -> [ERROR] error encountered during I2C transmit hook execution
15:00:15.271 -> [ERROR] i2c: received NACK on transmit of address {io}
15:00:15.271 -> [ERROR] error encountered during I2C transmit hook execution
15:00:16.255 -> [ERROR] i2c: received NACK on transmit of address {io}
15:00:16.255 -> [ERROR] error encountered during I2C transmit hook execution
15:00:17.285 -> [ERROR] i2c: received NACK on transmit of address {io}
15:00:17.285 -> [ERROR] error encountered during I2C transmit hook execution
15:00:18.272 -> [ERROR] i2c: received NACK on transmit of address {io}
15:00:18.272 -> [ERROR] error encountered during I2C transmit hook execution
15:00:19.281 -> [ERROR] i2c: received NACK on transmit of address {io}
15:00:19.281 -> [ERROR] error encountered during I2C transmit hook execution
15:00:20.321 -> [ERROR] i2c: received NACK on transmit of address {io}
15:00:20.321 -> [ERROR] error encountered during I2C transmit hook execution
15:00:21.316 -> [ERROR] i2c: received NACK on transmit of address {io}
15:00:21.317 -> [ERROR] error encountered during I2C transmit hook execution
15:00:22.343 -> [ERROR] i2c: received NACK on transmit of address {io}
15:00:22.343 -> [ERROR] error encountered during I2C transmit hook execution
15:00:38.634 -> [ERROR] i2c: received NACK on transmit of address {io}
15:00:38.634 -> [ERROR] error encountered during I2C transmit hook execution
15:00:39.626 -> [ERROR] i2c: received NACK on transmit of address {io}
15:00:39.626 -> [ERROR] error encountered during I2C transmit hook execution
15:00:40.608 -> [ERROR] i2c: received NACK on transmit of address {io}
15:00:40.608 -> [ERROR] error encountered during I2C transmit hook execution
15:00:41.640 -> [ERROR] i2c: received NACK on transmit of address {io}
15:00:41.640 -> [ERROR] error encountered during I2C transmit hook execution
15:00:42.627 -> [ERROR] i2c: received NACK on transmit of address {io}
15:00:42.627 -> [ERROR] error encountered during I2C transmit hook execution
15:00:43.657 -> [ERROR] i2c: received NACK on transmit of address {io}
15:00:43.657 -> [ERROR] error encountered during I2C transmit hook execution
15:00:44.645 -> [ERROR] i2c: received NACK on transmit of address {io}
15:00:44.645 -> [ERROR] error encountered during I2C transmit hook execution
15:00:45.670 -> [ERROR] i2c: received NACK on transmit of address {io}
15:00:45.670 -> [ERROR] error encountered during I2C transmit hook execution
15:00:46.706 -> [ERROR] i2c: received NACK on transmit of address {
Photo of Arduino Opta with Blues Wireless for Opta module, along with 12V power supply:
I have confirmed that the Arduino Opta is working on it’s own with a Modbus + WiFi + MQTT program. As well as I updated the firmware twice on the Blues Wireless for Opta unit twice (once from v7 to v8, and then v8 to v9). Also pressing the “TEST” button on the Blues unit sends an event/note to NoteHub like: _button.qo: {"power":true}
. I have also physically separated the Arduino Opta and Blues unit, inspected the AUX connector and it looked fine. Then re-attached and still seeing this issue. As well as uploading software to Arduino Opta from a different computer.
EDIT: I have tested with a second Arduino Opta unit, and still seeing the same thing happen.
Any help to resolve this would be great as we love the product.