WEBVTT

00:00.000 --> 00:02.720
Thank you for coming to reverse engineering marine engines.

00:02.720 --> 00:05.520
How to make powerboats do your evil bidding.

00:05.560 --> 00:08.040
Your bidding may not be evil, but that's really up to you.

00:08.040 --> 00:11.840
What we're going to talk about is different types of boats, different type of propulsion systems.

00:11.840 --> 00:13.340
It's going to start with a broad overview.

00:13.560 --> 00:22.420
It may be repetitive for some of you, and then we'll move on to like the best architecture and how to make this work properly, or how I've made it make it work properly.

00:22.480 --> 00:24.540
So a quick overview.

00:24.560 --> 00:29.840
So major outboard OEMs, and that's an outboard motor for those of you who haven't seen them before.

00:29.840 --> 00:31.640
That's actually four of them from Mercury.

00:31.640 --> 00:34.500
The major OEMs are Mercury, who's owned by Brunswick.

00:34.500 --> 00:36.580
We're going to come back to them a bunch.

00:36.580 --> 00:39.680
No specific malice against them, but we're going to come back to them a bunch.

00:39.860 --> 00:43.560
Yamaha, same people who make the pianos, make a lot of jet skis and jet boats.

00:43.560 --> 00:47.180
Honda, Suzuki, those are the outboard manufacturers.

00:47.180 --> 00:49.980
So let's talk outboards for a second.

00:49.980 --> 00:53.380
So there's significant consolidation in the outboard market.

00:53.380 --> 00:59.280
They're really only the four or five manufacturers that I mentioned when you get above about 150 horsepower.

00:59.280 --> 01:03.340
And when you start to see, you know, bigger engines that are more expensive.

01:04.620 --> 01:07.340
Most OEMs are pretty locked down.

01:07.340 --> 01:09.060
And we're going to get into that later.

01:09.160 --> 01:12.060
They do not want you messing with their engines.

01:12.060 --> 01:18.840
The answer that I've had from Mercury when they sent me a nasty letter was, we don't want the legal liability for this.

01:18.840 --> 01:23.020
So, you know, fine, but we're at DEF CON, so all that goes out the window.

01:24.180 --> 01:26.480
As we can see here, that's a Yamaha.

01:26.480 --> 01:29.600
So see that giant sort of thermos looking thing under the motor?

01:29.700 --> 01:33.480
That's the integrated steering motor for Yamaha.

01:33.480 --> 01:43.740
So if you buy this, you have opted out of the significantly standardized steering market that governs most outboards for the last 25, 30 years.

01:43.880 --> 01:48.000
And you now must buy Yamaha's helm, which is kind of annoying.

01:48.000 --> 01:50.380
I mean, it works really well, but it's kind of annoying.

01:50.540 --> 01:51.800
Their helm is force feedback.

01:51.800 --> 01:52.480
It's all CAN bus.

01:52.480 --> 01:56.320
It's kind of cute, but like you're in this for a lot of money now.

01:56.920 --> 02:03.520
So the reason you don't see companies doing autonomy and doing open buses is largely legal exposure.

02:03.600 --> 02:11.140
They both don't want you to warrant, don't want you to make warranty claims on the engines and don't want you killing people, quite frankly, accidentally.

02:11.400 --> 02:15.560
So let's talk more about inboard and IO.

02:15.560 --> 02:18.960
IO is sort of an odd one, but I've spent a bunch of time wrenching on IO.

02:18.960 --> 02:21.280
So I thought they deserved mention here.

02:21.560 --> 02:28.700
So the major manufacturers, they are Yanmar, Mercury, Cummins, Volvo, MTU, CAT.

02:29.000 --> 02:32.600
Caterpillar is notoriously locked down with their protocols.

02:32.600 --> 02:35.160
Like they will charge you out the wazoos.

02:35.160 --> 02:42.720
And a lot of what we're seeing in tractors with John Deere and the general hatred of them is very similarly reflected in Caterpillar.

02:42.720 --> 02:44.640
So here we've got a picture of an IO.

02:44.640 --> 02:47.240
It's basically the worst of both possible worlds.

02:47.380 --> 02:52.260
You have the lower half of an outboard that always stays wet and can't come out of the water and an inboard.

02:52.780 --> 02:55.600
And then you have an inboard engine, which is a straight driveline.

02:55.600 --> 02:57.480
There are a bunch of options there.

02:57.660 --> 02:59.980
So let's talk a little bit more about these.

02:59.980 --> 03:01.500
These are a little bit weirder.

03:02.520 --> 03:06.220
They're a lot less technically sophisticated than most modern outboards.

03:06.220 --> 03:08.060
This is for a variety of reasons.

03:08.740 --> 03:10.800
Manufacturers are way less vertically integrated.

03:10.800 --> 03:16.440
I mean, CAT makes a ton of engines for a ton of people, but their marine market isn't huge.

03:17.260 --> 03:20.640
The legacy control systems is really what people are trying to support.

03:20.640 --> 03:25.460
When I say legacy, I mean cables, like push-pull cables for throttle and shift.

03:26.820 --> 03:29.300
Let's say you bought yourself a nice Nordhavn yacht.

03:29.300 --> 03:30.840
You've really won the lottery.

03:30.840 --> 03:34.060
It's probably gonna come equipped with a helm.

03:34.060 --> 03:36.320
So you push the throttle forward.

03:36.320 --> 03:42.420
It's gonna send an electrical signal, either analog or CAN, to a box that moves a servo that pulls a cable.

03:42.420 --> 03:44.780
And then the engine go faster.

03:45.040 --> 03:49.860
The engine may have stuff like electronic throttle bodies.

03:49.900 --> 03:54.940
And actually, if you come to Maritime Hacking Village and plugs to come by the Maritime Hacking Village, it's super cool.

03:54.940 --> 03:57.180
We've got some great stuff, including boats with outboards.

03:57.280 --> 03:58.860
They didn't let me run them here.

04:00.180 --> 04:06.640
One of those motors is a Honda 150 that has a cable-driven electronic throttle body.

04:06.640 --> 04:10.860
So it's super weird, but it's basically a legacy support for a modern engine.

04:10.860 --> 04:12.560
There's an ECU on the motor.

04:13.280 --> 04:15.880
So these are way less sophisticated.

04:15.880 --> 04:17.460
They're made in way less volume.

04:17.460 --> 04:19.140
They're expecting legacy systems.

04:19.140 --> 04:21.840
So let's dive into those control systems.

04:22.560 --> 04:26.940
But outboards have significantly complex engine management.

04:27.100 --> 04:29.420
This Helm Master is from Yamaha.

04:29.420 --> 04:34.220
And I'm personally less familiar with Yamaha than other brands, but you've got a joystick there.

04:34.220 --> 04:37.980
So when you enable joystick mode, it can do GPS.

04:38.140 --> 04:48.200
So if you have four engines, for instance, it's gonna do some intelligent leader-follower stuff with the engines, because you probably only have two Helms rather than four.

04:48.200 --> 04:50.940
We're getting away from the sort of 747 style.

04:50.940 --> 04:53.160
I have six joysticks, I need to move them forward.

04:53.180 --> 04:55.360
That's all going out the window because digital.

04:55.660 --> 05:06.400
They're moving to CAN bus straight to the Helm, which is where some of my research starts to fall off because I need to go buy a digital Helm and hook it up to a digital motor, which I'll do eventually.

05:07.000 --> 05:21.800
Station keeping, say Virtual Anchor or Skyhook are these proprietary products that we as control systems folks sort of know about already, but they're being packaged and commoditized by Mercury, by Yamaha, and there's a big button that says, keep my boat in one place.

05:21.800 --> 05:28.100
And then it will use GPS, CAN bus, and advanced engine and steering control to try to do that.

05:28.120 --> 05:34.100
But these are all giant black boxes and they will absolutely not tell you how any of this works no matter who you are.

05:34.760 --> 05:37.320
They do not let Garmin do it, for instance.

05:38.780 --> 05:41.080
We talked legacy control systems.

05:41.080 --> 05:44.820
So that is an actual product from Glendinning.

05:44.940 --> 05:46.600
And we can talk more about them later.

05:46.600 --> 05:48.200
That literally pushes and pulls the cables.

05:48.200 --> 05:51.140
It sounds dumb, but that's a servo box that does that.

05:51.140 --> 05:53.660
And I don't know, I think that's like $1,600 or $1,700.

05:54.000 --> 05:55.020
It's very rugged.

05:55.020 --> 05:56.780
They have a bajillion hours on them.

05:56.780 --> 05:57.820
It will work.

05:57.820 --> 06:04.200
We'll also get into how to hack these guys for extra bonus points, because they won't tell you and their docs are terrible.

06:04.400 --> 06:07.080
Sorry, I'm going to actually name names in this presentation.

06:07.080 --> 06:08.700
If you're from Mercury, I apologize.

06:08.700 --> 06:09.920
I'll buy you a drink later.

06:10.880 --> 06:16.560
So a lot of modern ECUs, we talked about the ECUs being on the engine and controlling the actual firing sequence.

06:16.560 --> 06:21.360
Those are getting upgraded due to emissions concern, like tier four emissions, stuff like that.

06:21.360 --> 06:24.640
That's government mandated, but the interface itself is not.

06:25.160 --> 06:27.120
So cable-driven systems, still super common.

06:27.120 --> 06:31.640
If you're going to go out and buy a motor on Craigslist, it's probably going to be cable-driven.

06:32.480 --> 06:38.900
I can speak to a little bit of the Navy, US Navy autonomy looks for cable-driven motors because they use this exact setup.

06:39.420 --> 06:44.840
People that make these systems, Glendinning controls, C-Star is a name we'll come back to.

06:44.840 --> 06:46.540
So that's C-Star Dometic.

06:46.540 --> 06:50.020
They got bought out by, I think they're Danish, Dometic.

06:50.020 --> 06:52.980
They make refrigerators and campers and other stuff too.

06:53.040 --> 06:57.560
ZF micro commander, weird Zeppelin fact, because Zeppelin facts are awesome.

06:57.560 --> 07:01.140
ZF is the only surviving company that made original equipment for Zeppelins.

07:01.140 --> 07:03.060
And that's what the Z stands for.

07:03.080 --> 07:09.240
So NHK, which I haven't personally worked with, but same, same, you move a handle and servos move.

07:09.700 --> 07:11.780
Let's talk about hacking jet skis.

07:11.780 --> 07:17.440
I have a theory about jet skis that whenever anybody gets on them, they immediately become a jerk.

07:17.520 --> 07:19.180
No matter how nice they are.

07:19.180 --> 07:21.320
I have suffered from this myself.

07:23.200 --> 07:26.640
So honestly, the biggest hack I have here is read the manual.

07:26.640 --> 07:27.920
Like, I'm not kidding.

07:27.920 --> 07:30.080
We'll get into the actual manual pages in a second.

07:30.080 --> 07:33.700
And I realized this is an eye chart, but we will dive in deeper.

07:33.700 --> 07:38.300
So this is the master wiring diagram for a 2022 Sea-Doo.

07:38.320 --> 07:40.560
It was just the one I had handy.

07:40.740 --> 07:43.260
Yamaha is similar, similar enough.

07:43.260 --> 07:49.460
What this is showing you is that that's the throttle and it has two hall effects, which are basically digital voltage dividers.

07:49.600 --> 07:52.220
That's an OEM part they're buying from someone.

07:52.440 --> 07:55.680
So that's how to find out what it's looking for.

07:56.040 --> 08:02.320
And then you read the manual and it tells you how to tone it out because this is all designed for depot level maintenance.

08:02.320 --> 08:03.300
Stick a multimeter on it.

08:03.300 --> 08:04.320
How does it work?

08:04.960 --> 08:08.940
So the ECU is doing the digitizing from the command input.

08:08.940 --> 08:10.960
When I squeeze the throttle, I want to go faster.

08:10.960 --> 08:12.940
Two hall effect sensors are outputting voltage.

08:13.320 --> 08:14.120
ECU is reading it.

08:14.120 --> 08:20.340
ECU is then sending either CAN or analog to the throttle bodies and the reverser and the reverse bucket.

08:20.340 --> 08:22.400
And it's managing all that behind the scenes.

08:22.860 --> 08:29.060
So we see from this graph here, and to shout if you can't see, also the slides are available.

08:30.040 --> 08:37.280
We basically see it's just looking for two ratio metric voltages between, you know, what is it?

08:38.200 --> 08:40.780
0.15 and 1.4.

08:40.780 --> 08:43.420
Like making these really isn't that hard.

08:43.420 --> 08:52.440
You like digipots are a thing, but also you can get DACs that will take PWM and output actual honest to God voltages.

08:53.960 --> 08:56.120
Slew rates, you should check beforehand.

08:56.120 --> 08:57.640
Like don't rack these around.

08:57.940 --> 09:01.700
Try to emulate what a human would do as a rate of change.

09:01.700 --> 09:07.480
Now do also keep in mind, jet skis specifically are designed to be driven by the lowest common denominators.

09:07.480 --> 09:11.280
They're expecting somebody to do that and the ECU to not error out.

09:11.480 --> 09:14.680
Honestly, jet skis are really easy to autonomate.

09:15.440 --> 09:16.800
Be careful though, please.

09:16.800 --> 09:19.320
They go fast and they get away from you quickly.

09:19.360 --> 09:24.640
But the TLDR from this slide is, look for the voltages and then make them and just make the voltages.

09:24.640 --> 09:31.220
And we'll get into the right hardware and like the right place in the stack to do that and the appropriate hardware to do it.

09:31.300 --> 09:33.800
But let's talk about Mercury DTS.

09:33.900 --> 09:36.740
So DTS is a significantly more complex architecture.

09:36.740 --> 09:38.080
I know this is another eye chart.

09:38.080 --> 09:40.520
I pulled this out of the Mercury Verado manual.

09:40.520 --> 09:43.040
I think this is a 2020 engine.

09:43.560 --> 09:46.660
DTS-1 is Mercury's architecture pre-2022.

09:46.740 --> 09:52.080
DTS-2, they moved to CAN coming out of the helm itself.

09:52.420 --> 09:55.320
This is the one I need to go by and hack on.

09:56.240 --> 10:07.560
Once you start scaling into multiple motors, multiple helms, so let's say you've got a flybridge, a rear control station, a forward control station, this diagram becomes absolute spaghetti.

10:07.560 --> 10:12.720
The takeaway is you need multiple command modules, which is what Mercury is calling them here.

10:12.720 --> 10:14.100
We're gonna zoom in in a second.

10:14.100 --> 10:16.540
Don't worry if you can't read it.

10:16.720 --> 10:22.300
Mercury has at least two CAN buses that are off engine that are giving these commands.

10:22.520 --> 10:25.700
Honestly, we're not even gonna bother to reverse engineer those.

10:25.700 --> 10:28.280
We don't have to, like why make our lives hard?

10:28.580 --> 10:34.620
So Mercury's philosophy sort of divides into these three abstraction layers.

10:35.140 --> 10:41.780
Engine space, where each engine doesn't know anything about the other engines, and it's a very traditional ECU.

10:41.820 --> 10:46.300
So that's, again, controlling piston firing, dynamic timing, water pumps.

10:46.300 --> 10:48.040
If it gets too hot, it's gonna shut it down.

10:48.180 --> 10:50.920
All of that is contained on each engine.

10:50.920 --> 10:52.040
So that's engine space.

10:52.040 --> 10:56.880
Then you have boat space, which is where these command module thingies come into play.

10:57.380 --> 10:59.520
Boat space knows about the boat.

10:59.520 --> 11:01.020
It knows about how many motors it has.

11:01.020 --> 11:06.860
It knows that the port, starboard, center engines, anything like that.

11:07.040 --> 11:20.920
And that will then translate user space, which is the user intention of, I want to go forward fast now, please, into, okay, you engines need to go fast and you need to not go fast, for instance.

11:21.100 --> 11:24.200
User space is the helm.

11:24.240 --> 11:28.940
If you read the diagram, again, they're really just showing us how it works.

11:29.100 --> 11:33.820
It's looking per throttle handle, it's looking for three voltages that move in tandem.

11:34.820 --> 11:43.540
So those three dotted, those three lines of varying dash types on the chart, tell us what those are.

11:43.540 --> 11:47.360
And in this case, they've abstracted reverse away a little bit too.

11:47.360 --> 11:53.120
So unlike the CDU where you have a separate trigger when like, I need to pull this, then pull that to go backwards.

11:53.520 --> 11:56.620
Mercury just basically says, I have plus 100, which is forward.

11:56.620 --> 11:59.380
I have zero and I have minus 100, which is all back.

11:59.880 --> 12:10.240
If you had a system that had a non zero neutral point, like a bucket, a jet ski bucket, for instance, doesn't go down all the way to keep you still.

12:10.240 --> 12:12.340
It goes down all the way for full reverse.

12:12.500 --> 12:14.380
This is where to abstract it away.

12:14.660 --> 12:18.160
So to replicate these, you just need three decks.

12:18.160 --> 12:19.360
Like this sounds dumb.

12:19.360 --> 12:23.660
And honestly, the hardest part of this is finding the active connector that plugs into this.

12:23.660 --> 12:26.660
I think it's a GTS 150, but don't hold me to that.

12:26.660 --> 12:29.080
We can talk later if you really want the connectors.

12:29.080 --> 12:30.940
I've written up on GitLab somewhere.

12:31.700 --> 12:37.660
DTS two, I'm going to open up a throttle binnacle and just see what, again, it's going to be a hall effect.

12:37.660 --> 12:43.360
Maybe the hall effect is potted under epoxy on the board or something dumb, but I suspect it's not.

12:43.600 --> 12:47.440
And we're going to cut the traces or cut the wires and figure out what we do.

12:47.500 --> 12:49.280
So does this all make sense so far?

12:49.920 --> 12:50.700
Great.

12:50.860 --> 12:52.560
So hacking Glendinning.

12:52.560 --> 12:55.260
This is again, basically the same deal.

12:55.420 --> 13:01.500
So Glendinning uses proprietary CAN and it's not even a standard 1939, which is really annoying.

13:01.500 --> 13:04.600
So the standard decode tools for 1939 don't work for this.

13:04.640 --> 13:05.460
Don't try it.

13:05.460 --> 13:06.680
It's just not even worth it.

13:07.220 --> 13:08.800
You take the helm apart.

13:09.020 --> 13:13.440
Honestly, it's mostly like really nicely machined detents for the handles.

13:13.440 --> 13:16.420
When you move them back and forth, it has a really nice user feel.

13:16.860 --> 13:19.820
And then it's just a hall effect sensor on a magnet.

13:19.820 --> 13:21.840
You're like, wow, that's it?

13:22.040 --> 13:23.880
And it is, it turns out.

13:24.060 --> 13:31.280
There's some other CAN stuff in there, like idle and fast idle, but yeah, the lever is just a magnet and a hall effect.

13:31.440 --> 13:35.380
So take it apart and then you put it on a scope.

13:35.400 --> 13:43.000
Again, the only real advice I have here is because of how this worked, a meter was not high enough impedance to figure out what it was doing.

13:43.000 --> 13:44.480
So you had to put it on a two channel scope.

13:44.480 --> 13:46.360
Like that was as complicated as this was.

13:46.360 --> 13:49.240
This took about, I don't know, an afternoon.

13:49.240 --> 13:50.880
And that was including a lunch break.

13:51.500 --> 13:56.580
They also divide it into user space or user intention, boat space, these command modules.

13:56.580 --> 13:58.640
I think they call them CP modules here.

13:58.640 --> 14:01.700
And again, this is very brand specific.

14:01.760 --> 14:04.080
The CP module can control multiple engines.

14:04.080 --> 14:10.580
It knows what CAN ID engines are which, and you'll just buy it pre-configured from them if you really want to.

14:10.700 --> 14:16.760
So that's how to control or a control strategy for cable driven motors.

14:17.060 --> 14:22.760
So notable exceptions, Torquedo is well understood if finicky.

14:23.420 --> 14:30.600
Their code is now included in mainline ArduPilot which is awesome that the ArduPilot community got that together, like props to them.

14:30.980 --> 14:32.640
It's RS-485.

14:32.640 --> 14:34.300
It involves a whole bunch of handshakes.

14:34.300 --> 14:37.940
It's a giant pain, but like, okay, you can make it work.

14:39.060 --> 14:43.160
I can't really recommend Torquedo if you want electric power plants.

14:43.160 --> 14:45.140
Five years ago, yeah, sure, absolutely.

14:45.140 --> 14:46.600
They were probably your only option.

14:46.600 --> 14:48.340
Now there are other options.

14:48.480 --> 14:49.700
Go find them.

14:50.060 --> 14:55.960
Cox Marine who makes diesel outboards out of the UK just sends you the J1939 ICD.

14:55.960 --> 14:56.920
You just ask them nicely.

14:56.920 --> 14:58.100
You don't even have to sign an NDA.

14:58.100 --> 14:58.880
It's great.

14:58.880 --> 15:01.840
I would happily buy their motors just based on that alone.

15:01.860 --> 15:06.080
Whereas Mercury Brunswick has actually told me to not give this talk at a different venue.

15:07.080 --> 15:10.260
So we're here and this is DEF CON and that's how this works.

15:11.500 --> 15:13.160
Cox is really cool.

15:13.360 --> 15:25.400
And I haven't used their motors, but diesel outboards are a real subset of, subset of outboards that's rapidly becoming more in demand as DoD basically says, like, you must have diesel, we don't care.

15:25.400 --> 15:28.260
Not that it like makes no sense, but okay.

15:29.600 --> 15:32.140
So how do you interface this with an autopilot?

15:32.140 --> 15:37.920
And in this case, we're gonna refer to autopilots, not in the Marine sense of like, you push a button and it tracks a line.

15:38.060 --> 15:42.500
It's gonna be more the sense of a flight controller.

15:42.500 --> 15:48.640
And obviously like our boats aren't taking flight, but the terminology from ArduPilot is flight controller, FMU.

15:48.780 --> 15:52.000
So I messed around with PLCs a bit for this.

15:52.000 --> 15:54.040
And PLCs seem like a really obvious answer.

15:54.040 --> 15:57.160
Like you wanna make voltages, you want them to be ultra reliable.

15:57.640 --> 16:00.060
You know, you want them to be super auditable.

16:00.120 --> 16:01.960
I like PLCs to be clear.

16:01.960 --> 16:05.080
I have some background in Siemens stuff, although it's been a while.

16:06.300 --> 16:08.800
I tried to get this to work over MQTT.

16:08.800 --> 16:22.100
That seemed like a really cool way to do it, of put it on a normal IP network, have something like MavProxy on a Pi, just output MQTT messages from MavLink, just translate MavLink messages.

16:22.100 --> 16:23.920
And this is all MavLink specific.

16:24.600 --> 16:26.160
Your mileage may vary.

16:26.220 --> 16:29.560
So MavLink to MQTT worked great.

16:29.840 --> 16:33.080
Receiving the MQTT messages on the PLC did not.

16:33.160 --> 16:35.720
There were rate limits that were not documented.

16:35.720 --> 16:38.220
There were on-off stuff that just didn't work.

16:38.240 --> 16:40.980
It just, it doesn't work well, at least with AutomationDirect.

16:40.980 --> 16:43.140
And I like AutomationDirect a great deal.

16:43.140 --> 16:44.520
They're a super awesome company.

16:44.520 --> 16:49.340
Props to them for having 3D models, 2D models, ICDs on their website.

16:49.340 --> 16:51.040
So this isn't a them problem.

16:51.040 --> 16:54.260
I mean, it's trying to pack all this onto an STM32 problem.

16:54.440 --> 16:58.680
So could you write one if you were a PLC expert?

16:58.680 --> 16:59.340
Yeah, probably.

16:59.340 --> 17:01.740
If that's your chosen religion, like sure.

17:02.240 --> 17:05.760
You could digitize the PWM signals coming out of your flight controller.

17:05.760 --> 17:09.100
That's sort of the most basic way to do this.

17:09.140 --> 17:15.620
Those are, when I say PWM, it's the PWM hobby servo space.

17:15.620 --> 17:16.840
It's super well understood.

17:16.840 --> 17:19.880
It's basically a time pulse and then a gap and then another time pulse.

17:20.360 --> 17:24.720
And the length of that time pulse is your desired servo output.

17:25.180 --> 17:27.540
Could you have a time counter on a PLC do this?

17:27.540 --> 17:28.740
Yeah, of course you could.

17:30.200 --> 17:33.340
It just wasn't worth it to me to write custom serial stuff, basically.

17:33.340 --> 17:34.720
So I just spun my own boards.

17:36.000 --> 17:37.440
Refresh speed is not a factor.

17:37.440 --> 17:40.060
I used a Teensy, shout out to PJRC.

17:40.060 --> 17:40.820
He's awesome.

17:40.820 --> 17:43.960
I didn't interact with him for this, but like what he brings to the community is amazing.

17:44.100 --> 17:53.440
So I just used a Teensy, added a bunch of peripheral hardware to it and have it either listen to the pulse widths or Mavelink over serial.

17:53.440 --> 17:54.860
Like, honestly, it's not that hard.

17:54.860 --> 17:56.180
It's like 500 lines of code.

17:56.180 --> 17:57.620
I'm not a software developer.

17:57.620 --> 17:58.960
You don't want me writing code.

17:58.960 --> 18:01.840
So the fact I was able to make this work says it's actually pretty easy.

18:03.060 --> 18:06.920
You're gonna spend a bunch of time like with an engine diagnostic tool.

18:06.920 --> 18:21.520
And if you want to get into this, the best device I can give you is buy an engine diagnostic tool, either from the manufacturer or one of the third party ones that plugs into the engine bus and at least sees what the commands are so you can ground truth what your hardware is doing.

18:21.600 --> 18:23.660
That will save you a lot of time.

18:23.660 --> 18:27.080
Otherwise, you're just gonna get strange errors and beeps and you won't be able to reset them.

18:27.080 --> 18:31.720
And the number of Yamaha beeps I've heard in my life is far too many at this point.

18:31.720 --> 18:34.420
So let's talk through that diagram just real quick.

18:34.420 --> 18:36.420
So that's coming out of the flight controller.

18:37.860 --> 18:42.640
Mavelink or PWM or whatever you want, I guess, but those are the two I would recommend.

18:42.640 --> 18:49.480
This engine translator piece of hardware that you all will have designed if this is the way you want to go.

18:49.740 --> 18:54.780
And then you can talk to each ECU over application-specific analogs.

18:55.000 --> 19:02.780
And honestly, the big letdown of this talk is I'm not telling you to reverse engineer Mercury's 12 different CAN buses because also they're gonna change it out from under you.

19:02.780 --> 19:08.180
It's just intervene at the user space level and this will all be fairly easy.

19:08.440 --> 19:12.780
It would make sense if you want to keep your variables to keep signed eight bits.

19:13.640 --> 19:17.380
255 minus 254, zero, the same as Merck was doing.

19:17.380 --> 19:24.600
It basically makes the translation of when you get a command to what you want to do with that command to output a lot simpler in code.

19:24.840 --> 19:31.600
So that's the big reveal here is this isn't that complicated if you just break open stuff and pretend to be the user.

19:33.100 --> 19:34.620
And it works.

19:34.620 --> 19:36.180
It works reliably.

19:36.420 --> 19:38.320
So I've got some time for questions.

19:38.320 --> 19:40.240
I threw a lot out there and it was really fast.

19:40.240 --> 19:45.640
If you want to go back to any areas, please, I'm in the Maritime Hacking Village, which is awesome.

19:45.640 --> 19:46.680
It's my first DEF CON.

19:46.680 --> 19:48.940
So forgive me for talking fast and nervous.

19:49.300 --> 19:50.840
Come to Maritime Hacking Village.

19:50.840 --> 19:53.620
We have some boats, we have some engines.

19:53.920 --> 19:55.540
It's super cool.

19:55.540 --> 19:59.560
So we've got like five minutes for questions, exactly five minutes for questions.

19:59.560 --> 20:06.300
So after that great disappointment of just intervene with analog voltages, fire away.

20:10.560 --> 20:12.960
Someone must have a question here.

20:14.240 --> 20:15.680
Please, thank you.

20:27.230 --> 20:32.850
I do, unfortunately, and I hate it, but like, yeah, let's roll back to Yamaha.

20:32.990 --> 20:39.210
Like this is now the way they're going to, eventually they will stop selling cable driven like legacy support motors.

20:39.210 --> 20:40.510
And like, that's not great.

20:40.930 --> 20:46.370
And the wiring harness alone to rig one of these is over a thousand bucks new.

20:47.090 --> 20:48.450
That is the way it's going to go.

20:48.450 --> 20:53.910
And you're going to have to call your Yamaha rep and say like, I need a new thing and you won't be able to buy it yourself.

20:53.910 --> 20:57.770
And like, that's a world I personally don't want to live in, but yeah, it's going that way.

20:57.770 --> 20:59.810
I don't know what to do about it, but it is.

21:00.110 --> 21:01.470
Great question, thank you.

21:01.930 --> 21:03.030
Yeah, John Deere sucks.

21:04.770 --> 21:07.490
They do unfortunately make marine power plants too.

21:07.810 --> 21:10.450
I just haven't encountered any of them.

21:10.450 --> 21:12.070
Any other questions, please?

21:12.290 --> 21:13.430
Sir, thank you.

21:26.260 --> 21:39.780
Yeah, so that's sort of the whole, like the whole crux of this is, A, I'm not a particularly talented CAN reverse engineer and they're probably doing non-standard binary stuff that's really, really hard to track down.

21:40.520 --> 21:46.000
And this was like, this is sort of the afternoon level hacking and it works.

21:46.720 --> 21:57.740
I would say it's harder, but more hardware elegant to just modify the CAN packets, but you're gonna have to spend a lot of time listening to them and a lot of time with like very known states.

21:57.780 --> 22:01.900
And you're going to have a lot of jumpy data in that, that you're gonna be trying to decode as binaries.

22:01.900 --> 22:08.840
And I'm not saying don't throw an LLM at it cause that might actually work, but it's gonna be hard.

22:08.840 --> 22:10.760
It's not gonna take you an afternoon for sure.

22:12.000 --> 22:15.440
So my thought is just keep the Mercury stuff, Mercury stuff.

22:15.440 --> 22:18.940
And if they want to do engine synchronization in whatever weird way they're doing it, I don't care.

22:20.580 --> 22:21.260
Please.

22:24.240 --> 22:24.960
Cool.

22:26.760 --> 22:29.480
You should all buy a maritime hacking village badge cause it's super cool.

22:29.480 --> 22:34.740
And it can interface on 0183 and 2000 and should have arbitrary voltage outputs.

22:34.740 --> 22:37.080
And I don't know, I flashed a bunch of them, but I don't really know how they work.

22:37.240 --> 22:39.280
So those are super cool badge again.

22:39.900 --> 22:43.820
Thanks to maritime village for hacking, having me and thanks to DEF CON.

22:43.820 --> 22:45.620
Any other questions, please throw it out there.

22:45.620 --> 22:46.600
Those were great questions.

22:46.600 --> 22:47.820
Thank you, sir.

23:10.070 --> 23:11.290
Short answer, yes.

23:11.510 --> 23:13.050
It's easier than it looks.

23:20.430 --> 23:22.790
There is some subtlety to it.

23:22.790 --> 23:28.050
Like outputting PWM directly from microcontroller will probably yield unknown results.

23:28.050 --> 23:29.710
I put it through a DAC.

23:29.710 --> 23:34.710
So a PWM based DAC that has proper like voltage reference ratio metrics.

23:34.710 --> 23:37.430
All of these are like two, $3 hardware.

23:37.430 --> 23:40.710
But yeah, again, that's the terrible disappointment of this talk.

23:44.750 --> 23:45.430
Yeah.

23:45.970 --> 23:48.330
You could do it with analog if you wanted to.

23:48.330 --> 23:50.230
Yeah, sir, please.

24:00.640 --> 24:02.760
Ford has a really impressive system.

24:02.760 --> 24:11.560
Like that uses a whole bunch of cameras and lidars and basically you like, you turn the knob and your F250 will do like the inverse kinematics for the trailer.

24:11.580 --> 24:13.000
It's really sexy.

24:13.040 --> 24:15.920
It's only available in like the super high end Fords.

24:15.920 --> 24:18.180
Other than that, my only suggestion is practice.

24:20.000 --> 24:22.160
All right, we are at time.

24:22.160 --> 24:25.320
If anybody wants to get together at the hacking village, we have booze.

24:25.400 --> 24:26.240
Thank you.

