start	end	text
6690	11070	Hey everyone, today I'll show you how to set up a Raspberry Pi CubeSat Simulator.
11150	15090	Now, this setup might go a bit quick, so feel free to pause and go back if you need to.
15090	19090	I've also posted these instructions on GitHub so you can copy and paste the commands.
21930	26070	The first step is to download the Raspbian OS and write it to the microSD card
26070	28730	that will act as the Raspberry Pi's hard drive.
28730	34030	I use Rufus for this, but there are many other tools capable of writing the operating system to the card.
36110	40250	Be careful when you're writing to the card that you don't accidentally nuke your hard drive.
40250	42790	Just make sure that the microSD card is selected.
46740	51960	Once this step is complete, you'll want to eject your microSD card and then reinsert it back into your computer,
51960	54440	so that a drive called boot appears.
54440	58340	Next, create a blank text file called ssh.txt.
63820	70200	Then you'll want to remove the .txt extension so that the file is just a plain ssh file,
70200	71740	as you can see in this picture.
75200	78140	This simply enables ssh on your Raspberry Pi,
78140	81640	and this will allow you to access it without a monitor, keyboard, or mouse.
81740	85880	Now once the file is created, eject the microSD card and insert it into your Pi.
85880	88900	Then connect networking and then power to the Raspberry Pi.
91660	94600	Once connected to power, your Raspberry Pi will boot up.
94600	96860	We'll now attempt to find it on your local network.
96860	101520	Open up a command prompt and type ipconfig, as you can see in this screenshot.
104850	108250	Hit enter, and look for the line dns-suffix.
108250	111630	There might be a lot of information here, and so you might have to scroll up.
111630	118390	But as you can see for mine, it's local domain, and the default gateway is 192.168.11.1.
121530	125330	You'll now attempt to ping the Raspberry Pi by issuing the following command.
125330	128090	Replace local domain with your dns-suffix.
128090	130450	And with luck, you'll receive a ping back.
133370	139610	For my system, I'll type ping raspberrypi.localdomain.
141630	147150	Once you have the IP address of your Raspberry Pi, you'll install PuTTY or another SSH client of your choice.
147150	152470	You'll then use the default credentials pi and raspberry to log in, all lowercase.
156800	160200	Now that you have secure access to your Raspberry Pi through SSH,
160200	164720	the first thing you'll want to do is to change your password and make sure your Raspberry Pi is fully up to date.
164720	168040	Keep in mind this process may take a while, so be patient.
173780	177020	I'm going to skip through this long process in the interest of time.
177040	180260	However, when your Raspberry Pi is done upgrading and updating,
180260	185080	I would recommend copying and pasting the commands from GitHub to get everything installed properly.
189750	193650	Copying and pasting the commands from GitHub will install a variety of useful tools,
193650	197470	including the CubeSat simulator software, the FM transmitting software,
197470	200170	the signal decoder, and signal encoding software.
200230	203710	I've included a bit of the manual steps here to illustrate the process.
203710	206110	However, this is fully covered in the written instructions,
206110	208790	and it might save you a lot of time and a lot of typing.
310750	314210	I'm going to cut the software installation there, just to save time.
314230	317170	Next, we'll want to run sudo raspi-config.
317170	320970	This command will allow us to customize our Raspberry Pi just a little bit.
327480	329080	We can do a couple things here.
329080	331900	We can change our password, change the hostname of the Raspberry Pi,
331900	334680	connect the Raspberry Pi to Wi-Fi, set the local time,
334680	339100	and expand our operating system to use all of the space on the microSD card.
378090	380410	Once you've finished with your customizations,
380410	383070	navigate to Finish, and then reboot the Raspberry Pi.
383070	387030	I connected my Pi to Wi-Fi, added the antenna to the left side,
387030	390370	4th pin down, and connected the Pi to a portable battery.
396920	399220	If you check out the GitHub repository,
399220	401680	there is a clear example for how to place the antenna.
401720	403460	However, you may not even need it at all,
403460	407420	depending on how far away your FM receiver is from the Raspberry Pi.
412590	417230	Now you should be able to run the following command within the cubesat-sim directory.
417370	420590	You'll see that the program is playing the cw.wav file,
420590	424470	and by default will broadcast on 107.9 FM.
424510	428150	However, this can easily be changed if there's already a station on that channel.
445200	449800	In this next screen clip, you'll see my Baofeng radio tuned to 107.9,
449800	453240	picking up the cw.wav sound file that's being played.
453320	455580	If you manually decode the Morse code,
455580	458420	you'll notice that it is satellite telemetry information.
458460	460960	This process would be tedious to do manually.
460960	463860	Luckily, computers are great at doing this kind of work.
489920	492440	Now that we know we can transmit a signal,
492440	496800	we'll next install the software required to decode the telemetry information,
496800	499840	in addition to the software used to encode our own messages.
502460	505380	Before installing, run a cd or change directory
505380	508400	to make sure that we're in the right Pi home directory.
508400	510100	So I'll issue that command right now.
510100	512700	As you can see, we're in the Pi home directory.
514720	517180	We can next run an ls command or list command
517180	520280	to see what other directories or files are currently in the home directory.
520280	522000	And you can see we have the desktop folder
522000	525360	as well as the cubesat-sim folder that we just installed.
527160	529460	For this next step, I highly recommend
529460	531900	copying and pasting the commands from GitHub.
532220	534080	So now we're going to copy the command
534080	538360	for the program multimon-ng.
539520	540860	Hit enter.
541140	542860	And it should take care of everything
542860	545820	as the command is completely combined together.
549700	552400	This shouldn't take too long, I'm going to do it in real time.
556940	558960	And there you go, it brings you back to the home directory
558960	560220	and everything's all built.
560220	562360	If we issue an ls command,
562360	564220	you'll see that now we have the folder
564220	567080	multimon-ng, which is now installed.
568700	570760	We'll now copy the additional command
570760	573120	to install the cw encoder.
574260	576040	And again, I'll just hit enter,
576040	578200	and it should take care of everything in real time.
578880	580280	Run the ls command,
580280	581380	and now we can see that we have
581380	585360	cubesat-sim, cw-wave, desktop, and multimon-ng,
585360	587500	all successfully there and installed.
590920	593480	In this next step, you'll be required to use
593480	596560	your RTL-SDR or your software-defined radio.
598780	601380	It's typically best to shut down your Raspberry Pi
601380	604120	and then plug in the RTL-SDR
604120	606580	into the USB port of the Raspberry Pi
606580	609260	to prevent any power issues or brownouts.
610460	612840	Once you've plugged in your software-defined radio
612840	615640	into your Raspberry Pi,
615640	617580	you should be able to reconnect power
617580	620040	and then boot everything up just as before.
620220	622440	As you can see, I have two windows open
622440	624060	to PuTTY that we're going to use
624060	625920	to access the Raspberry Pi.
626380	628260	Now, if you're a normal Linux user,
628260	630020	you can feel free to use tmux or screen.
630020	631440	Sometimes it's just easier for anybody
631440	633080	who's new to Linux to open up two screens
633080	634860	so that they can have two different command windows
634860	636200	on the same system.
638500	640820	We are going to use one PuTTY session to transmit
640820	643200	and the other one to receive a message.
643500	645680	So, all we're going to do is copy and paste
645680	647480	from GitHub just like before.
649560	652440	In order to listen to the sound that's being transmitted,
652440	656340	we're going to cd into the multimon-ng and build directory.
656340	658260	Again, copy and paste this from GitHub.
658700	660600	Now that we're in this directory,
660600	662840	we can copy the next command,
662840	665540	which you'll see here in a second.
665540	669420	This will use the RTL-SDR to receive on FM.
670400	673180	On 107.5 FM.
673180	675200	That M stands for megahertz.
675260	676840	The dash S is the sample rate.
676840	678260	Always keep this as 48,000.
678260	679720	I'm not going to explain that right now,
679720	681620	but just keep that number the same.
681620	684740	We're going to pipe this output to multimon-ng
684740	687200	and we're going to accept raw format
687200	690880	and we're going to use the morse underscore cw encoder.
690880	694760	And we're going to accept input from dev standard input.
695520	698160	So when you run this command and you hit enter,
698160	702220	you'll see it'll start up with all the settings.
702540	703640	And we'll just leave this for now.
703640	705120	We'll go to the next window.
706400	708300	Again, copying and pasting from GitHub.
708300	711100	We are going to cd into the cubesatsim directory.
711200	712440	So cd cubesatsim.
712440	714300	And you can do tab to tab complete.
715440	718380	And now we're going to transmit the same cw.wav file
718380	719540	that we did before.
721960	724900	If you have your Baofeng or another FM radio on,
724900	725780	you'll hear this.
725780	728400	As you can see, I've added an additional flag,
728400	731240	which is .freq, which stands for frequency.
731240	733340	So this will play on 107.5,
733340	735560	as that's a clear station in my neighborhood.
738170	740450	As you can see, it's transmitting just as before.
740450	742090	And if we go to this other screen,
742090	745830	we should see that it starts decoding a message.
750640	752500	So if you let this play out for a while,
752500	754560	which I will do, I'll let it pause,
754560	757220	you'll be able to see that this is telemetry information,
757220	759760	or I guess I should say sample telemetry information,
759760	761260	that would be coming from a satellite.
761960	763400	And if you were listening to this on your Baofeng,
763400	765860	you'd be hearing a significant number of
765860	769080	just Morse code sounding encoded transmissions.
772520	773980	I'll pause it right now.
775300	776720	As you can see, after a while,
776720	778560	there's a lot more telemetry information.
778660	781500	Now, I'm not going to go into the specifics of what this telemetry data is,
781500	782720	since it's just a sample,
782720	784400	but I thought it would be next kind of neat
784400	787760	to show you how to transmit your own Morse code encoded signals.
793310	794750	Now, in the next step of this,
794750	796990	I am going to show you how to create your own message
796990	800410	and how to encode your own text into a WAV file message.
800410	802890	So we're going to cd to make sure we're back in the home directory,
802890	803910	which I've already done.
803970	808630	Now we're going to cd into the CWWAV directory,
808630	810210	and you can see that now we're in that directory,
810210	811550	issuing the ls command.
811550	817570	And now I'm going to copy and paste some sample text from GitHub.
817630	819310	And so you can see this is going to run the echo command,
819310	821570	and anything in between the double quotations,
821570	825070	it will put into that message.txt file.
825170	827570	So issuing that command, we don't get any output,
827570	832330	but if we are to cat that same message.txt folder,
832330	834610	we'll see, oh, sample message to transmit.
835310	840550	The next step of this is going to be to convert that message.txt file
840550	844010	into a message.wav file or an audio file.
845870	847710	So again, I'll copy from GitHub.
847930	850070	So now I'm going to execute the CWWAV command
850070	852350	with a sample rate of 48,000.
852350	854970	Don't worry about it, just always make sure that's 48,000.
855150	857610	The output file is going to be message.wav,
857610	861750	and the text that we're going to use is the file message.txt.
861910	865650	We're going to hit enter, process the file message.txt.
865650	870070	If we ls, we can now see in that light blue that there's a message.wav file
870070	871630	that we can now play.
874930	879050	I'm going to now cd up a directory, so cd..
879560	883210	and now cd back into the cubesat-sim directory.
883350	885890	And now I'm going to issue a very similar command
885890	889310	to what we did previously that played the sample command,
889310	893870	only this time you'll notice that the audio file is now
893870	897770	the message.wav file that we just created.
898390	901810	So now if I hit enter on this, it'll be in transmitting.
903130	906090	And if I fire back up our software-defined radio,
906090	908790	with any luck we should see our sample message shortly.
910190	913850	So you can see it had a little bit of error at the beginning,
913850	917850	but now that we're actually in it, we can see that it's decoding it properly.
922130	924150	Now, this may seem a little lame
924150	928270	that you're sending and receiving a message on the same Raspberry Pi.
928270	932130	However, you can set this up on multiple Raspberry Pis or on multiple computers
932130	935830	and you can essentially take this and send messages back and forth
935830	937630	between two different devices.
939810	944550	And this is really just to get your feet wet and show you how you can decode incoming signals
944550	948010	using an RTL-SDR and also how to transmit FM
948010	952070	signals, basically just to test out your knowledge of how things are encoded
952070	955170	and how different signals are processed and created.
958810	962410	Hopefully you've enjoyed this, and I would recommend that if this all
962410	966470	makes sense to you, to try and play with the AFSK encodings that are also
966470	970130	provided in the CubeSat SIM directory. It's a different type of message encoding
970130	973690	and it might be a little interesting to look at it and see if you can decode it.
