Serial port on RAK4631 gone after loading dev build

This may be intentional - but when I build from GitHub and load it to my RAK4631, the build works in the android app and shows it updated/etc…but I don’t get a serial console to come back after it loads.

I have to include the tinyusb.h library to get it to build as well, this may be causing issues.

Any ideas?

I can’t help you with the usb problem but this is how I build and run it:
I followed the instruction on

to install vscode and all other dependencies.
I use the functionality behind the ‘alien’ in vscode to build, upload and monitor.
You just need to specify monitor port in platformio.ini for the monitor to work.
It figures out the upload port by itself but not the monitor port (!?)
…and I am running Ubuntu 21.04

That is a good starting note - I’m actually past that point and am using that guide (on both Mac and Linux).

My issue is the board stops presenting the USB devices to the OS layer at all in any way after a compile.

No new devices in /dev/* and dmesg in the kernel shows no device is being plugged in. I would have suspected the firmware didn’t boot, but I’m up and 100% working in the android app.

@geeksville

Any ideas? Linux (Kali) dev environment. No errors, but I have to include “tusb.h” in the main nrf52 file.

USB isn’t presented to the OS after the build at all when the device is plugged in.

Switched over to a new dev environment. This time, no VM"s or anything but raw hardware.

Still nothing. I can load the firmware builds from github releases and they work great with USB. Then, I build my own and upload and get nothing. No device is presented and nothing in dmesg.

So close.

I ran into some build problems
see in

I found that I did not get the platformio.ini part of this change

I had to do a stash, pull and stash pop to get it since I had my own changes to platformio.ini and they seem to be blocking the new version when i run gitcommands from within VSCode manues.
(I guess you should run git in the shell to be safe)
Now I can build locally again
Just make sure you get the latest version of GitHub - meshtastic/arduino-fsm: Arduino library for implementing a finite state machine.
and not the earlier vesrion that the hash used to point at

I cleaned my entire git folder out and re-cloned. Then removed the hash target for the arduino-fsm out of the platform.ini and recompiled.

I did not get resolution which is interesting.

I do get that exact error you did about the TinyUSB bool callout and can fix that by including the tusb.h…but then my USB doesn’t work but I compile.

I have checked the compile flags for this target both in the CMAKE file AND the actual flags being run and -DUSE_TINYUSB is set for sure.

Strange side note - the TinyUSB library was having race condition problems prior to 14 days ago.

I know we have been working on the sleep state as if it was the core root cause, but its possible that said root cause was a bad Tusb library instead of anything within meshtastic.

1.4.1 - Fixed race condition for NRF5x boards released 14 days ago

1 Like