Utilities for working with the M17 SX1255 HAT.
Based on the work of Wojciech Kaczmarski SP5WWP and the M17 Project: zmq-pub.c, and zmq-sub.c, libsx1255, LinHT-utils, LinHT-share
Make sure you have a fast connection to your Raspberry Pi. Two 32 bit integers at 500K samples/second is 32 Mbits/sec one-way! On my Raspberry Pi Zero 2W I had to use a wired connection.
Configure the M17 sx1255 HAT via SPI/GPIO
Usage: sx1255-config <COMMAND>
Commands:
info Prints info about device state
reset Resets the device
save Save device state to file
load Loads device state from file
set Sets a register variable
help Print this message or the help of the given subcommand(s)
Options:
-h, --help Print help
-V, --version Print version
ryan@sx1255:~/sx1255-utils $ ./target/debug/sx1255-config set --help
Sets a register variable
Usage: sx1255-config set <COMMAND>
Commands:
driver_enable Enables the PA driver
tx_enable Enables the complete Tx part of the front-end (except the PA)
rx_enable Enables the complete Rx part of the front-end
ref_enable Enables the PDS and the oscillator
rx_freq Sets the Rx frequency
tx_freq Sets the Tx frequency
tx_dac_gain Sets the Tx DAC gain
tx_mixer_gain Sets the Tx mixer gain
tx_mixer_tank_cap Sets the capacitance in parallel with the mixer tank
tx_mixer_tank_res Sets the resistance inparallel with the mixer tank
tx_pll_bw Sets Tx PLL bandwidth
tx_filter_bw Sets Tx analog filter bandwidth DSB
tx_dac_bw Sets the number of taps for the Tx FIR-DAC
rx_lna_gain Sets the Rx LNA gain
rx_pga_gain Sets the Rx PGA gain
rx_zin200 Sets the Rx input impedance
rx_adc_trim Sets the Rx ADC trim for 36 MHz reference crystal (must be between 0-7)
rx_pga_bw Sets the Rx analog roofing filter
rx_pll_bw Sets the Rx PLL bandwidth
rx_adc_temp Puts the Rx ADC into temperature measurement mode
io_map0 Mapping of DIO(0)
io_map1 Mapping of DIO(1)
io_map2 Mapping of DIO(2)
io_map3 Mapping of DIO(3)
dig_loopback_en Enables the digital loop back mode of the frontend
rf_loopback_en Enables the RF loop back mode of the frontend
iism_rx_disable Disable IISM Rx (during Tx mode)
iism_tx_disable Disable IISM Tx (during Rx mode)
iism_mode Sets the IISM mode
iism_clk_div Sets the XTAL/CLK_OUT division factor
r Sets the interpolation/decimation factor
iism_truncation Sets the IISM truncation mode
help Print this message or the help of the given subcommand(s)
Options:
-h, --help Print help
Creates ZeroMQ sub/pub sockets to move data to/from the SX1255 via the I2S audio device
Usage: sx1255-zmq [OPTIONS]
Options:
-d, --rx-device <RX_DEVICE> receive audio device (run `arecord -l` to see what's available) [default: hw:1,1]
-D, --tx-device <TX_DEVICE> transmit audio device (run `aplay -l` to see what's available) [default: hw:1,0]
-r, --sample-rate <SAMPLE_RATE> sample rate for audio devices (doesn't matter, it's really set on the device) [default: 192000]
-f, --sample-format <SAMPLE_FORMAT> sample format for audio devices [default: S32_LE] [possible values: S16_LE, S32_LE]
-e, --rx-endpoint <RX_ENDPOINT> local ZeroMQ receive endpoint to establish [default: tcp://0.0.0.0:17017]
-E, --tx-endpoint <TX_ENDPOINT> remote ZeroMQ transmit endpoint to connect to [default: tcp://192.168.137.1:17018]
-m, --msg-size <MSG_SIZE> message size in frames (a frame is SAMPLE_SIZE * 2 bytes) [default: 625]
-p, --print every ten seconds print the rate at which we're publishing/receiving samples
-R, --disable-rx don't create a pub socket for rx samples
-T, --disable-tx don't connect to sub socket for tx samples
-h, --help Print help