Keyboard Shortcuts
Likes
- N2adr-Sdr
- Messages
Search
Re: quisk-4.2.29: minor NO ATU glitch
Hello?Jaroslav,
I do see your point. But it is not easy to do. First, the HL2 does not know if there is an ATU. The "No ATU" message appears if there is no IO board. And the bottom row with the "ATU" message is created before the PC can query the HL2 for the existence of the IO board. And since the query for the IO board relies on an I2C transaction over UDP, the time this will take is not known with certainty. I don't want to complicate the code, so I am inclined to rely on the user to know if she has an ATU or not. At least the "ATU" label means that if the user has an IO board with an ATU attached, the control is there. Jim N2ADR |
Re: quisk-4.2.29: minor NO ATU glitch
Hi Jim,
toggle quoted message
Show quoted text
thanks for fixing the docs. But I still think the code also needs update. I think if no ATU is available, the GUI should from the start shows the "No ATU" message. Now, if Quisk is started it shows "ATU" and if you click the listbox the message changes to "No ATU" and stays "No ATU". I.e. it should probably try to query the ATU on the Quisk init and set the message accordingly 73! Jaroslav, OK2JRQ jimahlstrom napsal(a): Hello?Jaroslav, |
Re: Tips on interfacing I/Q data into quisk?
¿ªÔÆÌåÓýThanks Jim,?
I made a lot of progress on this now.? I have decided to leave the serial port until later or never because UDP is so much faster and easier.? I can do 96 kHz on most WiFi networks instead of 48 kHz.? I can leave the radio in the shack and access
it remotely if I like.? Thanks for the tips!
73,
Rob
KL7NA
Get From: [email protected] <[email protected]> on behalf of jimahlstrom via groups.io <jahlstr@...>
Sent: Friday, March 15, 2024 8:48:41 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.
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: 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:
|
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:
|
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() |
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:
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 |
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: 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 |