YouTube2Text

Master Hex: Decoding CANBus Data Made Easy — Transcript

by Garage Tinkering · 7,676 words · 1,062 segments · language en · Watch on YouTube

Full transcript

  1. 0:00welcome back car and tech fans and
  2. 0:01welcome to
  3. 0:032025 at the end of last year we dipped
  4. 0:06our toes ever so slightly Into the Dark
  5. 0:10Art of canvas sniffing and in this video
  6. 0:13we're going to stop dipping like C we're
  7. 0:15going to dive head first straight into
  8. 0:18that deep pool and by the end of this
  9. 0:20video hopefully three things will have
  10. 0:22happened one we'll have pretty much a
  11. 0:25complete breakdown of what all of the
  12. 0:28canvas values for the 350 ZR two you
  13. 0:33should be able to take a look at a
  14. 0:35screen of canvas data like this and find
  15. 0:38it a lot less daunting and actually
  16. 0:41understand what's going on with it and
  17. 0:44three for those of you who don't already
  18. 0:45know it you should have a really good
  19. 0:47understanding of how we convert numbers
  20. 0:49like normal Arabic numbers that we use
  21. 0:52every day into binary and then into
  22. 0:56hexadecimal codes which is what is used
  23. 0:59in this canvas reader it seems all
  24. 1:02matths and scary but it's actually not
  25. 1:05and I think when you realize what is
  26. 1:07going on with the canvas and what the
  27. 1:09numbers actually mean it's actually not
  28. 1:11at all intimidating it's actually pretty
  29. 1:14cool how it all works so let's get into
  30. 1:17it I should note that if I sound a
  31. 1:18little horse throughout this I've been
  32. 1:20ill all over Christmas and New Year for
  33. 1:23the second year in a row so I'm just
  34. 1:25getting to the end of it so bear with me
  35. 1:28at the end of the last video we put
  36. 1:29together together this OBD2 reading
  37. 1:32canas sniffing esp32 distributor Thing
  38. 1:36by Mr DIY amazing little tool and it was
  39. 1:41really useful for getting the some of
  40. 1:43the canvas code filtering out the stuff
  41. 1:45that we wanted and then Distributing it
  42. 1:47to a couple of gauges over ESP noun in
  43. 1:50this video we're going to use it for a
  44. 1:52slightly different purpose and that is
  45. 1:53basically just as a forwarder to using
  46. 1:56Savvy can on a laptop through a wireless
  47. 1:59connection
  48. 2:00so we can just live view and analyze all
  49. 2:03of the data coming out of the canvas
  50. 2:05perhaps one of the coolest things about
  51. 2:07this something I didn't expect is when I
  52. 2:09went onto Mr diy's website here to look
  53. 2:12at the code that allows you to do this
  54. 2:15as a
  55. 2:16distributor and you go down to the
  56. 2:18bottom there's some code examples and
  57. 2:21you it says here you can Flash the ESP
  58. 2:2332 R which is the the the file system
  59. 2:26that we need that does this distribution
  60. 2:28or directly use my online flasher so we
  61. 2:31went to this and then the savian esp32
  62. 2:37r and you can just click flash at the
  63. 2:40bottom of the page plug in your esp32
  64. 2:44like
  65. 2:46so kick the link here
  66. 2:49connect and then it connect and download
  67. 2:52all the codes that you need to install
  68. 2:54onto this to run it straight from the
  69. 2:58website I've never seen that before I
  70. 3:00think that's ridiculously cool so uh
  71. 3:02great job Mr DIY for sorting that out
  72. 3:05but I don't need to do it again because
  73. 3:06it's already done it took about 2
  74. 3:08minutes um yeah dead simple so this
  75. 3:10thing's now ready to go and throw in the
  76. 3:12car use a laptop and sense all the canas
  77. 3:16data so let's go take a look at a couple
  78. 3:18of things and then I'll explain what it
  79. 3:21is that we're really looking at so at in
  80. 3:24the car we'll start just by plugging
  81. 3:25this thing in down here
  82. 3:30if we're all good and green light should
  83. 3:32come on put the keys
  84. 3:35in then turn oh I don't even need to
  85. 3:39turn uh the blue light has started
  86. 3:41flashing which means we can bring up the
  87. 3:46WiFi and here's the can Wireless which
  88. 3:48is Distributing from that and we've
  89. 3:51already put the password in if you're
  90. 3:53using the flashed thing from Mr DIY the
  91. 3:56password is Mr DIY doca
  92. 3:59and then we can boot up savian which we
  93. 4:01looked at in our last video but this
  94. 4:04time it's going to go into the open
  95. 4:06connection
  96. 4:08window add a new device connection over
  97. 4:11the network it populates that already
  98. 4:14create a connection and
  99. 4:17boom canvas data and it comes and we
  100. 4:21want to keep overwrite mode
  101. 4:24on so what that will do is show us this
  102. 4:27so this at the moment is in ACC mode so
  103. 4:31the the car isn't started up actually
  104. 4:33it's not even the key is just in so the
  105. 4:35key in and so these are the things that
  106. 4:37go no matter what what what we want want
  107. 4:40to start doing is finding things that we
  108. 4:42can that whilst the car is in the most
  109. 4:45minimal State possible so this at the
  110. 4:47moment is pumping out 10 different
  111. 4:49canvas IDs there are going to be a lot
  112. 4:51more than that but because the car has
  113. 4:53just got the keys in and the ACC isn't
  114. 4:56on the engine isn't on it only a few
  115. 5:00things so it'll find main finding things
  116. 5:02is a little bit easier before all the
  117. 5:04other stuff comes into play so let's
  118. 5:06take the lights for example because
  119. 5:09there are various types of data that
  120. 5:12we're going to be looking for ones that
  121. 5:14are a flag so something that is on and
  122. 5:16off like a light or a door is open
  123. 5:19there's something that is a real range
  124. 5:22so something that goes from say um 0 to
  125. 5:27100 it might be at a temperature um it's
  126. 5:30within a range and the the final value
  127. 5:32is less than
  128. 5:34255 you'll understand why that number is
  129. 5:36important in a bit if you don't know
  130. 5:37about heximal or there is something that
  131. 5:40runs over a large range and that has a
  132. 5:42multiplier flag so something like the
  133. 5:45RPM which can go from zero through to
  134. 5:47several thousand and they work in a
  135. 5:50slightly different way so we're looking
  136. 5:51for different types of data moving in
  137. 5:55different ways so let's start with the
  138. 5:58simplest one flag and also it's it's
  139. 6:01important to remember that the data that
  140. 6:02we're looking at on this screen these
  141. 6:04numbers aren't really numbers so like 50
  142. 6:08here isn't really 50 it's 50 in heximal
  143. 6:12which means something very different
  144. 6:15which we we'll get to in a minute so one
  145. 6:18thing that will work whilst all this is
  146. 6:20off is my lights so if I put on my side
  147. 6:25lights or my parking lights depending on
  148. 6:28what you call them we're going to look
  149. 6:29for a value changing so I'm just going
  150. 6:31to go on off okay you can see two values
  151. 6:36there the
  152. 6:3840 here and the 04 here so that's when
  153. 6:42it's on and off then if I go to main
  154. 6:45beam
  155. 6:500660 and then if I go to flash my full
  156. 6:54beams 70 okay so that one goes at the
  157. 6:58top 70 the bottom one doesn't go then I
  158. 7:01push it forwards to form beam all the
  159. 7:04time that top one so that top one looks
  160. 7:06like the best candidat that's going from
  161. 7:090 to 40 to 60 to 70 though that's not
  162. 7:15really like I say 0 20 40 60 70 it's
  163. 7:19heximal 20 40 60 70 which I'll explain a
  164. 7:24second so we've just got those lights so
  165. 7:26that's a flag type so it's something
  166. 7:28that changes is a state from on to off
  167. 7:31so that means we know that ID
  168. 7:36625 in bite position two so this is the
  169. 7:41second bite is to do with the lights so
  170. 7:45if
  171. 7:47040
  172. 7:486070 isn't really 040 6070 in the way
  173. 7:52that you know it what is it and how does
  174. 7:55it pertain to what the ECU in the car is
  175. 7:59actually looking at in order to better
  176. 8:01understand that you need to know how we
  177. 8:03convert from decimal to Binary and
  178. 8:05binary to heximal which is what is used
  179. 8:08in the car so let's do a little bit of
  180. 8:11learning if you obviously know how
  181. 8:13heximal Works already you can maybe skip
  182. 8:15on to the next chapter but it's always
  183. 8:16good to review and refresh your
  184. 8:18knowledge either way I'm sure you're
  185. 8:20perfectly well-versed with a normal
  186. 8:23counting system that goes from zero to 1
  187. 8:27to two to three all the way up to nine
  188. 8:31this is our normal decimal counting
  189. 8:34system Dei meaning 10 and it is a base
  190. 8:3910 system which means that it has 10
  191. 8:42digits so 0o through to nine and when we
  192. 8:46get to the last one it Loops back to the
  193. 8:50first digit and then it increments the
  194. 8:53next digit along as a flag to show that
  195. 8:56we've gone up another level so when we
  196. 8:58get to n n when we're counting it
  197. 9:01reverts back to 10 and then the next
  198. 9:03digit along to the left goes up to the
  199. 9:06next value 10 and then that repeats over
  200. 9:10and over so this one goes up until it's
  201. 9:1119 and then that one ticks over one more
  202. 9:15and this one goes up to the next value
  203. 9:17two and that is normal you know you know
  204. 9:20how numbers work you've been using these
  205. 9:22Arabic numbers your entire life you
  206. 9:24probably also know that a computer looks
  207. 9:27at code as a stream of zeros and ones
  208. 9:32bit data or binary data but how do we
  209. 9:36convert this decimal system that we see
  210. 9:39every day into computer binary code well
  211. 9:42it's actually pretty
  212. 9:44simple each one of those zeros or ones
  213. 9:48can be that only zero or one that's all
  214. 9:51it can be it's off or on it has two
  215. 9:55states and each one of those is known as
  216. 9:58a bit and I'm sure you've heard about
  217. 10:01bits before and you'll see bit written
  218. 10:04as a lowercase b so if we have a th000
  219. 10:07bits it's K lowercase b k being thousand
  220. 10:12but then we have bites and bites are
  221. 10:15written with an uppercase B so if you
  222. 10:17see KB that means th000 bytes and a bite
  223. 10:22is eight one two 3 4 five six seven
  224. 10:27eight bits and at this point in time
  225. 10:30that bite is the value zero because
  226. 10:33absolutely nothing is flagged onto it
  227. 10:35what we need to know is how we convert
  228. 10:39this number to a big one so let's just
  229. 10:42make it bigger here four five 6 7 8 so
  230. 10:47binary data is counted from the right
  231. 10:50and we double the value each time so
  232. 10:54this very right hand side one is worth
  233. 10:57one the next one is worth two 2 then
  234. 11:00four and we continue to double all the
  235. 11:03way up so 16 32 64 and
  236. 11:08[Music]
  237. 11:10128 so if we were to turn all of these
  238. 11:13on so these were all to become ones 1 2
  239. 11:173 4 5 6 7 8 you would add up all of
  240. 11:22these numbers so we've got 128 we've got
  241. 11:2564 we've got 32 and we've add them all
  242. 11:27up and that would equal
  243. 11:31255 which is why
  244. 11:34255 is the maximum value that a single
  245. 11:39bite can be so a maximum of a single
  246. 11:42bite is 255 so if we want to capture
  247. 11:45data that's greater than 255 we need to
  248. 11:48use multiple bytes but we'll get to that
  249. 11:51in a
  250. 11:52second so when we're converting from
  251. 11:55decimal to Binary let's say we take the
  252. 11:57number the decimal number
  253. 12:01143 how do we convert that into a binary
  254. 12:04number so like we said each binary digit
  255. 12:06is worth 128 64 32 16 8 4 2 and one so
  256. 12:17does 128 go into 43 yes it does which
  257. 12:23leaves us with a remainder of
  258. 12:2715 so 14 3 - 28 is 15 so does 64 go into
  259. 12:3315 no does 32 go into 15 no does 16 go
  260. 12:37into 15 no does eight go into 15 yes
  261. 12:43which leaves us with a remainder of
  262. 12:44seven does four go into seven yes
  263. 12:49remainder three and we can see here
  264. 12:51these two are going to make that last
  265. 12:53three so the decimal number for 143 is 1
  266. 13:000 1 1
  267. 13:03one1 pretty simple R but when we were
  268. 13:06looking at all that canas stator in the
  269. 13:07code it was always two digits and there
  270. 13:10were numbers from zero through to nine
  271. 13:12and then there were a few letters in
  272. 13:13there as well and that's where we
  273. 13:15introduce heximal and really all heximal
  274. 13:18is is a shorthanded way of visualizing a
  275. 13:22bite of data let me show you how that
  276. 13:25works as we mentioned at the start
  277. 13:28decimal is a BAS Bas 10 system whereas
  278. 13:31hexad decimal or just hex for short
  279. 13:35meaning six and 10 is a 16 base
  280. 13:40system so instead of counting Z up to
  281. 13:46nine so 10 10 moves as it were this one
  282. 13:51Counts from zero up to F which is 16
  283. 13:55moves
  284. 14:00so it
  285. 14:02counts
  286. 14:040 1 2 3 4 5 6 7 8
  287. 14:139 A B C D E and F so 0er through to 9ine
  288. 14:22mean exactly the same thing value-wise
  289. 14:26and then when we get Beyond 9 these
  290. 14:30become 10 11 12 13 14 and 15 so if we go
  291. 14:37from 15 through to zero because it's the
  292. 14:39extra that's 16
  293. 14:42moves which is where it gets its name so
  294. 14:46if we want to represent the number
  295. 14:4914 we just write it as e so e is equal
  296. 14:54to 14 and that's decimal 14 is equal to
  297. 14:59to hexadecimal e the thing is these
  298. 15:03numbers top out at 15 this is the
  299. 15:07maximum number a single heximal value
  300. 15:11can be represented as it maxes out of 15
  301. 15:15so how do we use it with our previous
  302. 15:18example of decimal 143 we've got this
  303. 15:21binary number how do we convert this
  304. 15:24into what we're seeing in the canvas
  305. 15:27let's take our number that we used
  306. 15:28before 4 1 0 0 0 1 1 1 1 remember that's
  307. 15:34143 the difference that hexad decimal
  308. 15:37does is it takes that long 8 by number
  309. 15:40which originally went from one here up
  310. 15:43to 128 here and it splits it into two
  311. 15:49individual four bit portions and then it
  312. 15:53treats them as 1 2 4 8 and 1 2 48
  313. 15:59and the reason heximal works so well is
  314. 16:02when you add up these four values 8 4 2
  315. 16:06and 1 it gives you the maximum value
  316. 16:08that each 4bit section can be which is
  317. 16:1315 and as we just seen in the previous
  318. 16:16one the maximum value of a hexadecimal
  319. 16:20is
  320. 16:2215 so we know this side is 8421 so this
  321. 16:26one is 15 and 15 is represented in
  322. 16:30heximal by F and this one is just8
  323. 16:34because we've got the eight here so this
  324. 16:38number 143 in decimal is equal to 8 F in
  325. 16:45binary so eight from that side and F
  326. 16:47from this side so as these numbers
  327. 16:50increment what you'll generally see is
  328. 16:52if it starts at 0 0 in an example where
  329. 16:55we're going from the lowest value
  330. 16:58through to the maximum value which is FF
  331. 17:01what typically happens is the right hand
  332. 17:03side one increments so it will go 0 1 2
  333. 17:063 4 5 6 7 8 blah blah blah all the way
  334. 17:09up to a b CDE e f and then when it gets
  335. 17:12to Zer f it then becomes 1 0 and then
  336. 17:16that one goes up 1 2 3 4 5 6 7 all the
  337. 17:19way up to 1 F and then becomes two 0 so
  338. 17:23when I said that 20 40 60 70 aren't
  339. 17:29really 20 40 60 70 this is what I mean
  340. 17:33so what really are we looking at when we
  341. 17:35see that value for the lights go from 0
  342. 17:390 to 40 to 60 to 70 let's just plot
  343. 17:45those
  344. 17:48out if we're going to treat 00
  345. 17:510 40 60 and 70 as hex what we need to
  346. 17:57remember is they are all two individual
  347. 17:59values so the right hand side in each
  348. 18:02one is always zero so we can assume for
  349. 18:06all four of these the right hand side is
  350. 18:10all zeros so for the zero the four the
  351. 18:15six and the Seven they're all zeros
  352. 18:18along this
  353. 18:23side now when we're z z and nothing is
  354. 18:27happening these ones are also or zero
  355. 18:30when we're at four if we remember we've
  356. 18:32got 1 2 4
  357. 18:368 when we're at four that means this one
  358. 18:40here four is
  359. 18:43on so our side beam is basically not
  360. 18:48really 40 it's saying this bit here that
  361. 18:53one bit that we're interested in has
  362. 18:56changed from a zero to a one so that
  363. 18:58changing from Z to one is the computer's
  364. 19:00way of knowing that those Sid lights are
  365. 19:03come on so if we want to analyze this we
  366. 19:06can look at this whole bite of
  367. 19:08information request just the second bit
  368. 19:11and say is this Bit Zero or one and
  369. 19:14based on whe which one it is we'll know
  370. 19:16whether or not those S side lights are
  371. 19:17on when it goes up to six six will be
  372. 19:21done with four and two so 0 1 1 0 so 2 +
  373. 19:274 is six which means side lights are
  374. 19:31still on because of course the side
  375. 19:33lights are still on when you put the
  376. 19:34four beams on the side lights are still
  377. 19:37on but now two has come on so this bit
  378. 19:40here is the indicator of full beams and
  379. 19:4570 is 0 1 1 1 so 4 + 2 + 1 is 7 so this
  380. 19:52bit here then indicates that the full
  381. 19:55beam has been put on so like I said
  382. 19:59we're not really looking at 40 60 and 70
  383. 20:02as the way you think of them in decimal
  384. 20:04values really we're just thinking of the
  385. 20:07left hand side of those numbers as four
  386. 20:10six and seven and they're these
  387. 20:12individual flags for each one so we know
  388. 20:17bit number two here is the side lights
  389. 20:22bit number three is the main beams and
  390. 20:28number four is the full
  391. 20:32beam hopefully that's made you realize
  392. 20:34it's not actually all that complex and
  393. 20:36it's a just a way of visualizing that
  394. 20:39number from zero up to like I said a
  395. 20:41maximum of
  396. 20:44255 in a way that is much more shorthand
  397. 20:48so instead of having between one and
  398. 20:50three digits so from zero up to 255 it's
  399. 20:53just always represented as two digits
  400. 20:57and it's just a wave keeping things
  401. 20:59really nice and consistent and quite
  402. 21:02Visual and easy to like scan through but
  403. 21:04what about numbers that are greater than
  404. 21:06255 let's take our RPM for example they
  405. 21:10need to go to much bigger numbers so how
  406. 21:13do we do that and that's where something
  407. 21:15you might have heard me talk about in
  408. 21:16our last video comes in which is big and
  409. 21:19little Indians and they're just
  410. 21:21modifiers that basically say don't do
  411. 21:23this in one bite do this in two and
  412. 21:26again fortunately it isn't all that
  413. 21:29complex let's say we've got an ID X so
  414. 21:34ID in our car doesn't matter which one
  415. 21:36it is is X and we know we're looking for
  416. 21:40the RPM so the RPM is going to be a
  417. 21:43value that is generally speaking going
  418. 21:46to be greater than
  419. 21:49255 so a single bite won't do it but it
  420. 21:53might start with a a z0 value and then
  421. 21:58it
  422. 21:59increases up to its maximum of FF and
  423. 22:03then it goes back down to zero again
  424. 22:05then starts counting up again until it
  425. 22:08hits FF and then another bite usually
  426. 22:12positioned next to it will increase by
  427. 22:15one so it'll start here and when this
  428. 22:17gets to FF it's still 0 0 but when it
  429. 22:20goes back down to 0 0 The Next Bite will
  430. 22:24go to 01 and that's just a flag to say
  431. 22:27this one previous has gone up by one
  432. 22:30value and then it'll do the same again
  433. 22:32it'll increase until it hits FF and then
  434. 22:35when it comes back down to zero again
  435. 22:37this next one will go from 01 to
  436. 22:4102 which hypothetically means we can go
  437. 22:44all the way up to FF
  438. 22:48FF which would be a lot more digits it
  439. 22:52would be 11 one one one one one one one
  440. 22:55one one one one one one1 and if we just
  441. 22:58keep doing that doubling thing so 1 2 4
  442. 23:028 16 32 64 128 then this one starts to
  443. 23:07become 256 512 1,24 248
  444. 23:13496
  445. 23:168,192
  446. 23:1816,384 and
  447. 23:2232,768 which when we add up all the ones
  448. 23:25together gives us a maximum total
  449. 23:29of
  450. 23:30[Music]
  451. 23:3265,536 which is more than enough to
  452. 23:35encapsulate pretty much everything that
  453. 23:37you might want within a range RPM is
  454. 23:41probably not going to go over 65,000 now
  455. 23:44obviously these digits when they're this
  456. 23:46way round and having this number here
  457. 23:49this one is actually these ones and then
  458. 23:54this number here is this one so they're
  459. 23:58back
  460. 23:59backwards and when we talk about big
  461. 24:02Indians and little
  462. 24:06Indians that's what this means so big
  463. 24:09Indian is when we take this number
  464. 24:12that's on the right hand side when we
  465. 24:14use it we technically are using it here
  466. 24:18so it's actually 0 0 FF so big endian is
  467. 24:21that swap around of taking the bite that
  468. 24:24follows and moving it into the position
  469. 24:27before before we do our math function on
  470. 24:30it so now that we know how this
  471. 24:32numbering system works and how this
  472. 24:34counting system works it makes staring
  473. 24:37at that re of data a lot less
  474. 24:39intimidating because we just know it's
  475. 24:41like a z0 is just zero whereas FF is
  476. 24:44showing is that the value is 255 so it's
  477. 24:46it's maximum where something like 87 is
  478. 24:50like you know kind of in the middle and
  479. 24:52also knowing how to look for those
  480. 24:55ranged data so something that goes up
  481. 24:57from 0 0 to FF and then drops to 0 0
  482. 25:01again and then has another bite next to
  483. 25:03it that increments means that we can
  484. 25:05start to look for those things that
  485. 25:07going to have larger ranges so with that
  486. 25:09information fresh in our heads we can go
  487. 25:11back out into the car and start to look
  488. 25:13for some of those things that work in
  489. 25:16ranges as opposed to just on off Flags
  490. 25:19right so continuing on let's try and
  491. 25:21find some other things so I'm going to
  492. 25:23turn the car to ACC mode and a lot more
  493. 25:27idas have come through
  494. 25:28so there's a lot more stuff happening
  495. 25:30but it means we also have access to more
  496. 25:32things so if I let's say another one
  497. 25:36that's a flag state is an
  498. 25:37indicator so I'm going to put the
  499. 25:40indicating left and there we can see at
  500. 25:4460
  501. 25:45D this is going from 06 to 26 so that
  502. 25:50means one of those bits is flagging on
  503. 25:53and off and I expect if I go right I bet
  504. 25:55that goes to
  505. 25:5746 yeah
  506. 25:58yet and if I put on my
  507. 26:02emergency that should go to
  508. 26:0566 exactly as I expected because we've
  509. 26:08got the one bit for the 20 flag we've
  510. 26:10got another bit for the 40 flag and then
  511. 26:12we've got both bits on together for the
  512. 26:1560 flag it's all very clever then there
  513. 26:18are a bunch of other flag position stuff
  514. 26:20so things that are on and off so I've
  515. 26:21got uh the button that turns on and off
  516. 26:25my rear heated wind screen so let's turn
  517. 26:28that on and off and just look for
  518. 26:29something that changes in fact there is
  519. 26:31first row you see 32 to 33 32 33 so that
  520. 26:39turns on and off so that's where that
  521. 26:41flag is what about AC
  522. 26:45on
  523. 26:47off yeah so the row below that turning
  524. 26:51AC on C 0 becomes C1 so that's AC on and
  525. 26:57AC off so it's
  526. 26:5935d what about opening the
  527. 27:10door uh here
  528. 27:1360D that's 0 0 in the first row 10 when
  529. 27:17I open the driver
  530. 27:19door and then passenger
  531. 27:24door
  532. 27:26um yeah 08
  533. 27:30yeah so there's a flag on both of those
  534. 27:33now let's try something that's not a
  535. 27:35flag type something that'll have a range
  536. 27:38my accelerator even though I'm stopped
  537. 27:40should still have a position sensor so I
  538. 27:42should be able to get my accelerator
  539. 27:45position which would be good because we
  540. 27:47can use it to rule out other things
  541. 27:49later on cuz when we've got the car on
  542. 27:52and we're running if you're trying to
  543. 27:53differentiate between um your foot
  544. 27:57throttle position how far it's down and
  545. 27:59then your throttle plate position how
  546. 28:01open it is and then your RPM and your
  547. 28:04speed and your math air intake level
  548. 28:08like there's a lot of things that run
  549. 28:10like concurrently with each other as the
  550. 28:13levels all go up and down so if we can
  551. 28:16eliminate some now before those other
  552. 28:19things are running it makes our job a
  553. 28:21little bit easier in the future so I'm
  554. 28:25going to just put my foot slowly down on
  555. 28:28the pedal and then look for things to
  556. 28:30change and you can see straight away
  557. 28:33this 231 line here jumps down so if I
  558. 28:37get my foot all the way to the
  559. 28:40floor this first value here as I slowly
  560. 28:44move
  561. 28:45down this one
  562. 28:47increases all the way up until it
  563. 28:51gets to where is it stop
  564. 28:54at it stops at C8 which is
  565. 28:58pretty far down 2 31 C8 I'm not sure
  566. 29:02what these two are next to it they seem
  567. 29:05to go alongside it but this one
  568. 29:08definitely runs from zero through to a
  569. 29:11quite high value
  570. 29:13C8 um are there any
  571. 29:16others oh okay there we go that flag
  572. 29:22there
  573. 29:24goes then my foot's all the way at the
  574. 29:26floor so
  575. 29:2823d goes from full
  576. 29:31zero through to full
  577. 29:35FF which is maximum all the way down
  578. 29:39foot on the floor FF so that's using the
  579. 29:43full range so that one 23d bite one but
  580. 29:47it's the second place but it's bite 0 01
  581. 29:50second bite is the throttle position
  582. 29:54that means we can eliminate that one
  583. 29:55that one won't be RPM and it won't be
  584. 29:57thrott throttle plate or anything like
  585. 29:59that so the throttle position there what
  586. 30:01about brake does breake have variable
  587. 30:03positions uh it's looking for something
  588. 30:05there it is 29e at the
  589. 30:07bottom so as I put my foot on the brake
  590. 30:10it's got It's just on and
  591. 30:14off so there's that 40 flag there so
  592. 30:17that's breake on that actually is
  593. 30:20probably more likely break light than
  594. 30:23brakes
  595. 30:24because yeah it's probably more likely
  596. 30:26brake light is on so that's useful
  597. 30:29rather than like any throttled position
  598. 30:32so that's some useful information now we
  599. 30:36know what some of these bites are the
  600. 30:39things that are going to get more
  601. 30:40difficult are oil pressure oil
  602. 30:43temperature water temperature which are
  603. 30:45three that we really want but when we
  604. 30:47start the car the temperature is going
  605. 30:49to be low and like are going to slowly
  606. 30:51rise and the pressure is going to be
  607. 30:52high and is going to slowly drop and
  608. 30:55when we turn the car on this is going to
  609. 30:57become mass of swilling information so
  610. 31:01what we want to try and do is like
  611. 31:03filter down as quick as we can to some
  612. 31:06of those things now I do have some
  613. 31:08candidates I found a couple of people
  614. 31:10who have created um templates for the
  615. 31:13350Z though they're very incomplete and
  616. 31:15I think some of them are wrong and I I
  617. 31:17found templates for the 370Z and another
  618. 31:21niss and the X teror and they both are
  619. 31:25using a lot of the same IDs so there's a
  620. 31:27good chance
  621. 31:29some of the information will be the same
  622. 31:31so I've got some candidates for what a
  623. 31:34couple of them could be for RPM oil
  624. 31:37temperature water temperature I've got
  625. 31:39no candidates for oil pressure so that
  626. 31:41one we're going to have to try and find
  627. 31:42out um and then speed I've got a
  628. 31:44candidate for as well even though I'm
  629. 31:46sure I've got RPM and speed locked down
  630. 31:49already um so I'm going to start up the
  631. 31:51car and then we need to see we need to
  632. 31:54try and get the temperatures and the
  633. 31:55pressures pretty quickly because they
  634. 31:57get to a point then they level and
  635. 31:58they're going to be a lot harder to find
  636. 32:00and we can optimize on some of the other
  637. 32:03views to do that so if I go
  638. 32:05into
  639. 32:06um if I go into
  640. 32:09tools and flow
  641. 32:13view we'll bring up this and if I go to
  642. 32:16live mode so this is it graphing what is
  643. 32:20currently
  644. 32:21outputting so we know based on this
  645. 32:26previous thing that our throttle
  646. 32:28position for example down here is this
  647. 32:31one so 23d is our throttle position so
  648. 32:35if we look at
  649. 32:3623d here you should see as I put my foot
  650. 32:40down see that green line go up to the
  651. 32:43top and then come down and that's
  652. 32:45following my foot so that is a really
  653. 32:49good way of just
  654. 32:51visualizing what this one is so that
  655. 32:53that's a a clear clearly this one it's
  656. 32:57going to be more difficult to try and
  657. 32:58find things that start low and move high
  658. 33:00and I'm hoping they're going to be
  659. 33:02either in Fahrenheit or Celsius just a
  660. 33:04direct number because that means
  661. 33:07there'll be a rough range um so
  662. 33:09temperatures right now it's about 8°
  663. 33:12here which in Fahrenheit must be uh 30
  664. 33:16something so maybe there'll be a value
  665. 33:18in the 30 somethings that will increase
  666. 33:21guess the only thing we can do is start
  667. 33:23her
  668. 33:24up and uh see what we get
  669. 33:29okay just start it
  670. 33:31oh
  671. 33:32so what that red line
  672. 33:38[Laughter]
  673. 33:41there that that red
  674. 33:44line I'm pretty sure is our
  675. 33:48RPM straight what straight off the
  676. 33:51straight off the backat let's just
  677. 33:52remove these and just leave four
  678. 33:54afterwards and I expect as this one goes
  679. 33:58up we'll see the bottom this next one
  680. 34:01after it tick up which is the third type
  681. 34:04that I was talking about which is an
  682. 34:06Indian
  683. 34:08flag yeah okay I'll all again so there
  684. 34:12are some bits of information that
  685. 34:14consist of two bites one bite which is
  686. 34:16going up and then as the first bite goes
  687. 34:18up the second one then has a tally to
  688. 34:21say that goes up further and it's the
  689. 34:22big and small Indians but right now
  690. 34:24let's see if we can just see anything
  691. 34:26that's a candidate for temperature and I
  692. 34:28would expect because they're sensors
  693. 34:30they're not perfectly one number and
  694. 34:32they'll be they'll be flickery numbers
  695. 34:35they'll be
  696. 34:36like okay something High there
  697. 34:4025 let me just see what my candidates
  698. 34:43were so in my candidates list 551 was an
  699. 34:48engine temperature so I'm just keeping
  700. 34:51an eye on this and potentially this blue
  701. 34:54line I mean any of these three lines
  702. 34:57could be it
  703. 34:58I'm just keeping an eye on them seeing
  704. 35:00how they move cuz at the moment yeah
  705. 35:03this bottom one is stuck
  706. 35:05around 75 no about 85 the green one is
  707. 35:09up at 120 and the top one's at 160 they
  708. 35:13could be a number of things now if if
  709. 35:16any of them were pressure if I put my
  710. 35:18foot down the pressure should
  711. 35:24rise yeah pressure's right up so none of
  712. 35:27them are pressure
  713. 35:28so I'm just going to come back to those
  714. 35:30in a minute and see if there's anything
  715. 35:32else here that rises with me putting my
  716. 35:34foot
  717. 35:37down sorry neighbors out on the drive R
  718. 35:40in your
  719. 35:42car uh
  720. 35:50ni ni okay let's go back to the start of
  721. 35:53the list and work our way down pretty
  722. 35:55sure it's going going to be that one
  723. 36:08no
  724. 36:16next uh it's moving but not
  725. 36:20sufficiently oh there's
  726. 36:22something 23 three what's that green
  727. 36:26one that settle at
  728. 36:28150
  729. 36:30160 my pressure right now is on the
  730. 36:33gauge is telling me it's at
  731. 36:3655 so if I move it up
  732. 36:39to
  733. 36:4490 okay it's definitely it definitely
  734. 36:47moves up it's 90
  735. 36:51PSI and then okay we've got this middle
  736. 36:54value or the middle one is just staying
  737. 36:56still
  738. 36:58if I then let off that
  739. 37:03drops potential candidates there for oil
  740. 37:08pressure let's check what 551 is doing
  741. 37:12now okay so this bottom one that was up
  742. 37:16at this one was down
  743. 37:18at 70 something and uh no this one was
  744. 37:21up at 80 something and is now up and he
  745. 37:24sitting like higher so this feels to me
  746. 37:27like a decent candidate for at least one
  747. 37:31of the temperatures now I know in the
  748. 37:33DBC file for I think it was the Xterra
  749. 37:37or it might be the
  750. 37:39370Z in
  751. 37:41551 was the oil temperature so it would
  752. 37:44probably make
  753. 37:46sense that it was using the same one so
  754. 37:50that's probably going to be oil
  755. 37:53temperature um my water temperature is
  756. 37:55also you know coming up yeah I think we
  757. 37:59might have oil temperature
  758. 38:02there so I'm just going to I'm going to
  759. 38:04stop the car here I just turn the car
  760. 38:07off and close this and then stop the car
  761. 38:12all
  762. 38:17together and we can then suspend
  763. 38:23capturing which means now I have all
  764. 38:26that data that I just created I have
  765. 38:29stored so I know that the pressure
  766. 38:33dropped um from you know High 120ish
  767. 38:37down to it stopped
  768. 38:40at 40 PSI um the water temperature came
  769. 38:44up predictably presumably even though we
  770. 38:47couldn't uh see it on any of the gauges
  771. 38:50the oil temperature came up so what we
  772. 38:52can do now is take all of that
  773. 38:54information that we've just created and
  774. 38:56go and plot it on a massive graph so
  775. 38:58instead of seeing a 1 second at a time
  776. 39:01snapshot of something going up and down
  777. 39:03we can look for that value that creeps
  778. 39:05up or creeps down over time and the oil
  779. 39:09pressure one should be creeping down and
  780. 39:11then just have blips where I was revving
  781. 39:13the engine but like you know generally
  782. 39:15be coming down over time whereas the
  783. 39:18other two should just generally be
  784. 39:21coming up over time let's go see if we
  785. 39:23can just find those last couple of bits
  786. 39:26of data so I've transferred that mass of
  787. 39:30information onto uh my desktop computer
  788. 39:33we have more lines here that I know what
  789. 39:36to do with and this is a trimmed version
  790. 39:39so I've maxed out what Excel is capable
  791. 39:42of so we'll try opening it up in Savvy
  792. 39:46can log
  793. 39:48file fingers crossed it doesn't just
  794. 39:50blow up yes okay right Rim okay ID
  795. 39:55233 was one of my candidates and that's
  796. 39:58this
  797. 39:59one so if we're looking the three we
  798. 40:02were looking at was the red one here the
  799. 40:04blue one and actually there were two
  800. 40:06others there was the green one and I
  801. 40:10can't remember which other color but I'm
  802. 40:11sure we'll see in a moment so if we
  803. 40:13start early in
  804. 40:15the early in the timeline we can see red
  805. 40:19is sat at
  806. 40:2224ish um whereas the blue is sat around
  807. 40:2660
  808. 40:27now if we just move
  809. 40:30on they're still both the same and at
  810. 40:33this point I don't think I turned the
  811. 40:34car on so if they were temperature based
  812. 40:36that would probably make sense and you
  813. 40:38can notice that actually the blue one
  814. 40:40here has these little ticks here where
  815. 40:42it moves up and down ever so slightly
  816. 40:45there's a good chance that's because
  817. 40:46it's a sensor and sensors are you know
  818. 40:49they're notorious they just like you
  819. 40:50know twitching the pendal as they move
  820. 40:52up it won't be perfectly
  821. 40:55straight whereas red I haven't seen
  822. 40:57anything think on yet so let's move
  823. 40:58further along and start playing they're
  824. 41:01still the same maybe these are oh okay
  825. 41:05blue is up so we've seen blue was
  826. 41:11climbed yeah so blue is slowly
  827. 41:14climbing up
  828. 41:17until let's go further along what does
  829. 41:19it max out at something so let's just
  830. 41:22focus on the blue one for now so if we
  831. 41:24just get rid of all of these other bites
  832. 41:31it
  833. 41:33increases and increases to
  834. 41:39120
  835. 41:43122 yeah so it seems to like max out at
  836. 41:46about
  837. 41:47122 and then its lowest
  838. 41:51value
  839. 41:52is
  840. 41:5460 so this could be something
  841. 41:57likely in Fahrenheit so if we just
  842. 42:03convert 60 fahit Celsius 15 and outside
  843. 42:09right now temperature in Bristol it's 11
  844. 42:12deges so maybe it's something that's
  845. 42:15slightly higher and it goes up to 120
  846. 42:19which is
  847. 42:2050° so in a car oil
  848. 42:25temp when driving or when warm would be
  849. 42:30oil temperature would expect to be 90 to
  850. 42:3395 seems like a bit on the low side you
  851. 42:36would
  852. 42:37expect uh temperature to be a bit higher
  853. 42:41than that but to be honest it is just
  854. 42:44sat idling on the
  855. 42:47drive um so you know it's not going to
  856. 42:49be going to the maximum temperature you
  857. 42:52know a running car you expect it to be
  858. 42:55up near 90 to 100 10 5° if it was oil
  859. 42:59temperature so as we've seen here this
  860. 43:02value gets up
  861. 43:04to so it could just be in Celsius but
  862. 43:06that would mean it started very
  863. 43:09high gets up to
  864. 43:12120 so whatever it is it's something
  865. 43:15it's something getting hot there are a
  866. 43:17bunch of people who have already started
  867. 43:19creating these DBC files database canvas
  868. 43:23files um and they're just a set of
  869. 43:26instructions for how to label um the
  870. 43:30outputs that come from the car so this
  871. 43:32has got a lot of the same stuff that
  872. 43:34we've already looked at but they've
  873. 43:36converted the numbers to decimal so
  874. 43:421549 if we just do 1549 Des to
  875. 43:51hex is 60D which is the ID that we had
  876. 43:55realized up here 60D and I'm not going
  877. 43:59to get back into that um was the one
  878. 44:01that had our indicators and our lights
  879. 44:03and all that kind of stuff on there so
  880. 44:05that lines up with what they
  881. 44:09thought um so 60ds all those different
  882. 44:11indicators and stuff now this person had
  883. 44:13thought that we've got speed on here RPM
  884. 44:18and then engine temperature they'd
  885. 44:21thought was
  886. 44:231361 so 1361
  887. 44:27is
  888. 44:29551 which is not the one that we're
  889. 44:31looking at they thought
  890. 44:35551 and they thought it was now how to
  891. 44:40read this
  892. 44:41is weird um it's the seventh bit from
  893. 44:46the start and it's eight bits long so
  894. 44:51it's one whole bite and it's going to be
  895. 44:53the second bite because it's seven bits
  896. 44:56from on the
  897. 44:58start so if we look at
  898. 45:01551 they reckon one of these
  899. 45:05is the
  900. 45:08temperature and these Wiggly
  901. 45:11lines do seem like they could well be it
  902. 45:14so that one starts at 50 which in
  903. 45:17Fahrenheit is about the right kind of
  904. 45:20number
  905. 45:23so 50 fahit to Celsius is 10 it's 11°
  906. 45:28outside at the moment so that would
  907. 45:30strike as probably about right let's go
  908. 45:33further along and see where it gets up
  909. 45:34to up to 90 oh
  910. 45:39yeah and so it would be on the low side
  911. 45:42right now it was still climbing when
  912. 45:46we yeah it's still climbing so up to
  913. 45:48about
  914. 45:50110 and 110 Fahrenheit is not
  915. 45:55that hot 43° so I mean that could very
  916. 46:00well be the oil temperature what's going
  917. 46:04to be best for this to really dig down
  918. 46:06and figure out what these values are is
  919. 46:09I need to get the car hot hot and what I
  920. 46:12need to do is have my candidate list so
  921. 46:14I'll update the reader and we'll just
  922. 46:16capture a few candidates that we think
  923. 46:19these ones look like they're potentially
  924. 46:22the values that we're looking for then
  925. 46:24we'll go for a drive and then I can
  926. 46:26analyze the data afterwards and go does
  927. 46:29it get up to like a hot temperature that
  928. 46:32would happen when we drive the car heavy
  929. 46:34what happens with the pressure all that
  930. 46:36kind of stuff so I need more data this
  931. 46:40this process is like a process of
  932. 46:42elimination we're going in we're getting
  933. 46:44our candidates going okay that's likely
  934. 46:46going to be the right things and then
  935. 46:48we're just figuring out exactly which
  936. 46:51ones they are it's a relatively painful
  937. 46:55process but I think we're we're really
  938. 46:57zooming in on the ones that we want
  939. 47:01also I'm working on a little secret
  940. 47:04something something that's going to make
  941. 47:05this a lot
  942. 47:08easier with this this little 2.8 in uh
  943. 47:13elro screen with a built-in SD
  944. 47:18card that graphing format that allows us
  945. 47:21to show live graphing I thought wouldn't
  946. 47:23it be really cool if we could do it on
  947. 47:25this so I'm creating a little tool that
  948. 47:29you'll all be able to use that when the
  949. 47:31OBD2 reader starts up we get a list of
  950. 47:36all of our IDs on here then we can click
  951. 47:38onto one click into a specific bite and
  952. 47:42then graph it live as we're driving
  953. 47:45around and we can go back and go no not
  954. 47:47that one and just see how things move up
  955. 47:50and down without having to have a big
  956. 47:52computer screen so that's a project that
  957. 47:55I'm working on and it's sort of working
  958. 47:59it need some refinement but we'll have
  959. 48:01that out probably in the next two weeks
  960. 48:04and we'll do a whole video about that
  961. 48:05and that you can use if you don't have a
  962. 48:07laptop or you don't want to get into
  963. 48:09Savvy can the idea is we'll be able to
  964. 48:12use it to analyze cus data live without
  965. 48:15the need for lots of data digging it's
  966. 48:19going to make it a little bit more
  967. 48:20usable I hope really that's what I
  968. 48:23wanted to get into in this video is show
  969. 48:25that this is how canvas data is analyzed
  970. 48:29we're getting closer to some of the
  971. 48:31values so I'm in the process of creating
  972. 48:34this big old file which will be a
  973. 48:36breakdown of all of the IDS and what all
  974. 48:40of the things in there do everything
  975. 48:43useful anyway there's going to be stuff
  976. 48:44that I'm not too worried about I'm
  977. 48:46probably not going to care too much
  978. 48:48about particular oxygen sensor readings
  979. 48:50or you know there's hundreds of sensors
  980. 48:52throughout the car that I I'm going to
  981. 48:53have no interest in but everything that
  982. 48:55we might want to tap something into boot
  983. 48:58being open uh specific lights doors
  984. 49:02being open all of the useful sensors and
  985. 49:05senders we're going to try and list all
  986. 49:07that out and I'll make this file
  987. 49:09available as and when it's done then
  988. 49:11we'll take a look at converting this
  989. 49:13into a DBC format like I said it's a
  990. 49:16canvas database format big
  991. 49:19endend uh and then we can just chare
  992. 49:22that so if you do have a 350Z and you
  993. 49:24want to use all of this and you be able
  994. 49:27to use this to dig down into your data
  995. 49:28really quickly you can do that and then
  996. 49:30we'll be able to hook up the new gauges
  997. 49:34to all of this so I've just finished
  998. 49:36redesigning the gauges that are going
  999. 49:38into my Z I went on a big drive over
  1000. 49:40Christmas back to my parents house and I
  1001. 49:42put my Speedo RPM gauge um on the
  1002. 49:45dashboard whilst I drove home just to
  1003. 49:47see how I felt about it and you know
  1004. 49:49what I don't use the Rev meter there's
  1005. 49:50no point to it I don't stand there and
  1006. 49:52look at it I do all my gear changes by
  1007. 49:54ear and just by feel rather than ever
  1008. 49:56worrying about what the RPM is so I
  1009. 49:58wanted to minimize it and just have the
  1010. 50:00information there that I actually care
  1011. 50:02about so there's been a full redesign of
  1012. 50:05those three gauges we'll get into that
  1013. 50:07more in the next video when we start
  1014. 50:10linking this data up to that I'm going
  1015. 50:12to show you how I create a network mesh
  1016. 50:16um of many senders and many devices
  1017. 50:19sending to many screens and how you know
  1018. 50:22your OBD2 canvas sender can send to many
  1019. 50:25gauges but also each gauge might receive
  1020. 50:28stuff from many sources um it's quite
  1021. 50:31interesting and very vital if you want
  1022. 50:33to take on this kind of car hacking
  1023. 50:35stuff and bring information in from a
  1024. 50:39variety of different sources and display
  1025. 50:41it around your car or use it in
  1026. 50:43different ways it seems from the
  1027. 50:45popularity of my previous video on it
  1028. 50:47people are really into this canvas
  1029. 50:49sniffing data analytical stuff so if you
  1030. 50:52want to use canvas data to do something
  1031. 50:54cool around your car what is it the
  1032. 50:56appliance is to do do you have any
  1033. 50:57wicked projects I should know about
  1034. 50:58anything that I can steal and uh yeah
  1035. 51:02I'll be honest I've already got some
  1036. 51:04awesome ideas I think this year I'm
  1037. 51:05going to try and create probably the
  1038. 51:07world's first voice activated
  1039. 51:12350Z in the next video we're going to
  1040. 51:14hook up this information to those three
  1041. 51:16little gauges before we then start
  1042. 51:19playing the big cluster gauge that goes
  1043. 51:22in the front of the driver and that's
  1044. 51:25going to be a hecking big project anyway
  1045. 51:28there's a bit more of a deep dive into
  1046. 51:30canas sniffing and data analysis and and
  1047. 51:33a breakdown of how you convert decimal
  1048. 51:35to Binary to heximal if you didn't know
  1049. 51:38that before hopefully you now understand
  1050. 51:40it let me know if that is all made sense
  1051. 51:43I hope the start of 2025 is going
  1052. 51:46amazingly for you I'm really looking
  1053. 51:48forward to all the projects that we
  1054. 51:49build over this year and if you want to
  1055. 51:51keep up with that Journey obviously make
  1056. 51:54sure you hit the Subscribe button
  1057. 51:55because we've got tons of stuff come in
  1058. 51:56and I can't wait to share it all with
  1059. 51:58you whatever you do with the rest of
  1060. 52:00your day folks have a wicked one I'll
  1061. 52:02see you on the next video take a easy
  1062. 52:04peace bye-bye

About this transcript

This page contains the full transcript of Master Hex: Decoding CANBus Data Made Easy by Garage Tinkering, generated from the public captions YouTube serves with the video. The transcript has 7,676 words across 1,062 segments, with the original timestamps preserved so you can click any line to jump to that moment in the embedded player.

What you can do with it

Use the transcript to take notes, quote the speaker, build a study guide, generate a summary with ChatGPT or Claude via the YouTube Summary tool, or export it as a timed subtitle file with YouTube to SRT. You can also re-open it in the transcriber to translate the transcript into 100+ languages.

Free YouTube transcript tool

YouTube2Text is a free YouTube transcript generator — no signup, no daily limit. Paste any YouTube link and get the full transcript instantly, with timestamps, click-to-jump, translation to 100+ languages, AI prompts for ChatGPT, Claude, and Gemini, and exports to TXT, SRT, VTT, or Markdown.