Skip to content
matt-knight edited this page Jul 23, 2017 · 6 revisions

Input/Output Overview

A frequent question that is raised regards the data types of gr-lora's inputs and outputs -- why they are gray as opposed to blue (complex float), yellow (short), etc. gr-lora's input and output is predominantly handled by GNU Radio's message passing API. This API is a powerful complement to GNU Radio's default synchronous datapath, and is well suited to handling packetized data -- such as what a MAC/layer 2 parser would pass to a PHY/layer 1.

The cleanest way to pass data into and out of gr-lora is with the Socket PDU block. The Socket PDU is a core GNU Radio block, and essentially exposes a websocket within the flowgraph. Configuring the Socket PDU is easy.

Input

Into gr-lora's encoder:

  • Create a Socket PDU and configure it to: Type=UDP Server, Host=127.0.0.1, Port=your choice, MTU=10k.
  • Connect its output pdus port to the encoder's in port.
  • To send data to the LoRa encoder, first start your flowgraph, then write data to your Socket PDU is if it were a conventional websocket. The easiest way to get up in running is with netcat: nc -u [IP] [PORT]

Output

Out of gr-lora's decoder:

  • Create a Socket PDU and configure it to: Type=UDP Client, Host=127.0.0.1, Port=your choice, MTU=10k.
  • Connect your decoder's out port to Socket PDU's input pdus port.
  • Configure a UDP server to ingest Socket PDU's output -- this can be a server written in your own application, or a command line tool of your choice. Netcat again is easy: nc -l -u [IP] [PORT]
  • Start your server application, and then start your flowgraph.
Clone this wiki locally