Topics

surprising CW sidetone value in uBITX Manager 0.11 #ubitx

Mike KK7ER
 

I upgraded to CEC 1.08 firmware and ran the uBITX Manager Ver 0.11 software.
It shows reasonable values for most fields.
However, it shows CW Side tone as 4294967295 Hz ( which interestingly is 0xFFFFFFFF).
This is obviously incorrect since it is far beyond human hearing.
In fact I'm surprised that side tone frequency in Hz is encoded with 32 bits.  Seems like overkill.
When I look for CW side tone from the LCD panel menu it is nowhere to be found.  Hmm...
CW speed in uBITX Manager is also shown as 4294967295.
When I view CW speed from the LCD panel it is shown as 12 WPM.  This implies that the register value should be 100.
This leads me not to trust uBITX Manager.  Should I?
Either uBITX Manager is wrong or the LCD panel is wrong or... ?

73 Mike KK7ER

Mike KK7ER
 

BTW, I should mention that the version 1.08 that I installed was compiled from the tip of the master branch of the Git repository as of Sunday.  I also tried the precompiled "HEX" file and it behaves the same way.

73 Mike KK7ER

Mike KK7ER
 

Looks like I'm the only person on this thread, but in case someone else is reading...
I finally found the spot on Ian's Github where he released the new version of uBITX Manager that goes along with 1.08.
https://github.com/phdlee/ubitx/releases/tag/v1.08
The fact that it was released outside the master branch of the source tree threw me off.
Looks like he is not open sourcing the manager app.
If anyone reads this and knows differently please let me know.  Thanks.

73 Mike KK7ER

Mike KK7ER
 

Alas, having the correct version of uBITX Manager did not solve the problem.  Now the CW Side Tone and CW Speed both show as 65535 (0xFFFF).  They are still just as meaningless as before and do not correspond to the values shown on the LCD display.
FYI.

73 Mike KK7ER

Tom, wb6b
 

Hi,

This is somewhat puzzling. Assuming it is not a software issue or hardware problem with the USB connection, I'll hazard one guess.

When I looked at the CEC code, some time ago, I noticed a few places, where the CEC firmware was adding new functionally, the code checked to see if the related EEPROM memory address had been set. To maintain backward compatibility with the factory firmware, if it saw 0xFF the code worked in a compatible mode to the factory firmware. 

Have you tried setting the values from the uBITX manager? 

Tom, wb6b

Jack Purdum
 

Virgin EEPROM on the Arduino family is set to 0xFF. My guess is that some value the software needs from EEPROM has not been set.

Jack, W8TEE

On Thursday, July 19, 2018, 11:52:48 PM EDT, Mike KK7ER <groupio@...> wrote:


Alas, having the correct version of uBITX Manager did not solve the problem.  Now the CW Side Tone and CW Speed both show as 65535 (0xFFFF).  They are still just as meaningless as before and do not correspond to the values shown on the LCD display.
FYI.

73 Mike KK7ER

Mike KK7ER
 

I think I see what is going on.  For example, in initSettings(), the sidetone value is getting read from the EEPROM:

EEPROM.get(CW_SIDETONE, sideTone);
 
But later on, it is getting overwritten if the value is not "sane":

if (sideTone < 100 || 2000 < sideTone)
  sideTone = 800;
 
So that explains why uBITX Manager is showing bogus values and yet normal values show up on the LCD.

73 Mike KK7ER

 

Mike,

This is to error correct extreme values that may be set by the user.
If the value is between 100 and 2000 it does nothing!

Raj


At 21/07/2018, you wrote:
I think I see what is going on.  For example, in initSettings(), the sidetone value is getting read from the EEPROM:

EEPROM.get(CW_SIDETONE, sideTone);
 
But later on, it is getting overwritten if the value is not "sane":

if (sideTone < 100 || 2000 < sideTone)
  sideTone = 800;
 
So that explains why uBITX Manager is showing bogus values and yet normal values show up on the LCD.

73 Mike KK7ER

W2CTX
 

Well if one goes out of his way to check an error condition and finds it you should

at least let the user know!  Probably should write the substituted value into the EEPROM.


rOn

On July 21, 2018 at 4:08 AM Raj vu2zap <rajendrakumargg@...> wrote:

Mike,

This is to error correct extreme values that may be set by the user.
If the value is between 100 and 2000 it does nothing!

Raj

At 21/07/2018, you wrote:
I think I see what is going on.  For example, in initSettings(), the sidetone value is getting read from the EEPROM:

EEPROM.get(CW_SIDETONE, sideTone);
 
But later on, it is getting overwritten if the value is not "sane":

if (sideTone < 100 || 2000 < sideTone)
  sideTone = 800;
 
So that explains why uBITX Manager is showing bogus values and yet normal values show up on the LCD.

73 Mike KK7ER


 


 

Mike KK7ER
 

I think this design choice is reasonable given the constraints.  The design principles involved seem to be:  1) don't overwrite the user's data in EEPROM unless the user tells you to, 2) don't accept user-defined values that would lead to obviously bad behavior, 3) make the transition from original/other firmware to CEC firmware painless and easily reversible.

Another design principle that you and I seem to value is that of informative and actionable error messages.  But that has to be weighed against the others.  Some of us want to know all the details (thankfully, we have access to source to figure them out!).  I suspect that the vast majority of folks just want it to work without thinking about firmware details.

73 Mike KK7ER

W2CTX
 

Following your thoughts Mike, The user's error should have been noted in the Memory Manager.


rOn

On July 21, 2018 at 5:58 PM Mike KK7ER <groupio@...> wrote:

I think this design choice is reasonable given the constraints.  The design principles involved seem to be:  1) don't overwrite the user's data in EEPROM unless the user tells you to, 2) don't accept user-defined values that would lead to obviously bad behavior, 3) make the transition from original/other firmware to CEC firmware painless and easily reversible.

Another design principle that you and I seem to value is that of informative and actionable error messages.  But that has to be weighed against the others.  Some of us want to know all the details (thankfully, we have access to source to figure them out!).  I suspect that the vast majority of folks just want it to work without thinking about firmware details.

73 Mike KK7ER

Tom, wb6b
 

It is true, better warnings and feedback would be good. The suggestion that the uBIX manager is the best place to add the feedback is good. But, remember this is the output of one programmer. I'd say the amount of code he has produces at a high level of code design is remarkable. 

I'm sure he does keep track of the users' experiences with his code (like this thread) and as he can, prioritize these along with other needs, and makes an effort to incrementally improve the code. So, in that light, user feedback and suggestions are valuable to everyone. I've definitely expressed my opinion where I think something should be changed, but I know that those suggestions will be weighed against other priorities. 

Tom, wb6b

Mike KK7ER
 

rOn,

I agree that uBITX Manager should flag bad values.  But this is not a user error.  It is simply the result of flashing CEC firmware on top of the stock firmware.  The stock firmware did not write the memory locations where CW speed and sidetone values are stored -- it left them uninitialized.  And apparently by design, the CEC firmware does not overwrite the EEPROM memory space used for user-defined parameters (probably to allow restoring the original firmware without losing settings).  I may be mistaken but this interpretation makes sense to me.

73 Mike KK7ER

Jack Purdum
 

I agree. It's important to keep in mind what both Farhan and Ian have shoehorned into an incredibly limited address space. To me, the most amazing part of their efforts is how they managed to fit everything into a 2K SRAM memory space. After all, that's where all of the data ends up residing plus it has to accommodate the heap and the stack. I'm sure both want to hear users' wish lists, but I would not be at all disappointed if most of those wishes end up on the to-do list simply because there aren't enough resources left to bring them to life.

Jack, W8TEE

On Saturday, July 21, 2018, 9:10:17 PM EDT, Tom, wb6b <wb6b@...> wrote:


It is true, better warnings and feedback would be good. The suggestion that the uBIX manager is the best place to add the feedback is good. But, remember this is the output of one programmer. I'd say the amount of code he has produces at a high level of code design is remarkable. 

I'm sure he does keep track of the users' experiences with his code (like this thread) and as he can, prioritize these along with other needs, and makes an effort to incrementally improve the code. So, in that light, user feedback and suggestions are valuable to everyone. I've definitely expressed my opinion where I think something should be changed, but I know that those suggestions will be weighed against other priorities. 

Tom, wb6b

W2CTX
 

OK - Agree about leaving code alone that is already there in EEPROM.


But since I never run CEC code does the Memory Manger check your inout when you

do enter a bad value?


rOn

On July 21, 2018 at 9:30 PM Mike KK7ER <groupio@...> wrote:

rOn,

I agree that uBITX Manager should flag bad values.  But this is not a user error.  It is simply the result of flashing CEC firmware on top of the stock firmware.  The stock firmware did not write the memory locations where CW speed and sidetone values are stored -- it left them uninitialized.  And apparently by design, the CEC firmware does not overwrite the EEPROM memory space used for user-defined parameters (probably to allow restoring the original firmware without losing settings).  I may be mistaken but this interpretation makes sense to me.

73 Mike KK7ER

Tom, wb6b
 

It has been awhile (so I may not remember all the details) since I ran the uBITX manager, but I believe it did do checks for valid input. The display was split between a panel that showed the "raw" hex values in EEPROM and a panel with input boxes that that were labeled and operated with the human readable values you were adjusting. Also, Farhan adopted the EEPROM memory layout used by Ian, so that increased the cross compatibility between the CEC firmware and the subset of functionality in the factory firmware. 

I'm going to speculate on one thing, originally Ian assumed people would be upgrading from the factory firmware, so the EEPROM values in the factory subset would be programmed. As of late, more people are starting from Nanos that have never been programmed and installing the CEC software. I wonder if that is why some of the new issues are coming up. In any case I'm sure when he can, he will look into these. 

The Nextion displays are turning out to be quite a success for the CEC software, it looks like they solve many of the feedback, due to lack of screen space, issues. Maybe even lessen the need for the uBITX manager. Ian may be concentrating on that track for now. The Nextion displays seem to fall into some kind of sweet spot that makes it more accessible for other people to contribute to the project. 

Tom, wb6b