Page 3 of 5

Re: SD card image with Debian 8.0, Red Pitaya web server and

Posted: Mon Oct 26, 2015 11:30 pm
by pavel
Hi Adam,

I've just tried the latest Red Pitaya SD card image and I'd say that it should solve all your problems.

Here is what I've done:
  • downloaded red_pitaya_OS_v0.94-RC16_21-Oct-2015.img.zip from http://downloads.redpitaya.com/downloads/
  • unzipped and copied the image to an SD card
  • fixed the Wi-Fi problem with the following commands (to be run from the Red Pitaya command line):

    Code: Select all

    /opt/redpitaya/sbin/rw
    curl -L https://raw.githubusercontent.com/RedPitaya/RedPitaya/master/OS/debian/overlay/etc/hostapd/hostapd.conf -o /opt/redpitaya/hostapd.conf
    /opt/redpitaya/sbin/ro
    reboot
  • checked that Red Pitaya can be accessed via Wi-Fi and its IP address is 192.168.128.1
  • then I copied the blink C example from http://redpitaya.com/make-your-app/blink/ to blink.c
  • replaced #include "redpitaya/rp.h" with #include "rp.h"
  • compiled it from the Red Pitaya command line:

    Code: Select all

    gcc -I/opt/redpitaya/include -L/opt/redpitaya/lib -Wl,-rpath,/opt/redpitaya/lib -lrp -lm -o blink blink.c
  • run it:

    Code: Select all

    ./blink
  • spent a few moments enjoying the blinking LED
  • stopped ./blink by pressing Ctrl+C
  • looked at the SCPI instructions at http://redpitaya.com/control/
  • started the SCPI server:

    Code: Select all

    systemctl start redpitaya_scpi
  • copied the blink Python example from http://redpitaya.com/make-your-app/blink/ to blink.py on a PC running Linux
  • copied redpitaya_scpi.py to the same PC
  • run it:

    Code: Select all

     python blink.py 192.168.128.1
  • spent another few moments enjoying the blinking LED
  • stopped blink.py by pressing Ctrl+C
So, with just a few tweaks here and there, the latest version of the Red Pitaya SD card image is perfectly usable. The gcc compiler works, the SCPI server works, the Wi-Fi access point works.

Could you give it a try and let me know how it worked for you?

Cheers,

Pavel

Re: SD card image with Debian 8.0, Red Pitaya web server and

Posted: Tue Oct 27, 2015 7:31 pm
by adam.polak
Hi,
Thank you again for prompt reply!
Today I failed already on the second point - copying the image to SD card. I don't know what is wrong (you were successful with that so it must be something at my side) but first of all it always took ages to finally copy the image onto the card (well, not ages, more like 45 minutes with dd), but then when I put it in RP and plug it in within few seconds of initialization RP starts blinking with red LED (LED 9) and is not responsive. I have no idea what is going wrong - I'm using standard methods to copy the image - I tried several times today - both with dd on Linux and Win32DiskImager under Win8, when the ones on Linux keep failing. Later on I tried the image RC15 from 12-Oct, but with the same result. There is nothing wrong with the RP because with card with old 0.92 ecosystem it initiate normally, so the only thing I can think of is that my SD card died.. somehow.. I don't know , but I will keep trying - I may find other card tomorrow to check if that's the problem.. I'll feedback my progress
Cheers!
Adam

Re: SD card image with Debian 8.0, Red Pitaya web server and

Posted: Wed Nov 11, 2015 5:13 pm
by dl7la
Hi Pavel,

great work, thanks a lot.

I'm aiming at running quisk, a SDR software in the repository. Therefore I am trying to get an external soundcard working via/at the USB A connector, without success so far. Inserting USB sticks with files works, the files are displayed and can be read. Inserting e.g. an USB headset from Logitech a lsusb will correctly identify it but aplay -l will nit find any soundcard to configure. Same hold true for a Logilink USB sound card. I installed ALSA witout problems.

Any ideas about what is missing from Debian that I must install?

TIA
Guenter

Re: SD card image with Debian 8.0, Red Pitaya web server and

Posted: Wed Nov 11, 2015 8:42 pm
by pavel
Hi Guenter,

I've been thinking about trying a USB sound card with Red Pitaya but could not find a good occasion.

What is missing is the Linux USB sound driver. I've just added it to my Linux patches with this commit.

As a quick fix I can propose you to download new uImage file from this link, copy it to /boot on your Debian SD card and reboot Red Pitaya. Then the sound should start to work.

I'm curious to know what solution you're going to use for display.

If you find that Red Pitaya does not have enough CPU power to run Quisk, it might be possible to make some optimizations, like for example, running FFT for spectrum display on FPGA and directly interfacing Quisk with Red Pitaya SDR.

Best regards,

Pavel

Re: SD card image with Debian 8.0, Red Pitaya web server and

Posted: Wed Nov 11, 2015 11:38 pm
by dl7la
Hi, Pavel,

thanks a lot, didn't expect that early an answer, I will try that asap (tomorrow..) I'm very curious now.

quisk SDR by Jim, N2ADR, originally consists of a hardware component where an ADC samples the antenna signal at 122,8 MSps. These samples are processed in FPGA hardware and sent to the software part as a UDP stream via the network (ethernet, WLAN). The software component is on a remote PC, where display and audio output and other control elements take place.

quisk was started as a python project running on linux an in the meantime supports quite some hardware platforms for the sample process, even down to soundcards fed with I/Q samples from audio baseband demodulators. It also transmits.

Since the Pitaya provides practically all essential hardware components hopefully a scaled down solution could be found for SDR reception.

I'll report soon on the results. Tnx again

Guenter DL7LA

Re: SD card image with Debian 8.0, Red Pitaya web server and

Posted: Thu Nov 12, 2015 12:03 am
by pavel
Hi Guenter,

I'm a little bit confused with your last comment. Are you planning to run Quisk on Red Pitaya or on remote PC?

When running on a remote PC, Quisk can be already used with the Red Pitaya SDR transceiver compatible with HPSDR. The Hermes configuration file (hermes/quisk_conf.py) works out of the box. More details can be found at this link.

There is already an active forum thread about the Red Pitaya SDR transceiver:

viewtopic.php?f=11&t=265

Best regards,

Pavel

Re: SD card image with Debian 8.0, Red Pitaya web server and

Posted: Thu Nov 12, 2015 12:13 pm
by dl7la
Hi, Pavel,

you are right, sounds all a bit confusing. The reason is that I'm still heavily experimenting with similar but different concepts and my mileage is still low. Using quisk as a 'test vehicle' since I'm familiar with it since its beginnings was the main reason. The facility of using USB sound I/O is now very useful.

Anyway with the changed uImage and after applying 'alsactl init' and rebooting aplay -l is now listing the hardware. Great progress as one can see... I guess I can now continue on my own for the time being.

Thank you once again for your work and efforts

Guenter DL7LA

Re: SD card image with Debian 8.0, Red Pitaya web server and

Posted: Wed Dec 09, 2015 4:32 pm
by greggdaug
I'm having trouble getting quisk to work with the sdr_transceiver_hpdr build. The process sdr_transceiver_hpdr appears to be running but quisk (remote pc running debian8) reports no capture device found when using the hermes/quisk_conf.py config file. Is there something in this file that needs changing? Current contents are shown below.

Thanks for any help you can provide.

-Gregg


# My mods to hermes/quisk_conf.py

from hermes import quisk_hardware
from hermes import quisk_widgets

use_rx_udp = 10 # Use this for Hermes-Lite
#rx_udp_clock = 73728000 # The clock is 73.728 or 61.440 megahertz. Adjust slightly for actual frequency.
rx_udp_clock = 61440000
rx_udp_ip = '192.168.1.100' # Sample source IP address "" for DHCP
rx_udp_port = 1024 # Sample source UDP port; must be 1024
data_poll_usec = 10000 # poll time in microseconds

use_sidetone = 1 # Use the Quisk sidetone for CW

sample_rate = 96000
name_of_sound_capt = "" # We do not capture from the soundcard

#name_of_sound_play = 'hw:0,0' # Play radio sound here. Linux.
#microphone_name = 'hw:0,0' # The microphone is here.

name_of_sound_play = 'pulse:Built-in Audio Analog Stereo'
microphone_name = 'pulse:Built-in Audio Analog Stereo'

#name_of_sound_play = 'Primary' # Play radio sound here. Windows.
#microphone_name = 'Primary' # The microphone is here.

graph_y_scale = 100
graph_y_zero = 100
playback_rate = 48000
add_imd_button = 1
add_fdx_button = 1
tx_level = {None:255, '60':255} # Adjust your power for each band

# Control the J16 connector according to the band. J16 is C0 index 0, C2[7:1]. If the band is not here, the default is 0x00.
# This value is written to bits C2[7:1]. That is, it is left shifted by one bit and written to byte C2.
Hermes_BandDict = {'160':0b0000001, '80':0b0000010, '60':0b0000100, '40':0b0001000, '30':0b0010000, '20':0b0100000, '15':0b1000000}

Re: SD card image with Debian 8.0, Red Pitaya web server and

Posted: Thu Dec 10, 2015 1:12 am
by pavel
Hi Gregg,

What Quisk version are you using?

The last version that I tested was 3.7.6.

In my configuration rx_udp_ip is empty:

Code: Select all

rx_udp_ip = ""
There is already an active forum thread about the SDR applications:

viewtopic.php?f=11&t=265

Please post your other SDR related questions to that thread.

Cheers,

Pavel

Re: SD card image with Debian 8.0, Red Pitaya web server and

Posted: Thu Dec 10, 2015 8:19 am
by greggdaug
quisk_status.png
Hi Pavel,

I tried both 3.7.8 and 4.0.1, (windows and debian) both with the same result. There doesn't appear to be any UDP communication taking place.

RP IP = 192.168.1.100
PC IP = 192.168.1.101

ping works ok.

How is communication initiated? Is there some way of verifying the connection?

Thanks for your help,

-Gregg WB6YAZ