Paparazzi UAS  v5.12_stable-4-g9b43e9b
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
telemetry_w5100 module

Telemetry using PPRZ protocol over W5100 Wifi module

W5100 is connected with a SPI link to the autopilot

Example for airframe file

Add to your firmware section: This example contains all possible configuration options, not all of them are mandatory!

1 <module name="telemetry_w5100">
2  <define name="W5100_DRDY_GPIO" value="GPIOX" />
3  <define name="W5100_DRDY_GPIO_PIN" value="GPIOY" />
4  <configure name="W5100_SPI_DEV" value="SPI1" />
5  <configure name="W5100_SLAVE_IDX" value="1" />
6  <configure name="W5100_IP" value="192,168,25,47" />
7  <configure name="W5100_SUBNET" value="255,255,255,0" />
8  <configure name="W5100_MULTICAST_IP" value="224,1,1,11" />
9  <configure name="W5100_MULTICAST_PORT" value="1234" />
10 </module>

Module configuration options

Configure Options

  • name: W5100_SPI_DEV value: SPI1
    Description: SPI port used for communication
  • name: W5100_SLAVE_IDX value: 1
    Description: SPI slave number
  • name: W5100_IP value: 192,168,25,47
    Description: IP address
  • name: W5100_SUBNET value: 255,255,255,0
    Description: network mask
  • name: W5100_MULTICAST_IP value: 224,1,1,11
    Description: multicast IP address
  • name: W5100_MULTICAST_PORT value: 1234
    Description: multicast IP port

Define Options

  • name: W5100_DRDY_GPIO value: GPIOX
    Description: GPIO port used for data ready pin
  • name: W5100_DRDY_GPIO_PIN value: GPIOY
    Description: GPIO pin number used for data ready pin

Auto-loaded modules

The following modules are automatically loaded (just as if you had added them in the airframe file)

  • module__telemetrysim

Module functions

Init Functions

These initialization functions are called once on startup.

Event Functions

These event functions are called in each cycle of the module event loop.


Header Files

The following headers are automatically included in modules.h

Source Files

Raw telemetry_w5100.xml file:

<!DOCTYPE module SYSTEM "module.dtd">
<module name="telemetry_w5100" dir="datalink" task="datalink">
Telemetry using PPRZ protocol over W5100 Wifi module
W5100 is connected with a SPI link to the autopilot
<configure name="W5100_SPI_DEV" value="SPI1" description="SPI port used for communication"/>
<configure name="W5100_SLAVE_IDX" value="1" description="SPI slave number"/>
<configure name="W5100_IP" value="192,168,25,47" description="IP address"/>
<configure name="W5100_SUBNET" value="255,255,255,0" description="network mask"/>
<configure name="W5100_MULTICAST_IP" value="224,1,1,11" description="multicast IP address"/>
<configure name="W5100_MULTICAST_PORT" value="1234" description="multicast IP port"/>
<define name="W5100_DRDY_GPIO" value="GPIOX" description="GPIO port used for data ready pin"/>
<define name="W5100_DRDY_GPIO_PIN" value="GPIOY" description="GPIO pin number used for data ready pin"/>
<autoload name="telemetry" type="sim"/>
<file name="w5100.h" dir="subsystems/datalink"/>
<init fun="w5100_init()"/>
<event fun="w5100_event()"/>
<makefile target="!fbw|sim">
<configure name="W5100_SPI_DEV" default="SPI1" case="upper|lower"/>
<configure name="W5100_SLAVE_IDX" default="1"/>
<configure name="W5100_IP" default="192,168,25,47"/>
<configure name="W5100_SUBNET" default="255,255,255,0"/>
<configure name="W5100_MULTICAST_IP" default="224,1,1,11"/>
<configure name="W5100_MULTICAST_PORT" default="1234"/>
<define name="USE_$(W5100_SPI_DEV_UPPER)"/>
<define name="USE_SPI_SLAVE$(W5100_SLAVE_IDX)"/>
<define name="W5100_IP" value="$(W5100_IP)"/>
<define name="W5100_SUBNET" value="$(W5100_SUBNET)"/>
<define name="W5100_MULTICAST_IP" value="$(W5100_MULTICAST_IP)"/>
<define name="W5100_MULTICAST_PORT" value="$(W5100_MULTICAST_PORT)"/>
<define name="DOWNLINK"/>
<define name="PERIODIC_TELEMETRY"/>
<define name="DOWNLINK_DEVICE" value="chip0"/>
<define name="DOWNLINK_TRANSPORT" value="pprz_w5100_tp"/>
<define name="DATALINK" value="W5100"/>
<file name="downlink.c" dir="subsystems/datalink"/>
<file name="datalink.c" dir="subsystems/datalink"/>
<file name="telemetry.c" dir="subsystems/datalink"/>
<file name="pprz_transport.c" dir="pprzlink/src"/>
<file name="w5100.c" dir="subsystems/datalink"/>
<makefile target="ap|nps" firmware="fixedwing">
<file name="fixedwing_datalink.c" dir="$(SRC_FIRMWARE)"/>
<file name="ap_downlink.c" dir="$(SRC_FIRMWARE)"/>
<makefile target="ap|fbw|nps" firmware="fixedwing">
<file name="fbw_downlink.c" dir="$(SRC_FIRMWARE)"/>
<makefile target="ap|nps" firmware="rotorcraft">
<file name="rotorcraft_datalink.c" dir="$(SRC_FIRMWARE)"/>
<file name="rotorcraft_telemetry.c" dir="$(SRC_FIRMWARE)"/>