Thursday, April 17, 2025

RTL_433 Tpms reading from Android

 New car, new problems. This page is mostly here for me to document what i did.

So. i got myself a Renault megane mk3 station wagon. The old Getz was no longer able to run in the cities because of having no particle filter.

Having BEGGED the wife for something RWD i ended up with this car. A FWD diesel eco car. The reason it was this specific type, is because the cabin is big enough for my kids.

Now this car has tpms sensors, and therefore i need sensors in the new summerwheels im getting.

So i needed a way to read the sensors.

I tried working with DTT4ALL but no luck. I will keep trying, time allowing, to see if i can switch to indirect tpms.

Until then, i need to figure out what tpms sensors are in the car, and what id they have, so i can clone them.

Having gone through a couple of different directions, i ended up with thinking rlt_433 was a path to follow. 

Searching the internet, i found rescourses like.

These about arduinos:

https://forum.arduino.cc/t/decoding-433-92-mhz-fsk-signal/486047/5 


And these about more general computers

https://github.com/jboone/tpms?tab=readme-ov-file

https://github.com/merbanan/rtl_433/issues/2978

https://www.rtl-sdr.com/testing-tire-pressure-monitoring-system-sensors-with-rtl-sdr-and-rtl_433/

This dude that made a translator from one type of tpms to another..

https://forum.arduino.cc/t/tpms-transcoder-for-renault-zoe2-with-cc1101-and-arduino-nano/1363151

Basically they ended up leading me to this piece of software

https://github.com/merbanan/rtl_433/tree/master

And the links ended up leading me to how to use the software, and what i needed

So i bought a dvb-t receiver with a RTL2832U chip, hoping it would work

Then got to work. My main laptop is using Debian 12, so a quick apt install rtl_433 later and bobs your uncle, i got a scanner.

Now some of the pages above suggest scanning the wheel sensors without an antenna, but i didn't work for me. When stationary i got no results, and the only result i got from driving around, was a single citroen sensor. Not good.

Having the laptop in the car wasn't nice either,

so i started googling rtl_433 and arduino.

and i got to THIS page.

It suggested installing Termux and ubuntu and using it.

Now being a jackass it took me the best part of the morning to get it working.

Here's a quick howto, but go to the link to see a better walk through.

1. install SDR driver from the play store https://play.google.com/store/apps/details?id=marto.rtl_tcp_andro

2. Install Termux https://play.google.com/store/apps/details?id=com.termux

Now i go on a side path, from what Dobrou did.

in Termux i did.


apt update && apt upgrade -y

apt install -y proot proot-distro

proot-distro add ubuntu


The reason is that i couldn't get AnLinux to work, and i didn't have time to fiddle. My guess would be that if i had installed proot and proot-distro, AnLinux would have worked.

Back to the fun.

i added a usb-c hub, Clamped in my dvb-T adapter

I opened the rtl-sdr driver, chose advanced and entered

-a 0.0.0.0 -p 14423 -f 433920000 -S 1024000 -T 0.

Then i started the driver. I found out that stopping RTL_433 in ubuntu, makes the driver stop.

The in Termux i started Ubuntu.

proot-distro login ubuntu

Again i divert from Dobrou. i did a

apt update

apt install rtl_433

Then i was set ready to play work.

The first command i tested, showed me that one of my neighbours have a 433mhz weatherstation.

Fun as that was, i didn't want that data.

I ended up with the following command to run the scan

 rtl_433 -M level  -S known -R 90 -R 168 -R 212 -d rtl_tcp:127.0.0.1:14423

The flags meaning

-M Level: Show signal level

-S known: Save every known signal, as a .cu8 file to look at later.

-R 90/168/212: Only look for these known signal types... Since i have a Reanult, those are the signals i look for.

-d rtl_tcp:127.0.0.1:14423  : This would apparently let us connect to a remote sensor, in this case we connect to localhost port 14423. its NOT a coincidence that the port number is the same as the -p parameter in the rtl-sdr driver.

Then i went driving.. And i found out my cars TPMS are very active the first 5 minutes of a drive. Then they seem to slow down.

Once i stop, they stop transmitting as well

Long story short, i got about  40 files, that i then moved from my phone to my computer  using scp. 

Woops. 

apt install openssh

There we go

Now to look at the data, on my laptop i did

rtl_433 -a *-cu8

For some reason, i didn't get the same amount of samples.
The sensors identify as
Abarth-124Spider and Renault-0435R

And i wont show the id's here, as you could potentially track the car using it.
From the pressures shown, i have the sensors placed at
Front               ;1;4;7;26;29;32;36:40                     :Pres 94/256 
Front               ;2;5;8;10;12;15;18;21;23;35;39      :Pres 92/260
Right  back     ;11;14;17;20;25;28;31;34;38          :Pres 88/217
Left back        ;3;9;13;16;19;22;24;27;30;33;37    :Pres 90/205

Funny thing the low preassure is from the Abarth-124spider amd the other is from the Renault-0435R.
i suspect its because of different encoding.
I think that before i mount the new sensors, i need to do a trip in the car, with just 1 sensor wheel on at each time.
The pressure and temperature is generally rising as i'm moving along.
Anyways. I think i have the sensor id's that i need, to order new sensors :-)


we see that one of the cars mentioned in the file, is the Megane III GrandTour, this fits
Then we see that the pressure is in 4/3 KPA. So the conv factor CF= 0.1087785
meaning that the pressures are 256=27,8;260=28,28;217=23,3;205=22,299 ( this tyre has a leak of some sort)
These pressures are what the system reports in the dash.

So using theese i have now contacted a company in Poland.
The reason being, that this company seems to be willing to program the sensor, with the original Id number (cloning) for free.
They also seem to be having an ok price for the sensor


So thats where this post will end for now.

I am waiting for an answer, to see if my Id's seem to make sense.

If they do, i will order the sensors, and hopefully i can get my summer wheels going.





Labels: , , , , ,

Tuesday, July 16, 2024

Backup Backup server - Part 3

 Adding storage and general software.

Now i have planned to create this server for some time.

What made me do it, is that one day googling i found this post. Basically Muffn_ combined some software that i didn't even know existed.

The short version is.

Debian for a stable system

SnapRaid for a flexible storage system, that doesn't use too many resources for my old N40L

Btrfs filesystem and snapshots to keep incomming / moving data safe. I will furthermore use the compression feature of the filesystem, as that will make disk usage more simple.

MergerFs to place the data on the disks.

Power down inactive disks

Turn on the backup server from my Main server, and shut it down, once backup is done, and SnapRaid hashing has been done


But first things are first. I started by removing the compatible wifi usb dongle, to see if the other one would play nicely. The system didn't even hickup as but that was because it was using the new adapter. For some reason it wouldn't change to the old one. Oh well. If i remember i will replace the new for the old on next reboot.

Edit:

Got it.

Used sudo iwconfig to get the interface name.

Then copied the functioning ethernet interface in /ect/network/interfaces, changing the name to the name of the second adapter.

Now it accepts ripping one adapter out, and adding the other one.



Then there the x/KDE thing. Lets disable the autostart at boot, to save resources

we do a 

systemctl set-default multi-user.target
and reboot.
Then on to the router, to assign a fixed Ip

Back to the main course.

i want to do the same as Muffn_ in that i want to use the ssd for caching incoming files. One of the reasons for this is also that i want to enable compression on the storage disks. Having read his blog, i found a very descriptive schematic of what i wanted to do. I wont steal or replicate his diagram, i will instead say this. I have no /mnt/array01 nor /mnt/Array02.

Now heres the fun part.

Muffn_ did at time of writing, not write part 4 of the saga yet. so instead i have to glean the things i can from the descriptions, and see what i can figure out from his ansible script.

Let the digging commense.

Ansible seems to be among other things an automated install script thinghy, so i will steal  learn as much as i can from it.

Having dug around a little bit, i relaised that its just a way of chugging down what you want to do, using a script language i don't know. I do this myself a fair bit when working with my robot... creating code so i don't have to do something. So off i go to try and figure out how this script would work.

Now as far as i could decipher you have to actually run the script on another computer, called a the control node, that then installs on the Managed node. This could be a skill that's useful, so of reading tutorials i go.

My idea now, is to fork the ansible script, and make my adjustmenst as i need them.

More will follow in part 4









Labels: , , , , , , , , , ,

Saturday, July 13, 2024

Backup Backup server - Part 2

 Well, nothing ever really works like you would like the first time.... Or the second, or the 10th.

So now im writing this on my laptop

Anyways, the computer did in fact not reboot. Trying to mount the disk and figure out what was wrong, just showed me that the files that were supposed to be on the disk weren't there.

So i tried from the kde live cd, and that just made me realize how much i have missed kde, from when i used SUSE in the olden days. It actually felt faster, more snappy than the xfce live distro !!. 

Anyhows. 

I tried to get the installation going from the latest Netinst iso, that failed as well.

Then i got an idea. Perhaps im just too impatient.

Perhaps i can chain boot the usb3 stick from the usb3 card, and speed up the disk access.

So in with an older boot usb, that contains a chainloading distro, the install drive went into the usb3 in the back.

Booting. Nope, cant see the usb3 connected drive. (Note to self, can i add the needed bios thinghy to to bios, Perhaps adding the server remote that the chipset supports as well ?? Ill park this here, as somethign for another day)

Now on this old boot stick, was an older version of the netInst for Debian 12. So because i'm too lazy to change the usb sticks, i tried booting this one.

This opened a simple graphical installer, and i'm currently installing the base system.

Settings like language, placement and so on are always kind of difficult, as i like my keyboard/time/locales to be Danish, but then language to be american english. 

I deselected the graphical system, added SSH-server. and let it run.

Installed the Grub boot loader. Decided to mess with the installation, and inst0alled the grub boot loader to the Intel disk, and the first disks on the internal controller, and the last disk on the internal controller as this is seen as /dev/sda

So basically to /dev/sda /dev/sdb /dev/sdf. I need to do some digging into if this is a good idea, and if i can trick the system into always updating all boot confs at once. Edit: Having done some googling, it doesn't seem to be necessary to do a grub update, just because of a kernel update.

Then i pressed finish installation, and hey presto it booted.

So now to install kde, not that i want it to start as default, i just like to have it as it makes following a tutorial from the net simpler.

off to install kde we go

As i use integrated amd graphics i skip the steps on nvidia.

sudo apt update

sudo apt install kde-standard plasma-nm

Then i needed to fix the new wifi card that wasn't detected.

 Reading from the ubuntu forums i found the following.

install kernel and build thinghys

sudo apt update
sudo apt install build-essential git dkms bc
Then get the latest driver from git, and compile
Git clone https://github.com/morrownr/8821cu-20210916.git
cd 8821cu-20210916
sudo ./install-driver.sh
Waited for the build to complete
 (a 1.3Ghz, dualcore Turion II cpu takes absolute AGES to do this)
Chose the default something for a file, and did a reboot as ordered.
Doing this booted directly into kde. Fine for now.
Later i will disable the kde startup
i will continue the log in part 3, working again on the server it self






Labels: , , , , , , , , , , ,