Skip to content
Browse files

Add to documentation and Makefile

The readme didn't describe some of the dependencies that are necessary
to compile the C part, and run the Python part. Also, the steps for
getting the protobuf file generated for Python was not documented or
automated. Also, there was no simple way to clean up the generated
files. All of this is now fixed.
  • Loading branch information...
rattboi committed Jan 24, 2017
1 parent 7da5a09 commit 6d55dd78664e24c13090c85167b9c7960794f8f3
Showing with 45 additions and 3 deletions.
  1. +3 −0 .gitignore
  2. +16 −2 Makefile
  3. +25 −0
  4. +1 −1
@@ -38,3 +38,6 @@ tv-serial

# Protobuf files

# Build directory
@@ -10,11 +10,25 @@ OBJS = \
$(BUILDDIR)/serial-commands.o \
$(BUILDDIR)/tv-serial.o \

$(BUILDDIR)/%.o: %.c $(DEPS)
all: tv-serial

rm -rf $(BUILDDIR)

mkdir $(BUILDDIR)

$(BUILDDIR)/%.o: %.c $(DEPS) $(BUILDDIR)
$(CC) -c -o $@ $< $(CFLAGS)

tv-serial: $(OBJS)
$(CC) -o $@ $^ $(CFLAGS) $(LIBS)

$(BUILDDIR)/commands.pb-c.c $(BUILDDIR)/commands.pb-c.h: commands.proto
$(BUILDDIR)/commands.pb-c.c $(BUILDDIR)/commands.pb-c.h: commands.proto $(BUILDDIR)
protoc-c --c_out=$(BUILDDIR) $< $(BUILDDIR)/

$(BUILDDIR)/ commands.proto $(BUILDDIR)
touch $(BUILDDIR)/
protoc --python_out=$(BUILDDIR) $<
@@ -9,6 +9,31 @@ reference to using the serial port as an "external control device". Everything
the remote control can do can be done via the serial port, which opens up some
interesting automation possibilities.

## C Dependencies

You need ZeroMQ libs, the Protobuf C compiler, and Python dev files to compile the tv-serial executable
apt install libzmq3-dev protobuf-c-compiler python-dev

## Python Dependencies

You need the python ZeroMQ and the Protobuf python library and compiler to run the script

apt install protobuf-compiler
pip install pyzmq
pip install protobuf

## Building

Assuming you have all dependencies installed, it should be as easy as:


## License

![AGPL v3.0](
@@ -1,7 +1,7 @@
#!/usr/bin/env python

import argparse
import commands_pb2
from build import commands_pb2
import sys
import zmq

0 comments on commit 6d55dd7

Please sign in to comment.
You can’t perform that action at this time.