I see. My custom platform uses the at-the-time-of-writing up-to-date core version, 2.6.1. I’ll update it to 2.8.1 so that we can compare apples to apples.
Thanks for the help! I updated the package and it still works for the serial monitor but not from the usbC cable to the nRF52840 plugged into my computer that is sending the serial data.
And just to make tripple sure that you’re not using the 1.0.0 version accidentally, you have this board selected right in the “Seeed nRF52 mbed-enabled Boards” right?
I update the platform to allow using the “1.0.0” version (extremely badly named by Seeed for another Adafruit_nRF52_Arduino fork, don’t know why they have the same board support in two different cores at all)
or, please try to see if in the Qt C++ code, you can assert the “DTR” (data terminal ready) signal of the opened serial port. Some Arduino cores have the pecularity that they will silently ignore and data sent to the virtual USB serial port if the virtual DTR signal is not asserted. The RTS can be left alone. This could unblock the firmware running with the PlatformIO fimware (using ArduinoCore-mbed fork) from accepting data from your Qt program.
You’re a genius. Adding that to my QSerialPort initiallization fixed the problem. I think, exactly like you said the Arduino core was ignoring the data without the DTR signal. It works now with this:
Great to hear! I’ll still work on getting the “1.0.0” supported in PlatformIO. If you were to use the custom built-in libraries of the Arduino core like BLE, they would be different between ArduinoCore-mbed and Adafruit_nRF52_Arduino, and the sketch would not compile anymore under PlatformIO.
I’ve created a xiaoblesense_adafruit and xiaoble_adafruit board that make use of the “1.0.0” Seeed Adafruit nRF52 core version. Can you execute the update command again (or if that doesn’t work, delete <home directory>/.platformio/platforms/nrf52*) and flash the example code from GitHub - maxgerhardt/pio-xiao-ble-test: Test programs for PlatformIO support for Xiao BLE (Sense) boards. on it, which is from here? I’d very much like to know whether the project can be uploaded and the BLE Uart service shows up in the App and can be connected to.
#include <Arduino.h>
// google suggested this one. It helps on the compiler, but does not yield anything in the serial monitor
//#include "Adafruit_TinyUSB.h"
void setup() {
Serial.begin(115200);
pinMode(LED_BUILTIN, OUTPUT);
}
void loop() {
Serial.println("hello world");
digitalWrite(LED_BUILTIN, ! digitalRead(LED_BUILTIN));
delay(500);
}
Compiler cant find Serial
.pio/build/xiaoble_adafruit/src/main.cpp.o: In function `setup':
main.cpp:(.text.setup+0x8): undefined reference to `Adafruit_USBD_CDC::begin(unsigned long)'
main.cpp:(.text.setup+0x18): undefined reference to `Serial'
.pio/build/xiaoble_adafruit/src/main.cpp.o: In function `loop':
main.cpp:(.text.loop+0x2c): undefined reference to `Serial'
collect2: error: ld returned 1 exit status
*** [.pio/build/xiaoble_adafruit/firmware.elf] Error 1
If I use the mbed variant it will compile, but then I am not able to get into the 5uA region when sleeping in delay()
As code hints, I have including the Adafruit_TinyUSB.h, bit it didn’t really help