GithubHelp home page GithubHelp logo

uaarg / telemetry-over-wifi Goto Github PK

View Code? Open in Web Editor NEW
0.0 5.0 2.0 441 KB

Code supporting redundant links by allowing telemetry to be sent to the ground segment over an IP network.

Makefile 4.05% C 83.78% C++ 12.17%

telemetry-over-wifi's Introduction

telemetry-over-wifi

Code supporting redundant links by allowing telemetry to be sent to the

ground segment over an IP network.

Currently configured to get data from a client and push it upstream to a server

** [ by default via UDP, easily configurable for TCP ].

Usage

make && cd exec

To spawn the server:
  ./server <port> <inDataStoragePath>

To spawn the client:
  ./client <targetHostName> <port> <serialdevice> <baudrate> [<dataSourcePath> eg /dev/ttyO3]

  Note: <baudrate> is an unsigned integer value eg 56700

File organization / Hierarchy

  • All header files [*.h] are in directory include/

  • All source files [*.c] are in directory src/

  • All executables created after running 'make' will be in directory exec/

  • Sample logs are in directory logs/

telemetry-over-wifi's People

Contributors

scdwyer avatar camlee avatar

Watchers

 avatar James Cloos avatar  avatar Emmanuel T Odeke avatar  avatar

Forkers

scdwyer odeke-em

telemetry-over-wifi's Issues

termios.h equivalent for Windows

The Windows header file equivalent for termios.h and pthread.h( if not using a Mingw compiler) are needed and then we can have a cross-platform build.

Proper signal/interrupt handling

A need for proper signal handling ie when interrupts such as SIGINT are detected and require the program to exit, we should restore the state of all open terminals[revert their baud settings etc], flush them all, close all open files.

Make polling ability configurable

The polling ability should be configurable at a high level. In particular, it should be easy to adjust wait times, maximum number of attempts, etc...

Technical Discussion:
I'd suggest implementing the following if it's not too difficult:
Keep a retry_delay_times array such as: [0.1, 0.1, 0.1, 0.2, 0.5, 1]. (units in seconds here)
Also keep a retry_delay_times_index integer. When a connection fails (is lost or fails on initial startup), wait the delay time at the index, increase the index, then try again. Once the last element is reached, keep trying at that delay time indefinitely. When a connection is established, set the index to zero in preparation for the next time it's lost.

The key behavior is that it'll aggressively try to reconnect immediately after a connection is lost but if the connection remains lost, it'll always poll at least every second. This allows a balance between performance and resource use while being able to handle both very intermittent links and links that are down for extended periods of time.

Fails to compile on OS X 10.7.5

Before the rework it compiled.

Gives the following error:
$ make
gcc -DUNIX -Wall client.c -o client
Undefined symbols for architecture x86_64:
"_socketConnection", referenced from:
_main in ccmPgpkG.o
"_msgTransit", referenced from:
_main in ccmPgpkG.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
make: *** [client] Error 1

@odeke-em any ideas?

Fix or investigate erroneous output in client

Running the client when there is no server yields output like the following:
Client: connected to 127.0.0.1
send: Connection refused
.
.
.
send: Connection refused
send: Connection refused
Done readingsent: 24576
byteTrans 24576

I see the "Done reading", but where does the "sent: 24576" come from? At the very least it should be on it's own line, but since this is the same data as the next line, it should really be suppressed.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.