Topics

The Saga continues.... uBITX v5 Firmware update

Daniel Flanagan
 

Hello again,

I now have all the tools I need to update my uBITX V5 firmware to
KD8CEC's V1.2 firmware thanks to the help of this group.

My new problem is my computer(s). I am using Windows 7 Professional
service pack 1.

I want to use XLoader to upload hex files to my uBITX V5, however I
can't get the CH340 driver to install properly. No com ports are
recognized after installation (none show up in device manager). When
I install the CH340 driver it tells me that the driver has been
installed in advance, i.e. pre-installed. When I installed the
Arduino IDE it installed a bunch of drivers. I thought that might be
the problem so I removed it (using Revo Pro which removes everything
associated with the program).

I have also tried doing this on my Windows 7 Home premium computer
with the same result. Can anyone tell me what I am missing?

Thanks,
Dan (W3DF)

AndyH
 

Dan,

   What does the computer do after you install the CH340 driver and then plug-in the USB cable connected to the Arduino?

   If it's working correctly, you won't see anything on the desktop or lower right status area.  To see if the Arduino has been assigned a port, you'll have to hit the control panel, then Device Manager, and look at Ports (COM & LPT).  (The image is from a Win 10 ultimate machine but it behaves the same as my remaining Win 7 box.)

   If the driver isn't loaded correctly, or there's a problem with a particular USB port, you'll get an error pop-up in the lower right of the desktop when you connect the Arduino.  Sometimes, using a different USB port is enough to 'force' Windows to reload/reconfigure the driver - that will usually make it work in all USB ports.

73, Andy, KG5RKP



   

Daniel Flanagan
 

OK thanks... well after much head scratching I discovered you have to
have the Arduino Nano connected into a usb port before it shows up as
a com port in device manager.

Now Xloader opens the com port and when I hit upload the led on the
nano blinks a couple of times then stops and it just sits there with
the led on. I have tried two different com ports from my two usb
ports, one is com 4 the other com 5. Both do the same thing.

How should the port be configured?

They are configured as follows:

Data bits 8
Parity None
Stop bits 1
Flow control None
In Advance settings.... Use FIFO buffers is checked (requires 16550
compatible UART)

The port was originally set at 9600 baud.... I set it for 115200
Neither setting works

Any ideas?

On 2/13/20, AndyH <ahecker@...> wrote:
Dan,

What does the computer do after you install the CH340 driver and then
plug-in the USB cable connected to the Arduino?

If it's working correctly, you won't see anything on the desktop or lower
right status area.  To see if the Arduino has been assigned a port, you'll
have to hit the control panel, then Device Manager, and look at Ports (COM &
LPT).  (The image is from a Win 10 ultimate machine but it behaves the same
as my remaining Win 7 box.)

If the driver isn't loaded correctly, or there's a problem with a particular
USB port, you'll get an error pop-up in the lower right of the desktop when
you connect the Arduino.  Sometimes, using a different USB port is enough to
'force' Windows to reload/reconfigure the driver - that will usually make it
work in all USB ports.

73, Andy, KG5RKP



N0YWB
 

Windows 7 and Windows 10 will normally automatically install the CH340 driver the first time you connect the Nano or UNO to your PC.
If you have uninstalled driver with the remove files option, You can get the CH340 drivers at
https://cdn.sparkfun.com/assets/learn_tutorials/8/4/4/CH341SER.EXE
Instructions (read past the ads):
https://learn.sparkfun.com/tutorials/how-to-install-ch340-drivers/all

There is no need to uninstall the Arduino IDE to be able to use XLoader or other loaders.
In fact, you can use the AVRdude utility in the Arduino installation to load hex files:
https://forum.arduino.cc/index.php?topic=410618.0

On 2/13/2020 09:38, Daniel Flanagan wrote:
Hello again,

I now have all the tools I need to update my uBITX V5 firmware to
KD8CEC's V1.2 firmware thanks to the help of this group.

My new problem is my computer(s). I am using Windows 7 Professional
service pack 1.

I want to use XLoader to upload hex files to my uBITX V5, however I
can't get the CH340 driver to install properly. No com ports are
recognized after installation (none show up in device manager). When
I install the CH340 driver it tells me that the driver has been
installed in advance, i.e. pre-installed. When I installed the
Arduino IDE it installed a bunch of drivers. I thought that might be
the problem so I removed it (using Revo Pro which removes everything
associated with the program).

I have also tried doing this on my Windows 7 Home premium computer
with the same result. Can anyone tell me what I am missing?

Thanks,
Dan (W3DF)

N0YWB
 

Some Arduino Nano boards require the old bootloader the first time.
Choose Processor > "ATmega328P (Old Bootloader)", and press the reset button on the Nano.
Thereafter, the new bootloader should be in the Nano, and reset should be necessary.

On 2/13/2020 11:53, Daniel Flanagan wrote:
OK thanks... well after much head scratching I discovered you have to
have the Arduino Nano connected into a usb port before it shows up as
a com port in device manager.

Now Xloader opens the com port and when I hit upload the led on the
nano blinks a couple of times then stops and it just sits there with
the led on.  I have tried two different com ports from my two usb
ports, one is com 4 the other com 5.  Both do the same thing.

How should the port be configured?

They are configured as follows:

Data bits  8
Parity  None
Stop bits  1
Flow control  None
In Advance settings.... Use FIFO buffers is checked (requires 16550
compatible UART)

The port was originally set at 9600 baud.... I set it for 115200
Neither setting works

Any ideas?





On 2/13/20, AndyH <ahecker@...> wrote:
Dan,

What does the computer do after you install the CH340 driver and then
plug-in the USB cable connected to the Arduino?

If it's working correctly, you won't see anything on the desktop or lower
right status area.  To see if the Arduino has been assigned a port, you'll
have to hit the control panel, then Device Manager, and look at Ports (COM &
LPT).  (The image is from a Win 10 ultimate machine but it behaves the same
as my remaining Win 7 box.)

If the driver isn't loaded correctly, or there's a problem with a particular
USB port, you'll get an error pop-up in the lower right of the desktop when
you connect the Arduino.  Sometimes, using a different USB port is enough to
'force' Windows to reload/reconfigure the driver - that will usually make it
work in all USB ports.

73, Andy, KG5RKP






N0YWB
 

Typo correction:

Some Arduino Nano boards require the old bootloader the first time.
From the Arduino IDE, choose Processor > "ATmega328P (Old Bootloader)", and press the reset button on the Nano. The Arduino IDE will also load the new bootloader in EEPROM (XLoader and other tools may not do this).
Thereafter, the new bootloader should be in the Nano, and pressing reset should NOT be necessary.

Read about 1/3 of the way down, at https://www.arduino.cc/en/Guide/ArduinoNano

NOTE: We have updated the NANO board with a fresh bootloader. Boards sold from us from January 2018 have this new bootloader, while boards manufactured before that date have the old bootloader.

On 2/13/2020 12:46, N0YWB via Groups.Io wrote:
Some Arduino Nano boards require the old bootloader the first time.
Choose Processor > "ATmega328P (Old Bootloader)", and press the reset button on the Nano.
Thereafter, the new bootloader should be in the Nano, and reset should be necessary.

On 2/13/2020 11:53, Daniel Flanagan wrote:
OK thanks... well after much head scratching I discovered you have to
have the Arduino Nano connected into a usb port before it shows up as
a com port in device manager.

Now Xloader opens the com port and when I hit upload the led on the
nano blinks a couple of times then stops and it just sits there with
the led on.  I have tried two different com ports from my two usb
ports, one is com 4 the other com 5.  Both do the same thing.

How should the port be configured?

They are configured as follows:

Data bits  8
Parity  None
Stop bits  1
Flow control  None
In Advance settings.... Use FIFO buffers is checked (requires 16550
compatible UART)

The port was originally set at 9600 baud.... I set it for 115200
Neither setting works

Any ideas?





On 2/13/20, AndyH <ahecker@...> wrote:
Dan,

What does the computer do after you install the CH340 driver and then
plug-in the USB cable connected to the Arduino?

If it's working correctly, you won't see anything on the desktop or lower
right status area.  To see if the Arduino has been assigned a port, you'll
have to hit the control panel, then Device Manager, and look at Ports (COM &
LPT).  (The image is from a Win 10 ultimate machine but it behaves the same
as my remaining Win 7 box.)

If the driver isn't loaded correctly, or there's a problem with a particular
USB port, you'll get an error pop-up in the lower right of the desktop when
you connect the Arduino.  Sometimes, using a different USB port is enough to
'force' Windows to reload/reconfigure the driver - that will usually make it
work in all USB ports.

73, Andy, KG5RKP





      

AndyH
 

Gah...I lost my entire response because I tried to attach a batch file.  Let's see...what did I type last time?  hihi

I can program a nano from the Arduino IDE.  Like you, I can no longer flash that nano with xloader.  Crud.

Ok, plan B!

In the folder with xloader you should also see avrdude files.  avrdude is a command line flash utility that works well even when xloader doesn't.

Here's a command string that works:
avrdude -C avrdude.conf -v -p atmega328p -c stk500 -P COM9 -b 57600 -D -U flash:w:UBITX_CEC_V1.100_16D.hex:i
You'll need to paste it into notepad (not wordpad or a regular word process as they include hidden characters), update the COM port number (mine's 9) and thename of the .hex file you want to upload, then save the batch file (load.bat, for example) into the same folder/directory as avrdude. when you edit the file name, make sure the flash:w: remains, as well as :i at the end.  Leave the rest, including the 57600 baud rate.

With this batch file and the .hex file you want to load in the same folder as avrdude, open a command prompt.  (Search for cmd.exe.)  You may have to change to the drive letter your avrdude files are on.  Mine are on I:. Yours might be on C: or D:.  To change drives, enter the letter and colon, and press enter.  Then change directories to the avrdude files.  You can start typing and hit tab to auto-complete for long directory names.  cd xloader<enter>.  When you think you're in the correct directory, type dir to see a directory listing.  When you know you're in the right place, type the name of your batch file (load.bat, for example) and watch the file transfer and be verified.

Good luck!
Andy

AndyH
 

You can also open a command prompt, change to the folder with your .hex files and the avrdude utility, and type the command string manually as well - it'll work the same as executing the batch file.

73, Andy


On Thu, Feb 13, 2020 at 01:51 PM, AndyH wrote:
Gah...I lost my entire response because I tried to attach a batch file.  Let's see...what did I type last time?  hihi

I can program a nano from the Arduino IDE.  Like you, I can no longer flash that nano with xloader.  Crud.

Ok, plan B!

In the folder with xloader you should also see avrdude files.  avrdude is a command line flash utility that works well even when xloader doesn't.

Here's a command string that works:
avrdude -C avrdude.conf -v -p atmega328p -c stk500 -P COM9 -b 57600 -D -U flash:w:UBITX_CEC_V1.100_16D.hex:i
You'll need to paste it into notepad (not wordpad or a regular word process as they include hidden characters), update the COM port number (mine's 9) and thename of the .hex file you want to upload, then save the batch file (load.bat, for example) into the same folder/directory as avrdude. when you edit the file name, make sure the flash:w: remains, as well as :i at the end.  Leave the rest, including the 57600 baud rate.

With this batch file and the .hex file you want to load in the same folder as avrdude, open a command prompt.  (Search for cmd.exe.)  You may have to change to the drive letter your avrdude files are on.  Mine are on I:. Yours might be on C: or D:.  To change drives, enter the letter and colon, and press enter.  Then change directories to the avrdude files.  You can start typing and hit tab to auto-complete for long directory names.  cd xloader<enter>.  When you think you're in the correct directory, type dir to see a directory listing.  When you know you're in the right place, type the name of your batch file (load.bat, for example) and watch the file transfer and be verified.

Good luck!
Andy

Daniel Flanagan
 

Thanks for the alternative method.... I have been able to upload a hex
file after uploading the old bootloader in the IDE and hitting the
nano reset button. XLoader seems a bit finicky... The examples use
57600 and XLoader defaults to that rate but it didn't work. I
switched to 115200 it uploads OK....

Boy am I glad I am doing this on a spare Nano board.... not the one in my uBITX.

Does plugging / unplugging from the USB port when things are hung up
do any potential damage? I've probably done this 25 times today.

Thanks much for all the help. I'll next try to upload the CEC V1.2 to
my spare board.

73, Dan (W3DF)

On 2/13/20, AndyH <ahecker@...> wrote:
You can also open a command prompt, change to the folder with your .hex
files and the avrdude utility, and type the command string manually as well
- it'll work the same as executing the batch file.

73, Andy

On Thu, Feb 13, 2020 at 01:51 PM, AndyH wrote:


Gah...I lost my entire response because I tried to attach a batch file.
Let's see...what did I type last time?  hihi

I can program a nano from the Arduino IDE.  Like you, I can no longer
flash that nano with xloader.  Crud.

Ok, plan B!

In the folder with xloader you should also see avrdude files.  avrdude is
a command line flash utility that works well even when xloader doesn't.

Here's a command string that works:
avrdude -C avrdude.conf -v -p atmega328p -c stk500 -P COM9 -b 57600 -D
-U
flash:w:UBITX_CEC_V1.100_16D.hex:i
You'll need to paste it into notepad (not wordpad or a regular word
process as they include hidden characters), update the COM port number
(mine's 9) and thename of the .hex file you want to upload, then save the
batch file (load.bat, for example) into the same folder/directory as
avrdude. when you edit the file name, make sure the flash:w: remains, as
well as :i at the end.  Leave the rest, including the 57600 baud rate.

With this batch file and the .hex file you want to load in the same
folder
as avrdude, open a command prompt.  (Search for cmd.exe.)  You may have
to
change to the drive letter your avrdude files are on.  Mine are on I:.
Yours might be on C: or D:.  To change drives, enter the letter and
colon,
and press enter.  Then change directories to the avrdude files.  You can
start typing and hit tab to auto-complete for long directory names.  cd
xloader<enter>.  When you think you're in the correct directory, type dir
to see a directory listing.  When you know you're in the right place,
type
the name of your batch file (load.bat, for example) and watch the file
transfer and be verified.

Good luck!
Andy