Skip to content

Server config file

Shahmir Javaid edited this page Apr 16, 2016 · 8 revisions

The remote and the server come with many configuration option to finetune your project. This documentation list configuration options for the server programs and the remotes.

The configurations can be loaded for server programs by using the --config parameter. For example:

bin/servod --config /etc/dashee/servod.conf

An example of all possible values can be found at files/examples/servod.conf.

Command line options

  • --port <number> The port number.
  • --verbosity <number>, -v, -v[v]+ The verbosity value.
  • --servo-name <filepath> The servo file path
  • --servo-type [1|2|3] The servo type to run
  • --config <filepath> The configuration file to load

Config file

The config file can take key value pairs represented in the format of key='value'. The value can be of string represented by quotes or a number without any quotes. Certain values are strong typed. For example passing a string to timeout='not valid' will not start the program. Values such as key=my non quoted value can be used, but it is recommended to use quotes for strings and no quotes for numeric type values.

General config keys

Some general settings which represent the state of the server are defined here.

config type description
timeout Int Number of seconds to wait for input before falling back to non-input functions such as autonomous functions or cut power. This is helpful for cars losing control.
timeoutM Int Same as timeout but represents the number in milliseconds. A combination of timeout and timeoutM may be used to represent fractional seconds. For example 1.5, 0.5, 1.999 or 0.100

Server configs, server-

The server sits and listens on 2047 over UDP by default. This can be changed given the following options.

config type description
port Int Allows to change the port the server is ran on, default is set to 2047
protocol String The type of server, UDP or TCP. By default we use UDP which is recommended but if you wish this can be changed.

Servo controller, servo-

These sets of options are used to provide configuration interface to Servo controllers. One may employ many types of servo controller from different manufacturer. These options allow you to tweak your set up accordingly.

Using a servo controller that is not defined, Read our documentation about Hardware > Servo Controller. You can help us add one feel free to fork.

config type description
type String The number represents the type of devices which controls the servo, The only board we support this program supports at the moment is the Pololu Servo board, which can be connected over UART or USB. In addition for testing we support a Dummy board, which is represented by a file on the server. The values can be UART, USB, Dummy
name String Is used for representing the file-path where the device lies. For UART this is usually /dev/ttyAMA0, for USB /dev/ttyUSB0 and for Dummy the file ./data/Servo.bin is created by the makefile. Note the dummy file is a relative path to the server folder in the source-code. The default value is set to /dev/ttyAMA0
channel Int This variable represents the number of channels a servo board represents. In some cases (like the Pololu Servo controller board) you can have different set of channels that our servod program can talk to. In these cases it is easier to add a value that will represent the number of channels that are available to communicate with. The program does not guarantee correct behaviour if an invalid channel number is accessed. For the Dummy type, the channel's must be 6 as the file only generates 6 channel dummy file.

Vehicle configuration, vehicle-

These sets of options are used to represent the state of the Vehicle on boot up. The following options are valid for all vehicle types.

config type Default description
type String Car A string value which represent the type of vehicle the program represent, Currently we only support Car and MultiRotoarQuadX. More will be added soon. The value is defaulted to Car and is represented by a string.
pitch Int 128 Sets the default values of the Pitch.
roll Int 128 Sets the default values of the Roll.
yaw Int 128 Sets the default values of the Yaw.
throttle Int 0 Sets the default values of the Throttle.
pitch-fallback Int 128 The fallback value of Pitch.
roll-fallback Int 128 The fallback value of Pitch.
yaw-fallback Int 128 The fallback value of Pitch.
throttle-fallback Int 0 The fallback value of Pitch.

Car, vehicle-car-

It is helpful to allow configuring the servo number that represent the controls. **The following options are only valid if the vehicle-type is set to Car. **

config type Default description
yaw-motor Int 0 The yaw represents the Steering in a car, and so the channel which represents the servo which controls the car can be represented here.
throttle-motor Int 1 The channel at which the motor sits on can be configured using this value.

Multirotor Quad, vehicle-multirotor-quad-

Each quad copter type X, H or + has 4 motors m1, m2, m3 and m4. The channel which the servo board represents each of these can be changed by using the following

config type Default description
m1 Int 0 The first motor
m2 Int 0 The second motor
m3 Int 0 The third motor
m4 Int 0 The fourth motor

##Other notes We support communication with the servo's using the Pololu Servo controller boards. Further documentation on these boards can be found at

You can’t perform that action at this time.