Hi Gary,
K3OS wrote:Dan -
I'll look forward to the update. Will it also cure the graphical crash on rotation?
Yes.
Would you help me with some code. I'm sure it's syntax and I'm a hardware guy, not software:)
Here's what I tried for PTT polling. Where would this be indicated on the app?
Elecraft TQ command returns "TQ0" for PTT OFF and "TQ1" for ON
CMD_READ_PTT=02,00,<STQ;>,<R>,03,<00>,<00>,<STQ0=OFF;STQ1=ON>
Here's the S-meter Command:
Elecraft SMH command returns "SMHxxx" where xxx is the s-meter value expressed as a decimal number. I assumed this number is one hex byte. I queried the radio with steady state noise to get these values.
CMD_READ_SMETER=01,01,,<SSMH;>,<R>,04,<00,00,00,1A=S3>,<00,00,00,1A=S3>,<00,00,00,20=S5>,<00,00,00,2A=S7>,<00,00,00,2D=S9>,<00,00,00,34=S9+10>,<00,00,00,3C=S9+20>
Then I added a polling statement. A small dot blinks on the left corner opposite the heartbeat. I guess that indicates polling, but that's all I get.
Yes, this means that polling is active.
First I need to know if TQ command can be used during both Rx and Tx. If this is the case, the right syntax for PTT read is the following:
CMD_READ_PTT=01,00,<STQ;>,<R>,03,<00>,<00>,<S0=OFF;S1=ON>
with the following explanation:
01 - read PTT status in each polling loop
00 - reat during both Rx and Tx
<STQ;> - send 'TQ;' command
<R> - separator
03 - 3 bytes are expected to be returned by the radio
<00> - this byte is discarded
<S0=OFF;S1=ON> - if the char in this byte is '0' then consider PTT off, if ''1' then PTT is ON.
For the S-METER things are more complicated, so you need to use calibration parameter too(it may require some tuning of the calibration parameter based on the specific values returned by the radio):
CMD_READ_SMETER=01,01,<SSMH;>,<R>,06,<00>,<00>,<00>,<T2>,<T1>,<T0>
with the following explanation:
01 - read the parameter each polling loop
01 - read only turing Rx
<SSMH;> - send the command 'SMH'
<R> - separator
06 - 6 bytes are expected to be returned by the radio
<00> - this byte is discarded
<T2> - hundreds digit of a decimal number (as a character)
<T1> - tens digit of a decimal number
<T0> - units digit of a decimal number
then for the calibration parameters. I don't have the right values for all S levels, so you need to change to the right values. Any values in between the defined ones are automatically interpolated by the application. Please be aware that all values assigned to each S are 3 digits decimal values.
CALIB_SMETER=<MAX=100>,<0=0;10=1;17=2;26=3;29=4;32=5;37=6;42=7;43=8;45=9;52=910;60=920;70=930;80=940;90=950;100=960>
with the following explanation:
<MAX=100> - decimal value corresponding with the S-meter bargraph in Pocket RxTx fully lighted
0=0 - 000 value means S0 (my estimation, as I don't have the real values)
10=1 - 010 decimal value means S1 (my estimation, as I don't have the real values)
17=2 - 017 decimal value means S2 (my estimation, as I don't have the real values)
23=3 - 023 decimal value means S3 (1A hex value in your example)
29=4 - 029 decimal value means S4 (my estimation, as I don't have the real values)
32=5 - 032 decimal value means S5 (20 hex value in your example)
37=6 - 037 decimal value means S6 (my estimation, as I don't have the real values)
42=7 - 042 decimal value means S7 (2A hex value in your example)
43=8 - 043 decimal value means S8 (my estimation, as I don't have the real values)
45=9 - 045 decimal value means S9 (2D hex value in your example)
52=910 - 052 decimal value means S9+10dB (34 hex value in your example)
60=920 - 060 decimal value means S9+20dB (3C hex value in your example)
70=930 - 070 decimal value means S9+30dB (my estimation, as I don't have the real values)
80=940 - 080 decimal value means S9+40dB (my estimation, as I don't have the real values)
90=950 - 090 decimal value means S9+50dB (my estimation, as I don't have the real values)
100=960 - 100 decimal value means S9+60dB (my estimation, as I don't have the real values)
Hope this clarify the syntax for the read commands.
73 Dan YO3GGX