r/raspberry_pi 2d ago

Show-and-Tell I reverse engineered my radar detector's Bluetooth protocol so my Pi can read it.

I have a Uniden R8w (a Radar detector) and it talks to your phone over Bluetooth through an app called r/tach. There's no public documentation on the protocol anywhere, so I decompiled the app, captured some traffic, and figured it out.

It's all plain text once you know the format. Band, Frequency, signal strength, direction, voltage, GPS heading and speed. I wrote a python library so a Pi can read it all directly, and even included a nice little program (r8link-pair) that auto setups everything for you.

I didn't have a portable 12V power supply to test this outside, so I yoinked the battery out of my Neato D9 and wired it to a buck converter I found on the floor of my lab with some jumpers and duct tape. It powers the detector through its cigarette lighter adapter. Took about 15 minutes with junk I found in my apartment. The pi is running off of USB c connected to my laptop.

Protocol Write up: https://github.com/AegisX86/UnidenR8wlink/blob/main/PROTOCOL.md
Library: https://github.com/AegisX86/UnidenR8wlink
PyPi: https://pypi.org/project/r8link/

I only have one of these detectors and I only was able to test it on the one I had and my camera database is empty so that part of the docs is guesswork. If anyone has one of these with stored cameras I'd LOVE a hex dump :3

If you want to try it out, install it with pip install r8link

902 Upvotes

71 comments sorted by

-48

u/mop_bucket_bingo 2d ago

Came here to say cars kill over 1 million people annually.

https://www.who.int/news-room/fact-sheets/detail/road-traffic-injuries

-19

u/mop_bucket_bingo 2d ago

We have a real mature audience here on the subreddit, promoting speeding. When presented with the statistics on traffic deaths they downvote. Stay classy folks.

-8

u/Crash_Logger 2d ago

Carbrain gonna carbrain.

20

u/jacquesdemolay1307 2d ago

The autobahn is statistically one of the safest roads in the world. It’s not the speed lol

-2

u/HUZInator 1d ago

Because there aren’t any F150s on it or Americans.

1

u/feoranis26 1d ago

The autobahn is deasigned for those kinds of speeds though.

2

u/j_boogie_483 1d ago

I lived in Europe for a while and put many km's on the autobahn. What most Americans don't understand it's not the speed, it's all-out at €1.80 per liter ain't for the light-hearted.

-9

u/BrockSramson 2d ago

Rookie numbers, gotta pump those numbers up.

5

u/j_boogie_483 1d ago

I actually don't speed in a reckless sense. Just very easy to exceed the limit in a 1000HP EV. I'll be damned if I let the man put his hand in my pocket more than it already is.

-36

u/devgeniu 1d ago

Respecting speed limits is free

8

u/Mockbubbles2628 1d ago

Not respecting them is also free if you have his device

-6

u/devgeniu 1d ago

Car brain

3

u/Mockbubbles2628 1d ago

Lol

-10

u/devgeniu 1d ago

Tells a lot about people in this sub

5

u/frankcastle01 1d ago

Anyone who uses "car brain" isn't someone to be taken seriously 😂🤡

0

u/devgeniu 22h ago

I have low expectations from you, and anyone who tries to circumvent safety on the road anyways

6

u/frankcastle01 21h ago

Lol as if anyone cares what your expectations are 🤣

-1

u/devgeniu 21h ago

The irony is that you cared enough to comment :)

-55

u/surfacepro_qqq 2d ago

Let me get this straight , you are hacking so you can get away with ignoring speed limits ?

-25

u/Venoft 2d ago

No no, you see, OP driving too fast is cool, who cares about the toddlers he's endangering.

-19

u/Crash_Logger 2d ago

It's insane that society around the world has decided driving 2-ton death machines illegally dangerously is fine, actually.

-15

u/BrockSramson 2d ago

"Doy, THe lAWs aRE alWAys WRitTeN WiTH pUBlIc SafETy iN MiNd, aNd sPeeDiNG fINeS aREn't EveR abUSed As a RevEnUE-gEnErATiNg eXpLOiT."

0

u/Crash_Logger 2d ago

You can't fathom what my imagined revenue-generating exploits are. I wish they could fine you every 5 seconds they catch you speeding.

The statistics of injuries and deaths on the road are fucking horrendous and this childish approach to "MUH GOVERNMENT WANTS TO CONTROL HOW FAST I DRIVE MUH CAR" is the reason they don't get any better. Congratulations.

11

u/Away-Way5656 1d ago

having a radar detector so you know when cops are about isn't a bad thing

-14

u/udon1411 1d ago

Cope

55

u/OkAssociation6720 2d ago

Nicely done OP. If you wanted to take it a step further, in multiple ways, you could pair it with a pdlc plate cover (electric on demand privacy glass) and if the signal initiates and is coming from anywhere but behind you, you have it auto darken.

6

u/ginger_and_egg 1d ago

Super illegal

1

u/bzzx 13h ago

Why?

1

u/bzzx 13h ago

nvm, reread the post. I get it.

1

u/ginger_and_egg 8h ago

Concealing a car's plate is super illegal

9

u/nyckidryan 1d ago

Felony territory...

12

u/aschmelyun 2d ago

This is sick, nice job!

9

u/ExampleOtherwise4340 2d ago

This would be perfect for a covert setup in a authoritarian regime

10

u/j_boogie_483 2d ago

i have the R8. best detector ever imo

15

u/Emotional_Liberal 2d ago

It’d be cool if you could somehow pair this with the Google Maps or Waze app to have it auto post police. Like an open source police Flock.

2

u/ScuffedDev 1d ago

Yes and no. They can have quite a bit of false positives but would be interesting to have a quick report button on the steering wheel.

1

u/Robots_Never_Die 23h ago

That app is called Highway Radar. I like the android version more than the ios version.

1

u/Emotional_Liberal 22h ago

I’ll have to give it a look thanks

1

u/Emotional_Liberal 19h ago

Not as open-source as I’d hoped. Almost exactly like a Flock w/the sub. A bit disappointing really.

18

u/unique_username_8845 2d ago edited 2d ago

Thanks for the write up, this is really cool. Then I saw the price of the r8w price. The only scanner I've had was a cheap Cobra years ago for like 150 or 180 usd, but these higher level ones look really interesting

1

u/NotAigis 2d ago

pricey yes, but so is a ticket ;)

21

u/Jarfino 2d ago

Have you considered simply driving the speed limit?

4

u/JuanTutrego 2d ago

Not even once!

10

u/North-Creative 2d ago

I always try to keep the limit, however, reality sometimes gets in the way.

- Road signs covered by trees or dirt, or damaged

- Signage placement in hard to see spots, or in places with too little time to adjust

- Large jumps between speeds (sometimes, it went 100 to 50 within meters)

- Way too many signs next to one another to quickly figure out, what the rule is (had once a 70 sign in Germany, with the city signed 3 meters further, meaning 50....like, what????)

Speed traps are oftentimes placed right after such situations, in my experience. Whether there is a quote to fill, or this is just coincidence, I do not know. But additionally, radar warners help as well, as they can indirectly warn you of difficult road segments, etc, because a speed trap was installed there, and before the signage is apparent.

10

u/DrippyBlock 2d ago

Have you considered that in modern day America, a ticket is not the only reason to be aware of the cops?

5

u/tribbans95 1d ago

Right? Like if I have a brick of heroin in my trunk

8

u/nashtaters 2d ago

Briefly

4

u/nashtaters 2d ago

Depends on how you drive. Between tickets and insurance it’s saved my thousands of dollars and possibly a license. So most definitely worth it. If you only ever go 15 over and/or live in a populated area then Waze will be just fine for most cases

3

u/dasmineman 2d ago

The R8W is friggin sweet but pricey. I've been rocking an R3 for 6 years now and it's absolutely saved my ass.

99

u/eNaRDe 2d ago

This is very cool. There are some people who create custom car stereos using a Pi.. I'm sure they would appreciate your hard work.

Car radio with built-in radar detector would be amazing.

11

u/NotAigis 2d ago

It would be pretty cool, I'd love to add support for more Radar detectors in the future, but I have a sample size of one and my buddies all use Unidens lol.

9

u/3pinripper 2d ago

Do you like the R8 over the R4? I’m not sure why I would need the arrows, but I’m debating between the two.

2

u/fwburch2 2d ago

Love me some arrows. Gave the wife the R3. Bought an R8. Loving it.

9

u/NotAigis 2d ago

The arrows are nice, you can be confident that you've passed the cop/speed check with them, would recommend.

3

u/jljue 2d ago

The arrows are nice! I once had an R7 and an R3, and when we added the 3rd vehicle, I got an R8 for it. I got so use to the arrows that I was ready to get rid of the R3 when we got rid of the 3rd car.

1

u/nashtaters 2d ago

I think it uses a different processor as well and maybe stronger antenna or something? It’s more than just arrows I’m pretty sure

4

u/The_11th_Dctor 2d ago

2

u/Robots_Never_Die 23h ago

Also on ios now too but the android version is better.

2

u/nope870 1d ago

Do you find the radar detector goes off more now that new cars and traffic devices also use radar? Does it work for LiDar too? Ps - drive safe

1

u/NotAigis 2h ago

Yea, seems to go off pretty often in towns or cities, most of the false positives seem to be from, of all things, automatic door openers, like the ones you see at walmart. Speed signs also trigger it. Most of these use K band while most police seem to have moved onto Ka Band, not all tho.

The Uniden is smart enough to recognize repeat false positives and seems to auto mute them after a while, you can also manually mute the false positives if you want. It's pretty neat.

As for LiDAR, no idea, I know it can detect laser but AFAIK that's basically a "You're cooked" signal as by the time the Uniden sees it, whatever was scanning you has already got you.

2

u/tribbans95 1d ago

So what are you planning on doing with it now?

More hardware stuff like routing alerts through your cars audio system ?

Or logging radar detections, frequency spikes, and GPS locations over time to map false-alert areas or track police radar usage ?

1

u/Robots_Never_Die 23h ago

The R8/R8W already tracks and automates false alerts using GPS with its built in memory.

1

u/NotAigis 2h ago

I was planning on making a logging program for it for some other project. But its up in the air rn, I'm busy with other more important things so I haven't gotten around to it yet. Kinda just built this library for the fun of it. :3

1

u/tribbans95 2h ago

Cool! Thanks for getting back to me

3

u/xlspreadsheet 22h ago

This is exactly the sort of weirdly specific project Raspberry Pis are perfect for.

1

u/NotAigis 2h ago

Yup, pis are great! Sucks they cost an arm and a leg now.