summaryrefslogtreecommitdiffstats
path: root/md/writeup/bladerf_quick_guide.md
blob: 1ece22e5c0c68c6c609b22d5a161ad223563eb23 (plain) (blame)
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
title:BladerRF quick quide
keywords:sdr,bladerf,gnuradio,gqrx

# BladeRF quick guide


## Intro

BladeRF is SDR device capable to transmit in range 47-6000Mhz and receive in range 70-6000Mhz. 
With samplerate 0.52-61Mhz and max bandwidth 0.2-56MHz. As it capable to RX/TX on quite
wide range there is infinite possibilities what can be done with it.


## Quick test

Run
```bash
bladeRF-cli -p
```
Output will show if any BladeRF device is connected




## Running GQRX

Lunch any of command below  to start graphical SDR 
```bash
gqrx
gqrx-alsa //if first one fails with some pulse audio error
```

Choose device selection dialog and add to 
__Device string__ 

```bash
bladerf=0,fpga=/usr/share/bladerf/fpga/hostedxA4.rbf
```

This will set to first bladerf and load FPGA bitstream, find path to bitstream on your PC from distro package.
Now GQRX will ready to go

### Enable biastee
If there are attached LNA or LNB to BladeRF SMA ports you can enable biastee by adding to 
GQRX __Device string__ with comma separation between parameters
```bash
biastee=rx
```

## Running from command line

To start interactive commandline point to fpga bitstream, can be found in distro package. 

```bash
bladeRF-cli -i -l /usr/share/bladerf/fpga/hostedxA4.rbf
```


### Receive

Set frequency to AA Megaherz with sample rate BB bandwidth CC and write to file DD in signed complex 16 bit, with 20M entries

```bash
set frequency rx  AAM
set samplerate rx BBM
set bandwidth rx CCM
rx config file=DD.sc16q11 format=bin n=20M
rx start
rx wait
rx
```



### Transmit

Set frequency to AA Megaherz with sample rate BB bandwidth CC and read from file DD in signed complex 16 bit

```bash
set frequency tx AAM
set samplerate tx BBM
set bandwidth tx CCM
tx config file=DDsc16q11 format=bin
tx start
tx wait
tx
```


### Enable biastee

To enable/disable biastee set channel RX1/RX2/TX1/TX2 to 0/false to disable and 1/true to enable biastee on particular channel

```bash
set biastee RX1 true
```

## Gnuradio

Gnuradio is opensource tool that allows you to utilize DSP blocks and create
processing pipeline. It works like a block diagrams drawing tool, except the block are 
DSP processing steps and as output you get processed signal. Here is example how to
create FM radio listening design and as result you can hear to your local radio stations.

![BladerRF fm radio block diagram](/img/gnuradio/bladerf_fm_radio.png)


## Links

[https://www.nuand.com/bladerf-2-0-micro/](https://www.nuand.com/bladerf-2-0-micro/)  
[https://gqrx.dk/](https://gqrx.dk/)  
[https://www.nuand.com/product/bt-100/](https://www.nuand.com/product/bt-100/)  
[https://www.nuand.com/product/bt-200/](https://www.nuand.com/product/bt-200/)  
[https://github.com/Nuand/bladeRF/wiki/bladeRF-CLI-Tips-and-Tricks](https://github.com/Nuand/bladeRF/wiki/bladeRF-CLI-Tips-and-Tricks)  
[https://sites.google.com/site/sdrbladerf/home/bladerf-getting-started](https://sites.google.com/site/sdrbladerf/home/bladerf-getting-started)  
[https://www.gnuradio.org/](https://www.gnuradio.org/)