Using bladeRF with Beaglebone Black

Having issues with the site, hardware, source code, or any other issues?
Post Reply
mmtb
Posts: 4
Joined: Tue Jan 02, 2018 10:28 am

Using bladeRF with Beaglebone Black

Post by mmtb »

Hi there,

I'm trying to develop a data-link between a regular linux machine and a beaglebone black board. I am having trouble with the bbb. I know it maybe is not powerful enough, and I have written vhdl code to offload signal processing to the fpga. Despite this, I am stil having instability errors. Sometimes it works, sometimes it doesn't. Sometimes it seems the samples are sent from the bbb at a different rate then what they were supposed to. As anyone tried to do anything similar to this?
RadioGuy
Posts: 7
Joined: Wed Dec 20, 2017 11:11 pm

Re: Using bladeRF with Beaglebone Black

Post by RadioGuy »

I haven't tried doing what you are going exactly, but I have a bladeRF and a few beagle bone black's and I do know single board computer like the beagle bone have limitations for this type of application. I've seen myself that sometimes USB on the BBB will either completely not work or become unreliable if too many or unusual combinations of devices are attached.

I did some thinking into trying to connect the bladeRF to the BBB or other computer via an interface other then USB by bypassing the microcontroller on the blade. I mentioned this on another thread, but it hasn't seen any interest and I haven't gotten very far with it.
bglod
Posts: 201
Joined: Thu Jun 18, 2015 6:10 pm

Re: Using bladeRF with Beaglebone Black

Post by bglod »

Like RadioGuy said, these SBC-type devices tend to lack the processing power, driver/software compatibility, or just have crummy USB controllers / power supplies.

Can you clarify your setup? It sounds like the bladeRF is connected to the BeagleBone via USB, and the BeagleBone is connected to a linux machine, also via USB. How is each device powered? If both boards are USB bus powered, definitely fix that!

The BeagleBone Black is USB 2.0, so you're limited to 500 mA total (if it can even handle that). The bladeRF alone uses most of the 500 mA depending on its configuration. If it's not already, I suggest powering the bladeRF via its DC barrel jack. This will do two things: (1) reduce load on the USB supply, which will help with connection stability, and (2) it will somewhat reduce RF noise on the bladeRF because it's starting with a cleaner supply rail. The BBB may continue to be powered from the USB bus of the linux host.

Also because the BBB is a USB 2.0 device, the bladeRF will need to be limited to low sample rates (<8 MSPS on a good controller). Start at something low, say 3 MSPS, and adjust up/down depending on stability. If you need >8 MSPS, you'll need to find a USB 3.0 compatible host.
Electrical Engineer
Nuand, LLC.
mmtb
Posts: 4
Joined: Tue Jan 02, 2018 10:28 am

Re: Using bladeRF with Beaglebone Black

Post by mmtb »

Hey there, thanks for the quick response. My setup is as follows. I have a linux machine on one side, connected to one bladerfx40. Completely disconnected from this, I have a BBB powered by an USB charger. A USB hub is connected to the BBB's USB port. To this hub another bladerfx40 is connected, allowing the BBB to access it, while receiving power from the USB hub (The USB hub also receives power from an outlet, I think this should fix the power constraints on the bladerf, no?). The idea is to create a communication channel of sorts, where I can transfer data by radio between the two (the linux machine and the BBB). I know this is not the best way to transmit data (i could use wifi for example) between these two, but please disregard that for now. I also have no problem with a low sample rate. If I can get this working at 1 or 2 MSPS for now would be great.

Firstly I've tried working the original bladerf-fsk program, but, while a link between 2 bladerf on the linux machine works perfectly, when one is connected to the BBB it stops working (I've compiled bladerf-fsk on the BBB).

I think that there are several things in play here. If you have any input on anything even related to this I would be grateful. I am self-learning everything about this so I may be missing some crucial core concepts.

At start I thought the issue might be that the BBB didn't have the raw processing power needed to cross-correlate the samples of the preamble in the data frame without causing overruns. In my first test this proved true, even at ridiculous low samplerates like 100kSPS, so I set out to develop vhdl code that filters, normalizes and cross-correlates the incoming samples. I managed to develop this and test it and it worked with some instability problems. Sometimes it worked, but sometimes it would still not work. As in, one day afternoon it was working, I would turn off everything for the night and in the morning it would not work. One of my problems is that the maximum value for the correlation with the preamble (and consequently the threshold I must apply) seems to change drastically with samplerates different than the default 2MSPS and even in different trials maybe (?). Maybe I'm too deep into trying to FPGA this and am missing some simple way of making this work?

I used bladerf-cli rx function with the default FPGA and I am indeed receiving and sending samples from the BBB, I just cannot reliably recognize them as a frame without causing overruns.

I'm running out of ideas and I could really use some help from fresh minds on this so thank you in advance. Any other feedback I can give just let me know.
mmtb
Posts: 4
Joined: Tue Jan 02, 2018 10:28 am

Re: Using bladeRF with Beaglebone Black

Post by mmtb »

I am also aware that what I'm trying to do is limited not only by raw samplerate but also because I need the cross-correlation, demodulation and the rest of the signal processing that is needed to translate the IQ samples to byte data. Is there a simpler way to transmit byte data through the SDRs? Is the bladerf-fsk a good example? Or too complex for what I want? Is there any simplification I can do to the correlation/modulation/"number of samples per bit" process?
RadioGuy
Posts: 7
Joined: Wed Dec 20, 2017 11:11 pm

Re: Using bladeRF with Beaglebone Black

Post by RadioGuy »

Sorry if I'm stomping on your thread. This subject is a interesting to me as well. I have a simple wireless transport that I made based on the blade-fsk example as well and I also noticed cross correlation takes an extreme amount of processing power. This was between two Intel PCs BTW.

One thing I did was have the cross correlation skip bits. This increases the number of false positive hits, but it makes a huge reduction in the amount of processing time required. I compensation for this by doing a regular demodulation of the preamble on a correlation match, and essentially doing a byte wise comparison with the known preamble. This eliminates the false positives.

I'm also wondering if PFSK is a good modulation technique for binary data. The example uses 8 IQ samples PER BIT. Which to me is a very large amount of data being pumped through USB just to send one bit of data over RF. That's why I'm looking into converting the example to something like QAM such appears to be more common for digital RF, but I'm still researching the subject.
mmtb
Posts: 4
Joined: Tue Jan 02, 2018 10:28 am

Re: Using bladeRF with Beaglebone Black

Post by mmtb »

RadioGuy wrote: Thu Jan 04, 2018 3:37 pm I'm also wondering if PFSK is a good modulation technique for binary data. The example uses 8 IQ samples PER BIT. Which to me is a very large amount of data being pumped through USB just to send one bit of data over RF. That's why I'm looking into converting the example to something like QAM such appears to be more common for digital RF, but I'm still researching the subject.
Did you have any luck with this? I am back on the project and am wondering if a change to QAM can be made.
Bear with me here, cause I am a newbie in RF. When I was trying to transmit IQ sample points between 2 bladeRFs, they always seemed rotated in the receiving one, by random amounts. Does this mean that the transmission is not referencing the same carrier on both sides, so I have to use Differential encoding? Even with differential encoding I had some problems because the IQ samples seem to be taken at different intervals then the ones sent? Or at least with a constant offset?

This is problably a simply mistake from my part, but I really don't understand how to correctly sync them.

On another sort of unrelated topic, my current range is quite low, a 5-10 meters. How can I improve this? Do I need the XB300 amplifier?
Post Reply