I can compile and upload to UNO but not NANO

In order to overcome the problem created by cheaper generic boards I am waiting for the delivery of a genuine Nano. I will not be shopping for clones again.

The boards that came from Lonely Binary. They may have all developed the same fault but that is stretching credibility a bit.

Pack of Nano R3

Board info

I would be grateful for any assistance, even if it just to confirm that the Lonely Binary Nano clones are probably faulty.

BN: Unknown board

VID: 0x0403

PID: 0x06001

SN:A50285B1A

I can compile but not upload either the program for the 20x4 LCD or the 28BYJ stepper to these Nano boards.

They will compile and upload to the Arduino Uno.

What is frustrating is that initially, by using the old boot loader, I was able to compile and upload the program for the 28BYJ stepper motor but now I get the same error message. I have tried hitting the switch a couple of times but that had no impact.

Arduino messages

Failed uploading: uploading error: exits status 1

Avrdude: ser_open(): cab”t open device [\.COM4](file://.COM4) Access is denied

1 Like

Multiple units with the same issue, and Lonely Binary as the supplier is a good clue. There are two varieties of Nano. One requires selecting ‘ATmega328P’ as the Processor. The other requires selecting ‘ATmega 328P (Old Bootloader)’ as the Processor. Worth trying.

3 Likes

Hi Robert,

Jeff is spot on here. That 100% worth a shot.

I’ve only had an access denied error when my computer was already trying to use that port but that was a difficult thing for me to troubleshoot.

Clone boards are only great because they’re cost efficient, name brand ones get some more rigorous testing before they get to sent out.

Hopefully its not a dead board here, give that other bootloader a shot.

1 Like

Thank you for your input. I am starting the feel that maybe there actually is some help I can call on.

For people my age (there are some who think I should just be sitting under a tree somewhere smoking a pipe and reflecting on a life well lived) who do not have a deep understanding of Arduino it is all a bit challenging.

I am not a tradesman and have no background in electronics or clockmaking but have now made 13 clocks using an electromagnetic control system I modified, and dare I say improved, from other people’s input using a 12f683 chip. I use a timing program one of my sons (who does know what he is doing – he is an engineer and builds his own computers but does not live in Australia) wrote for me so I can program the chip.

Many years ago, my daughter gave me a bag of marbles in my Christmas gift with a note to say that maybe I could use these marbles when I start to lose mine. The bag of marbles sat in my workshop for years until eventually, having decided that my collection of clocks in now complete, to change direction and build a unique, one of its kind, marble machine.

It has taken a coons age, but I am nearly there and am putting the finishing touches to the clock (I will not build any more) that will sit in the middle of the marble machine.

Arduino. Ah – you say he is finally getting to the point!

What I now want to do is to add some bells and whistles. I have made some (the word eclectic springs to mind) of them, for example, if you have seen Close Encounters of the Third Kind, you will remember the mother ship – I have made one of those that will flash from time to time (use a relay or nano to do that???) and a small flying saucer that spins but does not leave the ground will sit near it. That is all done.

Now I want to use Arduino to control some a couple of LED displays (one is programmed and controlled by a UNO) some RGBs etc etc.

I have been fiddling with Arduino for a while, been through countless You Tube videos and successfully copied and uploaded programs to Uno, and variously flash some LEDs, drive small stepper motors and even create text on a 20x4 LCD, the process is as exciting as it is surprising. “Gosh – it ran”.

But the pitfalls and many and the water out there is thick with sharks.

I have just spent a long time trying to get three Nanos I purchased from Lonely Binary to accept a compiled program. The result has always been the same. I am reminded of the adage about doing the same thing repeatedly but expecting a different result is the definition of insanity.

So, having tried all the bootloaders I can see on my system, spoken incantations to the Nanos, re-booted, pressed switches, changed cables, and computers, I decided that these cheap clones are duds. To restore my confidence, having failed to successfully upload these programs to Nanos, I returned to the Uno’s and, hey presto uploading complete – I have come to love those words!

It is a truism that you enjoy a reliable piece of equipment’s performance long after the price you paid for it is forgotten. So, I have sent off for a genuine Arduino Nano and it is due to arrive in a week or so.

When I look through the Core Electronics site, I see that there are other Nanos, some I think made by Core itself which are not as expensive as the genuine article – I know that making copies is permitted and common.

So, my question is: Given that I am not planning to write programmes with hundreds of lines of code but simply want my bells and whistles to ring and toot, what do you advise?

1 Like

What was the result when you selected the alternate Processor for your existing Nano modules?

1 Like

Hi Jeff

Thanks for your time.

I didn’t notice if the message in orange was different but the other was the same.

Failed uploading: uploading error: exits status 1

Avrdude: ser_open(): cab”t open device [.COM4](file://.COM4) Access is denied

On the Nano that I have managed to program, (I think it came in one of those kits newbies purchase) I had to use the old boot loader to get it to upload the program. It works normally.

Is the Com Port set by the computer or the Nano?. I wondered if changing the port would help but it only offered 1 option.

Incidentally I realised that it was this forum that sorted out the problem I was having with Liquid crystal libraries courtesy of Bill. some time ago.

I filed what he sent me under “Bills program never to be changed”. I was not the only one who was having trouble with Liquid crystal libraries and he sorted it out for anybody else as well.

Rob

1 Like

Your reference to orange text is concerning. Are you running Arduino IDE 1.8.19? Later versions (eg 2.3.0) do not properly support the Old Bootloader option for Nanos (although the error message is different). You should be running 1.8.19.

You need to confirm the serial port number that the device is using, because it seems like something else is using COM4. The simplest way to do this is to unplug the Nano and select the ‘Tools\Port’ menu option and note what ports are listed. Close the menu option, plug in the Nano, wait a moment and look at the ports option again. The correct port to use is the new one that has appeared.

You can run a similar process while looking at ‘Ports (COM & LPT)’ in Device Manager.

If the available ports list doesn’t change between plugging and unplugging the Nano then the device is not being recognised and it is a driver problem. There is lots of advice available on the interweb for solving that problem, but it can become quite messy.

The serial port number is assigned by the computer based on the driver it installs for the device that it detects. Each different device is assigned its own serial port number, which mostly stays unchanged, which is why the port numbers are not necessarily contiguous. Note that things can happen that cause the numbering to get reset, so you can’t always just do what you have done before. I would not expect that the port number assigned for your UNO would be the same as the Nano, hence the need for the check that I mention above.

FWIW the driver details for my Nanos are:
Name: USB-SERIAL CH340
Driver Manufacturer: wch.cn
Version: 3.8.2023.2
Hardware ID: USB\VID_1A86&PID_7523&REV_0264
If you see that then it tells you they should work (as Old Bootloader), but if your details are different then you can’t really draw any conclusions because there are many different varieties around.

1 Like

Good morning Jeff
Thank you again for taking the time. I do have IDE2.2.1. Should I install 1.8.19 instead or simply get a later version of Nanos?

Windows tells me my drivers are up to date.
These are the board details.

BN: Unknown board

VID: 0x0403

PID: 0x06001

SN:A50285B1A

regards

Bob

1 Like

Hi Jeff
I have just tried to upload the Nano on 1.8.19 with the same results.

I will want now for the new genuine Nano to arrive. I note that Core has a couple of cheaper Nanos and wonder if they would be worth a try?

It would be better than throwing my computer out of the window!!!

I really have appreciated your time.

regards
Rob

1 Like

Your VID/PID suggests a genuine Nano or a compliant clone, so there is no apparent reason why you are having problems. Whether or not you have to use the old bootloader depends on how old the stock is, not the hardware. Old stock should have been all shifted by now, but not all suppliers have got with the latest version. The fact that you can see the VID/PID indicates that the USB driver is working and the virtual serial port is being created properly (provided you are looking at the correct port!)

If you are connecting the Nano direct to the PC with a proper USB cable, confirming the port that appears in the listing when you connect, selecting Tools\Board: "Arduino Nano for the board, Tools\Port: with the port you confirmed, and both Tools\Processor: “Atmega328P” and Tools\Processor: “Atmega328P (Old Bootloader)” and using Sketch\Upload to upload then I can’t think of what else you can change.

If the new Nano works properly when it arrives it might be possible to get the Lonely Binary ones analyzed for the cause of the problem.

1 Like

Hi Jeff
My default position when I have a problem is that the problem is me! If the Nano is not uploading it is obviously something I am doing wrong.

But, in this case, with the same program when I change from Nano to Uno on the same com port 6, the uploading is pretty much instantaneous.

If the new nano does not upload I will bother you again, in the meantime I have taken enough of your time.

Thank you for your help.
Bob

1 Like

I hope this is not an assumption - the port number must be confirmed for each different device.

If the UNO and the Nano have the same PID/VID then then they will probably use the same port number, but it should still be checked each time.

1 Like

Thanks Jeff

I never make assumptions. Selecting tools/com port is something I do routinely.

While I am waiting for the genuine article to arrive I have one programmed Nano driving a small stepper so I can go ahead and finish that bit of my project.

I have really appreciated your time.

regards
Rob

1 Like

Hi Jeff
Just to complete this topic.

A genuine Arduino Nano arrived this morning and it has programmed perfectly.

I was not the problem. They are rubbish boardsand I will never bother Lonely Binary again.

It is unconscionable to sell rubbish parts to beginners because it destroys confidence very quickly. I automatically assume that I am the problem even although the Uno was programming normally.

There are a lot of sharks out there. I got bitten.

But it was not time wasted because I learned a lot as I tried to get a dud part to work.

The question I continue to have is what level of confidence can I have in non genuine parts or is it simpler to just purchase the original even if it is a bit more expensive?

regards
Robert

1 Like

That’s great news that you got it working so easily.

I have dealt with Lonely Binary and as far as I can recall they were no worse or better than any other. There is no real reason not to deal with the bargain basement sellers, as long as you understand what you are getting. There will be duds, old versions, out-of-date software, manufacturing errors, poor documentation, misdescriptions and outright fraud (like the multi-terabyte USB sticks that have infested EBay and Ali for months). But there is also perfectly functional components at good prices. It comes down to how familiar you are with the product, how much work you are prepared to do filtering the wheat from the chaff whether you want to deal with return procedures which the platforms and the sellers try to make as complex as possible.

IMHO tools should always come from a respected seller - cheap tools are more trouble than they are worth - and avoid batteries or items with batteries included because the capacity figures quoted are simply nonsense. I have sent a PM about moving forward with the items you have. Three dud items out of three is very unusual, and possibly indicates a widespread problem.

1 Like

thanks Jeff

I decided that reliable suppliers and brands are more important than the price you pay and applied that to pretty much everything in my workshop. Best example I can think of is Makita that just keep on going.

I am a novice when it comes to the electronics I am using and made the same mistakes I am sure other beginners have made. The last UNOs I bought were genuine and have not given any issues. I will be doing that with the Nano from now on.

Once again thanks for your help. I now have the Arduino components I need and will be able to complete my current project and then move on.

regards
Robert