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

Transmission of arbitrary waveforms #197

Open
wants to merge 34 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
d4cb47d
Merge branch 'main' of github.com:matteoserva/cariboulite into transm…
matteoserva Mar 14, 2024
9d92596
tutorials
matteoserva Mar 14, 2024
3ec203d
renamed tutorial
matteoserva Mar 14, 2024
eb025ad
removed temporary files
matteoserva Mar 14, 2024
c54bbc0
firmware makefile now checks for modified files
matteoserva Mar 14, 2024
e61fa1b
firmware makefile optimizations
matteoserva Mar 14, 2024
b3dd8bc
firmware: renamed pin clock
matteoserva Mar 14, 2024
c30f2ef
firmware: moved pins to proper SB_IO
matteoserva Mar 14, 2024
bb3cd45
firmware: fixed short circuit during RX
matteoserva Mar 14, 2024
54f5611
firmware: using first word fall through fifo
matteoserva Mar 14, 2024
2e270a9
firmware: fixing data direction bit
matteoserva Mar 14, 2024
de7f371
firmware: fixing register use in lvds_rx
matteoserva Mar 14, 2024
3a2601b
firmware: smi data handling during TX
matteoserva Mar 14, 2024
9d70475
firmware: using sys clock in lvds_tx module
matteoserva Mar 14, 2024
a401237
firmware: added lvds_tx module
matteoserva Mar 14, 2024
eef0bdc
driver: merged new kernel module
matteoserva Mar 14, 2024
8256de9
software: added tx_test module
matteoserva Mar 14, 2024
f072179
software: adding data rate config in RX test app
matteoserva Mar 14, 2024
dc382c4
software: configure radio before switching to tx_prep
matteoserva Mar 14, 2024
6785575
testapp: choose between hardcoded firmware or firmware file
matteoserva Mar 14, 2024
d83861d
software: minor fixes
matteoserva Mar 14, 2024
ef955d1
software: smi tx data format
matteoserva Mar 14, 2024
d533976
new hardcoded firmware
matteoserva Mar 14, 2024
ce76c78
removed temporary file
matteoserva Mar 14, 2024
d55ab04
Update tutorial.md
matteoserva Mar 14, 2024
5a5acd2
tx tutorial
matteoserva Mar 14, 2024
310b7e5
Update README.md
matteoserva Mar 15, 2024
1c85655
Update tutorial.md
great9 Apr 3, 2024
788d08e
firmware: using 16 bit buffers to simplify routing and use fpga resou…
matteoserva Apr 23, 2024
4612266
updating fpga binary blob
matteoserva Apr 23, 2024
d0805f5
improved example tx code
matteoserva Apr 23, 2024
c7efd74
merging changes from dev branch
matteoserva Apr 23, 2024
14ec44b
Merge pull request #1 from great9/patch-1
matteoserva Jul 21, 2024
0390c53
adding missing files
matteoserva Sep 26, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
# MODIFIED CARIBOULITE

This is a non-official branch of cariboulite.
Features:
- performance upgrades
- transmission of arbitrary waveforms

The guide on how to use this version is in docs/notes/tutorial.txt

___
_
___
_
___
_


# CaribouLite
CaribouLite is an affordable, educational, open-source SDR evaluation platform and a HAT for the Raspberry-Pi family of boards (40-pin versions only). It is built for makers, hackers, and researchers and was designed to complement the current SDR (Software Defined Radio) eco-systems offering with a scalable, standalone dual-channel software-defined radio.

Expand All @@ -22,6 +39,7 @@ Due to the architectural changes in RPI5 - the new I/O controller called "RP1" c
So, if you intend to use CaribouLite on RPI5 please don't - it won't work. Why was the SMI interface deprecated by Broadcomm (either from its hardware or kernel SW support)? Most probably due to the same reason this interface was not documented in the first place - no interest in supporting a high-speed external interface within the 40-pin connector.

Edit: The workaround we are working to support RPI5 anyway - trying to utilize the Display and Camera I/O pins from the 40-pin connector to stream information - FPGA + Kernel module adaptation.
Edit2: A unofficial developer (Matteo Serva) is working on supporting the RPI5 by leveraging multiple SPI interfaces

# Getting Started & Installation
Use the following steps to install the CaribouLite on your choice of RPI board
Expand Down Expand Up @@ -67,6 +85,11 @@ So currently, sudo'ing is needed whenever CaribouLite is accessed (including sud

To compile the API library and SoapySDR API from code please click [here](/software/libcariboulite/README.md)

# Transmitting a signal

There is an experimental feature for transmitting arbitrary waveforms.
The guide on how to use this version is [here](/docs/notes/tutorial.md)

# SMI Interface

Unlike many other HAT projects, CaribouLite utilizes the **SMI** (Secondary Memory Interface) present on all the 40-pin RPI versions. This interface is not thoroughly documented by both Raspberry-Pi documentation and Broadcomm's reference manuals. An amazing work done by [Lean2](https://iosoft.blog/2020/07/16/raspberry-pi-smi/) (code in [git repo](https://github.com/jbentham/rpi)) in hacking this interface has contributed to CaribouLite's technical feasibility. A deeper overview of the interface is provided by G.J. Van Loo, 2017 [Secondary_Memory_Interface.pdf](docs/smi/Secondary%20Memory%20Interface.pdf). The SMI interface allows exchanging up to ~500 Mbit/s (depending on the FPGA, data-bus width, etc.) between the RPI and the HAT, and yet, the results vary between the different versions of RPI. The results further depend on the specific RPI version's DMA speeds.
Expand Down
Binary file added docs/notes/gnuradio_tx.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
103 changes: 103 additions & 0 deletions docs/notes/tutorial.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@

# general info

tested on raspberry pi zero 2W, running raspbian bookworm, headless (no GUI)


# how to use the modified cariboulite

steps:
- install the OS
- install dependencies
- install cariboulite
- install cariboulite matteoserva
- compile driver
- compile software

- disable wifi powersave
- load driver

- run tx test
- run transmit samples
- run gnuradio transmit


## install latest raspbian bookworm, 64 bit
```
raspberry pi imager to install rasbpian bookworm (latest), 64 bit. With or without gui.
The raspberry imager allows you to enable ssh and configure wifi before installing, so there is no need for a monitor.
```

## install dependencies

```
apt-get install git socat screen
apt-get install libsoapysdr-dev gnuradio soapyremote-server
apt-get install buffer
apt-get install gir1.2-gtk-3.0
```

## install original software

```
git clone https://github.com/cariboulabs/cariboulite.git cariboulite_original
cd cariboulite_original
```

## install my branch in cariboulite
```
git clone https://github.com/matteoserva/cariboulite.git cariboulite_matteo
cd cariboulite_matteo
git checkout transmission_fix
```

## compile kernel driver
```
cd cariboulite_matteo/driver
mkdir build
cd build
cmake .. && make
```

## compile software
```
cd cariboulite_matteo/software/libcariboulite
mkdir build
cd build
cmake .. && make
```

## disable wifi powersave
```
sudo /sbin/iwconfig wlan0 power off
```

## load fpga
(ignore this)
```
~printf "3\n2\n99\n" | ./cariboulite_test_app ~
```

## launch transmission test
```
./tx_test -c 1 -f 433125000 -r 4000000 -w 0 -
```

## transmit from gnuradio
```
socat tcp-listen:9999,fork - | ./tx_test -c 1 -f 433125000 -r 400000 -w 0 -g 0 -e 1 -
```
follow the example workflow in gnuradio_tx.png

## planned features

- Soapy TX
- fix numeric range in exchanged data
- wrong data arriving at the transmitter

- Raspberry pi 5 support
The original developers are trying to use the camera port as a high speed device.
My approach is to use two RP1 dual spi ports. In future this can be replaced with a quad-spi but
right now the required pins are not routed by the caribou lite.


Loading