Topics

Current Firmware

Tom, wb6b
 

Hi Dennis,

Regarding the "failed to upload" message.

Both the Mac and many Windows machines need a driver installed to upload to the Raduino Nano board. Here is a somewhat random list of links to drivers I found doing a search of the BITX20 postings. If anyone has had success with these or another link, please chime in.

In some cases people have these drivers on their computers because they have installed software for a product that uses the same USB to Serial chip.

https://github.com/adrianmihalko/ch340g-ch34g-ch34x-mac-os-x-driver 
http://esp32.net/usb-uart/
http://www.wch.cn/download/CH341SER_ZIP.html
http://www.cesareriva.com/usb-to-serial-converter-hl-340-drivers/
CH340 Drivers for Windows, Mac and Linux.

Tom, wb6b



Dennis Yancey <bigbluedry@...>
 

Also, once you have the files extracted , it should have created a sub directory. That sub directory name is the same as the main file. Another thing that ishelpful is. If you try to load any .ino file in that directory. IDE, at least in Linux, will load the main file. So, it is hard to not load the correct file. 

Jack, W8TEE
 

Dennis:

For the Win 7 machine, unpack the ZIP file into a temporary directory. With the Arduino IDE (or a text editor), open each INO file until you find the one that holds both the setup() and loop() functions. This file is the "primary" ino file. Let's assume it is named ubitx_20.ino

I would suggest creating a root directory for the software named uBITXCode, probably on the C drive. So you would have:

     C:/uBITXCode

The Arduino compiler DEMANDS that the directory that holds the project code have the exact same name as the primary file name. Therefore, create a subdirectory with that name:

     C:/uBITXCode/ubitx_20

Now, copy ALL of the project files into that new directory:

    C:/uBITXCode/ubitx_20/ubitx_20.ino
                                            ubitx_cat.ino
                                            ubitx_menu.ino
                                            // ...and so on

Now, start the IDE and click the Open menu option and navigate to the directory and double-click on unbitx_20.ino. The IDE will open the project and automatically create tabs for every file in the project, with the primary file being located in the first tab on the left side of the screen. Then just connect your USB cable to the Arduino and your PC, select the proper board (Tools --> Boards) and port (Tools --> port) and you should be ready to compile and upload the project.

Jack, W8TEE



On Thursday, June 7, 2018, 11:13:17 AM EDT, Dennis <dennis@...> wrote:


Hi Armin,

1. The file I used from Gary was an ino file. (he also sent along a hex file, but I couldn't get ArduinoBuilder to work)
2. I originally used the zip file from Github - this file contained several ino files - I didn't (don't) know how to compile them altogether to create one compiled file to upload to the Arduino.
3. I am using Arduino IDE on three different machines.
issue with the mac - I would get a "failed to upload" message. This seems to be a port assignment issue.
issue with the win10 machine - I would get a "failed to upload" message. Again this seems to be a port assignment issue, but I didn't spend the time to try and resolve the issue.
Win 7 machine ran without issue after I properly assigned the port.
I couldn't get Arduino Builder to work on the Mac again I suspect a port assignment issue as within the port pull down menu there were no ports to assign.

My most pressing questions are: 1. how to assign the port on the Mac and 2. how do I compile the several files included in the zip file from GitHub into one combined file for upload.

Thanks for you help,

73, Dennis
W7DRW

Dennis
 

Hi Armin,

1. The file I used from Gary was an ino file. (he also sent along a hex file, but I couldn't get ArduinoBuilder to work)
2. I originally used the zip file from Github - this file contained several ino files - I didn't (don't) know how to compile them altogether to create one compiled file to upload to the Arduino.
3. I am using Arduino IDE on three different machines.
issue with the mac - I would get a "failed to upload" message. This seems to be a port assignment issue.
issue with the win10 machine - I would get a "failed to upload" message. Again this seems to be a port assignment issue, but I didn't spend the time to try and resolve the issue.
Win 7 machine ran without issue after I properly assigned the port.
I couldn't get Arduino Builder to work on the Mac again I suspect a port assignment issue as within the port pull down menu there were no ports to assign.

My most pressing questions are: 1. how to assign the port on the Mac and 2. how do I compile the several files included in the zip file from GitHub into one combined file for upload.

Thanks for you help,

73, Dennis
W7DRW

DJ2AG
 

I’m trying to help you make it run on your Mac and for this have some questions, if you don’t mind.

So you got a hex file or a ino file from Gary and you had to use Windows for uploading or compiling and uploading?
Did you use the Arduino IDE on Windows for this or used the ArduinoBuilder?
It’s  somewhat confusing.

i don’t think it’s a problem with your Mac if compilation fails. A lot of people, including me use Macs for Arduino development without problems. 

First you need to have a proper C ( ino) file, which according to the errors you posted is not the case. You are trying to compile a file with  html content, so as already mentioned before obviously something went wrong with your download. The same file compiled under Windows would als have thrown errors.

Did you use the downloaded  zip file from GitHub or used another method to fetch the files?

73 Armin, DJ2AG

Dennis
 

Just an update - I was able to load 4.3 onto the Arduino Nano by using the file Gary sent me. I used a Windows 7 machine to accomplish this. I don't think the Mac is well suited for uploading to the Arduino - at least in my shack.

73, Dennis
W7DRW

Art Olson
 

Dennis

If you get a hex file use the loader see link below





On Jun 6, 2018, at 1:14 PM, Tom, wb6b <wb6b@...> wrote:

Hi Dennis,

It looks like what you are trying to compile is, the code you would see if you clicked on "view source code" in your browser while looking at the code on GitHub. Of course, it is possible that something was temporary wrong at GitHub when you tried to download the code.

Try this link to download the zip file for the code. https://github.com/afarhan/ubitx4/archive/master.zip

I believe the CEC firmware has compiled HEX files available. There were instructions for how to install a program on Windows that could program an Arduino from the HEX file. In my case, as I have a Mac, it was just easier to compile the CEC software and upload it from the Arduino Sketch. 

Hopefully the number of errors you get, if any, will be simple "not found" errors as Jack mentioned. Those would be the libraries you would install from the "Sketch", "Include Library", "Manage Libraries" dropdown. Jack also points out that libraries can be downloaded directly from URLs, but I think anything needed for the factory firmware would be obtainable using the Sketch user interface.

Hang in there, much of programming and compiling seems counterintuitive. But, once you begin find your way around it starts to make sense. Once it all makes sense you've gone off the deep end and become a real programmer.

Side note: Hmmm. Maybe all those dire warnings about Microsoft and GitHub have so quickly become reality. After all, look at the first error:
"warning: missing terminating ' character
    Microsoft is acquiring GitHub!"

The deal hasn't even closed yet, and here we are...

Tom, wb6b

Arv Evans
 

Jerry

Sounds like a good reason to save the pre-processor output and name it filename.ino
This way you only need the libraries once and can dispense with the #include <library.h>
stuff for future compiles.  You can even check it back into the repository and eliminate
the need for repository based libraries for your project.

Arv
_._


On Wed, Jun 6, 2018 at 11:48 AM Jerry Gaffke via Groups.Io <jgaffke=yahoo.com@groups.io> wrote:
One problem with libraries is that they change.
Sometimes stuff simply disappears off web. 
Good luck building the original Bitx40 code of Dec 2016 (the etherkit si5351 library has changed).

A good reason for libraries is they can give portability across various processors.
Another is that they allow software to be quickly developed, no need to reinvent how to do stuff
or even figure out how it works.

But for production code, the fewer libraries getting sucked in the happier I am.

Jerry



On Wed, Jun 6, 2018 at 10:30 am, Jack Purdum wrote:
I would start by urging programmers to follow the convention I mentioned earlier, which is to provide the download URL for any non-Arduino libraries on the same line as their #include directive. Then at least you've know where to go to download the required libraries.
 

Jerry Gaffke
 

One problem with libraries is that they change.
Sometimes stuff simply disappears off web. 
Good luck building the original Bitx40 code of Dec 2016 (the etherkit si5351 library has changed).

A good reason for libraries is they can give portability across various processors.
Another is that they allow software to be quickly developed, no need to reinvent how to do stuff
or even figure out how it works.

But for production code, the fewer libraries getting sucked in the happier I am.

Jerry



On Wed, Jun 6, 2018 at 10:30 am, Jack Purdum wrote:
I would start by urging programmers to follow the convention I mentioned earlier, which is to provide the download URL for any non-Arduino libraries on the same line as their #include directive. Then at least you've know where to go to download the required libraries.
 

Jack, W8TEE
 

So how do we beginners determine which libraries are missing and where to find them?

I would start by urging programmers to follow the convention I mentioned earlier, which is to provide the download URL for any non-Arduino libraries on the same line as their #include directive. Then at least you've know where to go to download the required libraries.

Jack, W8TEE

On Wednesday, June 6, 2018, 11:07:57 AM EDT, Dennis <dennis@...> wrote:


On Wed, Jun 6, 2018 at 06:29 am, Jack Purdum wrote:
Missing libraries is a very common error that beginners make
So how do we beginners determine which libraries are missing and where to find them? I'm going to try this exercise on a win10 machine later today. Perhaps it will work better than the mac. I don't understand why we can't be provided with a single compiled file to upload to the Arduino. I would suspect that most hams are not accomplished programmers.

Tom, wb6b
 

Hi Dennis,

It looks like what you are trying to compile is, the code you would see if you clicked on "view source code" in your browser while looking at the code on GitHub. Of course, it is possible that something was temporary wrong at GitHub when you tried to download the code.

Try this link to download the zip file for the code. https://github.com/afarhan/ubitx4/archive/master.zip

I believe the CEC firmware has compiled HEX files available. There were instructions for how to install a program on Windows that could program an Arduino from the HEX file. In my case, as I have a Mac, it was just easier to compile the CEC software and upload it from the Arduino Sketch. 

Hopefully the number of errors you get, if any, will be simple "not found" errors as Jack mentioned. Those would be the libraries you would install from the "Sketch", "Include Library", "Manage Libraries" dropdown. Jack also points out that libraries can be downloaded directly from URLs, but I think anything needed for the factory firmware would be obtainable using the Sketch user interface.

Hang in there, much of programming and compiling seems counterintuitive. But, once you begin find your way around it starts to make sense. Once it all makes sense you've gone off the deep end and become a real programmer.

Side note: Hmmm. Maybe all those dire warnings about Microsoft and GitHub have so quickly become reality. After all, look at the first error:
"warning: missing terminating ' character
    Microsoft is acquiring GitHub!"

The deal hasn't even closed yet, and here we are...

Tom, wb6b

Gary Anderson
 

Too bad the Arduino IDE doesn't have a GUI interface to 'upload' a .hex (or .elf) file.
    This would make it easy to share a single 'compiled file'/ machine code and you could just upload to the Arduino.
    Easy enough to share the .hex, but the next battle will be you figuring out how to upload it.
There is software available for a P.C. that does
https://sourceforge.net/projects/arduinodev/files/ArduinoBuilder/
But I haven't found such for a mac, or have a way to test using an intel based 'modern' mac.

You don't have to be an accomplished 'C programmer' to use the Arduino IDE.

I don't see any libraries used in Farhan's supplied code that isn't part of the standard Arduino IDE.

Dennis,
I'd be happy to send you a single 'flat' ino file (the one that the Arduino IDE creates during the compile / linking process) in a private mail if this makes things easier for you to get going.
If you would like this, send me your email address by responding to this post with the "private" button, and I will send you a single file sketch.
I did not clean up the code that generates the compiler warnings.  I have checked that the single flat file  compiles and links.

Regards,
Gary

Dennis
 

On Wed, Jun 6, 2018 at 06:29 am, Jack Purdum wrote:
Missing libraries is a very common error that beginners make
So how do we beginners determine which libraries are missing and where to find them? I'm going to try this exercise on a win10 machine later today. Perhaps it will work better than the mac. I don't understand why we can't be provided with a single compiled file to upload to the Arduino. I would suspect that most hams are not accomplished programmers.

Jack, W8TEE
 

Missing libraries is a very common error that beginners make. In many cases, the programmer(s) who wrote the code supply the URL for libraries that are not distributed as part of the Arduino IDE. For example, this is near the top of the prototype header file in JackAl:

#include <Arduino.h>          // Standard with IDE
#include <EEPROM.h>           // Standard with IDE
#include <math.h>             // Standard with IDE
#include <SD.h>               // Standard with IDE
#include <Wire.h>             // Standard with IDE
#include <SPI.h>              // Standard with IDE
#include <stdio.h>            // Standard with IDE

#include <OpenAudio_ArduinoLibrary.h> // https://github.com/chipaudette/OpenAudio_ArduinoLibrary

#include <Adafruit_GFX.h>     // https://github.com/adafruit/Adafruit-GFX-Library
#include <Audio.h>            // https://github.com/PaulStoffregen/Audio
#include <RA8875.h>           // https://github.com/sumotoy/RA8875
#include <Rotary.h>           // https://github.com/brianlow/Rotary
#include <SerialFlash.h>      // https://github.com/PaulStoffregen/SerialFlash
#include <Time.h>             // https://github.com/PaulStoffregen/Time
#include <TimeLib.h>          // Part of Stoffregen library, done for backward compatibility
#include <TimerOne.h>         // Distributed with Teensy
#include <UTFT.h>             // http://www.rinkydinkelectronics.com/library.php?id=51
#include <URTouch.h>          // http://www.rinkydinkelectronics.com/library.php?id=92
#include <UTFT_Buttons.h>     // http://www.rinkydinkelectronics.com/library.php?id=61

If you get an error message stating that something "is not found", quite often it is a missing library. Providing a URL avoids confusion in locating the proper library because, in many cases, there are multiple libraries that use the same name (e.g., LiquidCrystal).

Jack, W8TEE


On Tuesday, June 5, 2018, 11:24:24 PM EDT, Tom, wb6b <wb6b@...> wrote:


Does the ubitx code rely on other libraries like "wire"? Missing libraries are a common cause of compile errors. 

I have installed many libraries over time, I may have needed dependencies already installed, so I don't know if the code won't compile for need of libraries when people are starting from scratch. 

Go to "Sketch", "Include Library", "Manage Libraries" to find libraries you may need. The error messages should mention what can't be found, and needed to be installed.

Ton, wb6b

Jack, W8TEE
 

Even on a  Mac, this looks like the wrong directory structure. (See first Yellow below.) This has been discussed here before. The second Yellow line suggests that a non-source file is compiling. Have no clue what that's about.


Jack, W8TEE

On Wednesday, June 6, 2018, 12:24:27 AM EDT, Dennis <dennis@...> wrote:


Hi Gary,
The following is the first of 8 pages of errors/warnings:
"

Arduino: 1.8.5 (Mac OS X), Board: "Arduino Nano, ATmega328P"

 

ubitx_cat.cpp:30: error: stray '\302' in program

  <title>ubitx4/ubitx_cat.ino at master · afarhan/ubitx4</title>

   ^

ubitx_cat.cpp:30: error: stray '\267' in program

sketch/ubitx_cat.cpp:131:367: warning: missing terminating ' character

   Microsoft is acquiring GitHub! <a href="https://blog.github.com/2018-06-04-github-microsoft/" class="text-bold text-white" data-ga-click="MS banner, click, link - text:Read our blog">Read our blog</a> and <a href="https://blogs.microsoft.com/?p=52553832" class="text-bold text-white" data-ga-click="MS banner, click, link - text:Satya Nadella's post">Satya Nadella's post</a> to learn more.

                                                                                                                                                                                                                                                                                                                                                                              ^

ubitx_cat.cpp:131: error: missing terminating ' character

   Microsoft is acquiring GitHub! <a href="https://blog.github.com/2018-06-04-github-microsoft/" class="text-bold text-white" data-ga-click="MS banner, click, link - text:Read our blog">Read our blog</a> and <a href="https://blogs.microsoft.com/?p=52553832" class="text-bold text-white" data-ga-click="MS banner, click, link - text:Satya Nadella's post">Satya Nadella's post</a> to learn more.

   ^

sketch/ubitx_cat.cpp:134:16: warning: missing terminating ' character

           <!-- '"` --><!-- </textarea></xmp> --></option></form><form data-remote="true" class="js-notice-dismiss" action="/settings/dismiss-notice/generic_site_banner" accept-charset="UTF-8" method="post"><input name="utf8" type="hidden" value="&#x2713;" /><input type="hidden" name="authenticity_token" value="4nneNjpLRGXeOjfsjQDIXjjJeRqb0BUhZekajl15HLz0ReoE/ZJe9X1xthO2thzPOjGdUvYRWYdsI1ihjIKr1w==" />

                ^

ubitx_cat.cpp:134: error: missing terminating ' character

           <!-- '"` --><!-- </textarea></xmp> --></option></form><form data-remote="true" class="js-notice-dismiss" action="/settings/dismiss-notice/generic_site_banner" accept-charset="UTF-8" method="post"><input name="utf8" type="hidden" value="&#x2713;" /><input type="hidden" name="authenticity_token" value="4nneNjpLRGXeOjfsjQDIXjjJeRqb0BUhZekajl15HLz0ReoE/ZJe9X1xthO2thzPOjGdUvYRWYdsI1ihjIKr1w==" />

           ^

sketch/ubitx_cat.cpp:164:10: warning: missing terminating ' character

     <!-- '"` --><!-- </textarea></xmp> --></option></form><form class="js-site-search-form" data-scope-type="Repository" data-scope-id="134364585" data-scoped-search-url="/afarhan/ubitx4/search" data-unscoped-search-url="/search" action="/afarhan/ubitx4/search" accept-charset="UTF-8" method="get"><input name="utf8" type="hidden" value="&#x2713;" />

          ^
"
73, Dennis
W7DRW

Gary Anderson
 

Dennis,
It looks like you are trying to compile the GetHub HTML page.
Possibly,  you downloaded the web page and saved as a file called 'ubitx_cat.cpp', etc?

https://github.com/afarhan/ubitx4

then click on the Green Button 'Clone or download' button.
and download the zip file with all the files
.

William Cullison
 

I always figure it out but I didn't realize what defined the main project file.

73 Bill WA8VIH/4

On Tue, Jun 5, 2018 at 4:44 PM, Karl Heinz Kremer, K5KHK <khk@...> wrote:
Actually, all of them are "the file": You need all the .ino files in one folder, which needs to be named after the base name of the main file. In this case, when you go to https://github.com/afarhan/ubitx4, you will see that the main file is ubitx_v4.3_code.ino, which means that all these files need to be in a folder named ubitx_v4.3_code 

How do I know that this is the main project file? Because it is the only one that contains the setup() and loop() functions. They are an integral part of an Arduino "sketch". 
--
Karl Heinz - K5KHK


DJ2AG
 

Dennis, how did you download the sketch? The ubitx_cat.cpp doesn’t look like c code. It’s more like part of GitHub website code. Could happen if one use right click on the file for downloading instead using the green button firbclonenor zip download.
Which git repository were you using? I don’t see *.cpp files in Ashars repository, only *.ino Files.

73 Armin, DJ2AG

Dennis
 

Hi Gary,
The following is the first of 8 pages of errors/warnings:
"

Arduino: 1.8.5 (Mac OS X), Board: "Arduino Nano, ATmega328P"

 

ubitx_cat.cpp:30: error: stray '\302' in program

  <title>ubitx4/ubitx_cat.ino at master · afarhan/ubitx4</title>

   ^

ubitx_cat.cpp:30: error: stray '\267' in program

sketch/ubitx_cat.cpp:131:367: warning: missing terminating ' character

   Microsoft is acquiring GitHub! <a href="https://blog.github.com/2018-06-04-github-microsoft/" class="text-bold text-white" data-ga-click="MS banner, click, link - text:Read our blog">Read our blog</a> and <a href="https://blogs.microsoft.com/?p=52553832" class="text-bold text-white" data-ga-click="MS banner, click, link - text:Satya Nadella's post">Satya Nadella's post</a> to learn more.

                                                                                                                                                                                                                                                                                                                                                                              ^

ubitx_cat.cpp:131: error: missing terminating ' character

   Microsoft is acquiring GitHub! <a href="https://blog.github.com/2018-06-04-github-microsoft/" class="text-bold text-white" data-ga-click="MS banner, click, link - text:Read our blog">Read our blog</a> and <a href="https://blogs.microsoft.com/?p=52553832" class="text-bold text-white" data-ga-click="MS banner, click, link - text:Satya Nadella's post">Satya Nadella's post</a> to learn more.

   ^

sketch/ubitx_cat.cpp:134:16: warning: missing terminating ' character

           <!-- '"` --><!-- </textarea></xmp> --></option></form><form data-remote="true" class="js-notice-dismiss" action="/settings/dismiss-notice/generic_site_banner" accept-charset="UTF-8" method="post"><input name="utf8" type="hidden" value="&#x2713;" /><input type="hidden" name="authenticity_token" value="4nneNjpLRGXeOjfsjQDIXjjJeRqb0BUhZekajl15HLz0ReoE/ZJe9X1xthO2thzPOjGdUvYRWYdsI1ihjIKr1w==" />

                ^

ubitx_cat.cpp:134: error: missing terminating ' character

           <!-- '"` --><!-- </textarea></xmp> --></option></form><form data-remote="true" class="js-notice-dismiss" action="/settings/dismiss-notice/generic_site_banner" accept-charset="UTF-8" method="post"><input name="utf8" type="hidden" value="&#x2713;" /><input type="hidden" name="authenticity_token" value="4nneNjpLRGXeOjfsjQDIXjjJeRqb0BUhZekajl15HLz0ReoE/ZJe9X1xthO2thzPOjGdUvYRWYdsI1ihjIKr1w==" />

           ^

sketch/ubitx_cat.cpp:164:10: warning: missing terminating ' character

     <!-- '"` --><!-- </textarea></xmp> --></option></form><form class="js-site-search-form" data-scope-type="Repository" data-scope-id="134364585" data-scoped-search-url="/afarhan/ubitx4/search" data-unscoped-search-url="/search" action="/afarhan/ubitx4/search" accept-charset="UTF-8" method="get"><input name="utf8" type="hidden" value="&#x2713;" />

          ^
"
73, Dennis
W7DRW

Gary Anderson
 

Dennis,
Warnings are not errors.  If it compiles and links you are most likely all good to go.
This code has obviously been used and tested by others.
As far as warnings go, all that matters is that the assembly code generated works the way it is intended to work.

If this was a commercial radio, you would have bought it without open source firmware, and never even considered if the source code was warning free on compile.
You just care that it works as intended.

If you are getting 50 "Errors", something else is going wrong for you.
If you post the Errors, maybe someone could help you.

Regards,
Gary