Unable to get reply to any of CI-V commands from the radio #22
Replies: 7 comments
-
I looked at the video. I think the BLE address in the paired devices list increments only if you have a second device connect. I tried changing the UUID for the controller and it never changed the address shown in the paired devices. At times I had up to 4 devices connected, a mix of BLE and Classic BT.
It seems like you have the login part and pairing solved, it is not responding to CI-V commands. That is normally because the radio address is not correct.
I usually auto detect the address. You can start off issuing the 0x19 TRX_ID command sent to address 0x00 (broadcast) and it will respond. Take the address from that response in byte 3. Ignore all messages where byte 3 == 0xE0 (which is you, the controller) or 0xEy – value ‘y’ could be another controller like wfView program) . If CIV Echo back is on you will get a command echo back from the controller address with Byte 3 == 0xE0 for every message you send. You can also just hard code the address to the IC-705, usually set to 0xA4.
Having finished my 5th or 6th variation on a CI_V decoder I am getting pretty good at CI-V stuff now 😊.
* Mike
From: Filip Melik ***@***.***>
Sent: Monday, March 17, 2025 2:35 PM
To: K7MDL2/IC-705-BLE-Serial-Example ***@***.***>
Cc: Subscribed ***@***.***>
Subject: [K7MDL2/IC-705-BLE-Serial-Example] Unable to get reply to any of CI-V commands from the radio (Discussion #22)
Hello Mike, and thanks for your thorough research 👍
I am trying to use your knowledge to make an "adapter" between the 705 and my little device<https://github.com/filipmelik/wavelog-trx-interface>. I am using Micropython, but my question is probably not really related to the code itself - I was able to connect to device using my code, send UUID, Name and "Token" messages and get all the replies you list here in your code<https://github.com/K7MDL2/IC-705-BLE-Serial-Example/blob/main/IC-705_BLE_Decoder_Simple/IC-705_BLE_Decoder_Simple.ino#L382>.
I was also reading the Technical details page<https://github.com/K7MDL2/IC-705-BLE-Serial-Example/wiki/Technical-Details> multiple times to make sure I did not miss something.
My problem is that even though I get the "access to CIV granted" message, the radio does not reply to any of my commands (I tried multiple ones, including the one you have in your example). So my question is - do you see some obvious error or missing step, or do you remember if you went through the behavior like this in the past maybe? I am attaching the video for reference on how it behaves.
https://youtu.be/uP_H9OibZOs
Thank you for any possible insight 😊
—
Reply to this email directly, view it on GitHub<#22>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/APLVE7E6IO5KCS2IS77SOIT2U45YTAVCNFSM6AAAAABZGSKPMOVHI2DSMVQWIX3LMV43ERDJONRXK43TNFXW4OZYGA4TKNBXGM>.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.******@***.***>>
|
Beta Was this translation helpful? Give feedback.
-
I also noted your frequency request is not formatted correctly.
Check out the CIV programmers guide for the 705.
The general form is
FE, FE, addr, addr, command , sub commands and/or data, FD
For frequency you would want BCD encoded little endian bytes after the frequency command.
Frequency commands are 0x0, 0x3, 0x5 and some others for general active VFO frequency.
0x2500, and ox2501 are selected and unselected VFO. You can find freq in many other like bandstack registers.
The above commands would be followed by 5 BCD data bytes for frequency
FE FE A4 E0 03 05 90 19 44 01 FD
This would be ‘ 01 44 19 90 05’ when converted to big endian byte order.
Then you convert BCD to decimal (see my code on the byte shifting to do that)
You get 144199005Hz or 144.199005MHz
The IC-905 uses 6 bytes for frequency data when on 10GHz or higher bands.
* Mike
From: Mike Lewis
Sent: Monday, March 17, 2025 2:49 PM
To: K7MDL2/IC-705-BLE-Serial-Example ***@***.***>
Subject: RE: [K7MDL2/IC-705-BLE-Serial-Example] Unable to get reply to any of CI-V commands from the radio (Discussion #22)
I looked at the video. I think the BLE address in the paired devices list increments only if you have a second device connect. I tried changing the UUID for the controller and it never changed the address shown in the paired devices. At times I had up to 4 devices connected, a mix of BLE and Classic BT.
It seems like you have the login part and pairing solved, it is not responding to CI-V commands. That is normally because the radio address is not correct.
I usually auto detect the address. You can start off issuing the 0x19 TRX_ID command sent to address 0x00 (broadcast) and it will respond. Take the address from that response in byte 3. Ignore all messages where byte 3 == 0xE0 (which is you, the controller) or 0xEy – value ‘y’ could be another controller like wfView program) . If CIV Echo back is on you will get a command echo back from the controller address with Byte 3 == 0xE0 for every message you send. You can also just hard code the address to the IC-705, usually set to 0xA4.
Having finished my 5th or 6th variation on a CI_V decoder I am getting pretty good at CI-V stuff now 😊.
* Mike
From: Filip Melik ***@***.******@***.***>>
Sent: Monday, March 17, 2025 2:35 PM
To: K7MDL2/IC-705-BLE-Serial-Example ***@***.******@***.***>>
Cc: Subscribed ***@***.******@***.***>>
Subject: [K7MDL2/IC-705-BLE-Serial-Example] Unable to get reply to any of CI-V commands from the radio (Discussion #22)
Hello Mike, and thanks for your thorough research 👍
I am trying to use your knowledge to make an "adapter" between the 705 and my little device<https://github.com/filipmelik/wavelog-trx-interface>. I am using Micropython, but my question is probably not really related to the code itself - I was able to connect to device using my code, send UUID, Name and "Token" messages and get all the replies you list here in your code<https://github.com/K7MDL2/IC-705-BLE-Serial-Example/blob/main/IC-705_BLE_Decoder_Simple/IC-705_BLE_Decoder_Simple.ino#L382>.
I was also reading the Technical details page<https://github.com/K7MDL2/IC-705-BLE-Serial-Example/wiki/Technical-Details> multiple times to make sure I did not miss something.
My problem is that even though I get the "access to CIV granted" message, the radio does not reply to any of my commands (I tried multiple ones, including the one you have in your example). So my question is - do you see some obvious error or missing step, or do you remember if you went through the behavior like this in the past maybe? I am attaching the video for reference on how it behaves.
https://youtu.be/uP_H9OibZOs
Thank you for any possible insight 😊
—
Reply to this email directly, view it on GitHub<#22>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/APLVE7E6IO5KCS2IS77SOIT2U45YTAVCNFSM6AAAAABZGSKPMOVHI2DSMVQWIX3LMV43ERDJONRXK43TNFXW4OZYGA4TKNBXGM>.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.******@***.***>>
|
Beta Was this translation helpful? Give feedback.
-
Additional info on converting the frequency in Python. In fact in this linked project I just completed is in Python. This is the CIV.py where you will find a list of CIV commands already sorted out.
CI-V_Serial_Band_Decoder/CIV_Serial.py at main · K7MDL2/CI-V_Serial_Band_Decoder<https://github.com/K7MDL2/CI-V_Serial_Band_Decoder/blob/main/CIV_Serial.py>
The list is under the function CIV_Action. The processCatMessages function parses the incoming message, validates the format, looks through the list of possible commands and sub commands, then identifies the starting data byte (if any) and data length. Sub commands and Data can both be 0.
Here I extracted from CIV_Action() the frequency handling code. After frequency extraction and conversion, it assigns the possible values to 3 variables which are passed to read_frequency() where other factors are applied to determine what to do with the values. Things like split, or for the IC-9700, the Sub RX on or off.
In my USB version written in C I just added IC-9700 support for Sub RX and I changed the last part that assigns 0x03 to 1 of 2 values, instead now always is assigned to bd.CIV_selected_vfo_rx value to make handling the IC-9700 easier, that radio get complicated for Sub RX and SAT modes. Read_frequency() then sorts out how to use them. All radios, the 705, 905 and 9700 can do cross band split which effects PTT sequence order when you mix a band change in the middle of PTT.
case cmds.CIV_C_F25A.value | cmds.CIV_C_F25B.value | cmds.CIV_C_F_READ.value | cmds.CIV_C_F_SEND.value | cmds.CIV_C_F1_SEND.value | cmds.CIV_C_TX_FREQ.value:
if ((data_len == 5 or (radio_address == IC905 and data_len == 6)) and (rd_buffer[4] == 0 or rd_buffer[4] == 3 or rd_buffer[4] == 5 or rd_buffer[4] == 0x25)):
#print("cmd:%d message:%s" % (cmd_num, [hex(num) for num in rd_buffer][0:msg_len])) #self.case_default(cmd_num, rd_buffer) # anything we have not seen yet comes to here
mul = 1
f = 0
for i in (n + data_start_idx for n in range(data_start_idx + data_len)):
#for (i = data_start_idx; i < data_start_idx + data_len; i++):
if (rd_buffer[i] == 0xfd):
continue #spike
f += (rd_buffer[i] & 0x0f) * mul
mul *= 10
f += (rd_buffer[i] >> 4) * mul
mul *= 10
#print("CIV_Action: Freq:", f, flush = True);
if rd_buffer[4] == 0x25 and rd_buffer[5] == 1:
bd.CIV_unselected_vfo = f
#print("VFOB Main", bd.CIV_unselected_vfo)
elif rd_buffer[4] == 0x25 and rd_buffer[5] == 0:
bd.CIV_selected_vfo = f
#rint("VFOA Main", bd.CIV_selected_vfo)
else:
if active_band:
bd.CIV_selected_vfo_rx = f
#print("VFOA Sub", bd.CIV_selected_vfo_rx)
else:
bd.CIV_selected_vfo = f
#print("VFOA Main", bd.CIV_selected_vfo)
#bd.CIV_selected_vfo_rx = 0
bd.frequency(bd.CIV_selected_vfo, bd.CIV_unselected_vfo, bd.CIV_selected_vfo_rx) # 0 is vfoa, 1 is vfo b
From: Mike Lewis
Sent: Monday, March 17, 2025 3:01 PM
To: 'K7MDL2/IC-705-BLE-Serial-Example' ***@***.***>
Subject: RE: [K7MDL2/IC-705-BLE-Serial-Example] Unable to get reply to any of CI-V commands from the radio (Discussion #22)
I also noted your frequency request is not formatted correctly.
Check out the CIV programmers guide for the 705.
The general form is
FE, FE, addr, addr, command , sub commands and/or data, FD
For frequency you would want BCD encoded little endian bytes after the frequency command.
Frequency commands are 0x0, 0x3, 0x5 and some others for general active VFO frequency.
0x2500, and ox2501 are selected and unselected VFO. You can find freq in many other like bandstack registers.
The above commands would be followed by 5 BCD data bytes for frequency
FE FE A4 E0 03 05 90 19 44 01 FD
This would be ‘ 01 44 19 90 05’ when converted to big endian byte order.
Then you convert BCD to decimal (see my code on the byte shifting to do that)
You get 144199005Hz or 144.199005MHz
The IC-905 uses 6 bytes for frequency data when on 10GHz or higher bands.
* Mike
From: Mike Lewis
Sent: Monday, March 17, 2025 2:49 PM
To: K7MDL2/IC-705-BLE-Serial-Example ***@***.******@***.***>>
Subject: RE: [K7MDL2/IC-705-BLE-Serial-Example] Unable to get reply to any of CI-V commands from the radio (Discussion #22)
I looked at the video. I think the BLE address in the paired devices list increments only if you have a second device connect. I tried changing the UUID for the controller and it never changed the address shown in the paired devices. At times I had up to 4 devices connected, a mix of BLE and Classic BT.
It seems like you have the login part and pairing solved, it is not responding to CI-V commands. That is normally because the radio address is not correct.
I usually auto detect the address. You can start off issuing the 0x19 TRX_ID command sent to address 0x00 (broadcast) and it will respond. Take the address from that response in byte 3. Ignore all messages where byte 3 == 0xE0 (which is you, the controller) or 0xEy – value ‘y’ could be another controller like wfView program) . If CIV Echo back is on you will get a command echo back from the controller address with Byte 3 == 0xE0 for every message you send. You can also just hard code the address to the IC-705, usually set to 0xA4.
Having finished my 5th or 6th variation on a CI_V decoder I am getting pretty good at CI-V stuff now 😊.
* Mike
From: Filip Melik ***@***.******@***.***>>
Sent: Monday, March 17, 2025 2:35 PM
To: K7MDL2/IC-705-BLE-Serial-Example ***@***.******@***.***>>
Cc: Subscribed ***@***.******@***.***>>
Subject: [K7MDL2/IC-705-BLE-Serial-Example] Unable to get reply to any of CI-V commands from the radio (Discussion #22)
Hello Mike, and thanks for your thorough research 👍
I am trying to use your knowledge to make an "adapter" between the 705 and my little device<https://github.com/filipmelik/wavelog-trx-interface>. I am using Micropython, but my question is probably not really related to the code itself - I was able to connect to device using my code, send UUID, Name and "Token" messages and get all the replies you list here in your code<https://github.com/K7MDL2/IC-705-BLE-Serial-Example/blob/main/IC-705_BLE_Decoder_Simple/IC-705_BLE_Decoder_Simple.ino#L382>.
I was also reading the Technical details page<https://github.com/K7MDL2/IC-705-BLE-Serial-Example/wiki/Technical-Details> multiple times to make sure I did not miss something.
My problem is that even though I get the "access to CIV granted" message, the radio does not reply to any of my commands (I tried multiple ones, including the one you have in your example). So my question is - do you see some obvious error or missing step, or do you remember if you went through the behavior like this in the past maybe? I am attaching the video for reference on how it behaves.
https://youtu.be/uP_H9OibZOs
Thank you for any possible insight 😊
—
Reply to this email directly, view it on GitHub<#22>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/APLVE7E6IO5KCS2IS77SOIT2U45YTAVCNFSM6AAAAABZGSKPMOVHI2DSMVQWIX3LMV43ERDJONRXK43TNFXW4OZYGA4TKNBXGM>.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.******@***.***>>
|
Beta Was this translation helpful? Give feedback.
-
Hi Mike, thanks so much for the insights and yout time 😊
I will try some more expoeriments, but I feel like I have tried almost everything I could think of. But I am curious - how did you manage to get the "pairing" sequence commands when it is not documented anywhere afaik? And one more thought - what firmware version does your rig have? I have this idea that it might be due to firmware difference, but that is just a long-shot, as I am starting to run out of ideas what I am doing wrong here. Filip |
Beta Was this translation helpful? Give feedback.
-
Did you fix your frequency command? Try other commands yet? The radio won’t typically reply to wrong format messages.
There are 2 open source projects that help figured out some of this. One is written in Swift for Apple devices that did the BLE. That code made my eyes cross but I was able to decipher it enough to figure out what to try for BLE. For all, I printed out any replies in hex and tried different things based on what I thought the other projects were doing (though not entirely clear at times).
wfView connects by USB and LAN, not BT, but I am using it a as LAN to virtual serail port bridge for a Pi based decoder. I am studying their code now to see how they do the LAN login and maintain the connection. I would like to add band decoder feature to it, and transverter offset support to it.
For the IC-905 to RF Unit TCP comms I just use tcpdump and push buttons and turn knobs and look for changes in packet lengths and contents that happen at that time.
My 705 firmware is the latest at 1.32. I doubt any changes to CI-V have been made in many years for the 705.
On the 705, BLE uses an advertisement approach and has been slow at times to connect and reconnect as it seems to skip some advert time slots. BT Classic reconnects very fast and has been very reliable but you do have to know the BT address in advance for that. I have a config file with suers BT address that overrides the default.
From: Filip Melik ***@***.***>
Sent: Thursday, March 20, 2025 12:23 PM
To: K7MDL2/IC-705-BLE-Serial-Example ***@***.***>
Cc: K7MDL ***@***.***>; Comment ***@***.***>
Subject: Re: [K7MDL2/IC-705-BLE-Serial-Example] Unable to get reply to any of CI-V commands from the radio (Discussion #22)
Hi Mike,
thanks so much for the insights and yout time 😊
I think the BLE address in the paired devices list increments only if you have a second device connect.
Thanks for clarifying on that, I must have misunderstood the info you have written. Makes sense.
I usually auto detect the address. You can start off issuing the 0x19 TRX_ID command sent to address 0x00 (broadcast) and it will respond
I tried this, unfortunately, the radio does not reply to the TRX ID command at all, which is pretty weird given that I am sending in to broadcast address. It replies to all my "setup" commands, up until the actual CI-V stuff, then it refuses to od anything :) I also tried other commands, but no joy :(
You can also just hard code the address to the IC-705, usually set to 0xA4
I have double checked that in the ic705's settings - this is the address my radio is set to (the default). So I cannot understand why is it not responding. By he way, I already have another project already done with CI-V working - using the IC-7300. So this is not the first time I am tackling the CI-V commands. So I am kind of familiar with the CI-V in a sense that ther eis this endianness fun etc. I just seems to fail in making it work using BLE on IC-705 😁
I will try some more expoeriments, but I feel like I have tried almost everything I could think of. But I am curious - how did you manage to get the "pairing" sequence commands when it is not documented anywhere afaik?
And one more thought - what firmware version does your rig have? I have this idea that it might be due to firmware difference, but that is just a long-shot, as I am starting to run out of ideas what I am doing wrong here.
Filip
—
Reply to this email directly, view it on GitHub<#22 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/APLVE7BCGFWBZVE5B2OHAQD2VMIQBAVCNFSM6AAAAABZGSKPMOVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTENJWHA2TAMI>.
You are receiving this because you commented.Message ID: ***@***.******@***.***>>
|
Beta Was this translation helpful? Give feedback.
-
You should be able to run my code on your S3 with minimal changes and turn off most of the features in the header file. It tries to autodetect the ESP32 version and even though it has M5Stack LCD graphics it usually can run with no graphics hardware OK. The transverter box configuration has no UI but also does not utilize BT.
From: Filip Melik ***@***.***>
Sent: Thursday, March 20, 2025 12:23 PM
To: K7MDL2/IC-705-BLE-Serial-Example ***@***.***>
Cc: K7MDL ***@***.***>; Comment ***@***.***>
Subject: Re: [K7MDL2/IC-705-BLE-Serial-Example] Unable to get reply to any of CI-V commands from the radio (Discussion #22)
Hi Mike,
thanks so much for the insights and yout time 😊
I think the BLE address in the paired devices list increments only if you have a second device connect.
Thanks for clarifying on that, I must have misunderstood the info you have written. Makes sense.
I usually auto detect the address. You can start off issuing the 0x19 TRX_ID command sent to address 0x00 (broadcast) and it will respond
I tried this, unfortunately, the radio does not reply to the TRX ID command at all, which is pretty weird given that I am sending in to broadcast address. It replies to all my "setup" commands, up until the actual CI-V stuff, then it refuses to od anything :) I also tried other commands, but no joy :(
You can also just hard code the address to the IC-705, usually set to 0xA4
I have double checked that in the ic705's settings - this is the address my radio is set to (the default). So I cannot understand why is it not responding. By he way, I already have another project already done with CI-V working - using the IC-7300. So this is not the first time I am tackling the CI-V commands. So I am kind of familiar with the CI-V in a sense that ther eis this endianness fun etc. I just seems to fail in making it work using BLE on IC-705 😁
I will try some more expoeriments, but I feel like I have tried almost everything I could think of. But I am curious - how did you manage to get the "pairing" sequence commands when it is not documented anywhere afaik?
And one more thought - what firmware version does your rig have? I have this idea that it might be due to firmware difference, but that is just a long-shot, as I am starting to run out of ideas what I am doing wrong here.
Filip
—
Reply to this email directly, view it on GitHub<#22 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/APLVE7BCGFWBZVE5B2OHAQD2VMIQBAVCNFSM6AAAAABZGSKPMOVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTENJWHA2TAMI>.
You are receiving this because you commented.Message ID: ***@***.******@***.***>>
|
Beta Was this translation helpful? Give feedback.
-
Hi Mike, I finally found the culprit, and I feel like a dumbass :) I could not get why the "pairing" messages went through but none of the CI-V messages. I feel like I have checked my code for 100 times, and I have also searched the implementation of BLE in micropython. But on 101st attempt to find the error, I have noticed that i missed the Thanks so much for the effort in helping me, really appreciate it ❤️ |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello Mike, and thanks for your thorough research 👍
I am trying to use your knowledge to make an "adapter" between the 705 and my little device. I am using Micropython, but my question is probably not really related to the code itself - I was able to connect to device using my code, send UUID, Name and "Token" messages and get all the replies you list here in your code.
I was also reading the Technical details page multiple times to make sure I did not miss something.
My problem is that even though I get the "access to CIV granted" message, the radio does not reply to any of my commands (I tried multiple ones, including the one you have in your example). So my question is - do you see some obvious error or missing step, or do you remember if you went through the behavior like this in the past maybe? I am attaching the video for reference on how it behaves.
https://youtu.be/uP_H9OibZOs
Thank you for any possible insight 😊
Beta Was this translation helpful? Give feedback.
All reactions