The TR Server thumb drive is a complete TR Server system contained on a flash drive ready to install and boot from a PC. This includes all required software and supporting files and is ready for immediate use. This article will cover PC configuration and installation of the TR Server:
- PC Requirements for the TR Server
- Configuring the PC System Bios
- Booting and Logging In
- Starting the TR System
- Using the TR Configuration Page
- Uploading Your Music Files
- Putting TR on the Internet
- Using Telnet to Access TR Remotely
- Who is Listening?
TR Server PC Requirements:
Almost any kind of PC can be used to host a TR Server using the thumb drive. Here are the minimum requirements:
- i486 or newer CPU, all Intel processors and AMD processors will work
- Bootable from USB drive
- 48 MB of RAM (or more)
- Network Card
A monitor and keyboard will be needed for initial bootup, but not once the server is operational. Older PCs are ideal for the TR Server and even thin client PCs will work.
Configuring the PC System Bios:
If you have an old PC you want to convert to s TR Server it most likely already has an operating system resident on the hard drive and is configured to boot the operating system from there. This can be changed in the PCs BIOS settings and the idea is to have the PC look at the USB port for a bootable drive such as the TR Server thumb drive. All but the oldest PCs will be able to boot from the TR Server thumb drive – it is just a matter of configuring the settings in the BIOS menus.
A fast tutorial is here.
A video tutorial is here.
A method to boot from a thumb drive when the BIOS does not have that option is here.
Once you have configured the PC BIOS to look for the USB thumb drive first, power down the PC, plug the TR Server Thumb Drive into a USB port, connect the PC to your home network and then power up the PC.
Booting and Logging In:
If the BIOS has been properly configured your PC screen will now show the TR Server Linux boot up sequence.
Please keep in mind this boot up sequence is very long and involves a lot of different steps! It will probably take several minutes before the TR Server is ready for logging in.
The TR Server Thumb Drive is a Linux system so the characters and messages on the screen as it boots up may look a bit strange. Linux is pretty good about showing you what is happening, but there may be times when all you see is a dot moving a little from time to time. Have patience and don’t give up!
Eventually you will come to a splash screen that looks like this:
There is an automatic countdown feature that activates in 5 seconds, and the booting process continues with more strange messages and notices passing by. The TR Server is built from a command line Linux and everything will be in text mode.
After some minutes the log-in prompt will appear, as shown below:
There are some things to note prior to logging in. Above the login screen proper is a series of lines starting with eth0: This is the way Linux idenifies the IP address on your PC network that has been assigned to the TR Server by your network router. The actual IP address appears in the second line and in this case is:
Write this down the first time you boot so you can find the TR Server on your network later.
Also note the commands to correctly shut down the TR Server – use poweroff to close down TR safely.
Next, find the Password supplied with the TR System Server Thumb Drive when you received it.
To log in, enter the username root (followed by return) and then your password (and return.)
You should arrive at a screen prompt with a flashing cursor that looks like this:
You’re in! Now you can navigate around the system and explore if you want. The guided tour is here. You can also download and install the Putty telnet client and log in from any PC on the network. Simply configure Putty as described and use the IP address issued during the boot up screen described previously.
Setting the Date:
The TR Server, when first booted, will likely have an incorrect time and date. To change this to, say November 22, 2015 at 6:00 PM, type the following command line and press the Enter key:
date -s “22 NOV 2015 18:00:00”
The time and date will be saved if the TR Server is powered down, but should be checked for accuracy on each power up.
Changing Your Password:
You can change the password for root at any time using the following command:
Enter the new password and confirm – and it will be enabled. Be sure to record this new password in a safe place!
Starting the TR System:
TR is designed to be used from a browser on the network, but the TR system has be enabled after power up. (After that you can leave the TR Server running and do everything from a different PC over the network using a browser, Telnet and FTP tools described.)
To start the TR Server after [power up, proceed as follows:
Navigate to the tr directory by entering the following Linux commands (all Linux commands are followed by the return key)
Once inside the tr directory, start the http server as follows:
You should see a notice that the lighttpd web server has been started.
Next, navigate to the cgi-bin subdiredtory
Activate the TR Server controller program as follows:
You should see a process number assigned to this. You can view all the Linux process by entering:
This should produce a long, mostly mysterious list of programs running on the TR Server – you should be able to find httpd and ctlr.pl in the list. httpd is the web server that your browser accesses to see the TR player page. ctlr.pl is a program that looks for a reconfiguration signal to start a new sequence of music files.
Once these programs have been started, you can verify that everything is functioning by opening a browser on another PC on the same network as the TR Server machine. Simply enter the following into the browser address box:
Where: 192.168.1.116 is the IP address assigned to the TR Server on power up. This will be the location of the player page on the TR Server. Each TR Server thumb drive comes loaded with a set of music files so that the system is completely functional. If everything so far has happened correctly you should see something like the following, although the actual music installed may vary.
This means the TR Server is up and running.
You can activate the player and hear the music. If you have a tablet or smartphone that can access your home network, see if the TR Server loads and works normally.
Using the TR Configuration Page:
To change the TR Server configuration, use your browser to navigate to the configuration page located at: http://192.168.1.116/lpcfg.html. You should see the following page in your browser:
Press the Configure button, and the complete configuration page will load into your browser, as shown below:
Here are all the elements that define a TR music sequence. You can edit this using the text boxes and drop-down menus supplied.
The text boxes – for some unknown reason – need to have an underscore _ between words for the title and composer names.
The Reconfigure button needs to be pressed to save the new configuration.
You will then see the new configuration again, as shown below:
In this case a new sequence algorithm has been chosen – Weather 3 – that uses European weather in sixteen cities to determine the sequence of the loaded music files.
To start the new sequence, press the Start Sequencing button. The browser will now be loaded with a notification page:
This notifies the user that a new sequence has started – and this will take an hour or more for this to complete, depending on the size of the files and the speed of the TR Server PC.
Do Not Edit or Initiate Any Changes to the Configuration While a New Sequence is in Progress!!!
You can understand why – the re-sequence process is independent of the viewing and configuration editing – if you somehow start several new sequences simultaneously, your TR Server will bet hopelessly bogged down and you may have to power down, re-boot and do some file repair.
You can, however, return to the player page and listen to the previous configuration. The player page is refreshed with a notice only when the newly sequenced music files are ready. If you should happen to be listening and the new music files are written, the player will simply stop playing. Refresh the page in your browser and you will see a configuration change notice – this is an indication that the new configuration is almost ready for playing. You can check back to the player page in a few minutes and the new player will appear.
Uploading a New Piece:
You upload files for a new piece to the TR Server using a free FTP client program called CoreFTP LE. You can download this program from the Core FTP site here. Once installed, run Core FTP and fill out the configuration screen as shown below to connect to your TR Server:
If you are connecting for the first time over your home network, use the local IP address assigned to the TR Server by your router. (This IP address was displayed just above the log-in screen when the TR Server was first booted.) Be sure to use root as the username and enter the password supplied with your system – or the password that you changed to. Note the Port number and Connection Type.
When you press the Connect button on this screen you will be asked about SSH codes – agree to this – it will only happen the first time you make a secure connection to the TR Server.
If all is successful you will see the Core FTP screen, similar that shown below:
On the left-hand side the files in the PC are shown. You can navigate around your PC file system using the buttons and controls immediately above the file list box. The idea is to get to the folder on your PC that holds the music segments as .ogg files. These should be precisely the same length and named exactly per the coordinate system described elsewhere in this site.
The right-hand side of the Core FTP screen is a similar list of files on the TR Server. You use the same sorts of navigating – first to the root directory (use the button with the up arrow) and then scroll down until you see tr in the list. Click on this and wor your way down to the /tr/cgi-bin/sourcetr directory. There will be files residing there from the original installation of TR, and these can be saved (to a separate and different PC directory!) or simply deleted. To delete the files, highlight all the files in the directory and press the Delete button above the file box.
Next, highlight all the .ogg segment files on your PC and press the Transfer button, as circled in the above screenshot. It may take several minutes for all the files to be moved over – you will see the progress as it occurs.
Note that if you have included some delay files in your piece, (named AAAA.ogg and AAA.ogg) these must be transferred to the /tr/cgi-bin directory – they do not go in the /tr/cgi-bin/sourcetr directory with the other .ogg files You navigate to /tr/cgi-bin folder, highlight the correct files on your PC and press the Transfer button, If there are existing files with the same name you will be asked to overwrite these. Of course it’s always a good idea to have back up copies.
When all the files have been transferred to the correct locations, use the Disconnect icon to close the FTP connection. If this seems complicated, a little practice will make it seem second nature. It is no more difficult than using Windows Explorer.
Next, return to the TR Configuration page in your browser and enter the new name, artist and sequence parameters. Update and start the sequence and after some while you will be able access the new player page with the new sequence, ready to play.
Note that Core FTP also works over the Internet – you simply need your router’s Internet IP address (see the Internet configuration discussion here. You can write music and upload the files to your TR Server from anywhere.
Putting TR on the Internet:
Putting your TR Server on the Internet is fairly straightforward. Here is the complete discussion.
Once your TR Server is connected to the Internet you can put links to the home page on social media or other web sites to attact visitors.
Accessing TR via Telnet:
A convenient way to log into the TR Server from a remote PC is to use Telnet. There is a secure Telnet server included in TR, you just need a Telnet client program to access this.
Putty is a free Telnet client for Windows that works very well with the TR Server. You can download Putty here:
Once installed, enter the IP address of the TR Server and the port number in the configuration screen, as shown below.
Note that you enter the TR Server local IP address if you are logging in from your home network. (Use your Internet IP address if you are logging in from the Internet.) Be sure to enter Port 22 and SSH in the configration, and save it using a convenient name. You can also set the default colors and other parameters, shown in the list on the left-hand side of the Putty configuration screen.
Press the Open button and you will see a bunch of SSH security activity the first time you log in – confirm this and you should be presented with the TR Server log-in screen as shown below:
Log in as root, and enter the TR Server password. You now have access to TR, just as if you are sitting at the TR Server PC keyboard and monitor. If fact, you can disconnect the keyboard and monitor of your TR Server PC and operate it as a headless system via Telnet and FTP.
Who is Listening?
The TR Server is configured with a logging function that records the IP address, time, date and pages served by the TR web server. If you have the TR Server running on the Internet and uploaded a new piece of music for sequencing, you can put a link to the TR Server in your Facebook feed or other social media to invite listeners.
To find out if anyone is listening, you can read the web server access log for clues. This file is located in the /tr subdirectory and is named accesslog.txt. You can open this file under Putty by typing in the command:
You can also view the accesslog.txt file from a browser – simply put this into your browser’s address box:
This will be convenient, but keep in mind that each time you view this page through a browser you will be adding another entry into the accesslog.
A better idea is to FTP accesslog.txt back to your PC so you can open this with Notepad or bring into a spreadsheet. Here is a sample of a typical accesslog.txt file:
Each line of the accesslog.txt file represents a page that has been served out to a requesting browser. Here is a description of the contents of the file:
IP Address: The first item is the IP address of the requesting browser. Often the same IP address appears in consecutive lines because several pages or files have been served to the same requester.
Date/Time: This appears in brackets next to the requesting IP address.
Request Type: This will usually be a simple GET page request.
Files Served: The file name of the pages served appear after GET and tell you what pages were sent to the requesting IP.
Bytes Served: This is the number of bytes sent and is an important clue – the large numbers are the .ogg music files sent to a listener. A small number of bytes served indicates that the player on the TR home page was not activated – so there was no one listening.
There is some useful information in accesslog.txt, but it takes a little study and digging to extract. In the above example the IP address 192.168.1.1 is the router IP on a home network and shows that trackall.ogg – the player file – was served as well as a lot of bytes were shipped out. So the first six lines show the pages served by the TR Server to a listener on the home network.
The next series of lines are from IP 18.104.22.168 and several pages were served, but the player was apparently not activated.
The lines from IP address 22.214.171.124 show that the TR home page and player were accessed – and this IP address is known to be the cell phone IP of a TR Server user. So the music on the TR Server was heard via cell phone.
The lines showing IP address 126.96.36.199, however, have some mysterious php script lines and just a few page bytes. This is likely a robot trolling IP addresses for activity.
Identifying Requesting IP Address Locations:
You can get some idea of where requesting IP addresses originate by using a reverse IP lookup utility. There are a number of these on the Internet – just google it – but one that gives a geographical location can be found here:
If we enter the mysterious IP address 188.8.131.52 into the IP lookup utility, we get the following:
So this IP address is located in Holland, and is likely just a bot searching out possible customers for software services. It can be a bit disconcerting to see how much unsolicited activity your TR Server can attract – especially once you post your IP on a social media page. But by taking your server offline and changing your password from time to time you should be mostly immune from actual hackers.