开云体育


Re: zbitx, compiler optimizations #zbitx

 

Hi Peter,
?
That? is essentially what I did - there is an existing global variable (in_tx) that is True when in Transmit Mode.? In the existing code, once the key down is discovered (which does not always happen right away), this in_tx global is being held True until the Semi-QSK tail timer expires.? Right now I am using that global being True to bypass all GUI processing that is in the ui_tick() function (which being called regularly by a clock timer).? That shuts down all updates to everything on both GUIs and makes the system much more responsive to key strokes (both Iambic and Straight Key).?
?
I now have GPIO Pin Interrupts working fine for the DASH Input and the PTT(DOT) Input (For some reason or another, the PTT and the DOT use same GPIO Input Pin, which seems to complicate things). ?I am presently forcing the in_tx global to True from within both of my IRQ handlers.? However, it is looks like I may need to trigger something else that is in the processing train that is ahead of that in_tx global instead.?
?
Using the IRQ handler for determining both key down and key up when in Straight Key Mode was my first idea.? But that does not look like anything that I can use due to how the exiting code is structured. ??I'm trying to band-aid, not totally restructure - that may be a mistake.? ?
?
So, right now I am trying to figure out what existing function I can wake up from my key-down IRQ handlers to start them polling the GPIO Pins and continue to act on the subsequent key-down events.. There are a number of CW processing functions.? It is not real straight forward.? Might have to print out the code and go though it on paper because I end up going around in circles whenever trying to chase through this in my code editor.
?
But, this head banging stuff is good for the brain they say.
?
72,
Jody - K3JZD? ? ??


Re: zbitx, compiler optimizations #zbitx

 

Peter , will it help to use the timing implementation from WiringPi?
?
?


Re: zbitx, compiler optimizations #zbitx

 

Hi,
?
digging deeper I was profiling the sbitx binary, and for better profiling support, I put the different parts of the ui_tick in own subroutines, so they can be identified separately at the profiler output:
handle_remote_cmd, handle_gtk_invalidations, handle_tuning_knob, handle_tick_count_routine (the part running only every 50/100/200 ticks), handle_cw_key, handle_scroll.
?
I found that the program is running in an empty time delay loop (i2c_delay) for nearly 60% of the time:
?
? % ? cumulative ? self ? ? ? ? ? ? ?self ? ? total ? ? ? ? ??
?time ? seconds ? seconds ? ?calls ? s/call ? s/call ?name ? ?
?58.73 ? ? 39.57 ? ?39.57 ?8844853 ? ? 0.00 ? ? 0.00 ?i2c_delay
?15.66 ? ? 50.12 ? ?10.55 ?4487474 ? ? 0.00 ? ? 0.00 ?get_field
? 9.62 ? ? 56.60 ? ? 6.48 ? ?14238 ? ? 0.00 ? ? 0.00 ?rx_linear
? 2.70 ? ? 58.42 ? ? 1.82 ? ? 3862 ? ? 0.00 ? ? 0.00 ?tx_process
? 2.35 ? ? 60.00 ? ? 1.58 ? ? ? ?1 ? ? 1.58 ? ?23.54 ?sound_loop
? 1.40 ? ? 60.94 ? ? 0.94 ? ?11294 ? ? 0.00 ? ? 0.00 ?spectrum_update
? 1.35 ? ? 61.85 ? ? 0.91 ? ?83078 ? ? 0.00 ? ? 0.00 ?handle_gtk_invalidations
? 1.34 ? ? 62.75 ? ? 0.90 ?4600445 ? ? 0.00 ? ? 0.00 ?vfo_read
?
?
The i2c_delay seems to be the main reason for the ui_tick being clogged (ui_tick -> handle_tick_count_routine -> zbitx_poll -> i2cbb-calls), see details in the attached profiler output.
?
Just for test I changed delayTicks to 1 (so i2c_delay counts to 1 instead of 400), and this seems to remove the clogging of the ui_tick completely.
?
Anyone knowing the code much better than I do:
I guess the burning of CPU time in i2c_delay has some reason, can anyone enlighten me why this is done?
Would there be any chance to put the i2c handling (communication with the screen pi, right?) in a separate thread?
?
73, Peter
?
?


Re: zbitx, compiler optimizations #zbitx

 

Today I setup the DASH input pin as a pin IRQ. ?That works. ?I have it switching into Transmit Mode immediately on a key down. ?But I have been struggling with figuring out a way to pass the key-down / key-up state form the IRQ processing routine to the complex string of CW processing functions. ?I have not given up on that. ?But I'm out of time for today.
?
?
I have no time yet to involve into investigating that problem, but can't the libgpiod functionality of reporting the timestamps of the pin state changes be used for that?
- see? gpiod_edge_event_get_timestamp_ns function.
73,
Wojtek - SP5DAA


Re: zbitx, compiler optimizations #zbitx

 

Fascinating.? Sure the waterfall is able to be eliminated and is a good idea.? Is the big yellow display of the dots and dashes worth eliminating, too.? I sure don't need that, although it could be a nice touch.? As a CW guy, I'm a bit disappointed in the cw operation, and I appreciate your good work.? ?Regards, John W9NET


Re: zbitx, compiler optimizations #zbitx

 

Hi Jody,
?
very interesting, thank you!
?
If you managed to detect key-down very fast with an IRQ handler, wouldn't it be sufficient to exit/skip time consuming tasks in ui_tick()?
I mean setting a new variable e g. "key_wants_tx", and time consuming code (like waterfall?) exits when this variable is set? This way, the further handling of key-down could stay where it is, it simply would be called faster.
?
Or did you try that already and it was not sufficient?
?
73 Peter
?
?
?


Re: FT8 time differential - how to resolve?

 

Ths is how I installed wsjt-z.

First, I installed hamlib 4.5.4. Hamlib4 is already installed but I wanted a newer version.

export CXXFLAGS='-O2 -march=native -mtune=native'
export CFLAGS='-O2 -march=native -mtune=native'
sudo apt-get update
sudo apt-get upgrade -y
sudo apt-get install -y bc build-essential git wget tar xz-utils make dialog
sudo apt-get install -y git cmake automake libtool asciidoctor asciidoc gfortran subversion
sudo apt-get install -y libwxgtk3.0-dev libusb-dev make portaudio19-dev
sudo apt-get install -y libsamplerate0-dev libasound2-dev libao-dev
sudo apt-get install -y libfftw3-dev libgsm1-dev libjpeg9-dev
sudo apt-get install -y libxft-dev libxinerama-dev libxcursor-dev libboost-all-dev
sudo apt-get install -y libqt5multimedia5 libqt5multimedia5-plugins
sudo apt-get install -y libqt5multimediawidgets5 libqt5serialport5-dev
sudo apt-get install -y libqt5svg5-dev libqt5widgets5 libqt5sql5-sqlite libqwt-qt5-dev
sudo apt-get install -y libsndfile1-dev libudev-dev qtmultimedia5-dev texinfo
sudo apt-get install -y xsltproc swig qttools5-dev qttools5-dev-tools
sudo apt-get install -y qtbase5-dev-tools ?libwxgtk3.0-gtk3-dev libjpeg62-turbo-dev
sudo apt-get install -y libreadline-dev libusb-1.0-0-dev libudev-dev

cd ~/Downloads
wget
tar -zxvf hamlib-4.5.4.tar.gz
cd hamlib-4.5.4
./configure --prefix=/usr/local --enable-static
make
sudo make install
sudo ldconfig

**** REBOOT ***

and then # 2, compile wsjt-z:

cd ~
mkdir build
cd build
wget
unzip wsjtz-2.7.0-rc7-1.48.zip
mkdir build
cd build
cmake -DWSJT_SKIP_MANPAGES=ON -DWSJT_GENERATE_DOCS=OFF ../wsjtx
sudo cmake --build . --target install



Leo, AI5II



?






On Thu, May 8, 2025, 9:22?PM miguel medina via <tech5022=[email protected]> wrote:
Hi Leo,
total newbie here, how do I install wsjt-z ?
?
thanks
Miguel KP4MI


Re: zbitx, compiler optimizations #zbitx

 

Peter,
?
I have been experimenting with getting CW to work smoothly on this device.? Previously I had published a modification that I made to sbitx_gtk.c which turned off the water waterfall (and more) on the dual GUIs whenever the device was in Transmit Mode.? That made it much more responsive in CW Mode.? Especially when using a Straight Key.??However, it still stutters if it is off doing something else whenever it should be switching right into Transmit Mode.
?
Today I setup the DASH input pin as a pin IRQ.? That works.? I have it switching into Transmit Mode immediately on a key down.? But I have been struggling with figuring out a way to pass the key-down / key-up state form the IRQ processing routine to the complex string of CW processing functions.? I have not given up on that.? But I'm out of time for today.
?
So, I don't think it is so much the load on the device, although running waterfalls on two GUIs contributes to that load.? I think it is more of a control issue.? Just an opinion.? ?
?
72,
Jody - K3JZD? ?


Re: FT8 time differential - how to resolve?

 

Hi Leo,
total newbie here, how do I install wsjt-z ?
?
thanks
Miguel KP4MI


Updates from Adafruit

 

FYI
?
The Wild West is painful for home brewers.
?
73, Andy
?


Re: error after update

 

If you check line #2 in start.sh, it is "cd sbitx" which will error out unless you run the start.sh script from the /home/pi folder because you are already in the sbitx directory and there is no sbitx directory under it.
If you edit the start.sh script and change that line to "cd ~/sbitx" then you can run that script from anywhere because "cd ~/sbitx" expands to "cd /home/pi/sbitx".

Leo, AI5II



On Thu, May 8, 2025, 8:44?AM miguel medina via <tech5022=[email protected]> wrote:
Hi all,
I updated the firmware and software to the latest and Im getting errors in my cli window.
?
?
?
any advise?
thanks
Miguel


Re: error after update

 

here is my CLI output
?
pi@sbitx:~/sbitx $ ./start.sh
?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ??USER ?? ?? ?? ??PID ACCESS COMMAND
/dev/snd/controlC0: ??root ?? ?? ?? ??321 f.... (root)alsactl
?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ??pi ?? ?? ?? ?? ??638 F.... (pi)lxpanel
/dev/snd/controlC0: ??root ?? ?? ?? ??321 f.... (root)alsactl
?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ??pi ?? ?? ?? ?? ??638 F.... (pi)lxpanel
./start.sh: line 2: cd: sbitx: Not a directory
sbitx v3.052
Audio Output Device is: plughw:0,0
hw version: 4
ALSA lib pcm.c:8424:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:8424:(snd_pcm_recover) underrun occurred
Resolving NTP server at time.google.com
Updating the RTC with network time
Time synchronized with the network.
ALSA lib pcm.c:8424:(snd_pcm_recover) underrun occurred
Turning off TUNE
RTC read as 2025/5/8 12:35:48
zBitx front panel detected
reading data from i2c: REF 0
ALSA lib pcm.c:8424:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:8424:(snd_pcm_recover) underrun occurred
reading data from i2c: REF 0
Resolving NTP server at time.google.com
Updating the RTC with network time
Time synchronized with the network.
reading data from i2c: REF 0
reading data from i2c: POWER 0
reading data from i2c: VBATT 678
reading data from i2c: NOTHING??
reading data from i2c: NOTHING??
reading data from i2c: NOTHING??
reading data from i2c: NOTHING??
reading data from i2c: REF 0
reading data from i2c: POWER 0
reading data from i2c: VBATT 677
reading data from i2c: NOTHING??
reading data from i2c: NOTHING??
reading data from i2c: NOTHING??
reading data from i2c: NOTHING??
reading data from i2c: REF 0
reading data from i2c: POWER 0
reading data from i2c: VBATT 679
reading data from i2c: NOTHING??
reading data from i2c: NOTHING??
reading data from i2c: NOTHING??
reading data from i2c: NOTHING??
reading data from i2c: NOTHING??
reading data from i2c: REF 0
reading data from i2c: POWER 0
reading data from i2c: VBATT 677
reading data from i2c: NOTHING??
reading data from i2c: NOTHING??
reading data from i2c: NOTHING??
reading data from i2c: NOTHING??
reading data from i2c: REF 0
reading data from i2c: POWER 0
reading data from i2c: VBATT 678
reading data from i2c: NOTHING??
reading data from i2c: NOTHING??
reading data from i2c: NOTHING??
reading data from i2c: NOTHING??
reading data from i2c: NOTHING??
reading data from i2c: REF 0
reading data from i2c: POWER 0
reading data from i2c: VBATT 681
reading data from i2c: NOTHING??
reading data from i2c: NOTHING??
reading data from i2c: NOTHING??
reading data from i2c: NOTHING??
reading data from i2c: NOTHING??
reading data from i2c: NOTHING??
reading data from i2c: REF 0
reading data from i2c: POWER 0
reading data from i2c: VBATT 680
reading data from i2c: NOTHING??
reading data from i2c: NOTHING??
reading data from i2c: NOTHING??
reading data from i2c: NOTHING??
reading data from i2c: NOTHING??
reading data from i2c: REF 0
reading data from i2c: POWER 0
reading data from i2c: VBATT 679
reading data from i2c: NOTHING??
reading data from i2c: NOTHING??
reading data from i2c: NOTHING??
reading data from i2c: NOTHING??
reading data from i2c: NOTHING??
reading data from i2c: REF 0
reading data from i2c: POWER 0
reading data from i2c: VBATT 677
reading data from i2c: NOTHING??
reading data from i2c: NOTHING??
reading data from i2c: NOTHING??
reading data from i2c: NOTHING??
reading data from i2c: NOTHING??
reading data from i2c: REF 0
reading data from i2c: POWER 0
reading data from i2c: VBATT 677
reading data from i2c: NOTHING??
reading data from i2c: NOTHING??
reading data from i2c: NOTHING??
reading data from i2c: NOTHING??
reading data from i2c: REF 0


Re: New zBitx - New User - CW operation

 

Thanks for the user experiences. Sounds like FT8 is usable then. It’s just a mode I very rarely use. SSB even less.?

As for CW…. “The zBitx is a CW dream machine….” is what the ad says. Perhaps some of you that have Bitx rig experience can tell me to be patient, it will eventually work? I hope so… but progress reports have been pretty quiet this week.?

I guess I need more patience….?


Re: zBitx power draw

 

开云体育

Of course, the output power measurement is just probably by measuring voltage and assuming a resistance, but that’s a pretty low overall calculated efficiency, 15% or so. ? And of course part of that is that it’s having to run the other circuits but they aren’t that high power hogging! Perhaps other than the display? ? wide band transformer systems aren’t anywhere close to as good as the tuned networks we use decades ago. ? At least it seems that way.!!

Gordon kx4z?



On May 8, 2025, at 17:04, JAMES LEWIS JR via groups.io <jtlewis@...> wrote:

?At 9v and 100% I was showing 5 watts out with a current draw of around 3.8 amps on FT-8.

Cheers

Jim



On May 8, 2025, at 4:31?PM, Ben Sanders via groups.io <sandersbenjamin@...> wrote:

Do you happen to know how much power it is drawing then?


Re: zBitx power draw

 

开云体育

At 9v and 100% I was showing 5 watts out with a current draw of around 3.8 amps on FT-8.

Cheers

Jim



On May 8, 2025, at 4:31?PM, Ben Sanders via groups.io <sandersbenjamin@...> wrote:

Do you happen to know how much power it is drawing then?


Re: zBitx power draw

 

Do you happen to know how much power it is drawing then?


Re: zbitx, compiler optimizations #zbitx

 

开云体育

It wouldn't be a 1:1 swap.? The GPIO pins are in a different configuration on the Radxa.? It might be possible to change all the pin assignments in the software to get it to work.?


From: [email protected] <[email protected]> on behalf of pd0zz via groups.io <pd0zz@...>
Sent: Thursday, May 8, 2025 12:37 PM
To: [email protected] <[email protected]>
Subject: Re: [BITX20] zbitx, compiler optimizations #zbitx
?
Next improvement could be this:
https://radxa.com/products/zeros/zero2pro/


Re: zbitx, compiler optimizations #zbitx

 

Next improvement could be this:
https://radxa.com/products/zeros/zero2pro/


Re: zBITX Heating

 

https://www.amazon.com/Awxlumv-Aluminum-60x150x25mm-2-36x5-91x0-98-Amplifier/dp/B07VDHQDQT


Re: QSSTV on ZbitX

 

Well, one can buy a bigger heatsink and make it fit to the bottom of the zBitx...

https://www.amazon.com/Awxlumv-Aluminum-60x150x25mm-2-36x5-91x0-98-Amplifier/dp/B07VDHQDQT