Firmware for an ad-hoc mesh network of Internet-of-Things devices based on LoRa (Long Range radio) that can be deployed quickly and cheaply.
cdpcfg.h File Reference

CDP central compile-time configuration file. More...

Go to the source code of this file.

Macros

#define CDPCFG
 
#define CDPCFG_BOARD_DEFAULT
 
#define CDPCFG_PIN_BAT   37
 
#define CDPCFG_BAT_MULDIV   320 / 100
 
#define CDPCFG_PIN_VEXT   21
 
#define CDPCFG_PIN_LED1   25
 
#define CDPCFG_PIN_LORA_CS   18
 
#define CDPCFG_PIN_LORA_DIO0   26
 
#define CDPCFG_PIN_LORA_RST   14
 
#define CDPCFG_PIN_OLED_CLOCK   15
 
#define CDPCFG_PIN_OLED_DATA   4
 
#define CDPCFG_PIN_OLED_RESET   16
 
#define CDPCFG_PIN_OLED_ROTATION   U8G2_R0
 
#define CDPCFG_PIN_LORA_DIO1   -1
 
#define CDPCFG_UPDATE_USERNAME   "username"
 Non board specific configuration. More...
 
#define CDPCFG_UPDATE_PASSWORD   "password"
 
#define CDPCFG_SERIAL_BAUD   115200
 Serial Console Baud Rate. More...
 
#define CDPCFG_AP_IP1   192
 
#define CDPCFG_AP_IP2   168
 
#define CDPCFG_AP_IP3   1
 
#define CDPCFG_AP_IP4   1
 
#define CDPCFG_WEB_PORT   80
 Asyncwebserver Port. More...
 
#define CDPCFG_RF_LORA_FREQ   915.0
 Frequency Range. Set for US Region 915.0Mhz. More...
 
#define CDPCFG_RF_LORA_BW   125.0
 Bandwidth. Default is 125Mhz. More...
 
#define CDPCFG_RF_LORA_SF   7
 Spread Factor. More...
 
#define CDPCFG_RF_LORA_TXPOW   20
 Transmit Power. More...
 
#define CDPCFG_RF_LORA_GAIN   0
 Antenna Gain correction. More...
 
#define CDPCFG_CDP_BUFSIZE   256
 CDP message buffer max length. More...
 
#define CDPCFG_UUID_LEN   8
 CDP UUID generator max length. More...
 
#define CDPCFG_MILLIS_ALIVE   1800000
 CDP ALIVE timer duration in milliseconds. More...
 
#define CDPCFG_MILLIS_REBOOT   43200000
 CDP REBOOT timer duration in milliseconds. More...
 
#define CDPCFG_PIN_RGBLED_R   25
 CDP RGB Led RED Pin default value. More...
 
#define CDPCFG_PIN_RGBLED_G   4
 CDP RGB Led GREEN Pin default value. More...
 
#define CDPCFG_PIN_RGBLED_B   2
 CDP RGB Led BLUE Pin default value. More...
 
#define CDPCFG_LORA_CLASS   SX1276
 Default LoRa Module supported chipset. More...
 
#define CDPCFG_OLED_CLASS   U8G2_SSD1306_128X64_NONAME_F_SW_I2C
 
#define CRPCFG_POST
 

Detailed Description

CDP central compile-time configuration file.

  • cdpcfg-pre.h at the beginning
  • cdpcfg-post.h at the end

To customize your build, you could ...

  • Edit this file or
  • Copy it to cdpcfg-pre.h and edit that or
  • Create a from-scratch cdpcfg-pre.h that just overrides f.ex. the board defines or
  • Create a cdpcfg-post.h to undef/define just parts
Version
Date
2020-09-16

Macro Definition Documentation

◆ CDPCFG

#define CDPCFG

◆ CDPCFG_AP_IP1

#define CDPCFG_AP_IP1   192

◆ CDPCFG_AP_IP2

#define CDPCFG_AP_IP2   168

◆ CDPCFG_AP_IP3

#define CDPCFG_AP_IP3   1

◆ CDPCFG_AP_IP4

#define CDPCFG_AP_IP4   1

◆ CDPCFG_BAT_MULDIV

#define CDPCFG_BAT_MULDIV   320 / 100

◆ CDPCFG_BOARD_DEFAULT

#define CDPCFG_BOARD_DEFAULT

BOARD "ttgo lora" and "heltec lora" v1

heltec pcb is white, ttgo pcb has heltec+ttgo markings left top+middle in this picture https://github.com/Xinyuan-LilyGO/TTGO-LoRa-Series pio: board = ttgo-lora32-v1

◆ CDPCFG_CDP_BUFSIZE

#define CDPCFG_CDP_BUFSIZE   256

CDP message buffer max length.

◆ CDPCFG_LORA_CLASS

#define CDPCFG_LORA_CLASS   SX1276

Default LoRa Module supported chipset.

◆ CDPCFG_MILLIS_ALIVE

#define CDPCFG_MILLIS_ALIVE   1800000

CDP ALIVE timer duration in milliseconds.

◆ CDPCFG_MILLIS_REBOOT

#define CDPCFG_MILLIS_REBOOT   43200000

CDP REBOOT timer duration in milliseconds.

◆ CDPCFG_OLED_CLASS

#define CDPCFG_OLED_CLASS   U8G2_SSD1306_128X64_NONAME_F_SW_I2C

◆ CDPCFG_PIN_BAT

#define CDPCFG_PIN_BAT   37

◆ CDPCFG_PIN_LED1

#define CDPCFG_PIN_LED1   25

◆ CDPCFG_PIN_LORA_CS

#define CDPCFG_PIN_LORA_CS   18

◆ CDPCFG_PIN_LORA_DIO0

#define CDPCFG_PIN_LORA_DIO0   26

◆ CDPCFG_PIN_LORA_DIO1

#define CDPCFG_PIN_LORA_DIO1   -1

◆ CDPCFG_PIN_LORA_RST

#define CDPCFG_PIN_LORA_RST   14

◆ CDPCFG_PIN_OLED_CLOCK

#define CDPCFG_PIN_OLED_CLOCK   15

◆ CDPCFG_PIN_OLED_DATA

#define CDPCFG_PIN_OLED_DATA   4

◆ CDPCFG_PIN_OLED_RESET

#define CDPCFG_PIN_OLED_RESET   16

◆ CDPCFG_PIN_OLED_ROTATION

#define CDPCFG_PIN_OLED_ROTATION   U8G2_R0

◆ CDPCFG_PIN_RGBLED_B

#define CDPCFG_PIN_RGBLED_B   2

CDP RGB Led BLUE Pin default value.

◆ CDPCFG_PIN_RGBLED_G

#define CDPCFG_PIN_RGBLED_G   4

CDP RGB Led GREEN Pin default value.

◆ CDPCFG_PIN_RGBLED_R

#define CDPCFG_PIN_RGBLED_R   25

CDP RGB Led RED Pin default value.

◆ CDPCFG_PIN_VEXT

#define CDPCFG_PIN_VEXT   21

◆ CDPCFG_RF_LORA_BW

#define CDPCFG_RF_LORA_BW   125.0

Bandwidth. Default is 125Mhz.

◆ CDPCFG_RF_LORA_FREQ

#define CDPCFG_RF_LORA_FREQ   915.0

Frequency Range. Set for US Region 915.0Mhz.

◆ CDPCFG_RF_LORA_GAIN

#define CDPCFG_RF_LORA_GAIN   0

Antenna Gain correction.

◆ CDPCFG_RF_LORA_SF

#define CDPCFG_RF_LORA_SF   7

Spread Factor.

◆ CDPCFG_RF_LORA_TXPOW

#define CDPCFG_RF_LORA_TXPOW   20

Transmit Power.

◆ CDPCFG_SERIAL_BAUD

#define CDPCFG_SERIAL_BAUD   115200

Serial Console Baud Rate.

◆ CDPCFG_UPDATE_PASSWORD

#define CDPCFG_UPDATE_PASSWORD   "password"

◆ CDPCFG_UPDATE_USERNAME

#define CDPCFG_UPDATE_USERNAME   "username"

Non board specific configuration.

◆ CDPCFG_UUID_LEN

#define CDPCFG_UUID_LEN   8

CDP UUID generator max length.

◆ CDPCFG_WEB_PORT

#define CDPCFG_WEB_PORT   80

Asyncwebserver Port.

◆ CRPCFG_POST

#define CRPCFG_POST