Skip to content

USART Driver Support

Ryan Kortbeek edited this page Aug 23, 2021 · 1 revision

Using this ground station repo with usart drivers (note: can't be done with Docker (yet)):

This assumes that you have the ex2_obc_software code running on a hardware board, and it's plugged into your computer.

  1. Install this repo, along with the ground_station branch of libcsp found here
  2. Configure libcsp to include python bindings, examples, and uart drivers like so:
./waf configure --with-os=posix --enable-rdp --enable-hmac --enable-xtea --with-loglevel=debug --enable-debug-timestamp --enable-python3-bindings --with-driver-usart=linux --enable-examples
  1. build libcsp:
./waf build
  1. You can verify by sending some pings by running the following command in the libcsp directory
sudo ./build/csp_server_client -k /dev/ttyUSB0 -r 0 -a 2

Which should ping the device running on USB0 (this may vary) with CSP address 0 5. To run the code in this repo, cd to the root of this project and run

sudo LD_LIBRARY_PATH=~/libcsp/build PYTHONPATH=~/libcsp/build python3 src/groundstation.py -I uart

Note: the command will vary depending on the location of the libcsp library on your computer.