 Okay, here we are again. This is part of a series be sure to check out the full playlist Which will hopefully be a link in a description of this video or at the end of this video and so we're gonna be looking at Some software I wrote and again the scenario here is Your your work for a fire or emergency rescue department and your normal Communication the internet is down, but you still want to transmit information to computers out in the field That's the scenario through radios that you have that work so There we go. If you go to github.com for slash metal X 1000 there should be a link in the description of this video I'll bring you to my github page. Let's go ahead and go to repositories and we're gonna go here and search Radio and the one you want is the radio transmissions. That's where all the code from this series is there should be a link to that In the description as well, so they were gonna be looking at the server one Let's go ahead and you would choose this and you would copy this and clone it or download the zip file and Unpackage it Once you have that you can be in there and again, we're going to be going into the server one folder So here we are. This is what you would see again. That's the same. That's here We got your mini modem scripts your morse code script server one server two license and read me That's what I have here. We're going to CD into server one And so server one is a shell-based server and client so on the top screen I'm gonna be doing this all on one machine But in reality and we'll do this in the next videos and you saw it in the original video We're gonna be doing this over radio waves. So here I'm going to go ahead and list out the files in here And you can see we got two scripts we got a in-out file and we also have a Data the data is just so it's transmitted, but it's also stored so you can reference it later So on the top is going to be my clients. So this is going to be trucks out in the field So we'll start up the client and it says listening for transmissions And this case should be receiving through radio into the audio card of your computer Or if you have an SDR dongle, which will go over in the near future. You could also use one of those if it is in the range that you're transmitting at any type of Audio input is basically what we're doing here. So that's running up there The bomb screen here is going to be our dispatch. So I'm going to go ahead and dot slash dispatch and now so dispatch The bottom of the screen here is somebody at dispatch That's taking calls in and now they want to send those signals out to the trucks so they're displayed on their screen So it's asking here for units and I'm going to say engine 24 medic 24 I'll hit enter and I'll say the address one two three pine Street and The notes will be you know the reference what's going on and we'll just say here sick person And go ahead and hit enter and you see with all that noise You will see up on the top once it's done transmitting it all appears nicely formatted up there You got your your trucks that were dispatched. You've got the address you were dispatched to you got the Reason you're being dispatched and the time and date and again in the scenario here There will be audio transmission. So you be telling that but it's also nice to have it sent to a computer for reference later In case you didn't hear the address and here I'm sitting at once and it's coming through if your communications aren't very clear And you worry about loss of data you can always send everything twice and then they can you know determine Hopefully if the address is missing a number or a letter in one of them you can determine which one is the correct one But from my experience as long as you have clear communications everything should go through fine Let's go ahead and do another one here. We'll say engine 24 engine 47 Engine 20 rescue 20 and Then we'll go ahead and enter and we'll say three two one oak have north and we'll say Fire sure go ahead and there you go. You can see it came up here Also, you know, so when I have it when you hit enter it says it's transmitting and it tells you what you're transmitting And then divides everything up each call with a little equal sign line there And let's go ahead and do one more and then we'll look at the code. So I'll say engine 24 medic 24 engine 20 and we'll say 101st Avenue and 9th Street North MVA motor vehicle accident and we can even say black pickup truck versus blue Ford there we go. There we go. Now this is the sort of thing So I've been a firefighter for almost 14 years now when I first started we would get print out So there'd be a printer by the door and when we get dispatch we hear the audio you know a person telling us where to go and By time we got to the door. Hopefully a paper would basically this type of information Not much more would be printed for us. I mean get in the truck and look it up in the map book nowadays if the dispatch is done by a computer and it's a Computer generate it's not your general voice It's they actually recorded ladies voice and then the output is generated by the computer for the dispatch audibly And we don't get printouts anymore But the information goes to the computer Which would also bring up the maps automatically for us. It's supposed to anyway But this is the basic information we care about when we're going out of calls Who's going where we're going and why we're going and what time we were told to go to make sure that we're looking at the right call So again in our scenario The internet's down, but we still want to get the information to the computers and we can do that through radio waves And let's go ahead and look at this code. So I'm gonna control C here and control C up here And first let's look at the dispatch. So Vim Dispatch and I'll make this full screen here very simple code. So by default start off the code I'm gonna clear the screen. I'm gonna set a message variable CAD Which could be anything and then we have two functions here. Let's look at down here This is gonna be our main while loop here So it's saying while one meaning loop forever until you kill it what we're gonna do We're gonna run the first function and then the second function. It was a very small program I could have not created functions put them all in here, but I tried I'm trying to be better about Keeping functions small so it's easy to find. It's a simple program now. It might get bigger as time goes on So let's see start transmissions. That's this up here So what this is gonna do is gonna create a file in file out Called this which in this case is CAD So if we exit out of here and I list out my files again, you can see that there's a CAD file here that's the file we created so we're gonna create that each time to make sure it exists and Here we're piping any error output to DevNull because if it already exists gonna give us an error message that already exists and Then we're going to cat our message to mini modem here. So we're just gonna say CAD So so what is what is going on here? So a file in file out so we need to constantly be reading from this file So that's what we're doing here We're creating the file and then we're saying read this file and dump all the contents to our mini modem to transmit it Well, if we just create a regular file and we said cat it would dump whatever was in there Which we just created so there's nothing in there and so nothing would be transmitted and then it'd be done Nothing nothing would happen So what we're saying here is we're creating a file and they're saying cat it and since it's a file in file out File what we're going to do is basically we're creating this file that never ends So it's constantly catting it if nothing's coming in nothing's going out But as soon as you start dumping stuff into that file, it's gonna start piping it and transmitting it here So that's where our next function does it's going to ask Questions what units and it'll put that in a variable call truck the address put that in variable call address notes and Put in a variable call notes and I'm doing echo lines here And I'm pretty sure the read command has an output option But I can never remember what is and I look at the man file So I always end up doing these echo so we can actually cut this part of the code in half If we just use the read function, but this works So we're getting the units we're getting the address we're getting the notes And then we're going to grab after we receive all that the current time stamp They're gonna say okay, we're transmitting and we're gonna say what we're transmitting here We're gonna be transmitting the trucks and then I'm using a pipe symbol to divide each column up So trucks Address notes and time. We're displaying that that's the output when you hit transmit this transmit And that's telling you the dispatcher what you sent Then we're gonna actually take that same information and this blank line here and dump it into our CAD file Which will start transmitting all that information and then we're going to do display on the dispatch screen a Dividing line for the new call. So this line here the dispatch does not see that's being sent To mini modem and being sent out up here. So that's that code very simple I chose use pipe symbols as my basically they're like new line characters when they're being sent You'll see when we get to the client's code so It's just for formatting on the other end if the dispatcher was to put a pipe symbol in one of these outputs It's not the end of the world. It would just put a new line in on the On the client machine. So let's go ahead and quit out of that and I'm gonna go into our clients now So this is the truck code and this is very very simple. We're gonna clear the screen We're gonna put a greeting message basically which is what these two lines are saying we're listening for transmissions put a dividing line Just so there's you know, that's like a header and then we're starting up mini modem We're saying we're gonna receive at 110 which 110 is just a rate that I have found that can transmit quick Hire that number the faster transmission, but also less like the more likely you are to lose data So 110 I find works well. It's a decent speed and you don't lose much data And then we're gonna pipe any error output to dev null because we don't want the client to see that And then we're gonna say T and T is a command Basically, it allows you to dump the output of something into a file But still displayed on the screen and the reason we're using T rather than just dumping into this file here Or if we were to just dump into that file you wouldn't see it on the screen Which we want but we also want to dump to this dat file so that they can reference it later for some reason They accidentally close and clear the screen. They can still reference. It's just a plain text file So we're saying Basically take the output of this so basically the stuff being transmitted dash a says a pen So it's gonna put it all to the end of this file But still going to display it on the screen and then this said command here Just says take any pipe symbol being transmitted and make it a new line character and that's it so let's go ahead and Run this again, so I'm gonna say client And again, I am Doing this all on once one computer here But we're pretending that they're two different computers and we're going to I've done in earlier parts of this series And I will again at the end Actually do this from two different things so again I said that the new line character is it is a pipe symbol when you're transmitting so if someone was to put like instead of a comma here if they did a pipe symbol and they said medic 24 and Then we come down here one two three oak Street north blah blah blah my test now Now when it transmits, you notice instead of on one line the The engine in the medic are on two different lines So it's just if you accidentally put one of those in there not a big gal It just adds a new line character where that is But that's it very simple code, but in our next video. We're going to use the same dispatch code, but modify our our Client code and add some html to that so that on the user end they get a nice clear Gooey interface similar to what I did in the first video of this series But a little bit nicer and actually breaks this information up so let's go ahead and be sure to like share subscribe and comment below if you're liking this series and Check out the full playlist in the link of in the description of the video and the next video Which will be in a day or so. Hopefully Will be that gooey code Again, if you like my videos films by Chris calm That's Chris of the Lake K Chris with a K There's a link in the description there under support You can support me through PayPal or at my patreon page page patreon.com 4 slash mil X 1000 if you like my videos even a dollar a month helps I appreciate it and also sharing and liking this video helps as well. I thank you for watching as always I hope that you have a great day