cariboulabs / cariboulite

CaribouLite turns any 40-pin Raspberry-Pi into a Tx/Rx 6GHz SDR
1.1k stars 104 forks source link

Unsupported frequency for the ISM S1G channel #204

Open rbalashevich opened 7 months ago

rbalashevich commented 7 months ago

I am trying to implement a script in Python which detects Wi-Fi signal. How to implement it? If I set

device_args = {"driver": "Cariboulite"}
sdr = SoapySDR.Device(device_args)

# Set sample rate, frequency, gain, etc.
sample_rate = 2e6  
frequency = 2.45e9  # 2.45 GHz frequency (WiFi 2.4 GHz band)        <-- here
gain = 20  

sdr.setSampleRate(SOAPY_SDR_RX, 0, sample_rate)
sdr.setFrequency(SOAPY_SDR_RX, 0, frequency)
sdr.setGain(SOAPY_SDR_RX, 0, gain)

# Set up streaming
rx_stream = sdr.setupStream(SOAPY_SDR_RX, SoapySDR.SOAPY_SDR_CF32)
sdr.activateStream(rx_stream)

I am getting

E CARIBOULITE Radio cariboulite_radio_set_frequency@cariboulite_radio.c:874 Unsupported frequency for the ISM S1G channel - 2450000000.00 Hz, deactivating channel                                                                                                                                                                                         
[ERROR] setFrequency dir: 1, channel: 0, freq: 2450000000.00 FAILED 

Here's my Soapy SDR Utility output, seems to be ok:

$ SoapySDRUtil -probe
######################################################
##     Soapy SDR -- the SDR abstraction library     ##
######################################################

Probe device 
[INFO] SoapyCaribouliteSession, sessionCount: 0
04-24 11:14:21.328 383911 383911 I FPGA caribou_fpga_program_to_fpga@caribou_fpga.c:210 FPGA already operational - not programming (use 'force_prog=true' to force update)
Printing 'findCariboulite' Request:                                                                                                                                                           
[INFO] [UHD] linux; GNU C++ version 11.3.0; Boost_107400; UHD_4.1.0.5-0-unknown                                                                                                               
[INFO] Initializing DeviceID: 0, Label: CaribouLite S1G[5e8f6274], ChannelType: S1G
[INFO] Creating SampleQueue MTU: 131072 I/Q samples (524288 bytes)

----------------------------------------------------
-- Device identification
----------------------------------------------------
  driver=Cariboulite
  hardware=Cariboulite Rev2.8
  device_id=0
  fpga_revision=1
  hardware_revision=0x0001
  product_name=CaribouLite RPI Hat
  serial_number=2940711226
  vendor_name=CaribouLabs LTD

----------------------------------------------------
-- Peripheral summary
----------------------------------------------------
  Channels: 1 Rx, 1 Tx
  Timestamps: NO

----------------------------------------------------
-- RX Channel 0
----------------------------------------------------
  Full-duplex: NO
  Supports AGC: YES
  Stream formats: CS16, CS8, CF32, CF64
  Native format: CS16 [full-scale=4095]
  Antennas: TX/RX Sub1GHz
  Full gain range: [0, 69] dB
    Modem AGC gain range: [0, 69] dB
  Full freq range: [389.5, 510], [779, 1020] MHz
    RF freq range: [389.5, 510], [779, 1020] MHz
  Sample rates: 4, 2, 1.333, 1, 0.8, 0.666, 0.5, 0.4 MSps
  Filter bandwidths: 0.02, 0.05, 0.1, 0.2, 0.25, 1, 1.25, 1.5625, 2, 2.5 MHz
  Sensors: RSSI, ENERGY, PLL_LOCK_MODEM
     * RSSI (RX RSSI):[-127, 4] 0.000000
        Modem level RSSI measurment
     * ENERGY (RX ENERGY):[-127, 4] 0.000000
        Modem level ENERGY (EDC) measurment
     * PLL_LOCK_MODEM (PLL Lock Modem): 1.000000
        Modem PLL locking indication

----------------------------------------------------
-- TX Channel 0
----------------------------------------------------
  Full-duplex: NO
  Supports AGC: NO
  Stream formats: CS16, CS8, CF32, CF64
  Native format: CS16 [full-scale=4095]
  Antennas: TX/RX Sub1GHz
  Full gain range: [0, 31] dB
    Modem PA gain range: [0, 31] dB
  Full freq range: [389.5, 510], [779, 1020] MHz
    RF freq range: [389.5, 510], [779, 1020] MHz
  Sample rates: 4, 2, 1.333, 1, 0.8, 0.666, 0.5, 0.4 MSps
  Filter bandwidths: 0.08, 0.1, 0.125, 0.16, 0.2, 0.4, 0.5, 0.625, 0.8, 1 MHz
  Sensors: PLL_LOCK_MODEM
     * PLL_LOCK_MODEM (PLL Lock Modem): 1.000000
        Modem PLL locking indication
rbalashevich commented 7 months ago

Maybe Matteo @matteoserva knows the workaround?

rbalashevich commented 7 months ago

If I understand right, the board itself supports two RX channels: S1G for sub-1GHz band, WB is a Wide tuning channel which operates in higher frequencies. So the question today is "How to switch one of the board's RX channels to WB with SoapySDR?"

rbalashevich commented 7 months ago

Found the answer here.

sdrHiF = SoapySDR.Device({"driver": "Cariboulite", "channel": "HiF"})

But it is still unclear how to be sure (to track, to capture) is the signal really in the air, or not.