1 00:00:06,690 --> 00:00:11,070 Hey everyone, today I'll show you how to set up a Raspberry Pi CubeSat Simulator. 2 00:00:11,150 --> 00:00:15,090 Now, this setup might go a bit quick, so feel free to pause and go back if you need to. 3 00:00:15,090 --> 00:00:19,090 I've also posted these instructions on GitHub so you can copy and paste the commands. 4 00:00:21,930 --> 00:00:28,730 The first step is to download the Raspbian OS and write it to the microSD card that will act as the Raspberry Pi's hard drive. 5 00:00:28,730 --> 00:00:34,030 I use Rufus for this, but there are many other tools capable of writing the operating system to the card. 6 00:00:36,110 --> 00:00:40,250 Be careful when you're writing to the card that you don't accidentally nuke your hard drive. 7 00:00:40,250 --> 00:00:42,790 Just make sure that the microSD card is selected. 8 00:00:46,740 --> 00:00:54,440 Once this step is complete, you'll want to eject your microSD card and then reinsert it back into your computer, so that a drive called boot appears. 9 00:00:54,440 --> 00:00:58,340 Next, create a blank text file called ssh.txt. 10 00:01:03,820 --> 00:01:11,740 Then you'll want to remove the .txt extension so that the file is just a plain ssh file, as you can see in this picture. 11 00:01:15,200 --> 00:01:21,640 This simply enables ssh on your Raspberry Pi, and this will allow you to access it without a monitor, keyboard, or mouse. 12 00:01:21,740 --> 00:01:25,880 Now once the file is created, eject the microSD card and insert it into your Pi. 13 00:01:25,880 --> 00:01:28,900 Then connect networking and then power to the Raspberry Pi. 14 00:01:31,660 --> 00:01:34,600 Once connected to power, your Raspberry Pi will boot up. 15 00:01:34,600 --> 00:01:36,860 We'll now attempt to find it on your local network. 16 00:01:36,860 --> 00:01:41,520 Open up a command prompt and type ipconfig, as you can see in this screenshot. 17 00:01:44,850 --> 00:01:48,250 Hit enter, and look for the line dns-suffix. 18 00:01:48,250 --> 00:01:51,630 There might be a lot of information here, and so you might have to scroll up. 19 00:01:51,630 --> 00:01:58,390 But as you can see for mine, it's local domain, and the default gateway is 192.168.11.1. 20 00:02:01,530 --> 00:02:05,330 You'll now attempt to ping the Raspberry Pi by issuing the following command. 21 00:02:05,330 --> 00:02:08,090 Replace local domain with your dns-suffix. 22 00:02:08,090 --> 00:02:10,450 And with luck, you'll receive a ping back. 23 00:02:13,370 --> 00:02:19,610 For my system, I'll type ping raspberrypi.localdomain. 24 00:02:21,630 --> 00:02:27,150 Once you have the IP address of your Raspberry Pi, you'll install PuTTY or another SSH client of your choice. 25 00:02:27,150 --> 00:02:32,470 You'll then use the default credentials pi and raspberry to log in, all lowercase. 26 00:02:36,800 --> 00:02:44,720 Now that you have secure access to your Raspberry Pi through SSH, the first thing you'll want to do is to change your password and make sure your Raspberry Pi is fully up to date. 27 00:02:44,720 --> 00:02:48,040 Keep in mind this process may take a while, so be patient. 28 00:02:53,780 --> 00:02:57,020 I'm going to skip through this long process in the interest of time. 29 00:02:57,040 --> 00:03:05,080 However, when your Raspberry Pi is done upgrading and updating, I would recommend copying and pasting the commands from GitHub to get everything installed properly. 30 00:03:09,750 --> 00:03:20,170 Copying and pasting the commands from GitHub will install a variety of useful tools, including the CubeSat simulator software, the FM transmitting software, the signal decoder, and signal encoding software. 31 00:03:20,230 --> 00:03:23,710 I've included a bit of the manual steps here to illustrate the process. 32 00:03:23,710 --> 00:03:28,790 However, this is fully covered in the written instructions, and it might save you a lot of time and a lot of typing. 33 00:05:10,750 --> 00:05:14,210 I'm going to cut the software installation there, just to save time. 34 00:05:14,230 --> 00:05:17,170 Next, we'll want to run sudo raspi-config. 35 00:05:17,170 --> 00:05:20,970 This command will allow us to customize our Raspberry Pi just a little bit. 36 00:05:27,480 --> 00:05:29,080 We can do a couple things here. 37 00:05:29,080 --> 00:05:39,100 We can change our password, change the hostname of the Raspberry Pi, connect the Raspberry Pi to Wi-Fi, set the local time, and expand our operating system to use all of the space on the microSD card. 38 00:06:18,090 --> 00:06:23,070 Once you've finished with your customizations, navigate to Finish, and then reboot the Raspberry Pi. 39 00:06:23,070 --> 00:06:30,370 I connected my Pi to Wi-Fi, added the antenna to the left side, 4th pin down, and connected the Pi to a portable battery. 40 00:06:36,920 --> 00:06:41,680 If you check out the GitHub repository, there is a clear example for how to place the antenna. 41 00:06:41,720 --> 00:06:47,420 However, you may not even need it at all, depending on how far away your FM receiver is from the Raspberry Pi. 42 00:06:52,590 --> 00:06:57,230 Now you should be able to run the following command within the cubesat-sim directory. 43 00:06:57,370 --> 00:07:04,470 You'll see that the program is playing the cw.wav file, and by default will broadcast on 107.9 FM. 44 00:07:04,510 --> 00:07:08,150 However, this can easily be changed if there's already a station on that channel. 45 00:07:25,200 --> 00:07:33,240 In this next screen clip, you'll see my Baofeng radio tuned to 107.9, picking up the cw.wav sound file that's being played. 46 00:07:33,320 --> 00:07:38,420 If you manually decode the Morse code, you'll notice that it is satellite telemetry information. 47 00:07:38,460 --> 00:07:40,960 This process would be tedious to do manually. 48 00:07:40,960 --> 00:07:43,860 Luckily, computers are great at doing this kind of work. 49 00:08:09,920 --> 00:08:19,840 Now that we know we can transmit a signal, we'll next install the software required to decode the telemetry information, in addition to the software used to encode our own messages. 50 00:08:22,460 --> 00:08:28,400 Before installing, run a cd or change directory to make sure that we're in the right Pi home directory. 51 00:08:28,400 --> 00:08:30,100 So I'll issue that command right now. 52 00:08:30,100 --> 00:08:32,700 As you can see, we're in the Pi home directory. 53 00:08:34,720 --> 00:08:40,280 We can next run an ls command or list command to see what other directories or files are currently in the home directory. 54 00:08:40,280 --> 00:08:45,360 And you can see we have the desktop folder as well as the cubesat-sim folder that we just installed. 55 00:08:47,160 --> 00:08:51,900 For this next step, I highly recommend copying and pasting the commands from GitHub. 56 00:08:52,220 --> 00:08:58,360 So now we're going to copy the command for the program multimon-ng. 57 00:08:59,520 --> 00:09:00,860 Hit enter. 58 00:09:01,140 --> 00:09:05,820 And it should take care of everything as the command is completely combined together. 59 00:09:09,700 --> 00:09:12,400 This shouldn't take too long, I'm going to do it in real time. 60 00:09:16,940 --> 00:09:20,220 And there you go, it brings you back to the home directory and everything's all built. 61 00:09:20,220 --> 00:09:27,080 If we issue an ls command, you'll see that now we have the folder multimon-ng, which is now installed. 62 00:09:28,700 --> 00:09:33,120 We'll now copy the additional command to install the cw encoder. 63 00:09:34,260 --> 00:09:38,200 And again, I'll just hit enter, and it should take care of everything in real time. 64 00:09:38,880 --> 00:09:47,500 Run the ls command, and now we can see that we have cubesat-sim, cw-wave, desktop, and multimon-ng, all successfully there and installed. 65 00:09:50,920 --> 00:09:56,560 In this next step, you'll be required to use your RTL-SDR or your software-defined radio. 66 00:09:58,780 --> 00:10:09,260 It's typically best to shut down your Raspberry Pi and then plug in the RTL-SDR into the USB port of the Raspberry Pi to prevent any power issues or brownouts. 67 00:10:10,460 --> 00:10:20,040 Once you've plugged in your software-defined radio into your Raspberry Pi, you should be able to reconnect power and then boot everything up just as before. 68 00:10:20,220 --> 00:10:25,920 As you can see, I have two windows open to PuTTY that we're going to use to access the Raspberry Pi. 69 00:10:26,380 --> 00:10:30,020 Now, if you're a normal Linux user, you can feel free to use tmux or screen. 70 00:10:30,020 --> 00:10:36,200 Sometimes it's just easier for anybody who's new to Linux to open up two screens so that they can have two different command windows on the same system. 71 00:10:38,500 --> 00:10:43,200 We are going to use one PuTTY session to transmit and the other one to receive a message. 72 00:10:43,500 --> 00:10:47,480 So, all we're going to do is copy and paste from GitHub just like before. 73 00:10:49,560 --> 00:10:56,340 In order to listen to the sound that's being transmitted, we're going to cd into the multimon-ng and build directory. 74 00:10:56,340 --> 00:10:58,260 Again, copy and paste this from GitHub. 75 00:10:58,700 --> 00:11:05,540 Now that we're in this directory, we can copy the next command, which you'll see here in a second. 76 00:11:05,540 --> 00:11:09,420 This will use the RTL-SDR to receive on FM. 77 00:11:10,400 --> 00:11:13,180 On 107.5 FM. 78 00:11:13,180 --> 00:11:15,200 That M stands for megahertz. 79 00:11:15,260 --> 00:11:16,840 The dash S is the sample rate. 80 00:11:16,840 --> 00:11:18,260 Always keep this as 48,000. 81 00:11:18,260 --> 00:11:21,620 I'm not going to explain that right now, but just keep that number the same. 82 00:11:21,620 --> 00:11:30,880 We're going to pipe this output to multimon-ng and we're going to accept raw format and we're going to use the morse underscore cw encoder. 83 00:11:30,880 --> 00:11:34,760 And we're going to accept input from dev standard input. 84 00:11:35,520 --> 00:11:42,220 So when you run this command and you hit enter, you'll see it'll start up with all the settings. 85 00:11:42,540 --> 00:11:43,640 And we'll just leave this for now. 86 00:11:43,640 --> 00:11:45,120 We'll go to the next window. 87 00:11:46,400 --> 00:11:48,300 Again, copying and pasting from GitHub. 88 00:11:48,300 --> 00:11:51,100 We are going to cd into the cubesatsim directory. 89 00:11:51,200 --> 00:11:52,440 So cd cubesatsim. 90 00:11:52,440 --> 00:11:54,300 And you can do tab to tab complete. 91 00:11:55,440 --> 00:11:59,540 And now we're going to transmit the same cw.wav file that we did before. 92 00:12:01,960 --> 00:12:05,780 If you have your Baofeng or another FM radio on, you'll hear this. 93 00:12:05,780 --> 00:12:11,240 As you can see, I've added an additional flag, which is .freq, which stands for frequency. 94 00:12:11,240 --> 00:12:15,560 So this will play on 107.5, as that's a clear station in my neighborhood. 95 00:12:18,170 --> 00:12:20,450 As you can see, it's transmitting just as before. 96 00:12:20,450 --> 00:12:25,830 And if we go to this other screen, we should see that it starts decoding a message. 97 00:12:30,640 --> 00:12:41,260 So if you let this play out for a while, which I will do, I'll let it pause, you'll be able to see that this is telemetry information, or I guess I should say sample telemetry information, that would be coming from a satellite. 98 00:12:41,960 --> 00:12:49,080 And if you were listening to this on your Baofeng, you'd be hearing a significant number of just Morse code sounding encoded transmissions. 99 00:12:52,520 --> 00:12:53,980 I'll pause it right now. 100 00:12:55,300 --> 00:12:58,560 As you can see, after a while, there's a lot more telemetry information. 101 00:12:58,660 --> 00:13:07,760 Now, I'm not going to go into the specifics of what this telemetry data is, since it's just a sample, but I thought it would be next kind of neat to show you how to transmit your own Morse code encoded signals. 102 00:13:13,310 --> 00:13:20,410 Now, in the next step of this, I am going to show you how to create your own message and how to encode your own text into a WAV file message. 103 00:13:20,410 --> 00:13:23,910 So we're going to cd to make sure we're back in the home directory, which I've already done. 104 00:13:23,970 --> 00:13:31,550 Now we're going to cd into the CWWAV directory, and you can see that now we're in that directory, issuing the ls command. 105 00:13:31,550 --> 00:13:37,570 And now I'm going to copy and paste some sample text from GitHub. 106 00:13:37,630 --> 00:13:45,070 And so you can see this is going to run the echo command, and anything in between the double quotations, it will put into that message.txt file. 107 00:13:45,170 --> 00:13:54,610 So issuing that command, we don't get any output, but if we are to cat that same message.txt folder, we'll see, oh, sample message to transmit. 108 00:13:55,310 --> 00:14:04,010 The next step of this is going to be to convert that message.txt file into a message.wav file or an audio file. 109 00:14:05,870 --> 00:14:07,710 So again, I'll copy from GitHub. 110 00:14:07,930 --> 00:14:12,350 So now I'm going to execute the CWWAV command with a sample rate of 48,000. 111 00:14:12,350 --> 00:14:14,970 Don't worry about it, just always make sure that's 48,000. 112 00:14:15,150 --> 00:14:21,750 The output file is going to be message.wav, and the text that we're going to use is the file message.txt. 113 00:14:21,910 --> 00:14:25,650 We're going to hit enter, process the file message.txt. 114 00:14:25,650 --> 00:14:31,630 If we ls, we can now see in that light blue that there's a message.wav file that we can now play. 115 00:14:34,930 --> 00:14:39,050 I'm going to now cd up a directory, so cd.. 116 00:14:39,560 --> 00:14:43,210 and now cd back into the cubesat-sim directory. 117 00:14:43,350 --> 00:14:57,770 And now I'm going to issue a very similar command to what we did previously that played the sample command, only this time you'll notice that the audio file is now the message.wav file that we just created. 118 00:14:58,390 --> 00:15:01,810 So now if I hit enter on this, it'll be in transmitting. 119 00:15:03,130 --> 00:15:08,790 And if I fire back up our software-defined radio, with any luck we should see our sample message shortly. 120 00:15:10,190 --> 00:15:17,850 So you can see it had a little bit of error at the beginning, but now that we're actually in it, we can see that it's decoding it properly. 121 00:15:22,130 --> 00:15:28,270 Now, this may seem a little lame that you're sending and receiving a message on the same Raspberry Pi. 122 00:15:28,270 --> 00:15:37,630 However, you can set this up on multiple Raspberry Pis or on multiple computers and you can essentially take this and send messages back and forth between two different devices. 123 00:15:39,810 --> 00:15:55,170 And this is really just to get your feet wet and show you how you can decode incoming signals using an RTL-SDR and also how to transmit FM signals, basically just to test out your knowledge of how things are encoded and how different signals are processed and created. 124 00:15:58,810 --> 00:16:08,650 Hopefully you've enjoyed this, and I would recommend that if this all makes sense to you, to try and play with the AFSK encodings that are also provided in the CubeSat SIM directory. 125 00:16:08,650 --> 00:16:13,690 It's a different type of message encoding and it might be a little interesting to look at it and see if you can decode it.