Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ubuntu SDRplay_API InitialiseMappingTableFromFile error -1: invalid filename #85

Open
Hazerre opened this issue Apr 11, 2024 · 1 comment
Assignees

Comments

@Hazerre
Copy link

Hazerre commented Apr 11, 2024

After having installed SDRPlay's API, installed SoapySDR, used make to install the SDRPlay module, I'm still having issues. Not sure what's wrong with it at this point. Any help is appreciated.

SoapySDRUtil --probe="driver=sdrplay"

######################################################
##     Soapy SDR -- the SDR abstraction library     ##
######################################################

Probe device driver=sdrplay
[INFO] devIdx: 0
[INFO] SerNo: 2234044947
[INFO] hwVer: 4
[INFO] rspDuoMode: 0
[INFO] tuner: 1
[INFO] rspDuoSampleFreq: 0.000000

----------------------------------------------------
-- Device identification
----------------------------------------------------
  driver=SDRplay
  hardware=RSPdx
  sdrplay_api_api_version=3.140000
  sdrplay_api_hw_version=4

----------------------------------------------------
-- Peripheral summary
----------------------------------------------------
  Channels: 1 Rx, 0 Tx
  Timestamps: NO
  Other Settings:
     * RF Gain Select - RF Gain Select
       [key=rfgain_sel, default=4, type=string, options=(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27)]
     * IQ Correction - IQ Correction Control
       [key=iqcorr_ctrl, default=true, type=bool]
     * AGC Setpoint - AGC Setpoint (dBfs)
       [key=agc_setpoint, default=-30, type=int, range=[-60, 0]]
     * BiasT Enable - BiasT Control
       [key=biasT_ctrl, default=true, type=bool]
     * RfNotch Enable - RF Notch Filter Control
       [key=rfnotch_ctrl, default=true, type=bool]
     * DabNotch Enable - DAB Notch Filter Control
       [key=dabnotch_ctrl, default=true, type=bool]
     * HDR Enable - RSPdx HDR Control
       [key=hdr_ctrl, default=true, type=bool]

----------------------------------------------------
-- RX Channel 0
----------------------------------------------------
  Full-duplex: NO
  Supports AGC: YES
  Stream formats: CS16, CF32
  Native format: CS16 [full-scale=32767]
  Antennas: Antenna A, Antenna B, Antenna C
  Corrections: DC removal
  Full gain range: [20, 59] dB
    IFGR gain range: [20, 59] dB
    RFGR gain range: [0, 27] dB
  Full freq range: [0.001, 2000] MHz
    RF freq range: [0.001, 2000] MHz
    CORR freq range:  MHz
  Sample rates: 0.0625, 0.096, 0.125, 0.192, 0.25, ..., 6, 7, 8, 9, 10 MSps
  Filter bandwidths: 0.2, 0.3, 0.6, 1.536, 5, 6, 7, 8 MHz

SoapySDRUtil --args="driver=sdrplay" --rate=2e6 --direction=RX

######################################################
##     Soapy SDR -- the SDR abstraction library     ##
######################################################

[INFO] devIdx: 0
[INFO] SerNo: 2234044947
[INFO] hwVer: 4
[INFO] rspDuoMode: 0
[INFO] tuner: 1
[INFO] rspDuoSampleFreq: 0.000000
[INFO] Using format CS16.
Stream format: CS16
Num channels: 1
Element size: 4 bytes
Begin RX rate test at 2 Msps
Starting stream loop, press Ctrl+C to exit...
[ERROR] error in activateStream() - Init() failed: sdrplay_api_Fail

journalctl -u sdrplay.service

Apr 11 05:49:20 portainer systemd[1]: Started SDRplay API Service.
Apr 11 05:49:20 portainer sdrplay_apiService[24076]: [24076]: sdrplay_apiService: sdrplay_apiServiceWorkerThread: Entry
Apr 11 05:49:20 portainer sdrplay_apiService[24076]: [24077]: sdrplay_apiService_device: heartBeatThread: Entry
Apr 11 05:49:20 portainer sdrplay_apiService[24076]: [24078]: sdrplay_apiService_device: registerDevThread: Entry
Apr 11 05:49:38 portainer sdrplay_apiService[24076]: [24716]: sdrplay_apiService_device: mCmdHandlerThread: Entry
Apr 11 05:49:38 portainer sdrplay_apiService[24076]: [24076]: sdrplay_apiService: SelectDevice: ERROR: InitialiseMappingTableFromFile error -1: invalid filename
Apr 11 05:49:38 portainer sdrplay_apiService[24076]: [24717]: sdrplay_apiService_rsp: streamThread: Entry
Apr 11 05:49:38 portainer sdrplay_apiService[24076]: [24716]: sdrplay_apiService_rsp_log_enable 3
Apr 11 05:49:38 portainer sdrplay_apiService[24076]: [24076]: sdrplay_apiService_log_enable: 0
Apr 11 05:49:38 portainer sdrplay_apiService[24076]: [24716]: sdrplay_apiService_rsp_log_enable 0
Apr 11 05:49:38 portainer sdrplay_apiService[24076]: [24076]: sdrplay_apiService_log_enable: 0
Apr 11 05:49:38 portainer sdrplay_apiService[24076]: [24716]: sdrplay_apiService_rsp_log_enable 0
Apr 11 05:49:42 portainer sdrplay_apiService[24076]: [24717]: sdrplay_apiService_rsp: streamThread: Exit
Apr 11 05:49:42 portainer sdrplay_apiService[24076]: [24716]: sdrplay_apiService_device: mCmdHandlerThread: Exit
@fventuri
Copy link
Collaborator

@Hazerre - usually the error message sdrplay_api_Fail means that there's an invalid or out of range parameter in the RSPdx API settings when the function sdrplay_api_Init().
The best way to find out what is the problem is to temporarily enable verbose debug messages in the SDRplay API. This can be done by uncommenting line 357 in Streaming.cpp (https://github.com/pothosware/SoapySDRPlay3/blob/master/Streaming.cpp#L357) and commenting out the previous line.

After that, please rebuild and reinstall this SoapySDRPlay3 module, and rerun the stream loop test with SoapySDRUtil; it will fail again, but this time the journalctl logs there should have some more useful details about what went wrong.

Please post those messages here so we can further troubleshoot the problem.
After the problem is fixed, you should change Streaming.cpp back to the way it was originally since verbose debugging adds some overhead.

Regarding that InitialiseMappingTableFromFile error message, I think it is harmless because I get it all the time here too. I think when you have an RSPdx, the SDRplay API can read an optional file called rspdx_gain_ini.txt, but I don't know what it should contain, and I don't think not having it affects normal operations.

Franco

@fventuri fventuri self-assigned this Apr 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants