¿ªÔÆÌåÓý

ctrl + shift + ? for shortcuts
© 2025 Groups.io

X6100 BASE firmware with compressor/noise gate


 

Hi.
?
I added a compressor to the X6100 BASE firmware. This version also have extended to 160 Hz low bound of band pass filter and increased modulation level for FM.
As far as OEM GUI application doesn't have an option to control compressor - it's enabled by default for USB/LSB/AM/FM (and disabled for digital modes and CW). I need to check, but I guess alternative GUI (R1CBU) will be able to control it with next version, at least on/off, but maybe also a compressor ratio.
In the signal processing chain it's after applying microphone gain and before band pass filters and modulation. As far as it's contain a gate - it's might be useful to adjust mic level to match gate threshold:
* Set mic gain to 20
* Switch to LSB/USB
* Press PTT in a silent environment
* Check, that there is no or very low signal on the spectrum/waterfall
* Release PTT
* Increase or decrease mic gain
I have OEM microphone with replaced capsule (it requires ~30 mic gain) and microphone from X6200 (it requires ~ 16 mic gain).
?
Some technical details:
Compressor has 4:1 fixed compression ratio and 4:1 gate ratio. Attack time is 5ms, release - 300ms. Also, it contains a delay line for 5ms to prevent overloading on attack. Threshold level for gate and compressor configured to prevent increasing internal radio noise on pauses.
?
Compressor code was written from scratch, I can share python/C sources, if it will be helpful for someone, let me know.
--
Georgy // R2RFE


 

Disclaimer: this firmare is provided "as-is". In theory, it might not works as expected.
?
If something will be wrong:
On alternative GUI (R1CBU) - long press to lock button to reset BASE. Then you can reboot to OEM and flash another version.
On OEM GUI - fastest way is got to FW upgrade menu and do an upgrade (don't forget to plug external power). Resetting BASE is a first step of FW upgrade procedure.
?
--
Georgy // R2RFE


 

Georgy,
I am really amazed that you were able to change the base firmware of the X6100 to add a compressor!

I would really like to learn how you did it.
Did you compile your code for the STM32 separately as a new function, and then appended it at the end of Xiegu's firmware, and also modified some function pointers to call the new code?
If so, did you also figure out the function call sequence used to process the input from the microphone?

I am very interested in understanding the internals of the X6100 baseband firmware, and any information you would like to share would be very useful.
?
Thanks again for all your work on this radio and on the new X6200!
?
73,
Franco K4VZ


 

¿ªÔÆÌåÓý

Georgy ¨C

?

Many thanks for this implementation~!

?

I¡¯m still running stock Xiegu firmware from a revision or two ago ¨C not the most recent version. What¡¯s the easiest way to upgrade this? I do not want to ¡°brick¡± the radio in the process ?

?

Thanks & 73 ¨C

?

Daniel

?

?

?

From: [email protected] <[email protected]> On Behalf Of Georgy Dyuldin via groups.io
Sent: Thursday, April 10, 2025 12:58 AM
To: [email protected]
Subject: [xiegu-x6100] X6100 BASE firmware with compressor/noise gate

?

Hi.

?

I added a compressor to the X6100 BASE firmware. This version also have extended to 160 Hz low bound of band pass filter and increased modulation level for FM.

As far as OEM GUI application doesn't have an option to control compressor - it's enabled by default for USB/LSB/AM/FM (and disabled for digital modes and CW). I need to check, but I guess alternative GUI (R1CBU) will be able to control it with next version, at least on/off, but maybe also a compressor ratio.

In the signal processing chain it's after applying microphone gain and before band pass filters and modulation. As far as it's contain a gate - it's might be useful to adjust mic level to match gate threshold:

* Set mic gain to 20

* Switch to LSB/USB

* Press PTT in a silent environment

* Check, that there is no or very low signal on the spectrum/waterfall

* Release PTT

* Increase or decrease mic gain

I have OEM microphone with replaced capsule (it requires ~30 mic gain) and microphone from X6200 (it requires ~ 16 mic gain).

?

Some technical details:

Compressor has 4:1 fixed compression ratio and 4:1 gate ratio. Attack time is 5ms, release - 300ms. Also, it contains a delay line for 5ms to prevent overloading on attack. Threshold level for gate and compressor configured to prevent increasing internal radio noise on pauses.

?

Compressor code was written from scratch, I can share python/C sources, if it will be helpful for someone, let me know.

--

Georgy // R2RFE

This e-mail and any files transmitted with it are the property of Arthrex, Inc. and/or its affiliates, are confidential, and are intended solely for the use of the individual or entity to whom this e-mail is addressed. If you are not one of the named recipient(s) or otherwise have reason to believe that you have received this message in error, please notify the sender at 239-643-5553 and delete this message immediately from your computer. Any other use, retention, dissemination forwarding, printing or copying of this e-mail is strictly prohibited. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. Finally, while Arthrex uses virus protection, the recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.


 

On Thu, Apr 10, 2025 at 03:34 PM, Franco Venturi wrote:
Did you compile your code for the STM32 separately as a new function, and then appended it at the end of Xiegu's firmware, and also modified some function pointers to call the new code?
If so, did you also figure out the function call sequence used to process the input from the microphone?
Yes. I created a project with stm32cubemx for target MCU, add offset to the .text section (file size + small gap for helper code) within LD script. Within this project I created 2 c functions - compressor and a function to initialize memory area (fill it with zeros). Also, I created a small ASM file with sections for jump instructions, some wrapper code (save/restore registers) and dummy sections for created functions. This asm was compiled and linked to correct address. Last step is just combine original file, compiled instructions and asm helper. To store compressor state - I move stack pointer at the start of the firmware.
I'll upload my code to the github.
Firstly, I tried to make the same using STM32 black pill board - created simple firmware, created a new logic and move it to compiled bin firmware. Much safer, than experimenting on the transceiver)

I'm not sure how to better share data from ghidra. for 1.1.8:
0x08024e62 - decimate tx audio (96 khz -> 12 khz)
008024e74, 0x08024e86 ?- apply bandpass filters
then - depending on modulation I and Q signals creates.?
--
Georgy // R2RFE


 

On Thu, Apr 10, 2025 at 04:19 PM, Daniel Baker wrote:
What¡¯s the easiest way to upgrade this? I do not want to ¡°brick¡± the radio in the process ?
You need to copy this file to transceiver's file system and update with menu of OEM firmware. I described procedure here
Good luck!
--
Georgy // R2RFE


 

- source code, used for patching.
--
Georgy // R2RFE


 

Very cool. I tested it out. Seemed to work ok in my brief testing. However i went back to 1.1.6 base as i dislike the 1.1.7 and 1.1.8 bases because their NR is horrible. The NR in 1.1.6 works and sounds fantastic. Using the others it sounds like everybody is "under water". Any way you could fix 1.1.8 to use 1.1.6¡¯s NR values?
?
Cheers


 

On Thu, Apr 10, 2025 at 07:36 PM, wicknix wrote:
Using the others it sounds like everybody is "under water"
Changing AGC threshold on 1.1.8 is affecting NR effect. I'm not sure about simple way to move 1.1.6 NR logic to 1.1.8
--
Georgy // R2RFE


 

On Thu, Apr 10, 2025 at 11:44 AM, Georgy Dyuldin wrote:
I'm not sure about simple way to move 1.1.6 NR logic to 1.1.8
Ah, bummer. 1.1.6 with your FM, 160, and Comp additions would be awesome also, but i understand if it can¡¯t be done or is too time consuming with all the other things you have going on. I just live in a high noise floor area and need NR enabled 99% of the time to pull weaker stations out cleanly.
?
Cheers


 

1.1.6 with compressor, increased 3 times FM modulation depth and 160 Hz low frequency filter.
Also, I created a branch for patching 1.1.6 in repo above.
?
I did only quick testing - looks like all working as expected, but feedback is appreciated.
--
Georgy // R2RFE


 

Thanks! I'll give it a good test over the weekend and report any findings good or bad.
?
Cheers


 

On Fri, Apr 11, 2025 at 01:42 AM, Georgy Dyuldin wrote:
but feedback is appreciated
All seems well with this 1.1.6 base modification. The only thing i noticed is that i have to turn my mic gain down for it to not feedback or make strange sounds (over driven?). I use to run mic gain at 45 with stock mic, now i¡¯m running it at 20-25. If that¡¯s normal with compression enabled, then no issues to report. Thanks much.


 

Thank you. I guess it might be due to high mic gain "moves" EMI from gate branch to compressor branch of the transfer curve - and it became amplified stronger,? that without compression. I did some measurements and will try to replace peak detector to RMS detector within the compressor. I guess it will allow to mitigate such situations.

§Ó§ã, 13 §Ñ§á§â. 2025 §Ô., 18:16 wicknix via <wicked5850=[email protected]>:

On Fri, Apr 11, 2025 at 01:42 AM, Georgy Dyuldin wrote:
but feedback is appreciated
All seems well with this 1.1.6 base modification. The only thing i noticed is that i have to turn my mic gain down for it to not feedback or make strange sounds (over driven?). I use to run mic gain at 45 with stock mic, now i¡¯m running it at 20-25. If that¡¯s normal with compression enabled, then no issues to report. Thanks much.


--
Georgy // R2RFE