serial media server FAQ

Installation

Just go forward and buy a ready to use image at my shop.

After downloading the image decompress it using 7zip or xz and write the image to a 16GB micro sd card using etcher or Win32DiskImage (or similar tool).

Startup

Put sd card into Pi3 slot, connect a HDMI display and power it up :-)

Connections

serial media server uses (in default configuration) the builtin hardware UART of the pi. It is exposed at pins 6, 8 and 10media-serverserial-cable

The comm port configuration is 57600 8N1.

So the easiest test would be get some USB to TTL 3.3V serial cable like this and then connect via putty (or similar) to send some commands to serial media server.

Commands

Commands always consist of 2 bytes. The two bytes represent a 16 Bit hex number or in other word 1. byte * 256 + 2. byte gives you the final number. If you connect via terminal program bytes are typically send in ascii code, which means if you type „00“ (two times zero) this will result in 48 (ascii for zero) * 256 + 48 = 12336. So 12336 is the resulting „command“.

serial media server is simply looking for a file like 12336.jpg or png to show. Or 12336.mp4 to play.

Media files

sd card is splitted in 2 partitions:

  1. windows readable data partition
  2. linux partition hosting serial media server binaries

media files all got to windows partition „data“ directory. So to copy media to the server just plug the sd card into your computer before starting media server and copy your media to the data directory. In order to get something played follow the naming convention mentioned above.

Using together with RasPiSound

Starting with version 1.17 of RasPiSound you can add a control file called serial.txt to every sound effect directory.

serial.txt file typically just contains one line mentioning one number which is the serial command for the media server. So in order to play this 12336.mp4 I used in the example above, just type 12336 in the serial.txt file and you’re done.

You can also use more than just one command in serial.txt by just adding more numbers separated by space like „12336 12337“ this would send either 12336 or 12337 commands to the media server choosen by random.

Connecting RasPiSound Shield to server

As the UART connection is effectively unidirectional (RasPiSound sends, server listens) you only need two wires to connect the two like this

Serial-Connection

Hinterlasse eine Antwort

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind markiert *