wfview on Xiegu X6100 Armbian

It’s my first post.
You may or may not know but Xiegu X6100 transceiver runs on Linux OS and some folks managed to boot Armbian OS through SD card and they published how to create the SD card.
Since some people are having difficulty creating the SD card, I distributed the easy-to-burn SD image through a YouTube video. crazycats100 is my YT channel name.
Many applications failed to install on the original SD image for various reasons, so I ran ‘apt upgrade.’ It took more than 5 hours to finish. After that I have been able to install more apps than the original OS.
I even uploaded the SD image to my cloud drive to share with others.
Because the latest firmware, which was released in November, is said to improve its compatibility with IC-705, I thought it might work on X6100 Armbian natively. I built wfview on the OS using the Debian Build Script. The installation finished without any issues. I tested to see if it works and it didn’t.
I posted YouTube video about my experiment and surprisingly W6EL saw my video and gave some suggestions. He said I am very close. Following his suggestion, I changed the CI-V addresses to IC705’s and checked 2 boxes. Also, I turned on debug logging. But to tell the truth, I am not sure what the logs are showing, since I am not a programmer.
I posted the results on YT. So right now, changes on the radio are reflected in wfview.
I cannot remote control the radio frequency from wfview. The mode change works. If I change the frequency on wfview, the radio frequency does not change and wfview reverts back to the radio’s frequency.

Is there anything else I should try? Or will I need to wait for the next few updates? To tell the truth, I am not sure how many people want to use wfview on X6100 Armbian. But if it all works, wfview could replace the radio’s main UI app under Armbian.

Another possible solution would be for wfview to have hamlib network control option, since X6100 Armbian is running hamlib rigctld, That will work.

I don’t expect the waterfall display working since the current firmware does not support audio over USB (correction: I may be wrong since wsjt-x/js8call work using USB) or network. But maybe in the near future, could it be implemented in wfview?

Sorry for the long post. I just want to be able to make it work on the radio since I think it’s very useful.

Hi crazycats,

We took a deeper dive into this topic recently. It seems that the X6100 expects a different frequency command than the one that wfview is using. The IC-705 responds to several versions of the frequency command, however, the Xiego X6100 appears to not implement the version of the frequency command that wfview uses. Wfview uses the 0x03 command, which all (or nearly all) the icom radios from the past 25 years support. The X6100 appears to not support this command.

There is also an additional unfortunate issue which appears to be (and I have not confirmed this) that the X6100 responds to a Rig ID query (command 0x19) and identifies as an IC-705! (Can anyone confirm this for sure?). If this is indeed the case, it will make things difficult down the road trying to adjust for the X6100.

It also looks like the X6100 does not process “invalid” commands too well and it can crash when it receives commands it doesn’t recognize. This appears to be a bug in the main X6100 program.

You can try a fix for the frequency command. Here are the two functions inside rigcommander.cpp of wfview:

getFrequency():

void rigCommander::getFrequency()
{
    // figure out frequency and then respond with haveFrequency();
    // send request to radio
    // 1. make the data
    QByteArray payload("\x03");
    prepDataAndSend(payload);
}

and setFrequency():


void rigCommander::setFrequency(unsigned char vfo, freqt freq)
{
    QByteArray freqPayload = makeFreqPayload(freq);
    QByteArray cmdPayload;

    cmdPayload.append(freqPayload);
    if (vfo == 0) {
        cmdPayload.prepend('\x00');
    }
    else
    {   
        cmdPayload.prepend(vfo);
        cmdPayload.prepend('\x25');
    }
    //printHex(cmdPayload, false, true);
    prepDataAndSend(cmdPayload);
}

You’ll need to dig around inside hamlib and see exactly which version of the frequency command is being sent out successfully, and then swap out the appropriate bits. From a brief glance at the source code of xiego.c in hamlib, it looks like they are sending:

    .set_freq =  icom_set_freq,
    .get_freq =  icom_get_freq,

Whatever those variables go with – you’ll have to dig around to see. hamlib source code can be a bit tricky to go through.

One more thing, you can save time by testing wfview first on a regular linux PC and talking to the Xiego over CI-V. Once you have comms worked out, then copy the source code of your modified wfview to the X6100 and recompile.

Please let us know what you find out, I’m very interested in supporting this radio.

–E
de W6EL

1 Like

Thanks for the further explanation. I will try even though I am no programmer. Could someone who also own X6100 try?

I ran wfview under Windows 10 and Ubuntu 22.04 x64 with X6100 attached through USB, and I got the same results. I guess that’s expected because the code base is the same.
I understand PA3MET is in contact with Xiegu to seek to make wfview work with X6100.
That’s a good news. I hope Xiegu comes to realize that supporting open source developers is beneficial for them.

Thank you.

crazycats100

I just bought a G90 and so far really like it. And I agree, they need to support developers. I have contacted them for issues and they do respond even though they are all in China and there are some issues with their Chinglish. If you send them a message they will respond and I bet they would respond to your idea.

We’re up for making it better.

I may make a branch of code for that rig. We’ll see.

I don’t wish to risk messing up wfview for other rigs, so I really need to at least get a way to identify the Xiegu and then wfview can feed it the commands it prefers. You may have noticed that wfview does not have a list of radio models in the app. That’s because most radios will answer our query about what model the rig is (command 0x19). For the much older rigs that lack this command, we provide an option to identify the rig assuming it is using the default CI-V for that model. But this will obviously not work if the X6100 is not an IC-705 and yet it uses the 705 default CI-V and yet does not reply to Rig ID (it seems so anyway, but nobody has confirmed this to me yet).

Hopefully we can get a unique Rig ID reply and a way for course spectrum data to fly out. Like the Icom rigs. I think it would be easy to add. And then wfview would be pretty sweet connected up. Run your own server, etc.

—E
de W6EL

1 Like

I just found a YouTube video with you W6EL and Steve of TOADs. So you and your team must be well aware of X6100 Armbian. I feel stupid to have been telling here about X6100 Armbian, but I hope it will benefit to those who were not aware of it.
My brief observation is that it worked better if I set IC-7100’s CI-V address rather than IC705 but YMMV.
I don’t own ICOM rigs with color display so if wfview works with X6100 with full waterfall display, that would be wonderful. Some may say just buy freaking IC-705 but I am not willing to pay that much money for 10W rig w/o built-in ATU. (I know the quality is much better than X6100. But my opinion may change if I earn more money).
I appreciate the direction you are willing to go and hope it succeeds well beyond my imagination.

Thanks.

Hi Crazycats100,

It’s all good man! I am completely in favor of saving money, and if you look at my shack on QRZ you’ll see I am pretty frugal (my dad gave me the 7610, for the record). Lots of older rigs and older technology there. I think the X6100 is great in that it is affordable and modern. I have heard the complaints about the performance, but that doesn’t mean it doesn’t have a place in ham radio, and in particular, the sub-$1000 market. There are only a few HF rigs of any type that you can get new in that price range. Plenty of used (older) rigs in this price range though.

I think it would be almost trivial to add spectrum (waterfall) output over CI-V just like many Icom radios have. I hope they will let this community help them do it, because we can design it to be largely compatible with existing software.

–E
de W6EL

1 Like

Beware you may have to deal with a lot of bugs.
We had 8 firmware updates so far and each time they fix a few but introduce more new bugs.
The promised features (wifi, Bluetooth, etc.) never worked well. Rumor has it there is only one guy working for the firmware development.

If they make it open source, they can have hundreds of people working on it. Seems like a win-win, especially if the team is so small. We have certainly benefited being open source.

Yes, bugs… it happens. You would not believe the number of bugs and band-aid solutions I’ve seen in popular commercial software.

Even wfview might have a few!

–E
de W6EL

Just FYI, I had a crazy idea of connecting my X6100 running Armbian to IC-7100 through USB. wfview runs perfectly, controlling IC-7100.
So my Armbian or wfview running on it is not broken. I wish I had kept my IC-7300 so I could extend this crazyness further, wfview on X6100 displaying IC7300’s spectrum display.
I looked into the source codes, but I don’t think I can be much of a help. Any takers?

That is pretty awesome, CC100. Even though I upgraded to the IC-7610, I miss my 7300 too. It is such a sweet little radio. And the 7100, nice rig. The successor to the 706, so I hear.

Open source makes these wild contraptions possible.

Stay tuned, we may work on this radio some more.

The rigcommander.cpp source of wfview isn’t too difficult if you want to modify a command or two. There are three frequency commands you could try in setFrequency(…), just look at the IC-705 CI-V dictionary. You have to modify how the command is sent mostly. I think wfview already understands all the possible frequency reply messages. It may be as simple as changing our (‘\x00’) to (‘\x05’). See the IC-705 CI-V reference manual for details.

–E
de W6EL

This is from the latest X6100 firmware upgrade log. Will it help or you know this already?

  1. Add CI-V instruction:
    1A 01 (C1) (C2)
    C1: band index, See IC-705 CI-V Command Table
    C2: bandstack register number(not use), See IC-705 CI-V Command Table
    X6100 send back description
    FE FE # 2 byte, CI-V header
    E0 XX 1A 01 01 01 # 6 bytes, The command payload, XX is the rig’s address
    00 00 80 01 00 # 5 bytes, Operating frequency setting
    03 02 # 2 bytes, Operating mode setting
    00 # 1 byte, Data mode setting
    00 # 1 byte, Duplex and Tone settings
    00 # 1 byte, Digital squelch setting
    00 08 85 # 3 bytes, Repeater tone frequency setting
    00 08 85 # 3 bytes, Repeater tone frequency setting
    00 00 23 # 3 bytes, DTCS code setting
    00 # 1 byte, DV Digital code squelch setting
    00 50 00 # 3 bytes, Duplex offset frequency setting
    58 36 31 30 30 20 20 20 # 8 bytes, UR (Destination) call sign setting
    20 20 20 20 20 20 20 20 # 8 bytes, R1 (Access repeater) call sign setting
    20 20 20 20 20 20 20 20 # 8 bytes, R2 (Gateway/Link repeater) call sign setting
    FD # 1 byte, CI-V tail
  2. Add CI-V instruction:
    1A 06
    See IC-705 CI-V Command Table
  3. Add CI-V instruction:
    21 00
    21 01
    21 02
    See IC-705 CI-V Command Table
  4. Add CI-V instruction:
    26 (C1) (C2) (C3) (C4)
    C1: VFO index
    0: Foreground VFO
    other: Background VFO
    C2: Operating mode
    See IC-705 CI-V Command Table
    C3: Data mode
    0: OFF
    other: ON
    C4: Filter setting
    1: FILTER1
    2: FILTER2
    3: FILTER3
    other: Invalid
    *Note: [LSB/USB mode] with Data mode ON → L-DIG/U-DIG
    [Other operating mode] with Data mode ON → No effect

Doesn’t really address the frequency command.

There are only a few possible frequency commands. Maybe just give each a try?

–E
de W6EL

Hi, Elliott.
Good news. I think I got it working by changing to x05. Need more testing.
Tested on Ubuntu x64 PC <->X6100. Both ways worked. Using IC7100 address.
Here is my YT video.

1 Like

Oh sweet! This is great! I’ll think about what we can do to implement it this way.

Does the X6100 have CI-V Transceive? If it dies and you can turn it on, then the radio will automatically announce changes such as the frequency changing from turning the physical knob. Then you’ll see wfview respond a lot faster. Right now wfview is updating the UI with a polling algorithm, which is why you see some delay from the knob turning to the UI changing.

Excellent work and nice X220 (is it?).

Can you run with the debug flag (“–debug”) and then press “send to termbin”? I’d like to check the log and see if any other commands had issues.

—E
de W6EL

I am excited to be able to contribute to this project.
Yes, it’s X220. I love it so much I have 3 :wink:
I am not sure if X6100 has CI-V Transceive.

The log was sent.

Thanks.

I did the same code alteration on X6100 Armbian and it worked.
Just first try and only one change. Wondered it was your intuition that it’s going to work.

One more thing, to get wfview to start in debug mode, the argument is --debug. Two dashes. My iPhone doesn’t let me type it! If you start wfview that way, you can see if there are any failed CI-V commands (assuming the X6100 replies with “FA” like the Icom radios do).

The 0x1A commands are going to be very model-specific. If they have prototyped their command set off the IC-705, then it is probably best to tell wfview that you have that model. Of course, the unfortunate thing here is that wfview will also assume you have spectrum support which the X6100 doesn’t have yet over CI-V.

I am thinking that you can help us by sort of “profiling” what commands the radio supports.

We have often discussed building a more modular radio “personality” class into wfview. That sort of thing would help with radios like the X6100.

But for now, just getting a good handle on what commands it’s using and what features it has will help.

–E
de W6EL

Tested Radio Server under Ubuntu as IC7100 and IC705. Windows client
Remote frequency change does not work (no dial or direct input)
Band change works
Mode change works
No audio (DEV port <-> PC) It may need to be connected differently. I can’t figure out which input/output to choose

sent debug log