
Guide to Software Defined Radio - phsilva
https://luaradio.io/new-to-sdr.html
======
AWildC182
Even if you have no idea what you're doing, I very much recommend buying one
of the RTL-SDR dongles on amazon for ~$20-30 and playing around. For the cost
of a movie ticket, an afternoon messing with one will teach you a MASSIVE
amount of stuff about how RF works.

~~~
MuffinFlavored
Can't those only receive and not send?

~~~
penagwin
Receiving radio is perfectly fine and you aren't at risk of interfering with
anyone.

Transmiting is very "dangerous" if you don't know what you're doing, and
likely illegal unless you're licensed (you're only allowed to broadcast on
certain frequencies below certain power limits without a license, but you can
still cause trouble).

Tl;Dr Please do not experiment with transmitting if you don't know what you're
doing.

~~~
sitzkrieg
pedantic but noteworthy: amateur radio licensees are not allowed to broadcast,
that is transmit with no intention to communicate two way

~~~
SamPatt
Even more pedantic: There is an exception to the broadcasting rule.

>Communications directly related to the immediate safety of human life or the
protection of property may be provided by amateur stations to broadcasters for
dissemination to the public where no other means of communication is
reasonably available before or at the time of the event.

------
fpgaminer
Man, this seems like such a great resource; wish I had found it when I first
got into SDR. I wrote a blog post about controlling ceiling fans using SDR
([https://blog.hmac.io/2019/10/25/making-dumb-fans-smart-
using...](https://blog.hmac.io/2019/10/25/making-dumb-fans-smart-using-
software-defined-radio.html)), but I glossed over my initial struggles just
getting up to speed with this stuff. All the concepts of SDR are
straightforward and fairly intuitive, but it's the software stack and actually
using the tools that's hard. The whole field is niche enough that you end up
stubbing your toe with every step you take in that world.

Googling around and trying to figure out where to even begin comes up with so
many fragmented, unhelpful pieces of information. You either end up being
pointed at Gnu Radio, which amounts to an incomprehensible behemoth for a
newbie, or you find the numerous lighter weight pieces of software which
aren't very clear on what exactly they're good for and are often unmaintained.

Luckily my first project was rather simple; ceiling fan remotes don't exactly
use the most advanced protocols. Once I found CubicSDR and fiddled around with
it enough I was able to dump the radio signals to an audio file and just tease
the rest out in Audacity. My blog post mostly covers the nightmare that was
the TX side of things.

------
CraigJPerry
Plug for the “universal radio hacker” open source tool. It made it absolutely
childs play to reverse engineer a wireless thermometer signal which i now feed
into a dynamo db table and present as a graph via alexa. My kamado joe is at
the bottom of the garden and when i’m smoking or bbq’ing i can bring up the
meat and the grill temps on any screen in the house. Fantastic.

~~~
dfc
There was a nice paper on it at woot18:
[https://www.usenix.org/node/220563](https://www.usenix.org/node/220563)

------
iudqnolq
Rachel Kroll (wrote The Bozo Hour making fun of incompetent sysadmins and
management) created a web portal for an SDR in C. I found her blog posts in
the project very interesting.

> [http://scanner.rachelbythebay.com/](http://scanner.rachelbythebay.com/)

------
xconverge
This write up is a great introduction to what can be done and is nearly word
for word what I have been through so far with SDR and amateur radio.

Another super interesting thing I have done with my RTL-SDR is track NOAA and
Meteor weather satellites and decode the images in realtime as they fly by
overhead

~~~
travbrack
That’s amazing. Did that require any custom code?

------
squarefoot
Thanks for posting, I didn't know about LuaRadio.

After playing with some examples I noticed the weird behaviour of the gnuplot
windows that get focused and refreshed (including decorations) at every sample
so that beside wasting cpu power for unneeded drawing, it takes away focus
from the shell where the program was invoked, making impossible for example to
press ctrl+c to stop the program. I was forced at every test to ctrl+alt+f1 to
a full screen console to kill the process.

There's a nice Lua GUI project called TekUI which includes a basic graphing
control that could be imported and extended to do the same without the need of
an external dependency like gnuplot.

    
    
      http://tekui.neoscientists.org/screenshots.html (look at about half of the page)
    
      http://tekui.neoscientists.org/releases/
    

It's highly portable, a few years ago I managed to compile and use it on a A10
ARM processor board (Hackberry if memory serves).

~~~
vsergeev
Thanks, I'll take a look! New plotting sinks are easy to add and I really
would like to migrate to something more stable. Gnuplot has been finicky with
many people's setups, and it's been a real sore point. They seem to run best
with the wxt output on Linux.

------
acd
Thanks what a good link to SDR, the link feels like a Christmas present.
SDRPlay is a good SDR receiver a step up from RTL-SDR for exploring the radio
spectrum. Plus to exploring software defined radios there is a good community
built around ham that one can join.

~~~
shifto
I got a SDRplay some time ago from a co-worker. I haven't used it yet because
of the behemoth that is SDR, but with this source I feel I can finally do
something with it.

------
Eehoj2zaiph
I want to broadcast (unidirectional) UDP packets over the air on 2.4 GHz or 5
GHz at 3+ Mbit/s at maximum (legal) power. Is there a good way to do this with
any current SDR hardware? Or is my best bet to ab(use) wifi cards for this
purpose?

~~~
defen
What does "broadcast UDP packets" mean? They'll need some sort of physical
encoding; if wifi, why not use a wifi card? If not wifi...what are you trying
to do by broadcasting UDP packets?

~~~
Eehoj2zaiph
Broadcast meaning unidirectional, with support multiple receivers, and no
association or acknowledgements required.

Correct me if I'm wrong, but I don't believe there is a "broadcast mode" for
wifi.

So I'm asking if there is some SDR software/hardware combo that works well for
this purpose, or if re-purposing wifi is the best option.

~~~
int_19h
UDP requires some physical layer, which 802.11 provides. There are others, but
in any case, you can't just "broadcast UDP" over the radio by itself.

~~~
Erlich_Bachman
That was the question, how to implement those layers. Why complain about
terminology, what does it contribute? Can you recommend specifics?

~~~
defen
The question was too underspecified to give a good answer. It's the equivalent
to asking "can I send data over the internet"? The answer to the question as-
asked is "yes", but the details will be substantially different depending on
what you're actually trying to do.

~~~
Erlich_Bachman
The question was precisely much more specific than "data over internet".

They indicated that they had UDP packets, which is the specification of the
application layer, it means that they have an application that already works
with UDP and they just want to send them over the radio, bypassing WiFi
protocols/cards etc, from an SDR to an SDR directly. It means that whatever
solution is, if it can work with UDP, if the underlying layer translates data
into UDP, it will work with their application. That's a very precise
specification.

~~~
defen
> from an SDR to an SDR directly

That wasn't actually stated. Maybe OP has a bunch of laptops with WiFi cards
and no access point and wants to broadcast data to them with the laptops
listening in monitor mode. Or maybe OP has a bunch of laptops connected to an
access point and wants to broadcast to them using IP multicast. Or maybe OP
really does have a bunch of software-defined radios and wants to directly
encode UDP packets into IQ samples. Don't you think those would be three very
different solutions?

------
JoblessWonder
When I was messing around with ADS-B stuff for work I found this website to be
very helpful with lots of ideas/links for projects: [https://www.rtl-
sdr.com/](https://www.rtl-sdr.com/)

------
zzo38computer
I have some other questions:

1\. Can Usenet (and perhaps also Unusenet) be used with amateur radio?

2\. Can received AM/FM broadcasts be used as a input for SoX?

3\. Is time synchronization possible with software defined radio?

4\. Can it be used with a RF cable (such as to connect to a VCR)?

~~~
Enginerrrd
For 1.) Yes, with caveats. No encryption would be allowed. Typical data
transfer rates are abysmal so it wouldn't be great for transferring files. And
it might get interesting legally if you do transfer a file with music. I
believe that would be broadcasting music which isn't allowed.

2.) Haven't tried this specifically, but I'd say almost certainly yes.
Gnuraduo is all about creating audio processing pipelines.

3.) Yes, almost definitely, though there might be some technical aspects to it
depending on what you're trying to accomplish.

4.) Yes, but that would likely require extra unnecessary steps.

~~~
zzo38computer
The caveats you mention would probably be irrelevant with text newsgroups.
However, what I am asking is if there are specific protocols for transferring
Usenet articles with amateur radio, and how those protocols work.

------
MuffinFlavored
One project I want to do with SDR is relay + amplify my car smart key so that
I can open my car from 50 feet away (as opposed to needing to be right next to
it)

Is this possible?

~~~
UI_at_80x24
Technically: yes

The tricky part is having your key-fob close enough to a transceiver that can
then rebroadcast it's signal. Which would no doubt run afoul of broadcast
regulations.

Devices like the RTL-SDR work on as receive-only. I'd suggest checking out
your local Amateur-Radio club to learn the laws, get a license, and have fun
with projects like that.

~~~
galangalalgol
Key fobs are at 315, an ism band, so 0.5w is fine for everyone. Some are
actually at 433, mostly European stuff. Technically not an ism band in the US
but if the fcc doesn't go after VW i doubt they will come after you. Unless
you are stealing cars with it.

~~~
galangalalgol
I'll add that there are no SDRs from ettus, lime, or hackrf that put out even
.25w without a separate amp. So he won't break the limit by accident.

~~~
MuffinFlavored
YardStick One: software-controlled antenna port power (max 50 mA at 3.3 V)

Is this enough to broadcast a signal stronger than my car key? If not, what do
I need to do to get a stronger antenna/more power?

~~~
galangalalgol
So recor and look at your car door signal. See how long the pulse train is for
one click. Lets call that time N samples. Have a running sum of the last N
samples' absolute value. When you see that sum peak above some threshold,
switch to TX and play back those N samples plus some on either end for good
measure. Newer cars with UWB wont work like this. They do an exchange and
measure distance.

~~~
MuffinFlavored
I actually _don 't_ want to do the "one click" to unlock. I want to do "is the
key near the vehicle".

~~~
galangalalgol
Ah, that is slightly harder. You have to hear the car's challenge and then
have a decent antenna pointed at the fob, repeat the challenge, then quickly
switch to rx to hear the response, them replay the response. Even with the
antenna pointed at the fob you should be loud enough for the car because it is
close.

You can even start the car this way. The car will keep running even out of
range of the fob for safety reasons.

PSA: Don't rob from or steal cars. That is wrong. Don't be a bad guy. They
might have worked hard for what they have and be really nice people.

~~~
MuffinFlavored
what frequency does the car transponder challenge the key and what frequency
does the key respond at?

is it a rolling code challenge like unlock/lock?

~~~
galangalalgol
Rolling yes, all on same freq. 315 mostly. Some 433

~~~
MuffinFlavored
Do you have an email/IRC I can reach you at?

------
mobilemidget
Oh great Xmas gift for myself, better receiver :-)

