Code Monkey home page Code Monkey logo

broadcaster's Introduction

Broadcaster

A QNX process for broadcasting data over an RN2483 LoRa radio module using a UART connection.

Usage

See the help documentation with the command: use broadcaster.

This program expects input through the form of a file or via stdin. The input should be packet data written in ASCII using only valid hexadecimal characters. A newline character is used to separate packets for transmission.

All radio parameters are configurable via command line arguments. The default values are listed in the help docs available by calling use broadcaster.

WARNING: LoRa radio parameters can be set using command-line to the program. You should not assume that the defaults match the settings for the CUInSpace ground station. For instance, the ground station assumes cyclic redundancy check to be enabled, but it is disabled by default in broadcaster. You will need to pass the -c flag to enable it.

Development

Please visit the GitHub wiki for developer resources.

broadcaster's People

Contributors

linguini1 avatar

Stargazers

 avatar

Watchers

 avatar

broadcaster's Issues

Radio fails to respond sometimes

Sometimes the radio fails to have its parameters set over UART on the first time broadcaster is run. This sometimes happens intermittently when broadcaster is run subsequently.

There should be some kind of retry to communicate with the radio to set parameters. It would also be good to understand the root cause of this issue, and why it happens intermittently. Is it because of timings?

Specify device handle for radio as command line argument

Currently /dev/ser3 is hardcoded as the device handle for the LoRa radio. This may change depending on where the program is run (not necessarily on our Pi with the custom boot image).

It should be provided as a positional command line argument.

Add 'mac pause' before transmisison

The RN2483 datasheet requires a mac pause command before a radio tx <data>, as discovered by Scott. Ideally we should include a new function for transmitting which does the following necessary steps:

  1. mac pause
  2. tcdrain() (to ensure module has received previous command)
  3. radio tx <data>
  4. tcdrain()
  5. Ensure success response was returned by reading radio output

The function should take the radio file descriptor and a string of data to transmit as input, and should return true or false based on whether or not the transmission was successful.

Gaurantee that all packets will be transmitted

Currently, broadcaster can receive input so quickly that the UART connection to the LoRa module cannot keep up. If the transmission fails, the LoRa radio reports it through stderr and continues.

In our telemetry system, the only acceptable packet loss should be due to loss over the air, not failure to be transmitted in the first place.

The program should retry failed transmissions until it is successful. There should be an upper limit to how many times broadcaster retries transmission. This may require experimentation to see what limit provides an acceptable throughput without piling up the input stream. Note that tests are currently being run with a dummy version of fetcher, which operates much faster than it will in reality (reading actual sensors takes time).

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.