1 00:00:02,550 --> 00:00:11,030 Hey everybody, Gary Kessler here, and welcome to my talk about putting an AIS receiver in Raspberry Pi. 2 00:00:11,050 --> 00:00:13,310 Hope everybody can hear me okay. 3 00:00:13,930 --> 00:00:18,770 Sort of strange giving a presentation to a bunch of people from an office, but off we go. 4 00:00:19,510 --> 00:00:24,330 Let me put on my screen here, hang on just a second, 5 00:00:33,460 --> 00:00:38,400 so right now you see me watching you watching me, so we're crossing the beam here. 6 00:00:40,820 --> 00:00:43,840 So let me get to the right page. 7 00:00:43,840 --> 00:00:45,360 That's not the right page. 8 00:00:45,880 --> 00:00:47,300 Let's go here. 9 00:00:48,500 --> 00:00:50,520 Now you all know that I watch Longmire. 10 00:00:50,520 --> 00:01:07,480 So I'm going to talk about setting up an AIS receiver on a Raspberry Pi, and I'm not going to assume that anybody has a lot of background in any of this, but obviously through comments and Q&As you'll tell me where I've gone too deep or not deep enough. 11 00:01:08,120 --> 00:01:17,280 But in any case, there are a lot of different ways to build a receiver in any number of formats. 12 00:01:17,420 --> 00:01:26,200 I like the Raspberry Pi because it provides a mechanism where I can take a cheap machine and have it dedicated to task. 13 00:01:26,520 --> 00:01:44,640 To give you an idea of that, just to tell you where it is we're going, I'm sitting here in my office right now, but over here, if I point this in the right direction, get rid of that, here's my TV screen showing my current AIS information I'm getting. 14 00:01:44,680 --> 00:01:52,500 Right there, I think if I'm pointing correctly and if I get this in focus, there's my Raspberry Pi. 15 00:01:53,220 --> 00:01:59,520 And now I'm about five miles from the water, so I'm not getting a lot of signal. 16 00:01:59,520 --> 00:02:04,980 But back up here over my shoulder, there's my antenna clipped to my bookcase. 17 00:02:05,420 --> 00:02:09,880 And again, connected to the Raspberry Pi, connected to my TV screen. 18 00:02:11,020 --> 00:02:18,100 Now in any case, what I'm going to do, I have a second Raspberry Pi here, so I'm going to sort of start from there and just give you a little bit of background. 19 00:02:18,560 --> 00:02:23,120 So first of all, I will say I've got a page on my website. 20 00:02:23,120 --> 00:02:27,520 If you go to GaryKessler.net, I egolessly named the domain after myself. 21 00:02:27,800 --> 00:02:33,180 If you go to GaryKessler.net, you can get this webpage. 22 00:02:34,260 --> 00:02:41,280 And if you want way more background on AIS, there's a couple of links that I give you up here. 23 00:02:41,540 --> 00:02:48,880 Actually, the Wikipedia page has a lot of good information, but of course you can go to the Coast Guard NAB Center and get their overview. 24 00:02:49,840 --> 00:02:53,680 International Association of Lighthouse Authorities has a really good overview as well. 25 00:02:53,680 --> 00:02:56,240 But in any case, sort of let me tell you where we're started here. 26 00:02:57,520 --> 00:03:06,400 Now, again, without making too many assumptions about what you all have played with or not played with, if you haven't seen before, this here's a Raspberry Pi. 27 00:03:06,400 --> 00:03:10,020 This one is a little bit old. 28 00:03:10,880 --> 00:03:15,280 This is, as you can see there, if I can focus this. 29 00:03:17,560 --> 00:03:18,720 Yeah, there we go. 30 00:03:18,720 --> 00:03:23,160 Okay, so this is the I think they're a couple beyond that now. 31 00:03:23,160 --> 00:03:32,200 But in any case, stock standard Raspberry Pi, a whole bunch of USB ports and Ethernet port as well. 32 00:03:33,140 --> 00:03:37,560 Here's where there's an HDMI connection as well as power. 33 00:03:37,760 --> 00:03:41,960 This is the general purpose IO bus back up in here. 34 00:03:43,280 --> 00:03:49,160 And let me go back to being live and personal. 35 00:03:49,160 --> 00:03:52,940 Anyway, so that's your stock standard Raspberry Pi. 36 00:03:52,940 --> 00:03:59,840 Now, there are also a number of ways where you can connect an AIS receiver. 37 00:04:00,140 --> 00:04:02,980 You can get some little plug right into the USB port. 38 00:04:02,980 --> 00:04:09,920 What I got was this device from Wegman, the Daisy AIS receiver. 39 00:04:10,620 --> 00:04:15,240 If you get a receiver, it is my recommendation, get a two channel receiver. 40 00:04:16,060 --> 00:04:20,300 So AIS broadcasts on two channels, what they call channel A and channel B. 41 00:04:21,240 --> 00:04:25,920 I don't see much use if you're going to be doing research and you're trying to gather data. 42 00:04:25,920 --> 00:04:30,060 I don't see much purpose in getting a single channel AIS receiver. 43 00:04:30,800 --> 00:04:42,420 It is true in my experience, most of what I've seen, chips that are broadcasting on channel B are also broadcasting on channel A. 44 00:04:42,420 --> 00:04:46,660 But again, there's probably no really good reason not to get both channels. 45 00:04:47,220 --> 00:04:52,060 In any case, this is, you know, like I said, this is the Daisy hat. 46 00:04:52,660 --> 00:04:57,380 And for those of you who like to look at SuperTree, that's the back part. 47 00:04:59,830 --> 00:05:02,250 So let me go back around here. 48 00:05:03,070 --> 00:05:13,750 In any case, so the first part in getting this together also, when you buy the piece parts, is you're going to have to buy an antenna. 49 00:05:13,750 --> 00:05:15,390 You're probably going to want to buy an antenna. 50 00:05:15,390 --> 00:05:20,590 You'll need a marine antenna because that will pick up the appropriate VHF channels. 51 00:05:20,830 --> 00:05:23,550 Read carefully on the antenna connector. 52 00:05:23,590 --> 00:05:27,430 I found that they use a whole different nomenclature. 53 00:05:27,430 --> 00:05:30,350 You know, every industry has its own vernacular. 54 00:05:30,350 --> 00:05:32,430 Antenna people have theirs as well. 55 00:05:33,290 --> 00:05:40,370 You probably want to get what's shown here is the stock standard marine antenna connectors. 56 00:05:40,490 --> 00:05:49,950 And you're going to need an adapter to go onto the Daisy hat, which again is what I used. 57 00:05:49,950 --> 00:05:53,570 So there's the antenna connector on the Daisy hat. 58 00:05:53,570 --> 00:05:58,910 So what I have here is an adapter. 59 00:05:58,910 --> 00:06:00,630 This goes onto the Daisy hat side. 60 00:06:00,630 --> 00:06:04,670 This is a stock standard bayonet connector for here. 61 00:06:04,670 --> 00:06:07,070 Here is the antenna connector. 62 00:06:07,070 --> 00:06:09,710 This is the part that goes to the marine antenna. 63 00:06:09,710 --> 00:06:15,150 And then here is the bayonet, the female connector. 64 00:06:15,150 --> 00:06:21,070 Anyway, so eventually this piece is going to go onto the Daisy hat. 65 00:06:21,070 --> 00:06:24,370 This piece is going to go on to that connector. 66 00:06:24,370 --> 00:06:27,870 And this is going to actually connect to the antenna itself. 67 00:06:34,480 --> 00:06:35,280 Oops. 68 00:06:36,620 --> 00:06:38,700 Just learning how to use a computer. 69 00:06:38,820 --> 00:06:46,360 Anyway, the operating system for the Daisy hat is going to fit onto a micro SD card. 70 00:06:47,820 --> 00:06:51,540 And, you know, you've all seen micro SD cards. 71 00:06:51,660 --> 00:06:59,300 I would get the biggest one that you can, just because it provides you more of an opportunity if you need to store a whole bunch of data. 72 00:06:59,740 --> 00:07:02,880 Micro SD card probably won't fit in your computer. 73 00:07:02,880 --> 00:07:09,740 Luckily, most micro SD cards these days come with an adapter so that they can plug into stuff. 74 00:07:09,880 --> 00:07:14,000 But, you know, basically, this is like most of my piece parts. 75 00:07:14,320 --> 00:07:17,220 I'll put that there so it'll be in the camera range. 76 00:07:20,000 --> 00:07:23,720 So installing Raspbian is something that I'm not going to... 77 00:07:25,680 --> 00:07:27,400 Hang on just a second. 78 00:07:27,400 --> 00:07:30,980 I'm getting a message here that I think I need to take a look at. 79 00:07:36,750 --> 00:07:39,510 They're not... you're not seeing the Raspberry Pi. 80 00:07:39,510 --> 00:07:42,050 So, do I understand? 81 00:07:42,050 --> 00:07:43,510 You're not seeing my camera? 82 00:07:43,590 --> 00:07:45,790 Okay, now, okay, now they are. 83 00:07:45,790 --> 00:07:46,650 All right. 84 00:07:49,520 --> 00:07:57,560 Anyway, on the Raspberry Pi, I chose to install Raspbian and then put OpenCPN. 85 00:07:57,780 --> 00:08:02,240 And so the rest of what I'm going to talk about is basically about that. 86 00:08:02,440 --> 00:08:08,400 On my page, I mentioned that there is a whole different direction you can go in if you want. 87 00:08:08,400 --> 00:08:18,120 If you go to the website AIS Hub, I've got a link for their RPi AIS, which is AIS Dispatcher for Raspberry Pi. 88 00:08:18,360 --> 00:08:26,140 And what Dispatcher will do, it basically acts as an intermediary to accept AIS feeds and then pop them out where you want them to go. 89 00:08:26,720 --> 00:08:31,340 That site is a really excellent site and has a lot of really good information as well. 90 00:08:31,880 --> 00:08:34,340 But that's not the direction I'm going to go in right now. 91 00:08:34,940 --> 00:08:46,400 What I'm going to talk about is just, again, stock standard, pretty much vanilla with my Raspberry Pi using the NOOBS operating system. 92 00:08:46,680 --> 00:08:51,480 And again, the operating system is going to go on the microSD card. 93 00:08:51,480 --> 00:08:56,240 There are a lot of places out there that give instructions for how to do this. 94 00:08:56,980 --> 00:09:07,940 And the reason I put this page together, actually, is I don't really have a lot of information here that's really unique to anything that I made up. 95 00:09:07,940 --> 00:09:16,580 But I found I had to go to about a dozen sites to get all the information together so that I could actually figure out how to do this. 96 00:09:16,580 --> 00:09:23,780 So I decided to build this page because, for me, it provided a roadmap that if I need to do it again in six months, I've got a place to go. 97 00:09:23,780 --> 00:09:29,640 In any case, relatively easy to get NOOBS onto the microSD card. 98 00:09:30,460 --> 00:09:40,700 And then, basically, after you have put the operating system... I'm going to get this off my card here. 99 00:09:40,920 --> 00:09:45,800 So I've got the operating system on my microSD card. 100 00:09:46,320 --> 00:09:53,220 And it just goes into the... oh, there it is. 101 00:09:53,220 --> 00:09:56,580 It just goes into the Raspberry Pi. 102 00:09:56,580 --> 00:09:59,640 And that is all of your local storage. 103 00:09:59,640 --> 00:10:00,900 That is your disk drive. 104 00:10:00,900 --> 00:10:04,440 That's your operating system and your bootable device. 105 00:10:04,440 --> 00:10:14,880 Of course, the joy with the Raspberry Pi is you can have a whole slew of different operating systems and you change the personality of the Raspberry Pi by what SD card you put in. 106 00:10:14,940 --> 00:10:23,900 One of the reasons I like having a big SD card, like I said, is if I'm doing local storage of stuff, I can keep it all on the SD card. 107 00:10:24,140 --> 00:10:31,420 Clearly, with four USB ports, I could also plug in all the external storage I want. 108 00:10:33,360 --> 00:10:43,700 So once you have gotten the software installed, you're going to plug the thing in. 109 00:10:43,700 --> 00:10:46,520 At this point, you need to have some I-O devices. 110 00:10:46,640 --> 00:10:55,800 So you do need to have a keyboard and a mouse and a monitor of some sort, at least for the initial phases. 111 00:10:56,380 --> 00:11:07,640 And so when you start the system up, you'll get some sort of boot screen and you'll tell it, you know, you want to install full Raspbian and just let that go. 112 00:11:08,040 --> 00:11:11,980 Now, at this point, you have an operating system. 113 00:11:11,980 --> 00:11:14,660 You now need to configure the Raspberry Pi. 114 00:11:14,800 --> 00:11:18,760 So I give you a little bit of instruction how to do that. 115 00:11:18,760 --> 00:11:24,220 But what I'm going to do is try to show you a little bit more dynamically and live. 116 00:11:24,220 --> 00:11:27,820 So the application menu is usually up in the upper left. 117 00:11:27,820 --> 00:11:31,840 It's the Raspberry Pi icon. 118 00:11:32,040 --> 00:11:39,080 And if you go down to preferences and then Raspberry Pi configuration, here's where you get to configure the things about your system. 119 00:11:39,100 --> 00:11:45,320 So here's where you can put in your password, the name of the computer, and all this kind of little stuff. 120 00:11:45,540 --> 00:11:48,720 One of the most important parts is going to be on the interfaces. 121 00:11:48,780 --> 00:11:58,260 If you want remote access to the Raspberry Pi, and I recommend that you do, be sure to enable SSH and VNC. 122 00:11:58,720 --> 00:12:01,600 SSH is going to use TCP port 22. 123 00:12:02,000 --> 00:12:04,640 VNC, I think, uses port 5900. 124 00:12:05,440 --> 00:12:11,500 You probably want to have the serial port enabled either, since you're going to put something onto that serial port. 125 00:12:12,460 --> 00:12:15,000 And then there's some other things you can configure here. 126 00:12:15,040 --> 00:12:18,520 One that I do recommend is to set your locale. 127 00:12:18,520 --> 00:12:21,480 If nothing else, be sure you're in the right time zone. 128 00:12:22,780 --> 00:12:28,060 And then you might want to do some other things about, you know, what country you're in, what language, and all those kind of things. 129 00:12:28,560 --> 00:12:30,380 But those are the two biggies. 130 00:12:30,920 --> 00:12:33,640 You do need to set the Wi-Fi country. 131 00:12:35,440 --> 00:12:42,800 And I must admit, I know you need to do it, and I haven't explored deeply as to what happens if you configure a different country. 132 00:12:43,380 --> 00:12:48,300 But, well, anyway, I'm going to cancel this, because I didn't really want to accidentally change anything. 133 00:12:50,320 --> 00:12:56,740 So, anyway, so this is all the stuff, like I said, you know, you can configure on the Raspberry Pi. 134 00:12:59,640 --> 00:13:04,240 Now, it turns out, of course, you can use the GUI, or you can use a command line. 135 00:13:04,640 --> 00:13:07,160 And here's some instructions on using the command line. 136 00:13:07,160 --> 00:13:13,860 I just do a sudo, you know, raspi-config, and it'll pop up actually the same screen. 137 00:13:14,800 --> 00:13:20,400 Now, you might want to put your Raspberry Pi onto a Wi-Fi network. 138 00:13:20,700 --> 00:13:39,180 And if you have a Wi-Fi network that it's broadcasting as SSID and doesn't have a password, and you're not physically connected on the Ethernet port, the Raspberry Pi should pick up that Wi-Fi network. 139 00:13:39,180 --> 00:13:58,440 However, if you want to connect anything else, like a Wi-Fi network that doesn't broadcast SSID and or requires a password, then there's a file that you need to edit and put the information in about that, about that network. 140 00:13:58,700 --> 00:14:09,100 This is one of the reasons I'm not going to show you the file that's sitting on my Raspberry Pi, because everything is in plain text, and I'm not, you know, don't know that I want to show everybody my password right now. 141 00:14:09,100 --> 00:14:16,340 Anyway, so what you need to do is go to this file, the sd underscore supplicant dot com file. 142 00:14:16,900 --> 00:14:22,960 Nano is a nice little GUI editor that comes on the Raspberry Pi. 143 00:14:23,060 --> 00:14:30,580 In any case, so what I've done here is I'm showing you how you could configure two different wireless networks. 144 00:14:30,580 --> 00:14:34,520 So, in the first case, I've got a guest network. 145 00:14:34,520 --> 00:14:38,300 There's no password, but in this case, the SSID 146 00:14:41,460 --> 00:14:43,240 is not being broadcast. 147 00:14:43,280 --> 00:14:45,780 So, the SSID for the guest network is guest. 148 00:14:46,420 --> 00:14:48,060 Anyway, so that's what that would look like. 149 00:14:48,060 --> 00:14:50,020 Then I've got another network called owner. 150 00:14:50,140 --> 00:14:52,380 And owner, in this case, does have a password. 151 00:14:52,380 --> 00:14:53,700 The password is secret. 152 00:14:54,100 --> 00:14:56,040 And it uses WPA. 153 00:14:56,220 --> 00:15:02,260 So, this is what those kind of commands would look like to, you know, indicate that network. 154 00:15:03,940 --> 00:15:07,400 So, let me just go back here for a second. 155 00:15:07,420 --> 00:15:10,840 And I want to get back to my video, actually. 156 00:15:12,920 --> 00:15:15,080 Here, let me just click the video. 157 00:15:15,640 --> 00:15:17,040 Oh, just click the video off. 158 00:15:17,040 --> 00:15:18,180 Sorry about that. 159 00:15:23,460 --> 00:15:24,400 All right. 160 00:15:24,900 --> 00:15:28,360 Sorry, we're all still learning the tools, particularly me. 161 00:15:33,820 --> 00:15:34,820 All right. 162 00:15:34,820 --> 00:15:37,960 So, I'm going to go back to Firefox here. 163 00:15:37,960 --> 00:15:46,580 So, basically, at this point, you've got your Raspberry Pi now can listen on SSH or VNC. 164 00:15:46,660 --> 00:15:48,720 You've got it connected to the wireless. 165 00:15:48,720 --> 00:15:59,060 So, at this point, you can take out your, you know, well, you can keep plugging into your monitor if you want, but you don't need your keyboard anymore and you don't need your mouse, because you can now do that remotely if you want. 166 00:15:59,260 --> 00:16:05,480 I do have a couple notes about the screen resolution, because I found that I had to play around a little bit with that. 167 00:16:06,640 --> 00:16:18,880 And you can go into the config.txt file, which is in the boot directory, and there are a number of different screen sizes you can try. 168 00:16:19,200 --> 00:16:27,040 What I found on this was I had to play around a little bit and experiment, and eventually, I found something that worked. 169 00:16:29,360 --> 00:16:35,960 So, now that I got the Raspberry Pi going, the next thing is installing the daisy hat. 170 00:16:36,460 --> 00:16:45,420 Now, again, I'm going to assume that many of you have played with this kind of stuff before, but there's probably some of you who haven't. 171 00:16:45,420 --> 00:16:59,300 So, on the Raspberry Pi, I've got these two rows of pins back in here, and on the daisy hat, I've got a socket that goes into it. 172 00:16:59,300 --> 00:17:01,220 Let me get that a little bit further down. 173 00:17:01,400 --> 00:17:12,820 And all I can say is, if you've never played around with, you know, putting sockets onto pins, just do it slowly, carefully, and make sure everything's lined up the first time. 174 00:17:12,820 --> 00:17:16,880 The other thing is, you'll notice, I actually have this in a case. 175 00:17:17,680 --> 00:17:23,740 You don't actually need to have it in a case, but I thought it was better, more better protected that way. 176 00:17:24,080 --> 00:17:27,580 So, I mounted the Raspberry Pi onto the case. 177 00:17:27,580 --> 00:17:28,880 You see the standoffs. 178 00:17:29,300 --> 00:17:35,780 If you're going to do this, there's some standoffs for the daisy hat as well. 179 00:17:35,840 --> 00:17:37,800 You know, this is the time to put those in. 180 00:17:37,800 --> 00:17:45,600 And then, like I said, it's a matter of, you know, be sure that you've lined up the socket correctly this way. 181 00:17:47,260 --> 00:17:51,900 And actually, it's not, but I can't see it as well as the camera can. 182 00:17:51,900 --> 00:17:55,160 And be sure that you've lined it up correctly, you know, here as well. 183 00:17:55,500 --> 00:18:02,060 And once you have everything lined up, let me try to get this in here. 184 00:18:02,060 --> 00:18:05,000 This is the problem with doing anything live, isn't it? 185 00:18:05,000 --> 00:18:10,860 Just be sure that you squeeze evenly on both sides and slowly. 186 00:18:11,340 --> 00:18:13,100 And there you go. 187 00:18:13,100 --> 00:18:14,520 I mean, it's like that. 188 00:18:14,860 --> 00:18:17,280 And then, of course, you screw it to the standoffs. 189 00:18:17,860 --> 00:18:20,260 And then you build the rest of the case. 190 00:18:20,880 --> 00:18:31,480 You can probably guess this is why I took apart one to put back together, but I'm not using that live because I'm not going to square everything back in together. 191 00:18:34,150 --> 00:18:39,730 Anyway, once you get the Dizzy Hat installed, that's really all you need to do. 192 00:18:39,930 --> 00:18:47,170 I gave some instructions on how to load a program called GPIO that allows you to look at your GPIO pins. 193 00:18:47,230 --> 00:18:53,610 You can do that or not do that, depending upon if you want to track all those things. 194 00:18:54,110 --> 00:18:57,270 I put in the software, but it's absolutely not necessary to do. 195 00:18:57,850 --> 00:19:14,010 There's also a program called Screen, which, again, provides you some useful information about anything on your serial board on the Raspberry Pi, but it's not essential to the operation of anything related to AIS. 196 00:19:14,010 --> 00:19:16,230 So I'm going to sort of skip over that. 197 00:19:17,630 --> 00:19:20,690 And what I want to do is I want to bring you to OpenCPN. 198 00:19:20,850 --> 00:19:25,410 So I'm running OpenCPN on the Raspberry Pi. 199 00:19:25,410 --> 00:19:30,690 I'm also running it on my Mac. 200 00:19:30,710 --> 00:19:38,730 And so there's slightly different views here from what I'll show you on the Raspberry Pi. 201 00:19:38,730 --> 00:19:42,270 But the OpenCPN is OpenChart Plotter. 202 00:19:42,330 --> 00:19:48,910 OpenCPN runs on just about all software platforms except iOS. 203 00:19:50,450 --> 00:19:56,890 And basically, like with any electronic chart display, you see all the targets out here. 204 00:19:56,890 --> 00:20:00,690 The targets are color-coded, actually, by type of vessel. 205 00:20:00,710 --> 00:20:03,690 And with AIS, they're identifying their type of vessel. 206 00:20:03,690 --> 00:20:05,210 Right here, I've got one. 207 00:20:05,210 --> 00:20:11,150 I don't really know much about it, but it apparently is a ship from Norway. 208 00:20:11,970 --> 00:20:17,590 It's a Class A vessel, which means we're going to be getting more information on its position reports. 209 00:20:17,590 --> 00:20:23,370 But you'll see here, you know, you've got its speed, its course, heading, rate of turn. 210 00:20:23,630 --> 00:20:31,890 A vessel like this, at this speed, ought to be broadcasting, well, certainly no more than about 10 seconds before their transmission. 211 00:20:31,890 --> 00:20:32,870 I'm a little bit surprised. 212 00:20:32,870 --> 00:20:34,130 They're up to four minutes now. 213 00:20:34,130 --> 00:20:35,690 Possibly, that's due to range. 214 00:20:37,090 --> 00:20:41,010 But in any case, I can look at any one of these other vessels. 215 00:20:41,230 --> 00:20:45,950 Baby Cakes, I can know that boat, just because I see it in the harbor all the time. 216 00:20:46,230 --> 00:20:48,210 Right now, it's probably parked. 217 00:20:49,210 --> 00:20:50,590 It's a smaller vessel. 218 00:20:50,590 --> 00:20:53,590 It's a smaller vessel, by which I mean it's a yacht. 219 00:20:54,170 --> 00:20:59,110 It's a Class B vessel, so it's not required to transmit AIS messages. 220 00:20:59,990 --> 00:21:16,070 But in any case, so OpenCPN, again, being open source and has a nice version for the Raspberry Pi, you can, you know, download the software at the OpenCPN.org site. 221 00:21:16,070 --> 00:21:20,570 They have more documentation than you can shake a stick at. 222 00:21:21,110 --> 00:21:28,210 But again, there's all sorts of information there about how to install OpenCPN. 223 00:21:28,750 --> 00:21:33,270 And again, I tried to put everything sort of in one place that, you know, steps you through. 224 00:21:33,270 --> 00:21:51,910 Most importantly is building yourself a PGP key file on the Raspberry Pi and how to be sure that you get the key so that you can actually install OpenCPN when you have, you know, gone through the first process here. 225 00:21:52,630 --> 00:21:58,150 So once you've got the key, you know, here are the steps right here to install OpenCPN. 226 00:21:58,690 --> 00:22:04,550 And like most things, you're waiting for a lot longer than you're actually typing in instructions. 227 00:22:04,810 --> 00:22:12,330 But once you get OpenCPN on your computer, you now have other things you need to play with. 228 00:22:12,710 --> 00:22:19,310 So, I'm going to go back to OpenCPN here, and you're now going to need to configure OpenCPN. 229 00:22:19,830 --> 00:22:36,850 Now, one of the things I want to show you, because I found this to be, and continue to find it to be, one of the, if anything in OpenCPN is difficult, this is the most difficult step, and that is getting charts. 230 00:22:36,990 --> 00:22:48,190 So, you have to be familiar with charts and how they're organized, at least in the United States. 231 00:22:48,190 --> 00:23:02,770 So, when you want to add a new chart, and you can get charts, as you may know, from the National Oceanographic and Atmospheric Administration, from NOAA, you can download every chart in the United States, in a variety of formats. 232 00:23:03,030 --> 00:23:14,150 You can download them as a PDF, so that as a person you can read them, or you can download them in a number of electronic formats, ENC being the most common. 233 00:23:15,570 --> 00:23:24,570 And so, basically what you need to do, if you want to add a chart, is, well, you can go to Chart Group here, if you want. 234 00:23:24,930 --> 00:23:28,090 You can add new groups of charts. 235 00:23:28,430 --> 00:23:37,150 The easiest way is to go to Chart Downloader, and, in this case, you can see that I have four catalogs on my computer right now. 236 00:23:37,150 --> 00:23:45,810 I've got the catalog for California, Florida, Connecticut, and, although it's not all shown here, for Coast Guard District 1. 237 00:23:46,250 --> 00:23:56,190 The reason I downloaded all of District 1's catalog was because I wanted charts from Vermont, but they don't actually have charts for Vermont. 238 00:23:56,270 --> 00:24:03,070 The Vermont charts are in the District 1 catalog, so that's one of the other things you sort of sometimes need to fight through. 239 00:24:03,430 --> 00:24:15,150 But, so, if you want to add a chart, you just go to Add, and then you get to choose where do I, from where do I want my charts? 240 00:24:15,150 --> 00:24:23,990 I usually want USA and NOAA charts, so I open up that, and then I can decide, okay, do I want the RNC or the ENC charts? 241 00:24:24,070 --> 00:24:30,450 The RNC or the rastrographic, they're not used very much anymore, or I can get ENC charts. 242 00:24:31,030 --> 00:24:34,510 And, now, I can download all the ENCs. 243 00:24:34,550 --> 00:24:36,330 I can look them up by district. 244 00:24:36,550 --> 00:24:40,390 I can look them up by state, look it up by region, what have you. 245 00:24:40,950 --> 00:24:45,870 So, if I wanted to look it up by state, for example, well, obviously, here's my states. 246 00:24:45,870 --> 00:24:49,890 So, let's say I wanted to get charts from Illinois. 247 00:24:50,550 --> 00:25:02,050 I could go to Illinois, click OK, and it now has just added the chart, but what it wants me to do is now update. 248 00:25:02,050 --> 00:25:04,190 So, the next thing I need to do is update. 249 00:25:04,630 --> 00:25:10,910 So, it gets all of those, and now you'll notice down here it has a list. 250 00:25:11,470 --> 00:25:15,910 Now, those of you that are familiar with charts know that the charts are numbered. 251 00:25:16,630 --> 00:25:31,670 The numbers are only good in OpenCPN as a mechanism to help you find the name of the chart because you'll notice in the catalog down here everything's by name. 252 00:25:31,970 --> 00:25:34,730 So, like I said, you just need to know the name of the chart. 253 00:25:34,730 --> 00:25:46,170 If I wanted to download, let's say, the Chicago Lakefront chart, I merely click on it, I download selected charts, and now those charts are available to me in OpenCPN. 254 00:25:46,390 --> 00:25:53,310 So, I'm going to say OK, so it's all here, and there's actually, there really is a reason I'm showing you this. 255 00:25:58,120 --> 00:26:13,680 All right, so, if I back out of here all the way, I'm going to take a look at the United States, and what you're going to see, well, maybe I'll go in a little closer, what you're going to see here is a bunch of green boxes. 256 00:26:13,820 --> 00:26:17,240 These are all of the places where I have downloaded charts. 257 00:26:17,240 --> 00:26:19,460 So, remember I have the California catalog? 258 00:26:19,460 --> 00:26:23,380 Well, all I have from California is some charts up in the San Francisco Bay Area. 259 00:26:23,820 --> 00:26:26,940 Here's Lake Cheyenne Plain, my Vermont charts. 260 00:26:26,940 --> 00:26:29,740 I have some charts from the New London area in Connecticut. 261 00:26:30,100 --> 00:26:36,080 The chart we just downloaded in Illinois, here are some of the Florida charts that I have. 262 00:26:36,080 --> 00:26:40,960 This is mostly the Pensacola area, and the rest of what I have is here where I am in Daytona. 263 00:26:41,340 --> 00:26:51,320 So, I have access to every chart in North America, but of course I haven't downloaded all of them because, you know, I'm not looking at all of them. 264 00:26:51,320 --> 00:27:05,580 And right now, for the feed that I have, I really only care about this area here, because for me, again in Daytona, this is the Intracoastal Waterway in my neck of the woods. 265 00:27:05,660 --> 00:27:12,160 So, it's going to take a couple seconds while all of this reloads, but anyway, so hopefully you sort of get the idea here. 266 00:27:15,450 --> 00:27:22,030 Anyway, that is the process that I describe here about downloading charts. 267 00:27:24,230 --> 00:27:30,390 Now, the next thing you need to do is figure out, okay, I'm going to display AIS data. 268 00:27:30,390 --> 00:27:31,770 Where am I getting it from? 269 00:27:32,030 --> 00:27:36,510 So, once again, I'm going to go back to here, and I'm going to go to the connections. 270 00:27:40,420 --> 00:27:45,540 And so, there's a variety of ways in which I can get data. 271 00:27:46,280 --> 00:27:49,940 I have myself set up three connections. 272 00:27:50,000 --> 00:27:58,400 One of them is that I get data from an antenna that I have at the university where I teach at Embry-Riddle Aeronautical University. 273 00:27:58,400 --> 00:28:11,940 So, I've got a device there called ssia-ais.eru.edu, and if I connect to that device over the internet on port 4000, that's where I get a feed. 274 00:28:13,040 --> 00:28:14,780 It's, at this point, public. 275 00:28:14,780 --> 00:28:19,420 I mean, any of you could point there as well, if you're interested in what's going on in Daytona. 276 00:28:20,460 --> 00:28:24,240 I'm going to move this out of the way here a little bit. 277 00:28:25,040 --> 00:28:30,660 All of these boats that I'm seeing here that's coming from that feed from Riddle. 278 00:28:30,880 --> 00:28:49,360 Now, on this particular computer, I'm not set up on the serial interface because I don't have an antenna on this computer, but if I switch back over to my... I'll go back to my Raspberry Pi, you'll notice the interface is slightly different. 279 00:28:49,380 --> 00:29:04,400 If I go here and I look at connections, you can see that I have... I've got a bunch of connections, but the two that are active, one is coming in, again, from ssia-ais.erau.edu, 280 00:29:08,060 --> 00:29:11,780 and the other, I'm set to the serial port. 281 00:29:11,800 --> 00:29:18,040 So, my Raspberry Pi can also be pulling in stuff from the antenna. 282 00:29:18,260 --> 00:29:33,620 So, my office is about, oh, I would say five or six miles from the river and from the ocean, and since you saw my antenna, it's only about seven feet high, I'm not picking up a lot of feeds. 283 00:29:33,780 --> 00:29:39,560 So, most of it's coming in from the antenna at the university, which is, like I said, up about 75 feet up. 284 00:29:39,580 --> 00:29:50,760 I will tell you one funny story, because when I was first experimenting with this, I had all this stuff at home, and home is 10 miles from the ocean. 285 00:29:50,900 --> 00:30:00,160 So, I'm fooling around with it one day, and right here, this window here is the NMEA debug window, because I checked the box. 286 00:30:00,300 --> 00:30:03,340 So, you see I'm getting traffic, and you can see where it's all coming from. 287 00:30:03,420 --> 00:30:09,320 So, I'm sitting at home, and I'm not getting any data, but I'm not expecting to, and all of a sudden, I get a hit. 288 00:30:09,720 --> 00:30:16,520 I have an AIS message come in on my serial port, and I go crazy, because I'm very excited. 289 00:30:16,520 --> 00:30:38,940 So, I take the message, and I parse it, and I look at the latitude and longitude, and I position exactly where the thing is, and it turns out I live about one mile east of I-95, and the latitude and longitude showed a boat going at approximately, you know, 290 00:30:38,940 --> 00:30:44,320 on a heading of approximately 210 degrees at 65 knots. 291 00:30:44,500 --> 00:30:48,780 And I said, there ain't a boat anywhere doing 65 knots around here. 292 00:30:48,780 --> 00:30:54,160 Well, the latitude and longitude put this boat in the southbound lane of I-95. 293 00:30:54,420 --> 00:30:57,060 So, clearly, this boat's sitting on somebody's trailer. 294 00:30:57,060 --> 00:31:03,180 They didn't turn off their AIS, and this guy's zooming down the road, and I got one of its transmissions. 295 00:31:03,180 --> 00:31:04,740 I was very excited. 296 00:31:05,780 --> 00:31:09,160 Anyway, I'm going to go back here. 297 00:31:09,420 --> 00:31:12,040 So, this is how you set up your connections. 298 00:31:12,080 --> 00:31:15,880 So, you can set up a serial connection, as I show here. 299 00:31:16,460 --> 00:31:22,260 If you set up a serial connection, it's going to automatically be an NEA 0183 protocol. 300 00:31:22,540 --> 00:31:29,720 You're going to want to set the data rate to be 38400, because that's probably what the data rate's going to be over the air. 301 00:31:30,540 --> 00:31:33,180 Or you can set up network connections. 302 00:31:33,700 --> 00:31:41,300 And for the network connections, it's going to need an IP address or a hostname, and it'll need the port on which to read. 303 00:31:41,300 --> 00:31:43,700 So, it's getting all of this, obviously , over the network. 304 00:31:43,760 --> 00:31:49,960 And again, you've just seen already, but this is what the debug window looks like. 305 00:31:50,180 --> 00:31:52,840 And let's see. 306 00:31:52,840 --> 00:31:55,420 So, this was stuff coming in on a serial port. 307 00:31:56,240 --> 00:31:58,920 This was stuff coming in on a network port. 308 00:31:58,920 --> 00:32:05,440 I'm not 100% sure why I decided to hide that IP address, but I did. 309 00:32:06,420 --> 00:32:23,640 Now, it also turns out that if you want to get one of these feeds live, if you go through OpenCPN, one of your problems is there's no way to take the information from the debug window and get it in any usable form. 310 00:32:23,640 --> 00:32:30,180 One thing you can do though is go around to a terminal window. 311 00:32:30,220 --> 00:32:32,220 I'm going to go around to a terminal window here. 312 00:32:32,220 --> 00:32:33,460 I'll make a new one. 313 00:32:33,540 --> 00:32:44,600 And I just do, you know, an NC to ssia-ais.erau.edu, port 4000. 314 00:32:47,080 --> 00:32:48,660 Hopefully, I'll start getting some data. 315 00:32:48,660 --> 00:32:49,460 There we go. 316 00:32:49,460 --> 00:32:52,300 So, I can get the feed this way. 317 00:32:54,200 --> 00:33:03,780 And this is something I'm actually going to talk about in a later talk when I talk about AIS and GPS spoofing. 318 00:33:03,780 --> 00:33:09,060 But one form of spoofing is a replay attack. 319 00:33:09,220 --> 00:33:12,500 So, a replay attack, well, just like the name sounds. 320 00:33:12,500 --> 00:33:13,940 I mean, you replay old data. 321 00:33:14,060 --> 00:33:16,560 This is a way of collecting data. 322 00:33:16,560 --> 00:33:18,900 So, I've actually written a program that will do this for you. 323 00:33:18,900 --> 00:33:20,700 But you can also do it for yourself. 324 00:33:22,420 --> 00:33:27,280 There's a reason you don't want to collect data in this format and then replay it. 325 00:33:27,440 --> 00:33:29,220 And the reason is you don't have a timestamp. 326 00:33:29,220 --> 00:33:30,580 You don't have relative timing. 327 00:33:30,840 --> 00:33:32,420 But more on that later. 328 00:33:33,820 --> 00:33:36,920 In any case, let me go back to this. 329 00:33:37,240 --> 00:33:42,420 So, like I said, there are a variety of ways where you can get the raw feed if you just want to see a raw feed. 330 00:33:43,280 --> 00:33:55,000 And one of the other things you can do, of course, is you can set up OpenCPN to display stuff that you are sending it from your computer. 331 00:33:55,000 --> 00:34:10,640 So, you can either set up OpenCPN to read from somebody else's TCP socket, or you can set up OpenCPN and write to OpenCPN. 332 00:34:10,660 --> 00:34:15,280 So, in this case, let's see. 333 00:34:15,280 --> 00:34:22,340 When I set up my network connection up here, you'll notice I was receiving input on this port. 334 00:34:22,800 --> 00:34:28,220 I can set up another port that I can then output on this port. 335 00:34:28,220 --> 00:34:41,140 So, what I now need is, if I have a program that will write to port 7777 on this computer, as I've configured it here, this provides another mechanism where I can show stuff. 336 00:34:41,140 --> 00:34:45,620 So, again, I'll be talking about that later on as well. 337 00:34:45,660 --> 00:35:03,220 So, in this case, what I did was I set something up where my serial port is an input port, network port, port 7777 is an output port, and this is what the debug window looks like, because it shows that I'm reading on the serial port and writing to port 7777. 338 00:35:03,380 --> 00:35:10,240 Again, there's a variety of ways of, you know, using OpenCPN for some really, really, you know, clever stuff. 339 00:35:12,160 --> 00:35:17,760 Anyway, so I mentioned this program that'll read for you. 340 00:35:17,760 --> 00:35:20,540 So, I have a program called Timestamp Data. 341 00:35:20,540 --> 00:35:21,960 It's on my website. 342 00:35:23,100 --> 00:35:26,860 It's software that's available, and we'll be making that available here. 343 00:35:26,860 --> 00:35:30,760 But if you run Timestamp Data, here's the help file. 344 00:35:31,140 --> 00:35:32,240 Excuse me. 345 00:35:32,240 --> 00:35:49,500 Again, you know, if you specify an IP address and a port number and whether you want to use TCP or UDP, defaults to TCP, you can now download data for, you know, some period of time. 346 00:35:49,500 --> 00:35:54,620 The program defaults to five minutes, but you could set it, you know, as far up to a week if you want. 347 00:35:55,560 --> 00:36:01,920 And what this will do is this will download the data and it will include a timestamp. 348 00:36:01,920 --> 00:36:09,860 So, what it does is, as it shows here, it creates a program or it creates an output file that looks like this. 349 00:36:09,860 --> 00:36:14,680 It's basically a pipe symbol delimited file. 350 00:36:15,220 --> 00:36:25,140 So, here you can see I've got, you know, the year, day, date, hour, minute, second, and then the Unix Epoch Time format of that. 351 00:36:25,520 --> 00:36:37,260 Now, the reason I'm using the pipe symbol is because if I let people choose their own delimiter, somebody will end up choosing a delimiter like a comma. 352 00:36:37,440 --> 00:36:42,320 Comma is not a unique character in an AIS message. 353 00:36:42,440 --> 00:36:46,960 There are a lot of symbols that you might see, so pipe, I knew, would be at least unique. 354 00:36:47,020 --> 00:36:52,440 If you don't like pipe, you can go into your text file and do a global search in place for a different delimiter. 355 00:36:52,440 --> 00:36:55,040 But just be careful that you don't duplicate something. 356 00:36:55,260 --> 00:37:09,020 The other thing is, by having here the relative timestamp, the message I just brought in, if I turn around and replay this, I can replay it and I get the same relative timing. 357 00:37:09,460 --> 00:37:13,840 So, you know, this really was not designed for a replay attack. 358 00:37:13,840 --> 00:37:22,340 It was designed so that I could gather data and then replay it in real time and, you know, actually see what was happening. 359 00:37:22,480 --> 00:37:27,640 Because I have another program called Play AIS, where I can replay this file. 360 00:37:27,640 --> 00:37:30,580 I can actually speed it up and slow it down, as well. 361 00:37:32,780 --> 00:37:37,240 Anyway, so I've already talked a little bit about sending data to OpenCPN. 362 00:37:37,440 --> 00:37:42,000 If you don't have a timestamp, everything just overwrites itself. 363 00:37:42,020 --> 00:37:54,260 And so, if you've got, like, 10 AIS messages from the same vessel and you replay the file, what you'll see is the last message, because the first nine got overwritten by all the following ones. 364 00:37:55,280 --> 00:38:02,880 Another tool you should know about for this is, there's a really, really cool NMEA simulator. 365 00:38:03,440 --> 00:38:11,940 And it generates NMEA sentences and, or AIS sentences, and it is really, really a cool program. 366 00:38:11,980 --> 00:38:15,380 For good or for bad, it only runs on Chrome. 367 00:38:16,940 --> 00:38:18,220 Can't explain that. 368 00:38:18,220 --> 00:38:21,720 This is the only application I actually run Chrome on. 369 00:38:22,380 --> 00:38:32,900 But, as you can see here from the dashboard and the other ways in which you can set this up, you can pretty much simulate whatever you'd like. 370 00:38:32,900 --> 00:38:35,320 You can put yourself in a particular position. 371 00:38:35,320 --> 00:38:38,300 You can get your vessel headed in a certain direction. 372 00:38:38,340 --> 00:38:40,160 You can give yourself a rate of turn. 373 00:38:40,160 --> 00:38:42,220 You can do all sorts of cool things. 374 00:38:42,220 --> 00:38:50,580 And then what you can do is, you can hook yourself up to a server and you can actually output the information that the simulator is creating. 375 00:38:50,580 --> 00:38:54,620 So, you could create information such as this. 376 00:38:54,920 --> 00:38:58,740 I can set up my simulator. 377 00:38:58,800 --> 00:39:04,900 I have it right to OpenCPN and then I can have it, you know, play on OpenCPN. 378 00:39:04,900 --> 00:39:07,340 It's really, really a cool tool. 379 00:39:09,560 --> 00:39:14,520 So, last but not least, how do you interpret this data? 380 00:39:14,800 --> 00:39:24,120 For those of you who like to get into code, Eric Raymond has a AIS protocol decoding page. 381 00:39:24,640 --> 00:39:25,840 You can see it's purple. 382 00:39:25,840 --> 00:39:27,160 I go there a lot. 383 00:39:28,040 --> 00:39:31,960 And, well, I mean, I may as well go there. 384 00:39:32,960 --> 00:39:41,400 He has here, like I said, a lot of information about the NMEA 0183 format. 385 00:39:41,400 --> 00:39:49,480 Not only the format, but what all the messages are, what the contents are, to a certain degree, how to encode the contents. 386 00:39:50,480 --> 00:39:56,420 AIS does not show information in any clear way that a human can understand. 387 00:39:57,100 --> 00:40:00,560 So, for example, you know, we've already seen a couple of these. 388 00:40:00,560 --> 00:40:09,300 This message right here, where I'm sort of moving my mouse, the AIVDM, comma, one, comma, one, comma, comma, A, comma, you know, all that jazz. 389 00:40:09,700 --> 00:40:13,780 There's a special encapsulation method that AIS messages use. 390 00:40:14,540 --> 00:40:22,180 Eric's page talks a little bit about that, how you can get everything into a 6-bit and armored ASCII and all that kind of stuff. 391 00:40:22,340 --> 00:40:35,360 But what you can do is you can take these AIS messages that you get, and you can go to a place such as the site I've gone to here, is Meritech Solutions, plop in the AIS message, and it will interpret it for you. 392 00:40:36,500 --> 00:40:42,480 There are a whole bunch of other AIS parsers online, and I've given you some links on my page here. 393 00:40:43,280 --> 00:40:52,520 And I've written a bunch of tools for this, because for some of the research that I wanted to do, I was trying to create some unique AIS messages. 394 00:40:53,020 --> 00:40:54,960 And so, I had to create a parser. 395 00:40:54,960 --> 00:41:05,020 So, I actually have an entire suite of tools, and we'll talk a little bit more with the AIS spoofing stuff. 396 00:41:05,360 --> 00:41:09,800 But if you go to my software page, you can download all of these. 397 00:41:09,800 --> 00:41:24,000 But if I take that same message, or I guess it's not the same message as was above, but some AIS message, and if all of my stuff is command line, and it's all written in Perl, don't get me started on why. 398 00:41:24,880 --> 00:41:28,600 And, in any case, it'll interpret, you know, the sentence for you. 399 00:41:28,700 --> 00:41:33,500 This is, in fact, an AIS mobile device. 400 00:41:33,620 --> 00:41:44,260 It's a VDM, meaning it's a VHF data link message, which is a nice way of saying, this is a message coming from another boat, as opposed to my message going out. 401 00:41:45,060 --> 00:41:49,420 Here's all the contents of a type one message, which this is. 402 00:41:49,420 --> 00:41:53,420 It's a class A big boat position report. 403 00:41:53,480 --> 00:41:56,500 Here's the device identifier. 404 00:41:56,500 --> 00:41:59,720 Every device has a unique nine digit identifier. 405 00:42:00,220 --> 00:42:07,120 This gives you all the other information, including longitude and a URL, so that you can click if you want. 406 00:42:08,720 --> 00:42:14,580 And there are a number of places where you can get data. 407 00:42:14,580 --> 00:42:18,920 I've already mentioned the site that is at my university. 408 00:42:19,540 --> 00:42:28,380 You can also go to places like AIS hub, and they also have a whole bunch of information. 409 00:42:28,660 --> 00:42:35,360 There are some other places online, if you can find them, that give you some more localized information. 410 00:42:35,600 --> 00:42:40,480 If you find more places you'd like to share with me, I would be delighted to have you there with me. 411 00:42:41,620 --> 00:43:01,780 And the format that we most commonly see over the air, like I keep saying, NMEA is the National Maritime Electronics Association, and the 0183 standard, which is about circa 1986, that's still the most commonly used standard that we see. 412 00:43:02,460 --> 00:43:07,460 In about 1999, they came out with NMEA 2000. 413 00:43:07,600 --> 00:43:12,040 As we speak, we're getting prepared to release the OneNet standard. 414 00:43:12,040 --> 00:43:20,600 It is very, very difficult to find out how to do any of the coding on 2000 or OneNet, because it's all highly proprietary. 415 00:43:21,820 --> 00:43:25,480 And everybody who has a copy signs a non-disclosure agreement. 416 00:43:25,480 --> 00:43:29,100 But there is a project called the CanBoat project. 417 00:43:29,980 --> 00:43:34,720 The CanBus is used with NMEA 2000. 418 00:43:34,820 --> 00:43:40,380 IP version 6 is used as the transmission for OneNet. 419 00:43:41,360 --> 00:43:45,680 NMEA 0183, basically everything runs over a serial bus. 420 00:43:45,960 --> 00:43:52,460 So a lot of the stuff that I'm showing you here with OpenCPN, we're pulling in from over the air. 421 00:43:52,460 --> 00:43:58,940 It turns out, if you can get onto the serial bus, you can get information right off the boat. 422 00:43:59,920 --> 00:44:17,380 And there are a variety of ways... I'm not going to get into that here, but there's a variety of ways of injecting messages directly on the boat, either through the CanBus, if you're NMEA 2000, and or through the serial on NMEA 0183. 423 00:44:18,180 --> 00:44:24,160 So I'm going to go back here for just a second. 424 00:44:24,620 --> 00:44:27,060 Everybody can see now. 425 00:44:27,600 --> 00:44:32,220 I mean, this is basically what I have on the device. 426 00:44:33,640 --> 00:44:40,440 And so, I certainly would like to leave this open to questions, if I have said anything, for which you have questions. 427 00:44:47,040 --> 00:44:49,860 Scrolling back up here to see if I can find the... 428 00:44:52,780 --> 00:44:55,180 AIS text appears closed. 429 00:44:55,240 --> 00:45:01,700 So, anyway, does anybody have questions that you want to ask, or anything like that? 430 00:45:08,160 --> 00:45:09,740 I'm detecting silence. 431 00:45:21,300 --> 00:45:24,400 Well, I'm going to hang around here for a few minutes. 432 00:45:24,460 --> 00:45:30,500 I've got another talk in about 18 minutes, but I'm going to stay connected until then. 433 00:45:30,500 --> 00:45:34,540 So, if anybody has anything, feel free to ask away. 434 00:45:37,520 --> 00:45:38,140 Oh, okay. 435 00:45:38,140 --> 00:45:42,140 How close do you have to be to receive signals is one of the questions I just got. 436 00:45:42,140 --> 00:45:52,640 So, I didn't really go into the AIS protocol, but the AIS protocol is basically designed for ships to talk to each other within about a 10 to 20 nautical mile range. 437 00:45:53,620 --> 00:45:58,700 So, obviously, you're going to get messages further away if your antenna is higher up. 438 00:45:58,700 --> 00:46:10,940 My antenna at my building at work is 75 feet high, and I have gotten messages from as much as 80 or 90 miles. 439 00:46:11,300 --> 00:46:25,040 With a normal ship antenna that might only be, let's say, at most probably 10 to 15 meters high, they're probably getting, you know, the 15 to 20 mile range. 440 00:46:50,700 --> 00:46:52,160 Okay, let's see. 441 00:46:52,160 --> 00:46:56,260 I just got a message asking about the Trend microlibrary. 442 00:46:56,480 --> 00:47:01,820 So, I actually haven't... oops, let's see. 443 00:47:01,820 --> 00:47:03,520 I have to get back to my video now. 444 00:47:03,760 --> 00:47:06,440 Ah, never change a working thing. 445 00:47:07,260 --> 00:47:14,300 So, at my website, I talk about the AIS Black Toolkit, and I'll talk a little bit more about that later on. 446 00:47:14,300 --> 00:47:24,860 So, a team of people from Trend Micro, led by a fellow named Marco Balduzzi, has been talking about AIS issues for a long time. 447 00:47:25,000 --> 00:47:34,840 In any case, the AIS Black Toolkit is a Python-based toolkit where they also wanted to be able to generate any AIS messages that they wanted. 448 00:47:35,160 --> 00:47:40,940 And so, I've used their toolkit a little bit. 449 00:47:41,180 --> 00:47:50,380 I've not used the part of their toolkit where they actually push out messages using software-defined libraries or software-defined radio. 450 00:47:51,880 --> 00:48:00,700 Their messages were basically a demonstration of capability that they could do it, but they used a lot of defaults that put them like in Italy and stuff like that. 451 00:48:00,840 --> 00:48:07,180 So, when I built my tools, they were a little bit inspired by, you know, what they did. 452 00:48:07,180 --> 00:48:13,540 But I tried to build it so that I used defaults per the standards so that I could create legal messages. 453 00:48:13,640 --> 00:48:18,160 But a lot of you may be familiar with the program HPing3. 454 00:48:18,160 --> 00:48:23,380 It allows you to build any TCPIP message you want, no matter how bogus. 455 00:48:23,980 --> 00:48:28,120 So, I was inspired to call my stuff AIS Ping for that reason. 456 00:48:28,120 --> 00:48:30,280 I mean, I can build legal AIS messages. 457 00:48:30,280 --> 00:48:36,200 I can also build entirely bogus AIS messages, because AIS won't stop me from doing it. 458 00:48:36,420 --> 00:48:40,100 And that's one of the protocol vulnerabilities. 459 00:48:40,720 --> 00:48:43,160 And again, I'll talk more about that later on. 460 00:48:43,440 --> 00:48:54,280 But, in any case, I had success using the AIS block toolkit, but I haven't used the block toolkit probably in a year, year and a half. 461 00:48:54,820 --> 00:49:02,300 I am pleased to say that one of my programs found its way into the block toolkit, the menu program, but the rest of it's on my site. 462 00:49:07,640 --> 00:49:11,200 Is the CAN project the only NMEA 2000 project? 463 00:49:11,300 --> 00:49:13,280 Now, I'm going to have to go look at that one. 464 00:49:13,280 --> 00:49:14,740 Hang on just a second. 465 00:49:15,160 --> 00:49:17,180 I'm going to run over to Slack, here. 466 00:49:19,720 --> 00:49:21,080 Let's see. 467 00:49:21,080 --> 00:49:24,960 Is the CAN project the only NMEA 2000 project you know of? 468 00:49:26,220 --> 00:49:27,560 It is. 469 00:49:27,640 --> 00:49:31,520 It's the only, well, by the standard, that's what it runs over. 470 00:49:31,600 --> 00:49:35,940 So, the problem with NMEA 2000, like I said, is it's proprietary. 471 00:49:36,080 --> 00:49:37,500 You need to buy the standard. 472 00:49:38,060 --> 00:49:46,820 I have a copy of the standard, with permission, and when they sent it to me for research purposes, it's actually watermarked with my name in it. 473 00:49:47,440 --> 00:49:52,120 They really are trying to discourage people from, you know, spreading the thing around. 474 00:49:52,760 --> 00:49:57,000 And everybody has to sign a non -disclosure saying that they won't release it. 475 00:49:58,600 --> 00:50:01,320 And it's been around for 20 years, and nobody's released it yet. 476 00:50:01,320 --> 00:50:03,380 So, they must be reasonably successful. 477 00:50:24,860 --> 00:50:25,860 Got a message. 478 00:50:25,860 --> 00:50:28,040 They're waiting for one more message. 479 00:51:03,130 --> 00:51:05,590 Oh, let me try the AIS text. 480 00:51:05,590 --> 00:51:07,570 There's maybe a message there. 481 00:51:14,560 --> 00:51:15,400 Okay. 482 00:51:16,320 --> 00:51:24,000 Redoubt's making a comment here about DEF CON 2016 open source project release for the J1939 truck duck. 483 00:51:24,840 --> 00:51:25,540 Okay. 484 00:51:25,540 --> 00:51:26,920 Good to know. 485 00:51:28,460 --> 00:51:31,260 Redacted by people willing to help port it. 486 00:51:32,120 --> 00:51:37,780 Well, where I come from, reverse engineering is a noble cause. 487 00:51:55,440 --> 00:52:00,720 When I was a young person, first in computers, I probably shouldn't age myself too much. 488 00:52:00,720 --> 00:52:01,500 Nothing. 489 00:52:01,500 --> 00:52:03,760 First of all, nobody had ever heard of open source. 490 00:52:04,440 --> 00:52:07,880 And the two words, didn't exist. 491 00:52:07,960 --> 00:52:09,560 Everything was proprietary. 492 00:52:09,840 --> 00:52:13,800 The only way to learn anything was to break the computer. 493 00:52:13,980 --> 00:52:18,800 And once you realize that you broke it, I mean, I was of a mind, once I broke it, I only had to break it once. 494 00:52:19,840 --> 00:52:27,940 Because computer security in the 1970s was when you broke something and you went to the network people and said, hey, if you do X, Y, and Z, your network will break. 495 00:52:27,940 --> 00:52:29,920 Their answer was, well, don't do that. 496 00:52:30,120 --> 00:52:32,620 We would say, oh, okay, we won't. 497 00:52:32,620 --> 00:52:33,820 We'll go do something else. 498 00:52:35,500 --> 00:52:37,140 But that's how you learn stuff. 499 00:53:25,340 --> 00:53:33,600 Well, I'll tell you what, I have that it is 250 where I am, so it must be 1150 back on the coast. 500 00:53:35,440 --> 00:53:43,140 If there's, like I said, I'm going to hang around for another 10 minutes or so for my next talk, but I'll, I'm prepared to close it now. 501 00:53:43,740 --> 00:53:45,240 You know, thanks for the questions. 502 00:53:45,240 --> 00:53:46,220 Thanks for being here. 503 00:53:46,760 --> 00:53:53,140 If you have any questions, if you get to my website, or any of those that are here, there's tons of ways to get ahold of me. 504 00:53:53,140 --> 00:53:55,580 Feel free to do that. 505 00:53:55,580 --> 00:53:57,160 I love talking about this stuff. 506 00:53:57,160 --> 00:53:59,060 Happy to help out in any way I can. 507 00:53:59,520 --> 00:54:06,220 And in about 10 minutes, I'll start talking a little bit about GPS spoofing and AIS spoofing and all that kind of stuff.