Skip to main content

How to use uBITX Manager for original source code

This is a guide for uBITX's original firmware (or source code) users to use uBITX memory manager.
Unfortunately, the original source can not be used as it is.



If you use my firmware (CEC Version) that I distribute today, do not read this article. This is because CAT communication as well as memory control is fully implemented.

Again, this article is for those who are using the original source code.

You can use uBITX Manager by adding a few lines to the original source code.

You can choose one of 3 ways.
1. Adding Protocols to the Original Firmware
1.1 It's the easiest way.
  Click the link below to download the firmware. And you can update.
  https://drive.google.com/open?id=11AQ5zKFLNdZckME6WUZhG94C9oUdD_0J

  How to update the firmware can be seen by clicking the link below.
 http://www.hamskey.com/2018/01/how-to-upgrade-ubitx-firmware.html

  The compiled firmware is only a protocol that allows memory access to the original source.
You can recover to the original at any time as instructed in the link above. Do not worry.

1.2 You are already using the uBITX source code.
 Add the following to the source code ubitx_cat.


The source code is just read and write memory through CAT, like CAT communications from traditional radio companies.
You do not need to type in the picture above. Click the link below to download the modified ubitx_cat.

https://drive.google.com/open?id=1SiYV5cvQWpb2oCbshaNKjN7Hp9ZbPfVB

Just copy that part and paste it into your firmware.

1.3 It is the person who will study Arduino from today with original firmware.
I just download the original source and download the source that added protocol to CAT communication.

https://github.com/afarhan/ubitx
It is downloaded from here and only the part of ubitx_cat is modified and compressed again.

https://drive.google.com/open?id=1FI2UuT0ukao_mIOcNMb66qcjHOKvvRRe



2.Download uBITX Manager

you can download the uBITX Manager by click below lick
https://drive.google.com/open?id=1IpAAKdfV4TJPjaVP9fUkwR4HbvwcsUY1



Extract downloaded file


3.Run uBITX Manager
you can uBITX_Manager.exe, double click this program.



you will can see below picture.


4.Connecting uBITX from uBITX Manager
Connect your uBITX to your computer.


Select the comport(serial port) that your uBITX is connected to.
If you are not sure, please refer to the link below.
http://www.hamskey.com/2018/01/how-to-upgrade-ubitx-firmware.html


Set baudrate to 9600, Must be 9600. The original source communicates at 9600 bps.

Click to Connect button, (Wait 2~3 second) You will then see the Read From uBITX button activated.


I made a delay of two or three seconds when I wrote the program and made it active.
Because uBITX (arduno) already has a minor problem.
Arduino is reset when it is connected for the first time. If you want to know more about the problem, click below.

http://www.hamskey.com/2018/01/ubitx-auto-reset-problem-and-solution.html

5.Read EEPRom Data from uBITX
Click to Read from uBITX Button.



if you has any problem, you will see above picture.
uBITX always starts from the Read from uBITX button. This is because only the changed data is needed to protect the EEPRom of the transceiver. Most EEProms have a write life of about 100,000 times.

6.Editing EEProm data directly
If you know the EEProm addressing scheme, you can modify it yourself.

below image is part of original source.


Let's change CW_SPEED to practice.
In the code above, you can see that address 28 is CW_SPEED.
In fact, the original source does not use EEProm, so it does not make much sense to use memory manager.

The above source code is almost all used EEProm. and CW_SIDETONE is not used because of a program bug. SIDE_TONE is only used and is not used.
LSB_CAL is also not used. This is because USB_CAL is used together with LSB mode.

So what's left?
MASTER_CAL and USB_CAL are available.

If you've looked at the source code, I do not think you'll need this manager program.
This program is for future firmware upgrades and is for backup and recovery.

Anyway, let's change CW_SPEED



Maybe you'll see another number.
In the source code, WPM is calculated as 1200 / value, in my case 1200 / 60 => 20WPM
It is a picture taken out of the smartphone now.


I will change it to 35 WPM. 1200 / 35 = 34




7.Write EEProm to uBITX
When all modifications are complete, click Write to uBITX.



The program compares the data read from uBITX with the data to be transmitted. and finds only the address '28' change and confirms it to you.
You need to see the final data to be transmitted directly.

When you are finished, press the Write button. Then you can see that EEProm is written as below.


Check the cw speed by turning the uBITX off and then on again. Maybe it will appear on the screen as you modified it. Because it only modifies the EEProm, you can check the value by turning the transceiver off and on again.




8.Backup transceiver's configuration
Exit the program and run it again. This is because the serial port may be disconnected when the transceiver is turned off and on.



Set the comport and speed 9600 and press the Port Open button. Then Click the 'Read from uBITX' button.
Let's back up the current state of the radio.

Click the 'Save to file' button



In the File save dialog, enter the name as you want.




I entered it as test1 The extension automatically becomes .btx



You can check the file with the file explorer.




9.Restore transceiver's configuration
Let's change the radio status before restoring




I changed CW SPEED to 7.

Exit the program and run it again. This is because the serial port may be disconnected when the transceiver is turned off and on.

Set Comport and baud rate is 9600 -> Port Open


Click the 'Read from uBITX'


[1200 / 171 = 7 wpm]

Click the 'Load from file' Button


Select Backup file you want


Firmware that has been uploaded can be confirmed.



Click the 'Write to uBITX'

The program compared the EEProm information read from the transceiver with the information contained in the backup file. When you have confirmed, click the Write button.

If you reset uBITX, you can confirm that the set value is Applied.


10.Decode and Encode
Decode and Encode buttons are made more convenient.

Since we do not know all the memory addresses, we have added Decode and Encode functions.

Click the Decode button to display the memory map on the left side of the items on the right. Click the Encode button to save the items value on the right to the left memory map.

Connect -> 'Read from uBITX'



Click the Decode button.

Now you can forget about complex memory addresses.

Let's change the frequency of VFOB.


I changed 15326330 to 14326330.


Now we need to move the values on the right to the memory map.
Just click on the 'Encode' button and the values on the right will go into the memory map on the left.

And the following message will appear.



Click the 'Write to uBITX'
The frequency is 4 Bytes and only 3 Bytes are changed and it looks like the below screen.





After all the data has been saved, turn the uBITX off and on again and switch to VFO B to move to the input frequency.

The videos below are executed in the above order.



73
KD8CEC / Ph.D Ian lee


Comments

  1. Hi,
    I am trying to follow your directions with this memory manager, but just get error receive length message when hitting read from ubitx. Please look at my postings on the Groups.io blog. I have got no response to my posting, but someone most have gone through this. I was able at one time to get the read to work,and I was able to save to a file. but I get error messages when I try to write as well. I uploaded ver1.061, which I think was successful. Any guidance would be greatly appreciated!!! Bill A.

    ReplyDelete
  2. Hi Ian,
    I am also trying to get the uBitx Manager to work with my V4.3 and I get into the same issue with " Error Receive Length = 1/1027" when I hit the read from uBitx. I have tried the autoreset fixes without any luck but then I realized that I have to upload a modified firmware first to have new protocols available that would work with the manager.
    From what I understand your changes here and the stock firmware you have shared via GDrive refers to V3 of the uBitx. Because of that I did not upload any new version from here since I have no backup to restore to.
    I was trying to use the manager to get a backup of the hex file before moving on with the modified firmware.
    Really appreciate your whole work on uBitx and I'm looking forward to tweak mine.

    Thank you for your understanding.
    73 de KA6LEX - Alex

    ReplyDelete

Post a Comment

Popular posts from this blog

How to upgrade uBITX Firmware

uBITX is based on Arduino Nano. So uBITX's firmware upgrade method is the same as Arduino.
There are two ways to upgrade the firmware of uBITX.

The first is to compile the source from the Arduino IDE, and the second is to upload the compiled hex file using the Firmware Upgrade Tool.

I'll show you how to upload a compiled hex file as a second method.

1.Connect the uBITX's USB cable to the computer.


2.Run Device Manager on your computer.
  The way to open the Device Manager for each OS Version differs slightly.
  In most Windows, you can easily launch the Device Manager by running.

  On your computer, press the Windows key + R.



 Type devmgmt.msc and press OK Button.




On most operating systems, there will be a serial port named Ports with CH340. If so, the next step is skipped.

If the serial port is not installed as below, you need to install the driver.



Included in uBITX is the Adonano, which uses the CH340 USB To UART part.

Download the latest CH340 driver from the Internet.

uBITX with Nextion LCD (CEC Firmware) - Installation and Introduction

uBITX with Nextion LCD (CEC Firmware) - Installation and Introduction uBITX CEC Firmware supports various LCD since Version 1.08 (16x02 Parallel, 20x04 Parallel, 16x02  I2C, 20x04 I2C, 16x02 Dual LCD with I2C).
Supports Nextion LCD (Graphic LCD) from Version 1.09, Version 1.09x is primarily aimed at Nextion LCD support. Also 1.09x will continue to be Beta version. If you want a stable version, please use 1.08 or 1.1 version to be released in the future.

uBITX Firmware CEC Version 1.08 Release

uBITX Firmware CEC Version 1.08 Release
Version 1.08 is the first major release since 1.061, I will release it after a 50-day beta test