1 00:00:00,000 --> 00:00:09,420 Coming out. My name is Eric Evanczyk. I work for a company called Atreides. We do embedded and mobile and all sorts of assessments of things. 2 00:00:10,540 --> 00:00:14,640 And I also play with cars a bunch and can bus a bunch, and that's kind of my deal. 3 00:00:14,920 --> 00:00:22,360 So recently I was playing around with some tools, and I was like, hey, Golang is kind of nifty. I want to play around with cars and Golang at the same time. 4 00:00:22,360 --> 00:00:29,280 So we have the little Go-Gopher, and we have your quintessential car hacker, because that's how you hack a car. 5 00:00:29,420 --> 00:00:31,700 You pick a MacBook, wear a balaclava, you're good to go. 6 00:00:32,760 --> 00:00:38,440 So has anyone here written some can bus tools? Maybe played around with socket can, written some stuff? 7 00:00:38,700 --> 00:00:40,720 Maybe some folks in the audience. I don't know. 8 00:00:40,920 --> 00:00:43,420 But if you want to write a tool, you need some things. 9 00:00:43,620 --> 00:00:48,480 And the first thing is, because cars mostly talk can nowadays, you need to be able to talk can. 10 00:00:48,580 --> 00:00:50,200 That's like a first pass thing. 11 00:00:51,280 --> 00:00:52,200 Concurrency is super. 12 00:00:52,360 --> 00:00:52,560 It's super useful. 13 00:00:53,060 --> 00:01:02,720 And the reason for this is whenever you're dealing with a can bus, there's a lot of times that you're sitting there and you're waiting for a frame to come in, and you're waiting, and you want to do other things. 14 00:01:02,820 --> 00:01:06,440 You want to be able to time out, you want to fail nicely, you want to be able to do that sort of thing. 15 00:01:06,620 --> 00:01:10,400 If you don't have concurrency, then you deadlock, you know, things like that. 16 00:01:10,620 --> 00:01:16,000 So having access to nice concurrency features is a really, really good thing when you're writing these types of tools. 17 00:01:17,660 --> 00:01:21,440 So we're going to pick a language that we're going to write our tool in, and traditionally, 18 00:01:21,440 --> 00:01:24,360 a lot of these have been C and C++ and Python. 19 00:01:24,600 --> 00:01:30,480 I've written a lot of stuff in Python, but I'm not smart enough to understand Python's new AsyncIO because it's crazy. 20 00:01:31,740 --> 00:01:35,680 And Pthreads are a bit of a pain, so that's why you might want Go. 21 00:01:35,800 --> 00:01:36,600 There's a few reasons. 22 00:01:37,160 --> 00:01:41,220 Well, it's in concurrency, so anyone in the audience written a line of Golang in their life? 23 00:01:41,660 --> 00:01:42,060 Maybe? 24 00:01:42,260 --> 00:01:42,880 A couple people. 25 00:01:43,060 --> 00:01:43,460 Cool. 26 00:01:43,640 --> 00:01:45,100 If you haven't, I recommend it. 27 00:01:45,160 --> 00:01:49,700 The tutorial on the Golang website, it, like, runs in your browser, and you can step through it. 28 00:01:49,740 --> 00:01:50,720 It's got lots of great examples. 29 00:01:50,720 --> 00:01:51,220 It's lovely. 30 00:01:51,840 --> 00:01:57,220 But one really nifty thing about Go is it's got these things that it calls Go routines, which is a pun, 31 00:01:57,420 --> 00:01:59,000 which is one reason I love the language. 32 00:01:59,100 --> 00:01:59,860 It's got puns. 33 00:02:00,060 --> 00:02:07,720 And that is actually a co-routine, so it will allow you to run a separate, you know, not thread. 34 00:02:07,940 --> 00:02:12,610 It's a co-routine, but it's run over here at the same time, and it also has channels, 35 00:02:13,240 --> 00:02:18,340 which allow you to do synchronized communication back and forth between these different routines that are running. 36 00:02:18,540 --> 00:02:20,700 And all this is implemented in the Go routine. 37 00:02:22,060 --> 00:02:27,680 So if you run it on Windows, Linux, OSX, whatever, you get the same sort of thing happening. 38 00:02:27,720 --> 00:02:29,480 You're not relying on some OS API. 39 00:02:30,000 --> 00:02:32,160 So the concurrency that's built in is really nice. 40 00:02:32,320 --> 00:02:37,860 It was thought of originally because Google wrote this language in order to actually, like, write web servers, 41 00:02:38,040 --> 00:02:39,420 where concurrency is kind of important. 42 00:02:39,920 --> 00:02:44,900 It's typed, which, if you've ever, like, started writing a project in Python and it got to a certain size, 43 00:02:45,080 --> 00:02:47,180 you probably went, I regret choosing Python now. 44 00:02:49,080 --> 00:02:50,320 Typing is really nice. 45 00:02:50,720 --> 00:02:53,860 It's where you are passing things around with different modules and things like that, 46 00:02:54,000 --> 00:02:56,480 and you want the data to not go to space. 47 00:02:57,020 --> 00:02:59,300 So I like typed languages, and, yeah. 48 00:02:59,900 --> 00:03:04,100 It's a compiled language, and this is great because often, when you're using scripting languages, 49 00:03:04,260 --> 00:03:06,460 you write, you know, a tool in Python, whatever it is, 50 00:03:06,600 --> 00:03:08,560 and then you have all these dependencies you've got to pull down, 51 00:03:08,820 --> 00:03:12,740 and if they have the wrong version, it's not going to work, and they're not online, 52 00:03:12,900 --> 00:03:15,180 they can't pull it down from pip and all that sort of stuff. 53 00:03:15,420 --> 00:03:20,360 You build a Go binary, you can build a, like, statically linked binary that's a single binary 54 00:03:20,360 --> 00:03:22,140 that you run it, and it works. 55 00:03:22,880 --> 00:03:26,960 And as of the whole purpose of this talk is, as of right now, it supports SocketCAN, 56 00:03:27,060 --> 00:03:28,580 which means that we can do CAN bots from it. 57 00:03:30,140 --> 00:03:31,680 So SocketCAN, what is this? 58 00:03:31,860 --> 00:03:33,800 I think there's talks on SocketCAN here. 59 00:03:33,940 --> 00:03:35,220 I'm going to be kind of brief. 60 00:03:36,320 --> 00:03:40,300 But SocketCAN is CAN over standard Unix sockets. 61 00:03:40,460 --> 00:03:45,600 So Unix sockets, if you've ever written any code on Unix or any Unix system, 62 00:03:45,900 --> 00:03:48,760 some web server, something like that, you know, you have these, 63 00:03:49,700 --> 00:03:52,720 Socket has a file descriptor, you set the thing up, you bind to it, 64 00:03:52,780 --> 00:03:53,780 and then you can read and write to it. 65 00:03:53,900 --> 00:03:55,980 You can also do a lot of other things, but that's the basic functionality. 66 00:03:56,380 --> 00:04:00,020 And that's usually used for network stuff, TCP IP, you know, 67 00:04:00,420 --> 00:04:01,640 that's how it's been used traditionally. 68 00:04:01,880 --> 00:04:03,660 But we can also do CAN from it. 69 00:04:04,140 --> 00:04:04,940 Any questions here? 70 00:04:05,140 --> 00:04:06,060 Is this available online? 71 00:04:06,880 --> 00:04:07,240 Slides? 72 00:04:07,340 --> 00:04:08,280 I will make them available. 73 00:04:08,540 --> 00:04:10,300 I will toss them in with the repo for this. 74 00:04:11,780 --> 00:04:15,400 So whether this works for you when you're doing CAN, 75 00:04:15,500 --> 00:04:17,880 you have an application, and I stuck the little gopher in a plane, 76 00:04:17,880 --> 00:04:19,300 because that's going to be written in Go. 77 00:04:19,760 --> 00:04:22,280 And then that's going to talk to the socket layer of your OS, 78 00:04:22,540 --> 00:04:23,620 which is in the kernel. 79 00:04:24,060 --> 00:04:26,800 And where SocketCAN jumps in here, you know, 80 00:04:26,800 --> 00:04:29,320 most of the time you'd have a protocol family, 81 00:04:29,500 --> 00:04:34,400 which is your standard Ethernet, Internet protocols, UDP, TCP. 82 00:04:35,020 --> 00:04:38,600 But we can have a CAN protocol family, and we can talk to it that way. 83 00:04:38,720 --> 00:04:42,120 And then that will talk to the device drivers and eventually the actual hardware. 84 00:04:42,340 --> 00:04:45,260 And this is super nice because it means it's hardware agnostic. 85 00:04:45,340 --> 00:04:47,860 If your hardware device supports SocketCAN, 86 00:04:47,880 --> 00:04:50,440 you don't care what device it is. 87 00:04:50,520 --> 00:04:52,660 You just send frames, and it works. 88 00:04:53,140 --> 00:04:54,060 Except for when it doesn't. 89 00:04:54,160 --> 00:04:56,180 But usually if they've implemented it right, it works. 90 00:04:56,880 --> 00:04:58,200 And so it's hardware agnostic. 91 00:04:58,420 --> 00:04:58,840 We don't care. 92 00:04:58,880 --> 00:05:01,840 As long as this thing is going to create a socket, we can make it go. 93 00:05:03,220 --> 00:05:04,320 So how do we do this in Go? 94 00:05:04,540 --> 00:05:07,520 Well, we can do this like any other socket we do. 95 00:05:07,720 --> 00:05:09,620 You know, file descriptor and error is equal to. 96 00:05:09,760 --> 00:05:10,860 We're going to make a Unix socket. 97 00:05:11,020 --> 00:05:13,740 The family there is CAN. 98 00:05:14,100 --> 00:05:17,540 It's going to be a raw CAN socket, and the type is CANRAW. 99 00:05:17,880 --> 00:05:21,120 And then we, you know, do this, set up an address. 100 00:05:21,360 --> 00:05:23,540 Usually this would be like your IP address you're binding to, 101 00:05:23,700 --> 00:05:24,920 and your port you're binding to. 102 00:05:25,260 --> 00:05:28,800 But now we need to, like, make a SocketCAN one. 103 00:05:29,040 --> 00:05:29,840 Then we bind it. 104 00:05:29,920 --> 00:05:30,740 This is kind of ugly, though. 105 00:05:30,800 --> 00:05:32,340 You don't want to do this every time you're writing something. 106 00:05:32,540 --> 00:05:34,180 So let's make a library. 107 00:05:35,160 --> 00:05:36,720 There's some other stuff that you need to do. 108 00:05:36,900 --> 00:05:38,680 And one of them that's kind of annoying 109 00:05:38,680 --> 00:05:41,480 is you've got to pack and unpack the structs that SocketCAN expects. 110 00:05:42,220 --> 00:05:44,080 Because SocketCAN, the way it ends up working, 111 00:05:44,260 --> 00:05:46,600 is there's a header file that's got these structs defined 112 00:05:46,600 --> 00:05:48,660 for, like, a CAN frame, for example. 113 00:05:49,740 --> 00:05:54,400 And, you know, Go doesn't interoperate that nicely with C structs, unfortunately. 114 00:05:55,440 --> 00:05:56,700 Rust does it better, but hey. 115 00:05:57,580 --> 00:05:59,860 So you need to pack these up the right way. 116 00:05:59,940 --> 00:06:01,020 You need to unpack them the right way. 117 00:06:01,140 --> 00:06:03,820 You need to set some SOC options, blah, blah, blah. 118 00:06:04,140 --> 00:06:06,380 You don't want to do this every time you write, like, little scripts. 119 00:06:06,660 --> 00:06:08,260 So we make a library. 120 00:06:09,860 --> 00:06:11,360 And this makes it a lot easier. 121 00:06:12,020 --> 00:06:14,560 So what you end up doing is you just create a device. 122 00:06:14,640 --> 00:06:15,420 This is a raw interface. 123 00:06:16,600 --> 00:06:17,900 You know, SocketCAN dot new rounded face. 124 00:06:18,400 --> 00:06:22,520 And you give it the, that CANIF is literally the string of the name, 125 00:06:22,580 --> 00:06:24,660 you know, CAN0, CAN1, whatever. 126 00:06:25,720 --> 00:06:27,240 Go's got this nice feature called defer, 127 00:06:27,540 --> 00:06:30,020 which stops you from leaving devices open by mistake. 128 00:06:30,380 --> 00:06:32,440 So you can say defer device dot close. 129 00:06:32,600 --> 00:06:34,040 And whenever that device goes out of scope, 130 00:06:34,240 --> 00:06:37,000 it'll call the close function and clean it up for you. 131 00:06:37,260 --> 00:06:40,380 Which is great, because I always forget to write those at the end of my functions. 132 00:06:40,580 --> 00:06:43,180 And then I end up with all these dangling file descriptors. 133 00:06:43,280 --> 00:06:45,720 And eventually, your OS goes, 134 00:06:46,600 --> 00:06:47,600 I won't let you create anymore. 135 00:06:48,640 --> 00:06:51,880 And then what you have is the ability to receive and send frames. 136 00:06:52,340 --> 00:06:54,320 So these are actually now Go structs. 137 00:06:54,320 --> 00:06:57,220 And those fields that go struct to the RBID, 138 00:06:57,420 --> 00:06:59,340 the data length code, and the data. 139 00:06:59,480 --> 00:07:00,940 And you can just send and receive those, 140 00:07:01,080 --> 00:07:04,820 work with them as normal structs to all the sort of normal Go things 141 00:07:04,820 --> 00:07:05,700 that you would do on them. 142 00:07:06,140 --> 00:07:08,000 And it just makes it a lot easier. 143 00:07:09,120 --> 00:07:11,900 Now, another thing that you might want to do is ISOTP, 144 00:07:12,200 --> 00:07:14,280 which is used for diagnostics in automotive. 145 00:07:14,520 --> 00:07:15,840 I won't get super into it. 146 00:07:16,600 --> 00:07:19,420 The real quick explanation is CAN frames are 8 bytes. 147 00:07:19,760 --> 00:07:21,080 You want to send more than 8 bytes, 148 00:07:21,300 --> 00:07:23,020 there's a sort of higher level protocol 149 00:07:23,020 --> 00:07:26,020 that will let you send up to 4095 bytes in multiple frames. 150 00:07:26,880 --> 00:07:28,880 And yes, it also does this. 151 00:07:29,060 --> 00:07:31,800 So there is a kernel module called CAN ISOTP. 152 00:07:32,120 --> 00:07:35,640 Unfortunately, unlike other kernel modules for socket CAN, 153 00:07:35,760 --> 00:07:39,960 it is not typically built into the kernel or available on most distros. 154 00:07:40,100 --> 00:07:42,560 You need to go download it and build it yourself. 155 00:07:42,800 --> 00:07:43,800 It's really easy. 156 00:07:43,800 --> 00:07:49,700 It's like you get, pull the thing and type make and then sudo insmod it. 157 00:07:49,820 --> 00:07:50,920 It's like three steps. 158 00:07:51,300 --> 00:07:53,380 But once you get that up and going, 159 00:07:53,560 --> 00:07:57,220 now you have inside the kernel the ability to do this chaining of messages 160 00:07:57,220 --> 00:07:58,580 so you can send larger buffers. 161 00:07:58,900 --> 00:08:01,960 That's nice because in the kernel it's not in your application, 162 00:08:02,280 --> 00:08:05,140 meaning one, you don't have to write the code for it, which is awesome. 163 00:08:05,840 --> 00:08:06,660 Laziness is good. 164 00:08:07,280 --> 00:08:10,020 But also, quite importantly, it's going to be faster 165 00:08:10,020 --> 00:08:13,020 because you don't have all the delays of stuff like going up to the application layer, 166 00:08:13,020 --> 00:08:14,960 every frame, and then sending it back down. 167 00:08:15,100 --> 00:08:16,820 It's happening in the kernel nice and quick. 168 00:08:17,640 --> 00:08:20,100 And this works very, very similarly. 169 00:08:20,660 --> 00:08:23,820 The difference is we now need to provide a RX and TX ID. 170 00:08:24,300 --> 00:08:27,600 So whenever you do ISOTP, you're going to be targeting a specific CAN ID 171 00:08:27,600 --> 00:08:29,760 and expecting data back on a specific CAN ID. 172 00:08:30,040 --> 00:08:30,920 So we enter those. 173 00:08:31,200 --> 00:08:34,260 We defer our device.close, which is the same thing. 174 00:08:34,320 --> 00:08:34,920 It's going to close down. 175 00:08:35,340 --> 00:08:37,780 And now instead of sending specific frames, 176 00:08:37,940 --> 00:08:42,700 we actually just send go byte arrays, so just an array of up to 4095 bytes. 177 00:08:43,020 --> 00:08:46,740 You shoot that out down the wire, and it'll come back with those. 178 00:08:46,840 --> 00:08:49,120 If it sees a valid one, it will trigger the send buff. 179 00:08:49,420 --> 00:08:52,720 And this is where the receive buff will actually complete. 180 00:08:52,900 --> 00:08:54,860 This is where it's very useful to have concurrency 181 00:08:54,860 --> 00:08:58,500 because you can sit in a go routine and wait for a buffer 182 00:08:58,500 --> 00:09:01,440 and maybe even receive a buffer and check some things 183 00:09:01,440 --> 00:09:04,060 to make sure it's actually the one that you want and it's got the right things. 184 00:09:04,220 --> 00:09:06,360 And then you can actually send it out. 185 00:09:06,560 --> 00:09:09,260 But you can be doing other things in the background while you're waiting for that, 186 00:09:09,360 --> 00:09:11,360 and you can have timeouts and things like that. 187 00:09:12,520 --> 00:09:15,980 What's really convenient is you can do both these things at the same time. 188 00:09:16,120 --> 00:09:18,960 So you can have a raw interface and an isotp interface, 189 00:09:19,280 --> 00:09:23,400 and you can send isotp data and then be receiving raw frames at the same time. 190 00:09:23,540 --> 00:09:26,440 You can have multiple raw interfaces if you wanted to. 191 00:09:26,560 --> 00:09:30,780 You can have multiple isotp interfaces that are listening and sending on different addresses. 192 00:09:31,700 --> 00:09:37,140 That's just handled by, you know, the Linux device or network device subsystem 193 00:09:37,140 --> 00:09:39,160 knows how to do that, so you don't have to do it. 194 00:09:39,220 --> 00:09:41,100 You don't have to deal with all the synchronous accessing 195 00:09:41,100 --> 00:09:43,100 of the hardware. It's all just done for you. 196 00:09:43,280 --> 00:09:44,660 So that's really convenient. 197 00:09:45,800 --> 00:09:47,240 So let's just do a little demo. 198 00:09:48,300 --> 00:09:50,780 All the code for this is, in fact, online. 199 00:09:52,200 --> 00:09:57,320 And there's like this really hard problem of trying to make VMs... 200 00:09:58,020 --> 00:09:59,380 Sure, let's go full screen mode. 201 00:09:59,680 --> 00:10:02,280 VMs look sort of legible on a projector. 202 00:10:02,760 --> 00:10:06,400 And also my resolution is like... 203 00:10:06,400 --> 00:10:08,140 We're back in the 90s here. 204 00:10:09,540 --> 00:10:10,780 With the plus. 205 00:10:12,880 --> 00:10:13,260 Cool. 206 00:10:14,720 --> 00:10:16,420 We'll roll with this. 207 00:10:17,720 --> 00:10:19,920 And actually, if we could, 208 00:10:22,160 --> 00:10:29,440 just be nice to you and set the background color to white. 209 00:10:30,200 --> 00:10:31,160 I think that will... 210 00:10:32,220 --> 00:10:32,980 White. 211 00:10:35,500 --> 00:10:36,260 Cool. 212 00:10:36,260 --> 00:10:38,660 Hopefully a little more contrast. 213 00:10:39,900 --> 00:10:42,860 So first off, we have tests, which we can run. 214 00:10:42,940 --> 00:10:43,980 Why don't you do a touch V. 215 00:10:45,580 --> 00:10:46,880 So tests are nice. 216 00:10:47,400 --> 00:10:50,140 They actually test itself and make sure that CAN frames 217 00:10:50,140 --> 00:10:51,780 get sent and received and are in the right format. 218 00:10:52,080 --> 00:10:55,840 And it's actually doing this all using what's called the V-CAN module. 219 00:10:56,040 --> 00:10:58,480 And that's a virtual CAN driver on socket CAN. 220 00:10:58,820 --> 00:11:00,760 So none of this has to leave my computer. 221 00:11:00,900 --> 00:11:02,880 I don't need an actual piece of hardware in CAN bus. 222 00:11:03,020 --> 00:11:05,520 I can just send it around inside the kernel. 223 00:11:06,260 --> 00:11:07,980 But all this would work and does work 224 00:11:07,980 --> 00:11:09,880 if you have an external device the exact same way. 225 00:11:10,300 --> 00:11:11,880 But it's just nice for testing because, you know, 226 00:11:11,900 --> 00:11:14,900 I don't want it to plug in two CAN things and, like, 227 00:11:14,900 --> 00:11:17,280 make a loop back and all that just to test my library. 228 00:11:19,100 --> 00:11:22,320 So some of the tools that are as examples in here... 229 00:11:22,320 --> 00:11:24,580 This window is going to be trouble. 230 00:11:24,860 --> 00:11:25,080 Okay. 231 00:11:26,880 --> 00:11:30,860 Two examples are a pretty simple implementation of CAN dump and CAN send. 232 00:11:31,120 --> 00:11:33,120 To give you an idea, like... 233 00:11:34,840 --> 00:11:35,880 Go in there. 234 00:11:39,440 --> 00:11:40,480 You know, this is... 235 00:11:40,480 --> 00:11:41,800 I didn't count earlier. 236 00:11:42,140 --> 00:11:44,680 It's going to look awful on a projector, 237 00:11:44,860 --> 00:11:46,900 but it's, like, well under 100 lines of code. 238 00:11:47,060 --> 00:11:49,120 Like, it's, like, 30 lines of code or something. 239 00:11:49,780 --> 00:11:53,200 And we can run CAN dump on interface. 240 00:11:53,360 --> 00:11:54,620 And what it's going to do is... 241 00:11:54,620 --> 00:11:56,340 Ooh, V-CAN 0. 242 00:11:56,840 --> 00:11:58,440 And we can do our typical... 243 00:11:58,940 --> 00:12:01,680 Run our system CAN send on V-CAN 0 244 00:12:01,680 --> 00:12:03,820 with 1, 2, 3, I don't know, whatever. 245 00:12:04,220 --> 00:12:08,740 And it's, you know, working as you'd expect with a CAN dump tool. 246 00:12:09,180 --> 00:12:10,180 And so that example's in there. 247 00:12:10,260 --> 00:12:11,600 And there's a similar one for CAN send. 248 00:12:11,920 --> 00:12:14,900 What's also nice is we can use that ISOTP stuff 249 00:12:15,460 --> 00:12:17,060 and run the tests again. 250 00:12:22,960 --> 00:12:25,880 And we'll actually see ISOTP data fly back around. 251 00:12:26,100 --> 00:12:27,440 It's actually just loading up. 252 00:12:27,580 --> 00:12:29,920 So the first one that it's doing is a single... 253 00:12:29,920 --> 00:12:31,260 If you look at the tests, 254 00:12:31,260 --> 00:12:32,020 it'll tell you what they were. 255 00:12:32,420 --> 00:12:34,680 There was a RXTX, a single frame, 256 00:12:34,760 --> 00:12:35,800 and RXTX, a multi-frame. 257 00:12:36,060 --> 00:12:38,100 So the first one is a SF, single frame. 258 00:12:38,740 --> 00:12:40,340 And it comes back. 259 00:12:40,620 --> 00:12:42,180 And then we do a first frame, 260 00:12:42,260 --> 00:12:45,020 and we're going to send the full 4,095 bytes of data. 261 00:12:45,580 --> 00:12:48,600 And we just have a buffer that goes up. 262 00:12:48,780 --> 00:12:50,540 And as you can see, the SN there 263 00:12:50,540 --> 00:12:51,560 is the serial number of the frame. 264 00:12:52,040 --> 00:12:53,160 And it's going to keep... 265 00:12:54,020 --> 00:12:55,760 First frame, you have a flow control frame. 266 00:12:55,900 --> 00:12:57,880 And after that, you have all these consecutive frames 267 00:12:58,300 --> 00:12:59,920 for 4,095 bytes, 268 00:12:59,920 --> 00:13:02,280 which goes on for a while and comes out. 269 00:13:02,680 --> 00:13:03,940 So if you're writing your own tools, 270 00:13:03,980 --> 00:13:05,480 writing something like a diagnostic tool, 271 00:13:05,940 --> 00:13:06,860 that's really handy. 272 00:13:07,000 --> 00:13:08,540 You don't need to deal with all that framing. 273 00:13:08,720 --> 00:13:11,360 You just put your UDS request together and send it 274 00:13:11,360 --> 00:13:12,580 and wait for one to come back. 275 00:13:13,600 --> 00:13:16,220 And all that's taken care of by the kernel. 276 00:13:17,300 --> 00:13:18,680 And let's jump back here. 277 00:13:20,880 --> 00:13:22,860 I thought I had a slide about next steps in this thing. 278 00:13:23,060 --> 00:13:24,120 So I'll tell you. 279 00:13:24,820 --> 00:13:27,020 This is pretty proof-of-concept-y now, 280 00:13:27,080 --> 00:13:28,560 but I'm using it in some actual projects. 281 00:13:28,560 --> 00:13:32,300 So I'm going to keep contributing or making commits 282 00:13:32,300 --> 00:13:34,640 to the Go stuff in here as I need features. 283 00:13:34,980 --> 00:13:38,480 There's some weirdness around how the ISOTP kernel module 284 00:13:38,480 --> 00:13:40,960 deals with some SOC options for, like, 285 00:13:41,440 --> 00:13:43,280 does it pad the frames out to 8 bytes? 286 00:13:44,520 --> 00:13:45,920 They did it in a weird way, 287 00:13:46,020 --> 00:13:47,200 so I have to figure out how to make that work. 288 00:13:47,340 --> 00:13:49,440 But that's all going to get done so that I can actually control it. 289 00:13:49,560 --> 00:13:52,040 And you'll have a nice API rather than having to do these, 290 00:13:52,400 --> 00:13:54,500 you know, set SOC ops with weird structs. 291 00:13:54,880 --> 00:13:56,260 So, yeah, that's the idea there. 292 00:13:56,480 --> 00:13:58,100 And it's just another option 293 00:13:58,100 --> 00:13:59,400 if you're trying to write CAN bus tools. 294 00:13:59,540 --> 00:14:00,680 You've got something that does socket CAN 295 00:14:00,680 --> 00:14:02,820 or you want to play around with V-CAN on your device. 296 00:14:03,740 --> 00:14:04,580 That's a way to play with it. 297 00:14:04,940 --> 00:14:06,060 I don't know how I'm doing on time. 298 00:14:06,200 --> 00:14:07,880 That was pretty quick, but I'm happy to take any questions 299 00:14:08,640 --> 00:14:10,160 or comments or whatever you'd like to do. 300 00:14:10,260 --> 00:14:12,060 But thanks for coming and filling up the room. 301 00:14:12,200 --> 00:14:12,560 It was nice.