Closed karel closed 6 years ago
Theres never been a formal SoapySDR API for that because so many devices do it differently. Automatically on load, command line apps, and obviously APIs -- which in this case is great.
I recommend overloading the writeSettings(key, value)
call to implement something like
#for example in python it could look like this
device.writeSettings('RESET', 'true');
device.writeSettings('FIRMWARE', open(fw_file).read());
Apparently the firmware files are not well suited to be represented as strings, getting some encoding errors etc. I currently only need the reset function so I am skipping the others.
I may have wrongly assumed that the firmware functions took file contents, but given that the parameter is char *, they probably just take the file path, so device.writeSettings('FIRMWARE', open(fw_file).read());
is really device.writeSettings('FIRMWARE', fw_file);
FWIW
How should the functions in libbladeRF: Device loading and programming be made available from SoapyBladeRF? Especially interested in the device reset functionality.