开云体育

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

Re: quisk-4.2.29: minor NO ATU glitch

 

Hello?Jaroslav,

The Hardware -> Antenna tuner == None item refers to an antenna tuner attached to the end plate of the HL2. The "ATU" button on the last line of the screen refers to an antenna tuner attached to the IO board. I will correct the documentation.

Jim
N2ADR


Re: Tips on interfacing I/Q data into quisk?

 

Hello Rob,

The SDR-IQ uses the hardware file quisk_hardware_sdriq.py and all the code is in Python. The old sdriqpkg directory has the file sdriq.c. I can send you sdriq.c if you don't have it. But for the SDR-IQ the Python code is fast enough. I suggested looking at quisk_hardware_sdriq.py because it is easier to program in Python.

If your data rate is 3.5 Mbits/sec then this is very fast for a serial port. At one bit per baud it is 3,500,000 baud. Your file shows 460,800 baud. In either C or Python you will have to read and manage large chunks of data, not small records. And since serial ports usually have small buffers, you need to read the port continuously.

Jim
N2ADR


Re: Tips on interfacing I/Q data into quisk?

 

开云体育

Thanks, Ben, for the heads up on the WIFI scans.? Right now, I am using wired Ethernet on the Linux box, and no scans are set up at all on the Pico.? I'll have to check this out when I finish getting the Quisk hardware file working right.? ?Since I am a school employee, GitHub is sponsoring me with Copilot.? It has been immensely helpful for the once-in-a-while programmer.

73,
Rob
KL7NA


From: [email protected] <[email protected]> on behalf of Ben Cahill via groups.io <bmcahill@...>
Sent: Sunday, March 10, 2024 8:35 AM
To: [email protected] <[email protected]>
Subject: Re: [n2adr-sdr] Tips on interfacing I/Q data into quisk?
?
CAUTION: This email originated from outside the Walla Walla University email system.

Hi Rob,


Make sure you disable WiFi scans at both WiFi clients (APs do not scan) ... otherwise you will likely get periodic discontinuities as the WiFi clients briefly (e.g. ~100msec bursts every few minutes) tune away from the WiFi AP operating frequency to look for other WiFi access points ... there are (at least) 3 potential levels to configure on Linux (WiFi chip driver, WPA_supplicant, and WiFi app-level code), and different platforms/distributions/versions may (or may not) have easy ways to disable scans ... I've never figured out how to successfully stop scans on Windows, but (anyone!) please(!) let me know if you know or learn how to!


Also, you may be aware already, the Softrock RXTX Ensemble has transformer isolation between the USB-connected circuitry and the RF/baseband circuitry, in case you might be interested in pursuing the USB approach again in the future.


Good luck!


-- Ben, AC2YD --


On 3/9/24 23:39, Rob Frohne (KL7NA) via groups.io wrote:
Thanks Mike,
I got my board back from JLCPCB and did some testing.? It works okay over USB, but all the 1 uV birdies go away when I disconnect it from USB, so I was motivated to send the ADC data over WIFI using UDP.? This seems to have a lot more bandwidth than the ACM UART.? ?I will make some Python test code to see if I can receive the data using Python.? If that is the case, I hope I can just integrate it with the present version nicely.? ?There are not all the nice API instructions Jim put in the old code, but there is Github copilot.? It was really helpful tonight making the Pico UDP server work well.
73,
Rob
KL7NA



From: [email protected] <[email protected]> on behalf of Mike Black via groups.io <mdblack98@...>
Sent: Wednesday, March 6, 2024 6:40 AM
To: [email protected] <[email protected]>
Subject: Re: [n2adr-sdr] Tips on interfacing I/Q data into quisk?
?
CAUTION: This email originated from outside the Walla Walla University email system.


Try suppressing the flush.

You can use an IOBytes buffer and then write the buffer out to file.? That's probably the best/fastest solution.


Or you could try writing in chunks:

import os
import serial

port = "/dev/ttyACM0"
baudRate = 460800

try:
??? ser = serial.Serial(port, baudRate)
except serial.SerialException as e:
??? print(f"Error opening {port}: {str(e)}")
??? exit(1)

try:
??? with open("sound_data.csv", "w") as outFile:
??????? count = 0
??????? chunk_size = 100? # Define the size of each chunk
??????? data_chunk = []? # Initialize the list to hold data lines


??????? while count < 1000:
??????????? data = ser.readline().decode().strip()
??????????? if data:
??????????????? data_chunk.append(data + "\n")
??????????????? count += 1


??????????????? # When the chunk size is reached, write the chunk to the file
??????????????? if len(data_chunk) == chunk_size:
??????????????????? outFile.writelines(data_chunk)
??????????????????? data_chunk = []? # Reset the chunk


??????? # Write any remaining data in the chunk after the loop ends
??????? if data_chunk:
??????????? outFile.writelines(data_chunk)


finally:
??? ser.close()









Re: Tips on interfacing I/Q data into quisk?

 

开云体育

Hi Rob,


Make sure you disable WiFi scans at both WiFi clients (APs do not scan) ... otherwise you will likely get periodic discontinuities as the WiFi clients briefly (e.g. ~100msec bursts every few minutes) tune away from the WiFi AP operating frequency to look for other WiFi access points ... there are (at least) 3 potential levels to configure on Linux (WiFi chip driver, WPA_supplicant, and WiFi app-level code), and different platforms/distributions/versions may (or may not) have easy ways to disable scans ... I've never figured out how to successfully stop scans on Windows, but (anyone!) please(!) let me know if you know or learn how to!


Also, you may be aware already, the Softrock RXTX Ensemble has transformer isolation between the USB-connected circuitry and the RF/baseband circuitry, in case you might be interested in pursuing the USB approach again in the future.


Good luck!


-- Ben, AC2YD --


On 3/9/24 23:39, Rob Frohne (KL7NA) via groups.io wrote:

Thanks Mike,
I got my board back from JLCPCB and did some testing.? It works okay over USB, but all the 1 uV birdies go away when I disconnect it from USB, so I was motivated to send the ADC data over WIFI using UDP.? This seems to have a lot more bandwidth than the ACM UART.? ?I will make some Python test code to see if I can receive the data using Python.? If that is the case, I hope I can just integrate it with the present version nicely.? ?There are not all the nice API instructions Jim put in the old code, but there is Github copilot.? It was really helpful tonight making the Pico UDP server work well.
73,
Rob
KL7NA



From: [email protected] <[email protected]> on behalf of Mike Black via groups.io <mdblack98@...>
Sent: Wednesday, March 6, 2024 6:40 AM
To: [email protected] <[email protected]>
Subject: Re: [n2adr-sdr] Tips on interfacing I/Q data into quisk?
?
CAUTION: This email originated from outside the Walla Walla University email system.


Try suppressing the flush.

You can use an IOBytes buffer and then write the buffer out to file.? That's probably the best/fastest solution.


Or you could try writing in chunks:

import os
import serial

port = "/dev/ttyACM0"
baudRate = 460800

try:
??? ser = serial.Serial(port, baudRate)
except serial.SerialException as e:
??? print(f"Error opening {port}: {str(e)}")
??? exit(1)

try:
??? with open("sound_data.csv", "w") as outFile:
??????? count = 0
??????? chunk_size = 100? # Define the size of each chunk
??????? data_chunk = []? # Initialize the list to hold data lines


??????? while count < 1000:
??????????? data = ser.readline().decode().strip()
??????????? if data:
??????????????? data_chunk.append(data + "\n")
??????????????? count += 1


??????????????? # When the chunk size is reached, write the chunk to the file
??????????????? if len(data_chunk) == chunk_size:
??????????????????? outFile.writelines(data_chunk)
??????????????????? data_chunk = []? # Reset the chunk


??????? # Write any remaining data in the chunk after the loop ends
??????? if data_chunk:
??????????? outFile.writelines(data_chunk)


finally:
??? ser.close()









quisk-4.2.29: minor NO ATU glitch

 

Hi,

if no ATU is connected to HL2 and tuner is disabled (Hardware -> Antenna tuner = None) the ATU listbox on the main panel shows "ATU". If the listbox is clicked the text changes to "No ATU". I think it should show "No ATU" from the beginning in such case

73! Jaroslav, OK2JRQ


Re: Tips on interfacing I/Q data into quisk?

 

开云体育

Thanks Mike,
I got my board back from JLCPCB and did some testing.? It works okay over USB, but all the 1 uV birdies go away when I disconnect it from USB, so I was motivated to send the ADC data over WIFI using UDP.? This seems to have a lot more bandwidth than the ACM UART.? ?I will make some Python test code to see if I can receive the data using Python.? If that is the case, I hope I can just integrate it with the present version nicely.? ?There are not all the nice API instructions Jim put in the old code, but there is Github copilot.? It was really helpful tonight making the Pico UDP server work well.
73,
Rob
KL7NA



From: [email protected] <[email protected]> on behalf of Mike Black via groups.io <mdblack98@...>
Sent: Wednesday, March 6, 2024 6:40 AM
To: [email protected] <[email protected]>
Subject: Re: [n2adr-sdr] Tips on interfacing I/Q data into quisk?
?
CAUTION: This email originated from outside the Walla Walla University email system.


Try suppressing the flush.

You can use an IOBytes buffer and then write the buffer out to file.? That's probably the best/fastest solution.


Or you could try writing in chunks:

import os
import serial

port = "/dev/ttyACM0"
baudRate = 460800

try:
??? ser = serial.Serial(port, baudRate)
except serial.SerialException as e:
??? print(f"Error opening {port}: {str(e)}")
??? exit(1)

try:
??? with open("sound_data.csv", "w") as outFile:
??????? count = 0
??????? chunk_size = 100? # Define the size of each chunk
??????? data_chunk = []? # Initialize the list to hold data lines


??????? while count < 1000:
??????????? data = ser.readline().decode().strip()
??????????? if data:
??????????????? data_chunk.append(data + "\n")
??????????????? count += 1


??????????????? # When the chunk size is reached, write the chunk to the file
??????????????? if len(data_chunk) == chunk_size:
??????????????????? outFile.writelines(data_chunk)
??????????????????? data_chunk = []? # Reset the chunk


??????? # Write any remaining data in the chunk after the loop ends
??????? if data_chunk:
??????????? outFile.writelines(data_chunk)


finally:
??? ser.close()









Back From Skiing

 

Hello Group,

I just got back from a ski trip. I will try to catch up as soon as possible.

Jim
N2ADR


Re: Tips on interfacing I/Q data into quisk?

Mike Black
 

Try suppressing the flush.

You can use an IOBytes buffer and then write the buffer out to file.? That's probably the best/fastest solution.


Or you could try writing in chunks:

import os
import serial

port = "/dev/ttyACM0"
baudRate = 460800

try:
? ? ser = serial.Serial(port, baudRate)
except serial.SerialException as e:
? ? print(f"Error opening {port}: {str(e)}")
? ? exit(1)

try:
? ? with open("sound_data.csv", "w") as outFile:
? ? ? ? count = 0
? ? ? ? chunk_size = 100? # Define the size of each chunk
? ? ? ? data_chunk = []? # Initialize the list to hold data lines


? ? ? ? while count < 1000:
? ? ? ? ? ? data = ser.readline().decode().strip()
? ? ? ? ? ? if data:
? ? ? ? ? ? ? ? data_chunk.append(data + "\n")
? ? ? ? ? ? ? ? count += 1


? ? ? ? ? ? ? ? # When the chunk size is reached, write the chunk to the file
? ? ? ? ? ? ? ? if len(data_chunk) == chunk_size:
? ? ? ? ? ? ? ? ? ? outFile.writelines(data_chunk)
? ? ? ? ? ? ? ? ? ? data_chunk = []? # Reset the chunk


? ? ? ? # Write any remaining data in the chunk after the loop ends
? ? ? ? if data_chunk:
? ? ? ? ? ? outFile.writelines(data_chunk)


finally:
? ? ser.close()


Re: Tips on interfacing I/Q data into quisk?

 

开云体育

Hi Jim,
My simple test to see how Python keeps up doesn't seem encouraging.? I just did something simple like this:

import os
import serial

port = "/dev/ttyACM0"
baudRate = 460800

try:
? ?ser = serial.Serial(port, baudRate)
except serial.SerialException as e:
? ?print(f"Error opening {port}: {str(e)}")
? ?exit(1)

try:
? ?with open("sound_data.csv", "w") as outFile:
? ? ? ?count = 0
? ? ? ?while count < 1000:
? ? ? ? ? ?data = ser.readline().decode().strip()
? ? ? ? ? ?if data:
? ? ? ? ? ? ? ?outFile.write(data + "\n")
? ? ? ? ? ? ? ?count += 1
finally:
? ?ser.close()

print("Data collection complete.")

It gave me a plot like this:?

With C++, I get this: fdi
which is what I expect, with my finger on the ADC input.? I'm not sure how to make sure there is no blocking I/O or no flow control in Python, but I did that in C++ code which produced the expected result, so this test is maybe not definitive.

73,
Rob
KL7NA


From: [email protected] <[email protected]> on behalf of Rob Frohne (KL7NA) via groups.io <rob.frohne@...>
Sent: Tuesday, March 5, 2024 10:14 PM
To: [email protected] <[email protected]>
Subject: Re: [n2adr-sdr] Tips on interfacing I/Q data into quisk?
?
CAUTION: This email originated from outside the Walla Walla University email system.

Hi Jim,

I was looking at version 4.2.28 since I had the source handy, and was looking at sdriq.cpp as you recommended.? I thought before I got to hacking around to try and get something going, I should update to the latest?version, so I did from github.? Now I cannot find the sdriqpkg directory or sdriq.cpp.? ?Can you clue me in on what I am missing?? It looks?like you moved everything to Python.? You had a nice "API" in the old C++ file.? Is Python going to be fast enough to handle the approximately 3.5 Mbit/s I am expecting over /dev/ttyAC0?? What do you recommend now?

Thanks & 73,

Rob
KL7NA

From: [email protected] <[email protected]> on behalf of Rob Frohne (KL7NA) via groups.io <rob.frohne@...>
Sent: Tuesday, December 26, 2023 3:17 PM
To: [email protected] <[email protected]>
Subject: Re: [n2adr-sdr] Tips on interfacing I/Q data into quisk?
?
CAUTION: This email originated from outside the Walla Walla University email system.

Cool!? Thanks Jim.? I will try and decimate it down to something more manageable on my end,? It is a relief to know Quisk can handle some small mismatch.

73,
Rob
KL7NA


From: [email protected] <[email protected]> on behalf of jimahlstrom via groups.io <jahlstr@...>
Sent: Tuesday, December 26, 2023 1:06 PM
To: [email protected] <[email protected]>
Subject: Re: [n2adr-sdr] Tips on interfacing I/Q data into quisk?
?
CAUTION: This email originated from outside the Walla Walla University email system.

>>Do you have a feel for the best way to deal with the fact that my sample rate is going to be 48.0460 kHz, not 48 kHz?

Quisk can correct small rate differences itself. Otherwise the SDR-IQ rate correction can be used. We will have to deal with this once we have the hardware available.

Jim
N2ADR


Re: Tips on interfacing I/Q data into quisk?

 

开云体育

Hi Jim,

I was looking at version 4.2.28 since I had the source handy, and was looking at sdriq.cpp as you recommended.? I thought before I got to hacking around to try and get something going, I should update to the latest?version, so I did from github.? Now I cannot find the sdriqpkg directory or sdriq.cpp.? ?Can you clue me in on what I am missing?? It looks?like you moved everything to Python.? You had a nice "API" in the old C++ file.? Is Python going to be fast enough to handle the approximately 3.5 Mbit/s I am expecting over /dev/ttyAC0?? What do you recommend now?

Thanks & 73,

Rob
KL7NA


From: [email protected] <[email protected]> on behalf of Rob Frohne (KL7NA) via groups.io <rob.frohne@...>
Sent: Tuesday, December 26, 2023 3:17 PM
To: [email protected] <[email protected]>
Subject: Re: [n2adr-sdr] Tips on interfacing I/Q data into quisk?
?
CAUTION: This email originated from outside the Walla Walla University email system.

Cool!? Thanks Jim.? I will try and decimate it down to something more manageable on my end,? It is a relief to know Quisk can handle some small mismatch.

73,
Rob
KL7NA


From: [email protected] <[email protected]> on behalf of jimahlstrom via groups.io <jahlstr@...>
Sent: Tuesday, December 26, 2023 1:06 PM
To: [email protected] <[email protected]>
Subject: Re: [n2adr-sdr] Tips on interfacing I/Q data into quisk?
?
CAUTION: This email originated from outside the Walla Walla University email system.

>>Do you have a feel for the best way to deal with the fact that my sample rate is going to be 48.0460 kHz, not 48 kHz?

Quisk can correct small rate differences itself. Otherwise the SDR-IQ rate correction can be used. We will have to deal with this once we have the hardware available.

Jim
N2ADR


Re: Reading band or frequency from quisk_widgets.py

 

I've finally figured out how to do this: The variable can be accessed as "self.application.lastBand" from inside the function "UpdateText(self)"


Re: Bug. Window width pixels

 

The problem was solved as follows.
#wFrame, h = frame.GetClientSize().Get()?# client window width
wFrame = conf.window_width - 15


Reading band or frequency from quisk_widgets.py

 

Hi group,

I am trying to extend the following widget:

What I am trying to achieve is to automatically change the selected band on the Hardrock-50 via an API call. At the moment I have added a button for each band (not in the code linked above) and when I click on it a request is sent to the server component which then sends the serial command to the HR50. Now I want to automate this.
To do this, I need to continuously read the selected band (or frequency if band is not possible), but I can only do this at startup by adding
to the function Widgets_0x06(self, app, hardware, conf, frame, gbs, vertBox)

The function "UpdateText(self)" is called all the time so I tried to read out the value from there as a test but I failed since I cannot reach it from inside this function.

Can you please help me here?

Thanks and 73
Michael, DK1MI


Re: Bug. Window width pixels

 

The value of?wFrame in the second line is incorrect at first, and after the second reboot it becomes correct.


Re: Hamlib/rigctl compatibility?

 

This is very interesting information.

I feel that it belongs in a document for people wanting to add support for their SDR to Hamlib.

I have been reading the README.* files in the Hamlib repo.

May I suggest adding a README.sdr to include this info and any other related info?

IMO it's just not obvious on what the best way to do this is.

Re: "You can connect to any rig via a TCP socket " -- note that README.md says:

Initially serial (RS232) connectivity will be handled, but we expect that IP
(and other) connectivity will follow afterwards.

So it's probably time to update that.

Regards,
Dave, N1AI



Re: Quisk Error on pip install (Cannot open include file: 'sys/time.h') on Windows 11

 

On Fri, Mar 1, 2024 at 01:28 AM, Rob Frohne (KL7NA) wrote:

Does anyone have any ideas on how to fix this problem?
Which compiler? With MSVC I assume since it does not have 'sys/time.h'.

Your student need to use MinGW. But I've no experience with "pip install" and MinGW.

Untested: "python setup.py build -c mingw32" could do it.


Quisk Error on pip install (Cannot open include file: 'sys/time.h') on Windows 11

 

开云体育

Does anyone have any ideas on how to fix this problem?? This is from ac2yd/remote.c(12).? This is with Python 3.12.1.? One of my students is having this issue.

Rob
KL7NA

--

Rob Frohne, PhD PE

School of Engineering

Walla Walla University

100 SW 4th St

College Place, WA 99324

(509) 527-2075


Re: Hamlib/rigctl compatibility?

Mike Black
 

The reason rigctld emulation is a bad idea is that it changes over time.? And the client may want vfo mode or not so most every command has to be checked for VFO.
A rig definition never changes -- but it can be extended.
Historically rigctld emulation was only necessary if you wanted a socket connection but that's not true anymore.
You can connect to any rig via a TCP socket and in 4.7 you'll be able to have a UDP/Multicast connection to control the rig.

So here's a rigctld emulation in code.

fgets(buf,sizeof(buf),fp);
char vfo[16];
long freqA,freqB;
int n = sscanf(buf,"f %s %ld", vfo, &freq);
if (n == 2) { // then there's no VFO
????int n = sscanf(buf,"f? %ld", &freq);
? ? vfo = current_vfo;? // you have to track which vfo is active -- PITA
}
if (vfo == 'VFOA') freqA = freq;
else if (vfo == 'VFOB') freqB = freq;
else printf("unknown vfo")
printf ("read freq %ld from vfo %s\n", freq, vfo);

And here's a TS-2000 emulator which is very straightforward and easy to understand.

fgets(buf,sizeof(buf),fp);
char vfo[16];
long freq;
int n = sscanf(buf,"FA%d",&freq);
printf ("read freq %ld from vfo %s\n", freq, vfo);
if (n == 1)
{
?freqA = freq;
}
n = sscanf(buf,"FB%d",&freq);
if (n == 1)
?freqB = freq;
}

Mike W9MDB

On Tuesday, February 27, 2024 at 06:31:31 AM CST, Roger David Powers via groups.io <progpwr@...> wrote:





On Fri, Aug 18, 2023 at 01:50 PM, jimahlstrom wrote:

I can alter Quisk's Hamlib code if it makes it more convenient for the Hamlib community, but I need a description of what to change.
In?/g/n2adr-sdr/message/3043?we get a hint.

You probably should read the whole thread when you get a chance.

Personally I think emulating rigctld was a good idea, and I don't know why some think it was a bad idea.

I've read the code of an emulated TS-2000 and it reads like a hex dump.

Yet it seems the current "best practice" is to emulate a real radio closest to the SDR's capabilities, and use a radio-specific back end to tweak any back-end differences.

It seems to me this would lead to lots of copy/paste code since hamlib isn't object-oriented so their is no core object you can extend as far as I can tell.

It seems there are function pointers to call into other radio objects, but still it seems to take a few thousand lines of code to do a back end regardless.

As usual, these are just my opinions, and I'm willing to be corrected.

Regards,
RDP


Re: Hamlib/rigctl compatibility?

 

On Fri, Aug 18, 2023 at 01:50 PM, jimahlstrom wrote:
I can alter Quisk's Hamlib code if it makes it more convenient for the Hamlib community, but I need a description of what to change.
In?/g/n2adr-sdr/message/3043?we get a hint.

You probably should read the whole thread when you get a chance.

Personally I think emulating rigctld was a good idea, and I don't know why some think it was a bad idea.

I've read the code of an emulated TS-2000 and it reads like a hex dump.

Yet it seems the current "best practice" is to emulate a real radio closest to the SDR's capabilities, and use a radio-specific back end to tweak any back-end differences.

It seems to me this would lead to lots of copy/paste code since hamlib isn't object-oriented so their is no core object you can extend as far as I can tell.

It seems there are function pointers to call into other radio objects, but still it seems to take a few thousand lines of code to do a back end regardless.

As usual, these are just my opinions, and I'm willing to be corrected.

Regards,
RDP


Some other questions about the screen

 

What is the Rflna slider, what is its purpose?
What is the screen got when hitting the Bscope button?
How can I show the "slider 0 to 100% to change the transmit power", which is indicated in the HL2 - Bands - Tx level comment?
73 - Pierre - FK8IH