Raspberry Pi Zero shield with the SX1255 RF transceiver chip.
Sample Raspberry Pi code for SX1255 control can be found here.
I2S slave overlay is required. Sample rate for both RX and TX is 125kHz.
RX/TX frequency setting:
./sx1255-spi 435000000 438000000
arecord -t raw -f S32_LE -r 192000 -c 2 --device="hw:0,1" | ./int_to_short | ./zmq-pub
In which int_to_short
is a simple int
to short
format converter:
while(1)
{
ioctl(STDIN_FILENO, FIONREAD, &rcvd);
if(rcvd>0)
{
if(read(STDIN_FILENO, inp, rcvd)==rcvd)
{
for(int i=0; i<rcvd; i+=8)
{
memcpy(&out[i/2 ], &inp[i +2], 2);
memcpy(&out[i/2+2], &inp[i+4+2], 2);
}
write(STDOUT_FILENO, out, rcvd/2);
}
}
}
./zmq-sub 192.168.50.243:17018 | aplay -t raw -f S32_LE -r 192000 -c 2 --device="hw:0,0"
There are 2 demo flowgraphs available:
The RX demo also provides a set of sinc compensating FIR filter taps through the Decimating FIR Filter
block.
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.