I programmed the Nano once, except my mistake it worked (blink LED with 1s, and the Nano presenly blinks).
Since then I cannot program, don't see the Com port that's documented in the guide, not can I program using tiny isp which it looks is not supported for Nano BLE.
Can somone please help ?
Linux mintdesktop based on ubuntu 18.04 x86_64 GNU/Linux
Arduino IDE 1.18.2
Bus 011 Device 059: ID 1781:0c9f Multiple Vendors USBtiny
jfsimon1981:
Since then I cannot program, don't see the Com port that's documented in the guide
The tricky thing about the boards with native USB functionality like your board is that the USB code that creates the CDC serial port is running on the same microcontroller as your sketch. This means your sketch code can break the USB code, or stop it from running.
Fortunately, there is an easy way to recover from this situation:
Press and release the reset button on your board quickly twice. You should now see the LED on the board pulsing, which means the bootloader is running. The double press causes the bootloader to run indefinitely (until the board is reset, powered off, or an upload is done), which means you don't need to get the timing of the reset just right.
Select the port of your board from the Tools > Port menu. The port number may be different when the bootloader is running so don't assume you already have the correct port selected.
Start an upload in the Arduino IDE.
The upload should now finish successfully. After this, you should be able to go back to doing normal uploads without needing to press the reset button. If you still need to do the reset trick to do uploads after this, the problem may be caused by your code. You can verify this by uploading a simple sketch like File > Examples > 01.Basics > BareMinimum.
jfsimon1981:
not can I program using tiny isp which it looks is not supported for Nano BLE.
That's correct. The USBtinyISP is only for boards of the AVR architecture like the classic Nano. It can't be used with the Nano 33 BLE. When you upgrade to the latest version of the Arduino IDE, you'll find that an improvement has been made so that programmers are only accessible when you have a compatible board selected. That was done to prevent this sort of confusing behavior of the Arduino IDE.
After entering into boot mode as mentionned, I still only see ttyS0 ttyUSB0, none of which are related to the USB powered Nano BLE, and dmesg shows no activity on usb port.
In summary, your procedure works, except I don't see the Nano at the Ports list.
The code causing the issue in the first place is simple:
Make sure the USB cable is completely plugged into both the Arduino board and the PC.
You may have a damaged/defective or charge-only USB cable. Try a different cable.
Either of the above can result in the power connections being made (and thus LED lights on the board), but no data connections (and thus no port for the board).
@pert has posted elsewhere, Arduino Nano 33 BLE damaged? - Nano 33 BLE - Arduino Forum, helping someone else who was having difficulties with their Nano, getting it to behave. I used their advice, taking the option of hooking the Nano in question up to a known good Arduino, connecting ground and tx1 from the Nano to RX1 of the known good board. I then just echoed everything the known good board received on rx1 through to Serial. The Nano will transmit at 115200b.
If the Nano in question is having problems, you’ll get an error report from mBedOS.
I have had similar problems with my Arduino environment, which is Eclipse/Sloeber on Linux Mint.
I found, that there is a kind of overlapping in using the serial port by the down-loader (bossac) and the serial monitor. My workaround was to switch off the serial monitor before programming and switch it on (selecting the port) after it. That was a stable behavior without problems.
Now I use an extra serial terminal (GtkTerm) instead of the build in serial monitor. For me, there are 3 advantages with it:
Switching terminal on and off is more easy done with F5 (on) and F6 (off).
I have a more direct communication because the keyboard is mixed with the display, not this line window to enter text and click for sending. So I developed an extra monitor class for having direct access to the CPU to do tests at run-time. It is a great help for debugging.
For testing radio communication with my own software (I do not use the BLE library of the nano board, instead I program the radio periphery directly) I need to have more Nano BLE 33 connected at the same time (on different USB ports of course). To watch their behavior I start an accordingly number of serial terminals (GtkTerm), which is working perfectly.