-Server Pi – Student Worksheet

Learning Outcomes • Learn the basics of IoT; • Understand the concepts of a Mumble-server; • Learn how to configure and use a Mumble-server.

Background Raspbian is a Debian-based computer for the Raspberry Pi computer. There are several versions of Raspbian including: Raspbian Stretch and Raspbian Jessie. Raspbian was created by Mike Thompson and Peter Green as an independent project, with an initial build completed in June 2012. Since 2015, Raspbian has been officially provided by the Raspberry Pi Foundation as its primary operating system for the family of Raspberry Pi single-board computers and is highly optimized for the Raspberry Pi line's low-performance ARM CPUs.

The internet of things, or IoT, is a system of interrelated computing devices, mechanical and digital machines, objects, animals or people that are provided with unique identifiers (UIDs) and the ability to transfer data over a network without requiring human-to-human or human-to-computer interaction.

IoT devices could be a person with a heart monitor implant, a farm animal with a biochip transponder, an automobile that has built-in sensors to alert the driver when tire pressure is low or any other natural or man-made object that can be assigned an IP address and is able to transfer data over a network. Increasingly, organisations in a variety of industries are using IoT to operate more efficiently, better understand customers to deliver enhanced customer service, improve decision-making and increase the value of the business.

Mumble is a voice over IP (VoIP) application primarily designed for use by gamers and is similar to programs such as . Mumble uses a client–server architecture which allows users to talk to each other via the same server. It has a very simple administrative interface and features high sound quality and low latency. All communication is encrypted to ensure user privacy. Mumble is free and open- application, is cross-platform, and is released under the terms of the new BSD license.

A Mumble server (called Murmur) has a root channel and a hierarchical tree of channels beneath it. Users can temporarily connect channels to create larger virtual channels. This is useful during larger events where a small group of users may be chatting in a channel but are linked to a common channel with other users to hear announcements. It also matches team-based first-person shooter (FPS) games. Each channel has an associated set of groups and access control lists which control user permissions. The system supports many usage scenarios, at the cost of added configuration complexity.

Mumble uses the low-latency audio codec as of version 1.2.4, the codec that succeeds the previous defaults and CELT. This and the rest of Mumble's design allow for low-latency communication, meaning a shorter delay between when something is said on one end and when it's heard on the other.

Page 1 of 17 www.cyberpiprojects.com | [email protected]

Mumble also incorporates echo cancellation to reduce echo when using speakers or poor-quality sound hardware.

Hardware Required

Component Number (Peli Case) Component Number (Box Case) Component

Slot 4 + 5 Slot 1 Raspberry Pi + Case

Slot 5 Slot 10 Raspbian SD Card

Slot 9 Slot 2 TFT Screen

Slot 3 Slot 11 HDMI

Slot 3 Slot 11 Wireless Keyboard

Slot 5 Slot 12 Wireless Mouse

Slot 1 Slot 13 Power Supply Unit

Slot 3 Slot 11 Headphones

Slot 3 Slot 11 Microphone

Project assembly/ Code setup:

Step 1: Ensure that all the hardware required is taken out of the Peli or Box case;

Step 2: Insert the Raspbian SD Card into the SD Card slot on the Raspberry Pi;

Step 3: Insert the USB dongle for the keyboard and mouse (or connect an external USB keyboard and mouse). Now plug in the microphone to one of the USB ports and then headphones into the aux port; Step 4: Connect the TFT Screen to the Raspberry Pi GPIO pins ensuring that the HDMI ports align on the side. Connect the HDMI to HDMI U shaped connector between the Raspberry Pi and the TFT Screen. (If using an external monitor connect the HDMI cable directly to the external monitor and you do not need to use the TFT Screen); Step 5: You are now ready to power on the Raspberry Pi. Plug in the power supply unit into your wall power outlet and connect the mini USB cable to the power socket on the Raspberry Pi. You should get a red light appear and a green/amber light flashing as the Raspberry Pi starts to boot up;

Page 2 of 17 www.cyberpiprojects.com | [email protected]

Step 6: Once the Raspbian OS has booted up you will be sign in automatically;

Step 7: Make sure your Raspberry Pi is either connected to your WiFi or connected to the internet using an Ethernet cable and connecting it using the Ethernet port on the Raspberry Pi; Step 8: Open up the terminal;

Step 9: We need to do some basic configurations such as set up a superuser so we can connect, do this by running the following command. sudo dpkg-reconfigure mumble-server Step 10: This command will present you with a few options, set these however you would like mumble to operate. Autostart: I selected Yes High Priority: I selected Yes (This ensures Mumble will always be given top priority even when the Pi is under a lot of stress) SuperUser: Set the password here. This account will have full control over the server. Step 11: You need the IP address to connect, to get this type the following: ip addr show Step 12: Write this number down next to inet (It will be under either eth0 or wlan0) as you will need it to connect to the server and also setup port forwarding for outside access if you want to take the project further. Step 13: Now we will probably want to set up a few things on the Mumble server such as welcome message, password (if you don’t want anyone just joining). Step 14: In the terminal app enter the following command: sudo nano /etc/mumble-server.ini This command will open the server config in the nano text editor. Step 15: Everything here is pretty self-explanatory: • Find welcomeText and update to whatever you would like displayed when a user joins the channel. • Find serverpassword and update if you would like a password for users looking to join the server. • Uncomment registerserver by removing the # and replace mumble server with the name that you would like to use for the base channel. Step 16: You will need to restart the server for changes to take place. Enter the following command. sudo /etc/init.d/mumble-server restart

Page 3 of 17 www.cyberpiprojects.com | [email protected]

Once the server has rebooted, you can now move onto accessing it via the mumble client. Step 17: Now we need to run the audio tuning wizard. Upon opening mumble, you should see the Audio Tuning Wizard prompt. Step 18: Click the Next button to continue the wizard.

Step 19: On this screen if you know exactly what devices you use, select them, if not just leave values to the defaults. Click the Next button to continue.

Page 4 of 17 www.cyberpiprojects.com | [email protected]

Step 20: On this portion you should be hearing a continuous loop of sound. Select a value that gives you no interruptions or jitter in the sound. Once you find a good setting click the Next button to continue.

Step 21: Follow the instructions on the screen and click the Next button once complete.

Step 22: If you want Mumble to record your voice as soon as you start talking without having to push a button, you'll want to select the Raw amplitude from input option. If you want Mumble to

Page 5 of 17 www.cyberpiprojects.com | [email protected]

start recording your voice after you push a button, you'll select the Push To Talk option and you'll need to click inside the box next to the option and push a key you want to use.

Step 23: We recommend leaving the defaults on the page here, although you can change them if you want higher quality or do not want to hear sounds instead of text to speech.

Page 6 of 17 www.cyberpiprojects.com | [email protected]

Step 24: Depending on the speaker or headphone setup you use, you'll want to select the Use headphones if you do so. Click Next otherwise.

Step 25: Click the Finish button to finish the setup wizard.

Page 7 of 17 www.cyberpiprojects.com | [email protected]

Step 26: You will now get a certification authentication screen pop up. Click on the automatic certificate creation option and then on the next screen select finish. Step 27: Open the Mumble Client Software by typing mumble into the terminal. Make sure you are on the same network as the server other you won’t be able to connect. Step 28: Click Server -> Connect on the menu bar to open the Mumble Server Connect dialog window as shown in the next step;

Page 8 of 17 www.cyberpiprojects.com | [email protected]

Step 29: Click Add New... and add in the details; Label: The name that will appear in your server list. Address: This is the IP Address we wrote down earlier. Port: 64738 (Unless you changed it) Username: SuperUser Password: The one you set earlier using the dpkg command. Click on your newly created server and click Connect. This will connect your local certificate profile to the admin user on the Mumble Server so, from now forward you will be connected with admin privileges. You might get a pop-up saying certificate failed verification if so, just select the yes option. Then it will ask you for a password, so just type your password you created earlier for the superuser account. Step 30: To create a channel right click on your server name and click Add.

Page 9 of 17 www.cyberpiprojects.com | [email protected]

Step 31: In the Name field type the new channel name you are creating Click OK to create the channel

Page 10 of 17 www.cyberpiprojects.com | [email protected]

Step 32: Right click on the channel you want to add a password to and click Edit.

Step 33: In the Password field type the channel password Click OK to add the password to the channel

Page 11 of 17 www.cyberpiprojects.com | [email protected]

Step 34: At top of Mumble click the Server menu then click Access Tokens

Step 35: Click Add

Step 36: Type in the channel password

Page 12 of 17 www.cyberpiprojects.com | [email protected]

Click the OK button to finish

Step 37: Now we want to set push to talk. So, click on the Configure menu then click Settings.

Step 38: Under the Audio Input option, you will be able to set the Transmit drop down to the Push To Talk option.

Page 13 of 17 www.cyberpiprojects.com | [email protected]

Step 39: On the left-hand side click the Shortcuts menu to setup a hotkey for Push to Talk. Click the Add button to start the shortcut setup.

Step 40: Under function select the Push-to-Talk option.

Page 14 of 17 www.cyberpiprojects.com | [email protected]

Step 41: Click under the shortcut column to set a key or mouse bind for your push to talk.

Step 42: Click under the apply button to have the settings take effect.

Page 15 of 17 www.cyberpiprojects.com | [email protected]

Step 43: You have now set up the mumble server on a LAN so you can use the mumble server and as long as people are on the same network as you so can they. For further research into this project you could look at Setting up External Access to the Mumble Raspberry Pi Server. Step 44: I hope that this tutorial has shown you all the necessary steps to getting this Raspberry Pi mumble server up and running. You can now pack away your components.

Conclusion This project is designed to introduce students to the concept of a mumble server and the applications it has within IoT. In this project you will have learnt how to set up a Raspberry Pi Mumble server which is an open source VOIP (Voice Over Internet Protocol) chat software that provides you with a low latency high- quality voice chat. Mumble is an extremely powerful application and has many different tools, and this project is just scratching the surface of what you can achieve with it, there are so many different projects you can build around this. Keep in mind that the Raspberry is limited in processing power and will not be able to handle large volumes of traffic accurately.

Disclaimer Any actions and or activities related to the material contained within this Website is solely your responsibility. The misuse of the information in this website can result in criminal charges brought against the persons in question. Cyber Security Associates Limited will not be held responsible for any criminal charges brought against any individuals misusing the information in these projects to break the law.

Page 16 of 17 www.cyberpiprojects.com | [email protected]

Page 17 of 17 www.cyberpiprojects.com | [email protected]