WEBVTT

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: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.

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: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.

00:54.440 --> 00:58.340
Next, create a blank text file called ssh.txt.

01:03.820 --> 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.

01:15.200 --> 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.

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: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.

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: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.

03:09.750 --> 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.

03:20.230 --> 03:23.710
I've included a bit of the manual steps here to illustrate the process.

03:23.710 --> 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.

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: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.

06:18.090 --> 06:23.070
Once you've finished with your customizations, navigate to Finish, and then reboot the Raspberry Pi.

06:23.070 --> 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.

06:36.920 --> 06:41.680
If you check out the GitHub repository, there is a clear example for how to place the antenna.

06:41.720 --> 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.

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:04.470
You'll see that the program is playing the cw.wav file, 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: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.

07:33.320 --> 07:38.420
If you manually decode the Morse code, 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: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.

08:22.460 --> 08:28.400
Before installing, run a cd or change directory 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: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.

08:40.280 --> 08:45.360
And you can see we have the desktop folder as well as the cubesat-sim folder that we just installed.

08:47.160 --> 08:51.900
For this next step, I highly recommend copying and pasting the commands from GitHub.

08:52.220 --> 08:58.360
So now we're going to copy the command for the program multimon-ng.

08:59.520 --> 09:00.860
Hit enter.

09:01.140 --> 09:05.820
And it should take care of everything 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:20.220
And there you go, it brings you back to the home directory and everything's all built.

09:20.220 --> 09:27.080
If we issue an ls command, you'll see that now we have the folder multimon-ng, which is now installed.

09:28.700 --> 09:33.120
We'll now copy the additional command to install the cw encoder.

09:34.260 --> 09:38.200
And again, I'll just hit enter, and it should take care of everything in real time.

09:38.880 --> 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.

09:50.920 --> 09:56.560
In this next step, you'll be required to use your RTL-SDR or your software-defined radio.

09:58.780 --> 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.

10:10.460 --> 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.

10:20.220 --> 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.

10:26.380 --> 10:30.020
Now, if you're a normal Linux user, you can feel free to use tmux or screen.

10:30.020 --> 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.

10:38.500 --> 10:43.200
We are going to use one PuTTY session to transmit and the other one to receive a message.

10:43.500 --> 10:47.480
So, all we're going to do is copy and paste from GitHub just like before.

10:49.560 --> 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.

10:56.340 --> 10:58.260
Again, copy and paste this from GitHub.

10:58.700 --> 11:05.540
Now that we're in this directory, we can copy the next command, 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:21.620
I'm not going to explain that right now, but just keep that number the same.

11:21.620 --> 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.

11:30.880 --> 11:34.760
And we're going to accept input from dev standard input.

11:35.520 --> 11:42.220
So when you run this command and you hit enter, 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:59.540
And now we're going to transmit the same cw.wav file that we did before.

12:01.960 --> 12:05.780
If you have your Baofeng or another FM radio on, you'll hear this.

12:05.780 --> 12:11.240
As you can see, I've added an additional flag, which is .freq, which stands for frequency.

12:11.240 --> 12:15.560
So this will play on 107.5, 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:25.830
And if we go to this other screen, we should see that it starts decoding a message.

12:30.640 --> 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.

12:41.960 --> 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.

12:52.520 --> 12:53.980
I'll pause it right now.

12:55.300 --> 12:58.560
As you can see, after a while, there's a lot more telemetry information.

12:58.660 --> 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.

13:13.310 --> 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.

13:20.410 --> 13:23.910
So we're going to cd to make sure we're back in the home directory, which I've already done.

13:23.970 --> 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.

13:31.550 --> 13:37.570
And now I'm going to copy and paste some sample text from GitHub.

13:37.630 --> 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.

13:45.170 --> 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.

13:55.310 --> 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.

14:05.870 --> 14:07.710
So again, I'll copy from GitHub.

14:07.930 --> 14:12.350
So now I'm going to execute the CWWAV command 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: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.

14:21.910 --> 14:25.650
We're going to hit enter, process the file message.txt.

14:25.650 --> 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.

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: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.

14:58.390 --> 15:01.810
So now if I hit enter on this, it'll be in transmitting.

15:03.130 --> 15:08.790
And if I fire back up our software-defined radio, with any luck we should see our sample message shortly.

15:10.190 --> 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.

15:22.130 --> 15:28.270
Now, this may seem a little lame that you're sending and receiving a message on the same Raspberry Pi.

15:28.270 --> 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.

15:39.810 --> 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.

15:58.810 --> 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.

16:08.650 --> 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.

