[00:06.690 --> 00:11.070] Hey everyone, today I'll show you how to set up a Raspberry Pi CubeSat Simulator. [00:11.150 --> 00:15.090] Now, this setup might go a bit quick, so feel free to pause and go back if you need to. [00:15.090 --> 00:19.090] I've also posted these instructions on GitHub so you can copy and paste the commands. [00:21.930 --> 00:26.070] The first step is to download the Raspbian OS and write it to the microSD card [00:26.070 --> 00:28.730] that will act as the Raspberry Pi's hard drive. [00:28.730 --> 00:34.030] I use Rufus for this, but there are many other tools capable of writing the operating system to the card. [00:36.110 --> 00:40.250] Be careful when you're writing to the card that you don't accidentally nuke your hard drive. [00:40.250 --> 00:42.790] Just make sure that the microSD card is selected. [00:46.740 --> 00:51.960] Once this step is complete, you'll want to eject your microSD card and then reinsert it back into your computer, [00:51.960 --> 00:54.440] so that a drive called boot appears. [00:54.440 --> 00:58.340] Next, create a blank text file called ssh.txt. [01:03.820 --> 01:10.200] Then you'll want to remove the .txt extension so that the file is just a plain ssh file, [01:10.200 --> 01:11.740] as you can see in this picture. [01:15.200 --> 01:18.140] This simply enables ssh on your Raspberry Pi, [01:18.140 --> 01:21.640] and this will allow you to access it without a monitor, keyboard, or mouse. [01:21.740 --> 01:25.880] Now once the file is created, eject the microSD card and insert it into your Pi. [01:25.880 --> 01:28.900] Then connect networking and then power to the Raspberry Pi. [01:31.660 --> 01:34.600] Once connected to power, your Raspberry Pi will boot up. [01:34.600 --> 01:36.860] We'll now attempt to find it on your local network. [01:36.860 --> 01:41.520] Open up a command prompt and type ipconfig, as you can see in this screenshot. [01:44.850 --> 01:48.250] Hit enter, and look for the line dns-suffix. [01:48.250 --> 01:51.630] There might be a lot of information here, and so you might have to scroll up. [01:51.630 --> 01:58.390] But as you can see for mine, it's local domain, and the default gateway is 192.168.11.1. [02:01.530 --> 02:05.330] You'll now attempt to ping the Raspberry Pi by issuing the following command. [02:05.330 --> 02:08.090] Replace local domain with your dns-suffix. [02:08.090 --> 02:10.450] And with luck, you'll receive a ping back. [02:13.370 --> 02:19.610] For my system, I'll type ping raspberrypi.localdomain. [02:21.630 --> 02:27.150] Once you have the IP address of your Raspberry Pi, you'll install PuTTY or another SSH client of your choice. [02:27.150 --> 02:32.470] You'll then use the default credentials pi and raspberry to log in, all lowercase. [02:36.800 --> 02:40.200] Now that you have secure access to your Raspberry Pi through SSH, [02:40.200 --> 02:44.720] the first thing you'll want to do is to change your password and make sure your Raspberry Pi is fully up to date. [02:44.720 --> 02:48.040] Keep in mind this process may take a while, so be patient. [02:53.780 --> 02:57.020] I'm going to skip through this long process in the interest of time. [02:57.040 --> 03:00.260] However, when your Raspberry Pi is done upgrading and updating, [03:00.260 --> 03:05.080] I would recommend copying and pasting the commands from GitHub to get everything installed properly. [03:09.750 --> 03:13.650] Copying and pasting the commands from GitHub will install a variety of useful tools, [03:13.650 --> 03:17.470] including the CubeSat simulator software, the FM transmitting software, [03:17.470 --> 03:20.170] the signal decoder, and signal encoding software. [03:20.230 --> 03:23.710] I've included a bit of the manual steps here to illustrate the process. [03:23.710 --> 03:26.110] However, this is fully covered in the written instructions, [03:26.110 --> 03:28.790] and it might save you a lot of time and a lot of typing. [05:10.750 --> 05:14.210] I'm going to cut the software installation there, just to save time. [05:14.230 --> 05:17.170] Next, we'll want to run sudo raspi-config. [05:17.170 --> 05:20.970] This command will allow us to customize our Raspberry Pi just a little bit. [05:27.480 --> 05:29.080] We can do a couple things here. [05:29.080 --> 05:31.900] We can change our password, change the hostname of the Raspberry Pi, [05:31.900 --> 05:34.680] connect the Raspberry Pi to Wi-Fi, set the local time, [05:34.680 --> 05:39.100] and expand our operating system to use all of the space on the microSD card. [06:18.090 --> 06:20.410] Once you've finished with your customizations, [06:20.410 --> 06:23.070] navigate to Finish, and then reboot the Raspberry Pi. [06:23.070 --> 06:27.030] I connected my Pi to Wi-Fi, added the antenna to the left side, [06:27.030 --> 06:30.370] 4th pin down, and connected the Pi to a portable battery. [06:36.920 --> 06:39.220] If you check out the GitHub repository, [06:39.220 --> 06:41.680] there is a clear example for how to place the antenna. [06:41.720 --> 06:43.460] However, you may not even need it at all, [06:43.460 --> 06:47.420] depending on how far away your FM receiver is from the Raspberry Pi. [06:52.590 --> 06:57.230] Now you should be able to run the following command within the cubesat-sim directory. [06:57.370 --> 07:00.590] You'll see that the program is playing the cw.wav file, [07:00.590 --> 07:04.470] and by default will broadcast on 107.9 FM. [07:04.510 --> 07:08.150] However, this can easily be changed if there's already a station on that channel. [07:25.200 --> 07:29.800] In this next screen clip, you'll see my Baofeng radio tuned to 107.9, [07:29.800 --> 07:33.240] picking up the cw.wav sound file that's being played. [07:33.320 --> 07:35.580] If you manually decode the Morse code, [07:35.580 --> 07:38.420] you'll notice that it is satellite telemetry information. [07:38.460 --> 07:40.960] This process would be tedious to do manually. [07:40.960 --> 07:43.860] Luckily, computers are great at doing this kind of work. [08:09.920 --> 08:12.440] Now that we know we can transmit a signal, [08:12.440 --> 08:16.800] we'll next install the software required to decode the telemetry information, [08:16.800 --> 08:19.840] in addition to the software used to encode our own messages. [08:22.460 --> 08:25.380] Before installing, run a cd or change directory [08:25.380 --> 08:28.400] to make sure that we're in the right Pi home directory. [08:28.400 --> 08:30.100] So I'll issue that command right now. [08:30.100 --> 08:32.700] As you can see, we're in the Pi home directory. [08:34.720 --> 08:37.180] We can next run an ls command or list command [08:37.180 --> 08:40.280] to see what other directories or files are currently in the home directory. [08:40.280 --> 08:42.000] And you can see we have the desktop folder [08:42.000 --> 08:45.360] as well as the cubesat-sim folder that we just installed. [08:47.160 --> 08:49.460] For this next step, I highly recommend [08:49.460 --> 08:51.900] copying and pasting the commands from GitHub. [08:52.220 --> 08:54.080] So now we're going to copy the command [08:54.080 --> 08:58.360] for the program multimon-ng. [08:59.520 --> 09:00.860] Hit enter. [09:01.140 --> 09:02.860] And it should take care of everything [09:02.860 --> 09:05.820] as the command is completely combined together. [09:09.700 --> 09:12.400] This shouldn't take too long, I'm going to do it in real time. [09:16.940 --> 09:18.960] And there you go, it brings you back to the home directory [09:18.960 --> 09:20.220] and everything's all built. [09:20.220 --> 09:22.360] If we issue an ls command, [09:22.360 --> 09:24.220] you'll see that now we have the folder [09:24.220 --> 09:27.080] multimon-ng, which is now installed. [09:28.700 --> 09:30.760] We'll now copy the additional command [09:30.760 --> 09:33.120] to install the cw encoder. [09:34.260 --> 09:36.040] And again, I'll just hit enter, [09:36.040 --> 09:38.200] and it should take care of everything in real time. [09:38.880 --> 09:40.280] Run the ls command, [09:40.280 --> 09:41.380] and now we can see that we have [09:41.380 --> 09:45.360] cubesat-sim, cw-wave, desktop, and multimon-ng, [09:45.360 --> 09:47.500] all successfully there and installed. [09:50.920 --> 09:53.480] In this next step, you'll be required to use [09:53.480 --> 09:56.560] your RTL-SDR or your software-defined radio. [09:58.780 --> 10:01.380] It's typically best to shut down your Raspberry Pi [10:01.380 --> 10:04.120] and then plug in the RTL-SDR [10:04.120 --> 10:06.580] into the USB port of the Raspberry Pi [10:06.580 --> 10:09.260] to prevent any power issues or brownouts. [10:10.460 --> 10:12.840] Once you've plugged in your software-defined radio [10:12.840 --> 10:15.640] into your Raspberry Pi, [10:15.640 --> 10:17.580] you should be able to reconnect power [10:17.580 --> 10:20.040] and then boot everything up just as before. [10:20.220 --> 10:22.440] As you can see, I have two windows open [10:22.440 --> 10:24.060] to PuTTY that we're going to use [10:24.060 --> 10:25.920] to access the Raspberry Pi. [10:26.380 --> 10:28.260] Now, if you're a normal Linux user, [10:28.260 --> 10:30.020] you can feel free to use tmux or screen. [10:30.020 --> 10:31.440] Sometimes it's just easier for anybody [10:31.440 --> 10:33.080] who's new to Linux to open up two screens [10:33.080 --> 10:34.860] so that they can have two different command windows [10:34.860 --> 10:36.200] on the same system. [10:38.500 --> 10:40.820] We are going to use one PuTTY session to transmit [10:40.820 --> 10:43.200] and the other one to receive a message. [10:43.500 --> 10:45.680] So, all we're going to do is copy and paste [10:45.680 --> 10:47.480] from GitHub just like before. [10:49.560 --> 10:52.440] In order to listen to the sound that's being transmitted, [10:52.440 --> 10:56.340] we're going to cd into the multimon-ng and build directory. [10:56.340 --> 10:58.260] Again, copy and paste this from GitHub. [10:58.700 --> 11:00.600] Now that we're in this directory, [11:00.600 --> 11:02.840] we can copy the next command, [11:02.840 --> 11:05.540] which you'll see here in a second. [11:05.540 --> 11:09.420] This will use the RTL-SDR to receive on FM. [11:10.400 --> 11:13.180] On 107.5 FM. [11:13.180 --> 11:15.200] That M stands for megahertz. [11:15.260 --> 11:16.840] The dash S is the sample rate. [11:16.840 --> 11:18.260] Always keep this as 48,000. [11:18.260 --> 11:19.720] I'm not going to explain that right now, [11:19.720 --> 11:21.620] but just keep that number the same. [11:21.620 --> 11:24.740] We're going to pipe this output to multimon-ng [11:24.740 --> 11:27.200] and we're going to accept raw format [11:27.200 --> 11:30.880] and we're going to use the morse underscore cw encoder. [11:30.880 --> 11:34.760] And we're going to accept input from dev standard input. [11:35.520 --> 11:38.160] So when you run this command and you hit enter, [11:38.160 --> 11:42.220] you'll see it'll start up with all the settings. [11:42.540 --> 11:43.640] And we'll just leave this for now. [11:43.640 --> 11:45.120] We'll go to the next window. [11:46.400 --> 11:48.300] Again, copying and pasting from GitHub. [11:48.300 --> 11:51.100] We are going to cd into the cubesatsim directory. [11:51.200 --> 11:52.440] So cd cubesatsim. [11:52.440 --> 11:54.300] And you can do tab to tab complete. [11:55.440 --> 11:58.380] And now we're going to transmit the same cw.wav file [11:58.380 --> 11:59.540] that we did before. [12:01.960 --> 12:04.900] If you have your Baofeng or another FM radio on, [12:04.900 --> 12:05.780] you'll hear this. [12:05.780 --> 12:08.400] As you can see, I've added an additional flag, [12:08.400 --> 12:11.240] which is .freq, which stands for frequency. [12:11.240 --> 12:13.340] So this will play on 107.5, [12:13.340 --> 12:15.560] as that's a clear station in my neighborhood. [12:18.170 --> 12:20.450] As you can see, it's transmitting just as before. [12:20.450 --> 12:22.090] And if we go to this other screen, [12:22.090 --> 12:25.830] we should see that it starts decoding a message. [12:30.640 --> 12:32.500] So if you let this play out for a while, [12:32.500 --> 12:34.560] which I will do, I'll let it pause, [12:34.560 --> 12:37.220] you'll be able to see that this is telemetry information, [12:37.220 --> 12:39.760] or I guess I should say sample telemetry information, [12:39.760 --> 12:41.260] that would be coming from a satellite. [12:41.960 --> 12:43.400] And if you were listening to this on your Baofeng, [12:43.400 --> 12:45.860] you'd be hearing a significant number of [12:45.860 --> 12:49.080] just Morse code sounding encoded transmissions. [12:52.520 --> 12:53.980] I'll pause it right now. [12:55.300 --> 12:56.720] As you can see, after a while, [12:56.720 --> 12:58.560] there's a lot more telemetry information. [12:58.660 --> 13:01.500] Now, I'm not going to go into the specifics of what this telemetry data is, [13:01.500 --> 13:02.720] since it's just a sample, [13:02.720 --> 13:04.400] but I thought it would be next kind of neat [13:04.400 --> 13:07.760] to show you how to transmit your own Morse code encoded signals. [13:13.310 --> 13:14.750] Now, in the next step of this, [13:14.750 --> 13:16.990] I am going to show you how to create your own message [13:16.990 --> 13:20.410] and how to encode your own text into a WAV file message. [13:20.410 --> 13:22.890] So we're going to cd to make sure we're back in the home directory, [13:22.890 --> 13:23.910] which I've already done. [13:23.970 --> 13:28.630] Now we're going to cd into the CWWAV directory, [13:28.630 --> 13:30.210] and you can see that now we're in that directory, [13:30.210 --> 13:31.550] issuing the ls command. [13:31.550 --> 13:37.570] And now I'm going to copy and paste some sample text from GitHub. [13:37.630 --> 13:39.310] And so you can see this is going to run the echo command, [13:39.310 --> 13:41.570] and anything in between the double quotations, [13:41.570 --> 13:45.070] it will put into that message.txt file. [13:45.170 --> 13:47.570] So issuing that command, we don't get any output, [13:47.570 --> 13:52.330] but if we are to cat that same message.txt folder, [13:52.330 --> 13:54.610] we'll see, oh, sample message to transmit. [13:55.310 --> 14:00.550] The next step of this is going to be to convert that message.txt file [14:00.550 --> 14:04.010] into a message.wav file or an audio file. [14:05.870 --> 14:07.710] So again, I'll copy from GitHub. [14:07.930 --> 14:10.070] So now I'm going to execute the CWWAV command [14:10.070 --> 14:12.350] with a sample rate of 48,000. [14:12.350 --> 14:14.970] Don't worry about it, just always make sure that's 48,000. [14:15.150 --> 14:17.610] The output file is going to be message.wav, [14:17.610 --> 14:21.750] and the text that we're going to use is the file message.txt. [14:21.910 --> 14:25.650] We're going to hit enter, process the file message.txt. [14:25.650 --> 14:30.070] If we ls, we can now see in that light blue that there's a message.wav file [14:30.070 --> 14:31.630] that we can now play. [14:34.930 --> 14:39.050] I'm going to now cd up a directory, so cd.. [14:39.560 --> 14:43.210] and now cd back into the cubesat-sim directory. [14:43.350 --> 14:45.890] And now I'm going to issue a very similar command [14:45.890 --> 14:49.310] to what we did previously that played the sample command, [14:49.310 --> 14:53.870] only this time you'll notice that the audio file is now [14:53.870 --> 14:57.770] the message.wav file that we just created. [14:58.390 --> 15:01.810] So now if I hit enter on this, it'll be in transmitting. [15:03.130 --> 15:06.090] And if I fire back up our software-defined radio, [15:06.090 --> 15:08.790] with any luck we should see our sample message shortly. [15:10.190 --> 15:13.850] So you can see it had a little bit of error at the beginning, [15:13.850 --> 15:17.850] but now that we're actually in it, we can see that it's decoding it properly. [15:22.130 --> 15:24.150] Now, this may seem a little lame [15:24.150 --> 15:28.270] that you're sending and receiving a message on the same Raspberry Pi. [15:28.270 --> 15:32.130] However, you can set this up on multiple Raspberry Pis or on multiple computers [15:32.130 --> 15:35.830] and you can essentially take this and send messages back and forth [15:35.830 --> 15:37.630] between two different devices. [15:39.810 --> 15:44.550] And this is really just to get your feet wet and show you how you can decode incoming signals [15:44.550 --> 15:48.010] using an RTL-SDR and also how to transmit FM [15:48.010 --> 15:52.070] signals, basically just to test out your knowledge of how things are encoded [15:52.070 --> 15:55.170] and how different signals are processed and created. [15:58.810 --> 16:02.410] Hopefully you've enjoyed this, and I would recommend that if this all [16:02.410 --> 16:06.470] makes sense to you, to try and play with the AFSK encodings that are also [16:06.470 --> 16:10.130] provided in the CubeSat SIM directory. It's a different type of message encoding [16:10.130 --> 16:13.690] and it might be a little interesting to look at it and see if you can decode it.