Hey everyone, today I'll show you how to set up a Raspberry Pi CubeSat Simulator. Now, this setup might go a bit quick, so feel free to pause and go back if you need to. I've also posted these instructions on GitHub so you can copy and paste the commands. 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. I use Rufus for this, but there are many other tools capable of writing the operating system to the card. Be careful when you're writing to the card that you don't accidentally nuke your hard drive. Just make sure that the microSD card is selected. 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. Next, create a blank text file called ssh.txt. 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. This simply enables ssh on your Raspberry Pi, and this will allow you to access it without a monitor, keyboard, or mouse. Now once the file is created, eject the microSD card and insert it into your Pi. Then connect networking and then power to the Raspberry Pi. Once connected to power, your Raspberry Pi will boot up. We'll now attempt to find it on your local network. Open up a command prompt and type ipconfig, as you can see in this screenshot. Hit enter, and look for the line dns-suffix. There might be a lot of information here, and so you might have to scroll up. But as you can see for mine, it's local domain, and the default gateway is 192.168.11.1. You'll now attempt to ping the Raspberry Pi by issuing the following command. Replace local domain with your dns-suffix. And with luck, you'll receive a ping back. For my system, I'll type ping raspberrypi.localdomain. Once you have the IP address of your Raspberry Pi, you'll install PuTTY or another SSH client of your choice. You'll then use the default credentials pi and raspberry to log in, all lowercase. 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. Keep in mind this process may take a while, so be patient. I'm going to skip through this long process in the interest of time. 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. 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. I've included a bit of the manual steps here to illustrate the process. However, this is fully covered in the written instructions, and it might save you a lot of time and a lot of typing. I'm going to cut the software installation there, just to save time. Next, we'll want to run sudo raspi-config. This command will allow us to customize our Raspberry Pi just a little bit. We can do a couple things here. 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. Once you've finished with your customizations, navigate to Finish, and then reboot the Raspberry Pi. 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. If you check out the GitHub repository, there is a clear example for how to place the antenna. However, you may not even need it at all, depending on how far away your FM receiver is from the Raspberry Pi. Now you should be able to run the following command within the cubesat-sim directory. You'll see that the program is playing the cw.wav file, and by default will broadcast on 107.9 FM. However, this can easily be changed if there's already a station on that channel. 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. If you manually decode the Morse code, you'll notice that it is satellite telemetry information. This process would be tedious to do manually. Luckily, computers are great at doing this kind of work. 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. Before installing, run a cd or change directory to make sure that we're in the right Pi home directory. So I'll issue that command right now. As you can see, we're in the Pi home directory. We can next run an ls command or list command to see what other directories or files are currently in the home directory. And you can see we have the desktop folder as well as the cubesat-sim folder that we just installed. For this next step, I highly recommend copying and pasting the commands from GitHub. So now we're going to copy the command for the program multimon-ng. Hit enter. And it should take care of everything as the command is completely combined together. This shouldn't take too long, I'm going to do it in real time. And there you go, it brings you back to the home directory and everything's all built. If we issue an ls command, you'll see that now we have the folder multimon-ng, which is now installed. We'll now copy the additional command to install the cw encoder. And again, I'll just hit enter, and it should take care of everything in real time. 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. In this next step, you'll be required to use your RTL-SDR or your software-defined radio. 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. 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. As you can see, I have two windows open to PuTTY that we're going to use to access the Raspberry Pi. Now, if you're a normal Linux user, you can feel free to use tmux or screen. 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. We are going to use one PuTTY session to transmit and the other one to receive a message. So, all we're going to do is copy and paste from GitHub just like before. In order to listen to the sound that's being transmitted, we're going to cd into the multimon-ng and build directory. Again, copy and paste this from GitHub. Now that we're in this directory, we can copy the next command, which you'll see here in a second. This will use the RTL-SDR to receive on FM. On 107.5 FM. That M stands for megahertz. The dash S is the sample rate. Always keep this as 48,000. I'm not going to explain that right now, but just keep that number the same. 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. And we're going to accept input from dev standard input. So when you run this command and you hit enter, you'll see it'll start up with all the settings. And we'll just leave this for now. We'll go to the next window. Again, copying and pasting from GitHub. We are going to cd into the cubesatsim directory. So cd cubesatsim. And you can do tab to tab complete. And now we're going to transmit the same cw.wav file that we did before. If you have your Baofeng or another FM radio on, you'll hear this. As you can see, I've added an additional flag, which is .freq, which stands for frequency. So this will play on 107.5, as that's a clear station in my neighborhood. As you can see, it's transmitting just as before. And if we go to this other screen, we should see that it starts decoding a message. 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. And if you were listening to this on your Baofeng, you'd be hearing a significant number of just Morse code sounding encoded transmissions. I'll pause it right now. As you can see, after a while, there's a lot more telemetry information. 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. 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. So we're going to cd to make sure we're back in the home directory, which I've already done. 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. And now I'm going to copy and paste some sample text from GitHub. 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. 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. The next step of this is going to be to convert that message.txt file into a message.wav file or an audio file. So again, I'll copy from GitHub. So now I'm going to execute the CWWAV command with a sample rate of 48,000. Don't worry about it, just always make sure that's 48,000. The output file is going to be message.wav, and the text that we're going to use is the file message.txt. We're going to hit enter, process the file message.txt. If we ls, we can now see in that light blue that there's a message.wav file that we can now play. I'm going to now cd up a directory, so cd.. and now cd back into the cubesat-sim directory. 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. So now if I hit enter on this, it'll be in transmitting. And if I fire back up our software-defined radio, with any luck we should see our sample message shortly. 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. Now, this may seem a little lame that you're sending and receiving a message on the same Raspberry Pi. 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. 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. 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. 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.