On this Step:
If you’re using PlatformIO, open the Serial Monitor by clicking the plug icon in the bottom of VS Code.
You should see a few debug messages, including the JSON object you sent, as well as the response from the Notecard {}. (Note: You might need to upload your code a second time to see the result of the hub.set request, as the Serial Monitor only captures output when it’s actively running.)
after i got the success messages after running my code. On the monitor task instead of having this:
{“req”:“hub.set”,“product”:“com.blues. tvantoll:weather”, “mode”:“continuous”, “body”:{“a
gent”:“note-arduino”,“compiler”:“gcc 9.2.1 20191025 (release) [ARM/arm-9-branch revisi
on 277599]”,“req_interface”:“i2c”,“cpu_name”:“swan_r5”}}
I got some errors:
[ERROR] i2c: received NACK on transmit of data {io}
[ERROR] error encountered during I2C transmit hook execution
[ERROR] i2c: received NACK on transmit of data {io}
[ERROR] error encountered during I2C transmit hook execution
[ERROR] i2c: received NACK on transmit of data {io}
[ERROR] error encountered during I2C transmit hook execution
Also mine don’t say Monitor task, instead it says PlataformIO.
Hey @Andres18,
Welcome to the Blues community! And sorry you hit an issue here.
To start, could you let me know what firmware version your Notecard is using? (You can get that by running the card.version
request.)
Can you also try to power cycle the device to see if this error is happening consistently?
Thanks,
TJ
This is my platformio:
[env:bw_swan_r5]
platform = ststm32
board = bw_swan_r5
upload_protocol = dfu
framework = arduino
build_flags = -D PIO_FRAMEWORK_ARDUINO_ENABLE_CDC
monitor_speed = 115200
lib_deps =
Wire
blues/Blues Wireless Notecard@^1.6.0
This is my Main CPP:
#include <Arduino.h>
#include <Notecard.h>
#define usbSerial Serial
#define productUID “edu.ncsu.aalop…”
Notecard notecard;
void setup()
{
// initialize digital pin LED_BUILTIN as an output.
delay(2500);
usbSerial.begin(115200);
notecard.begin();
notecard.setDebugOutputStream(usbSerial);
J *req = notecard.newRequest(“hub.set”);
JAddStringToObject(req, “product”, productUID);
JAddStringToObject(req, “mode”, “continuous”);
notecard.sendRequest(req);
}
// the loop function runs over and over again forever
void loop()
{
}
After i run it i get a success messages!!! but the next step to press the serial Monitor and see the request. i see these errors and i can’t establish connection to my bluenotehub . I have connect the USB to the sawn nothing else connect it.
[ERROR] error encountered during I2C transmit hook execution
[ERROR] i2c: received NACK on transmit of data {io}
[ERROR] error encountered during I2C transmit hook execution
[ERROR] i2c: received NACK on transmit of data {io}
[ERROR] error encountered during I2C transmit hook execution
[ERROR] i2c: received NACK on transmit of data {io}
[ERROR] error encountered during I2C transmit hook execution
[ERROR] i2c: received NACK on transmit of data {io}
[ERROR] error encountered during I2C transmit hook execution
Can you run the card.version
request using the In-Browser Terminal and paste in what you get back here?
I’d like to see what firmware version your Notecard is using first.
Thanks,
TJ
Hey,
version": “notecard-7.4.2.16888”,
“device”: “dev:351077454529689”,
“name”: “Blues Wireless Notecard”,
“sku”: “NOTE-WBGLW”,
“ordering_code”: “HB0YT1N0AEAU”,
“board”: “5.13”,
“wifi”: true,
“cell”: true,
“gps”: true,
“api”: 7,
“body”: {
“org”: “Blues Wireless”,
“product”: “Notecard”,
“target”: “u5”,
“version”: “notecard-u5-7.4.2”,
“ver_major”: 7,
“ver_minor”: 4,
“ver_patch”: 2,
“ver_build”: 16888,
“built”: “Aug 27 2024 19:08:01”
#include <Arduino.h>
#include <Notecard.h>
#define usbSerial Serial
// #define productUID “andresnotehubproject”
#define productUID “com.renago.datweneb:testrun”
Notecard notecard;
Main cpp:
void setup() {
// put your setup code here, to run once:
delay(3500);
usbSerial.begin(115200);
notecard.begin();
notecard.setDebugOutputStream(usbSerial);
J *req = notecard.newRequest(“hub.set”);
JAddStringToObject(req, “product”, productUID);
JAddStringToObject(req, “mode”, “continuous”);
notecard.sendRequest(req);
}
void loop() {
// put your main code here, to run repeatedly:
}
Hi @Andres18,
Usually the I2C issue you’re seeing is the result of either an I2C address conflict (i.e. do you have another I2C sensor/component that could be conflicting with the Notecard) or a wiring issue. Are you using a starter kit with the Notecarrier F or another Notecarrier? It might be worthwhile posting an image of your wiring.
Thanks,
Rob
1 Like