-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New Device - Nissan Leaf TPMS #1024
Comments
@zuckschwerdt Over my head a bit. Is this output string the raw string, or the manchester decoded value?
Before I go to town on BitBench, I want to know I'm using the right value. I'm hoping to check every other TPMS format to see if it matches any of those. |
Sorry, no this isn't manchester decoded. You would need to apply that by hand. I'll add a few example scripts and maybe a button for BitBench soon. |
Sounds good, thanks!
I guess using the tx_tools generator with a suspected preamble would be a
nice way to graphically visualize the preamble to make sure it ends at the
right spot.
…On Thu, Mar 28, 2019 at 3:06 AM Christian W. Zuckschwerdt < ***@***.***> wrote:
Sorry, no this isn't manchester decoded. You would need to apply that by
hand. I'll add a few example scripts and maybe a button for BitBench soon.
There currently is no MC decode for FSK as you would need to align the
data at a suitable preamble. The trick for subsequent manchester is to make
sure all groups of two bits after the preamble are either 01 or 10. Also
the resulting hex code could be shifted 1-3 bits if the preamble to cut off
was choosen to short or long.
Sorry again, I'll try to make MC utils available asap.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#1024 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AIABdwD8VFR5pAlG4OAMn9M9EUiUXpBdks5vbGoPgaJpZM4cLxk->
.
|
I tried playing around with this data a bit. After removing a sync/prefix and Differential Manchester decoding the data, I took a stab at trying to identify the fields. I wasn't able to come up with much, but maybe this is progress? There seems to be a parity bit in there somewhere, and I'd guess it's the final bit. There's a few other flags that may mean something, and there seems to be an 8-bit value that may be related to pressure, but maybe not? Also, I'll assume these samples all come from the same device since bits that probably relate to a TPMS_ID don't change at all. |
I would expect 3-4 bytes of ID, 1-2 bytes pressure, 1 byte temp, and 1 byte checksum. Haven't really seen shorter codes. I'll take a closer look this evening. |
I did some quick googling to see if there was any Leaf tool that would spit out the TPMS ID's. There's an Android app (Leaf Spy), but even the Pro version doesn't report the ID's. |
@gcormier Would it be possible to get samples from other tires, and have a manual tire pressure reading associated with each sample? |
@gcormier Just a crude first test, but BitBench now has Preamble/Sync options and Manchester decode also. |
Yes, I will try to get readings for PSI as well as something from the other 3 wheels. They don't belong to me, so I'll see when I can get over to my friends to read them :) |
This BitBench has the data with Preamble alignment and DMC coding. The didn't check/update the format string tough. |
Some of my research notes (I think would support the MC theory) Claims to be OEM : https://www.ebay.com/p/Nissan-407003AN1B-Genuine-OEM-TPMS-Sensor/1437046258?iid=132576949062 https://industrycanada.co/7812D-S180015B
Hmm, it's not ASK we're seeing but FSK... so perhaps a red-herring to be ignored. Also, I have a note that there is some unfinished work done on a sensor by the same company, whether that helps or not : merbanan/rtl_433_tests@master...FizzyWhiz:master for the KR5S180052056. |
Agreed that MC looks better than DMC for this. I was able to parse out 8 bits that may relate to pressure, and using the same decoding for a PSI value that the Toyota TPMS sensor uses ((PSI+7)*4), I'm getting sane values. Here's another stab at decoding: BitBench |
Nice! I am heading over to my buddies tomorrow evening to get some captures from the other 3 wheels! I'll make a note of the PSI as well and ambient temp. |
To get robust sync the preamble should be shorter so some starting bits a re allowed to be missing, 16 bit seems enough |
Got the data. Might take a day or two to update the tests and PR, but here's one string from each tire. I have the PSI's all written down too, i just have to crossreference.
|
Also, unfortunately I forgot my IR thermometer. The thermostat in the basement said 18.5 Celsius. Tire 4 was on the bottom, so a change it is slightly colder, and tire 2 was on top, so warmest. |
@gcormier Great, thanks! I revised the BitBench a bit to include these new data points and reset the preamble value to what @zuckschwerdt suggested. The TPMS_ID might be only 5 bytes long since the 6th byte doesn't seem to vary at all between all 4 tires. Also, changing the formula for the pressure value to be interpreted as ((PSI+3)*4) seems to line up well with the manual readings you took. |
Nice work! It is odd, the picture shows more values for the sensor ID.. but I don't see where they would be unless they are all matching (what would be the odds?!) in the 4 tires I found. |
I'd guess each sensor is only advertising one ID. Since the photo you provided is from a random ebay listing and not the exact sensor you're scanning, it's difficult to tell which ID printed on the sensor is being advertised, and if I aligned the bits correctly to pick it up that way. Unless you can view the sensor you're scanning (I'm guessing that's unlikely), maybe you can use some kind of OBDII device to have the car tell you what it thinks the IDs of the sensors are? I think that unless we can get some kind of confirmation of what the TPMS_ID of the device is supposed to be, we're just guessing at bits. Also, I'm not seeing any indication that the sensor is advertising a temperature reading. |
The Leaf app won't divulge the sensor ID unfortunately. I concur on the temperature - I hit it with freezing spray and never noticed a difference. One last idea is that perhaps there is another mode activated by regular driving that differs from the panic mode, and subsequent "frequent update" mode. Tail end of winter up here, but know that I know a bit of what we're looking for, I can go for a ride along when these wheels are back on the car to see what's getting spit out. |
@gcormier while you were working on this, did you happen to stumble across any information related to Honda TPMS sensors? |
No I didnt.
…On Thu., Apr. 25, 2019, 9:24 p.m. Matt Panaro, ***@***.***> wrote:
@gcormier <https://github.com/gcormier> while you were working on this,
did you happen to stumble across any information related to Honda TPMS
sensors?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1024 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACAAC5YE3YWZXFQEAHYOJS3PSJKWPANCNFSM4HBPDE7A>
.
|
I was able to ride around in a 2015 Nissan Leaf and record some data. I used what I found in this issue to write a decoder based off the Citroen decoder. After combing through the data looking for 4 distinct tires I think the data field may be 24 bits wide, b/c that gave me 4 distinct IDs and the time between each set of transmissions was ~65s. I should put it under a feature branch, but right now I have changes for it sitting on master here: Before: MODE:2d TPMS_ID:20h UNKNOWN:5b (PSI+THREE)*FOUR=8d UNKNOWN:2b |
Timestamps would help, but here's the data on BitBench with the 24-bit ID encoding. Although, now that I look at how many times I saw each TPMS_ID I only saw one tire 4 times and only near the end of the drive.
|
Background: It was just last week I came across your tpms_nissan.c update and it worked great! My Ask (Please!!) Since most car guys may not know how to compile code, is there nay chance you can make a windows standalone exe? I did try to create a windows standalone, and spent 2 days trying Visual Code and CMAKE, but it always gave me an error "this can't be executed" when on the other windows machine. (I work in the embedded field, so DLL are new to me) Anyways, thanks for your work on this. Here is my post from 10 months ago: |
I'll try to review and, if possible, merge a decoder tomorrow. We can then create the "nightly" pre-release for Windows. |
Thank you, thank you!! If possible, could you outline the steps you use to make a stand alone exe using CMAKE? Anyways, thank you again for all the great work you have done with the RTL_433 program! |
The steps are automated in https://github.com/merbanan/rtl_433/blob/master/.github/workflows/release.yml |
Well.... this is weird. I just followed those instructions again, moved the needed DLLs to a different windows 10 machine and it worked!!! I have no idea what I was doing wrong the last two days!! I'll look at it again to make sure I understand all this crazy desktop dev stuff. Update: |
Looks like support was merged in #2536. |
Sorry, misread. Yes, if you can get this to mergeable state -- and feel free to open a PR yourself and we can close the one done on your behalf -- that would be great. @zuckschwerdt this is about a PR you are a middleman for. |
@alwilson I have access to leaf, how to test? |
Updated and manually merged with d34e48d |
Alright, I've compiled and running it with ./rtl_433 -R 248. |
checksum is here: rtl_433/src/devices/schraeder.c Line 237 in a7c5ef1
|
Where are we on this? It seems there is some support in master. Anything else to do? Starting 30-day feedback timer to close, unless there's a reason to keep it open. |
link points to nissan TPMS checksum, // 00 = OK
func sum2N(message [5]byte) byte {
sum := message[0] >> 7
sum += message[0] >> 5
sum += message[0] >> 3
sum += message[0] >> 1
sum += message[0] << 1
sum += message[1] >> 7
sum += message[1] >> 5
sum += message[1] >> 3
sum += message[1] >> 1
sum += message[1] << 1
sum += message[2] >> 7
sum += message[2] >> 5
sum += message[2] >> 3
sum += message[2] >> 1
sum += message[2] << 1
sum += message[3] >> 7
sum += message[3] >> 5
sum += message[3] >> 3
sum += message[3] >> 1
sum += message[3] << 1
sum += message[4] >> 7
sum += message[4] >> 5
sum += message[4] >> 3
return (^sum) & 0x03
} |
Test data
merbanan/rtl_433_tests#269
Figured I would bring the discussion here.
Second guessing myself here - did I waste an evening decoding the raw bitstream? Or will the -X output the DMC decoded values? I feel like it's the former... :(
BitBench
Decode string
-X "name=test,modulation=FSK_PCM,s=120,l=120,r=300"
The text was updated successfully, but these errors were encountered: