mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-20 17:52:35 +00:00
Compare commits
8 Commits
InkHUD_une
...
thinknode-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
48af1cd0e1 | ||
|
|
c3a7ad2865 | ||
|
|
06dac12a73 | ||
|
|
d60b263a00 | ||
|
|
486fa74549 | ||
|
|
faa6af74af | ||
|
|
2baa9ccbe0 | ||
|
|
5d7da6868e |
176
.github/workflows/build_one_arch.yml
vendored
176
.github/workflows/build_one_arch.yml
vendored
@@ -1,176 +0,0 @@
|
|||||||
name: Build One Arch
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
inputs:
|
|
||||||
# trunk-ignore(checkov/CKV_GHA_7)
|
|
||||||
arch:
|
|
||||||
type: choice
|
|
||||||
options:
|
|
||||||
- esp32
|
|
||||||
- esp32s3
|
|
||||||
- esp32c3
|
|
||||||
- esp32c6
|
|
||||||
- nrf52840
|
|
||||||
- rp2040
|
|
||||||
- rp2350
|
|
||||||
- stm32
|
|
||||||
- native
|
|
||||||
|
|
||||||
permissions: read-all
|
|
||||||
|
|
||||||
env:
|
|
||||||
INPUT_ARCH: ${{ github.event.inputs.arch }}
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
setup:
|
|
||||||
runs-on: ubuntu-24.04
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v6
|
|
||||||
- uses: actions/setup-python@v6
|
|
||||||
with:
|
|
||||||
python-version: 3.x
|
|
||||||
cache: pip
|
|
||||||
- run: pip install -U platformio
|
|
||||||
- name: Generate matrix
|
|
||||||
id: jsonStep
|
|
||||||
run: |
|
|
||||||
TARGETS=$(./bin/generate_ci_matrix.py $INPUT_ARCH --level extra)
|
|
||||||
echo "Name: $GITHUB_REF_NAME Base: $GITHUB_BASE_REF Ref: $GITHUB_REF"
|
|
||||||
echo "selected_arch=$TARGETS" >> $GITHUB_OUTPUT
|
|
||||||
outputs:
|
|
||||||
selected_arch: ${{ steps.jsonStep.outputs.selected_arch }}
|
|
||||||
|
|
||||||
version:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v6
|
|
||||||
- name: Get release version string
|
|
||||||
run: |
|
|
||||||
echo "long=$(./bin/buildinfo.py long)" >> $GITHUB_OUTPUT
|
|
||||||
echo "deb=$(./bin/buildinfo.py deb)" >> $GITHUB_OUTPUT
|
|
||||||
id: version
|
|
||||||
env:
|
|
||||||
BUILD_LOCATION: local
|
|
||||||
outputs:
|
|
||||||
long: ${{ steps.version.outputs.long }}
|
|
||||||
deb: ${{ steps.version.outputs.deb }}
|
|
||||||
|
|
||||||
build:
|
|
||||||
if: ${{ github.event_name != 'workflow_dispatch' }}
|
|
||||||
needs: [setup, version]
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
build: ${{ fromJson(needs.setup.outputs.selected_arch) }}
|
|
||||||
uses: ./.github/workflows/build_firmware.yml
|
|
||||||
with:
|
|
||||||
version: ${{ needs.version.outputs.long }}
|
|
||||||
pio_env: ${{ matrix.build.board }}
|
|
||||||
platform: ${{ matrix.build.arch }}
|
|
||||||
|
|
||||||
build-debian-src:
|
|
||||||
if: ${{ github.repository == 'meshtastic/firmware' && github.event_name != 'workflow_dispatch' || inputs.arch == 'native' }}
|
|
||||||
uses: ./.github/workflows/build_debian_src.yml
|
|
||||||
with:
|
|
||||||
series: UNRELEASED
|
|
||||||
build_location: local
|
|
||||||
secrets: inherit
|
|
||||||
|
|
||||||
package-pio-deps-native-tft:
|
|
||||||
if: ${{ inputs.arch == 'native' }}
|
|
||||||
uses: ./.github/workflows/package_pio_deps.yml
|
|
||||||
with:
|
|
||||||
pio_env: native-tft
|
|
||||||
secrets: inherit
|
|
||||||
|
|
||||||
test-native:
|
|
||||||
if: ${{ !contains(github.ref_name, 'event/') && github.event_name != 'workflow_dispatch' || !contains(github.ref_name, 'event/') && inputs.arch == 'native' }}
|
|
||||||
uses: ./.github/workflows/test_native.yml
|
|
||||||
|
|
||||||
gather-artifacts:
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
pull-requests: write
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
arch:
|
|
||||||
- esp32
|
|
||||||
- esp32s3
|
|
||||||
- esp32c3
|
|
||||||
- esp32c6
|
|
||||||
- nrf52840
|
|
||||||
- rp2040
|
|
||||||
- rp2350
|
|
||||||
- stm32
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs: [version, build]
|
|
||||||
steps:
|
|
||||||
- name: Checkout code
|
|
||||||
uses: actions/checkout@v6
|
|
||||||
with:
|
|
||||||
ref: ${{github.event.pull_request.head.ref}}
|
|
||||||
repository: ${{github.event.pull_request.head.repo.full_name}}
|
|
||||||
|
|
||||||
- uses: actions/download-artifact@v6
|
|
||||||
with:
|
|
||||||
path: ./
|
|
||||||
pattern: firmware-${{inputs.arch}}-*
|
|
||||||
merge-multiple: true
|
|
||||||
|
|
||||||
- name: Display structure of downloaded files
|
|
||||||
run: ls -R
|
|
||||||
|
|
||||||
- name: Move files up
|
|
||||||
run: mv -b -t ./ ./bin/device-*.sh ./bin/device-*.bat
|
|
||||||
|
|
||||||
- name: Repackage in single firmware zip
|
|
||||||
uses: actions/upload-artifact@v5
|
|
||||||
with:
|
|
||||||
name: firmware-${{inputs.arch}}-${{ needs.version.outputs.long }}
|
|
||||||
overwrite: true
|
|
||||||
path: |
|
|
||||||
./firmware-*.bin
|
|
||||||
./firmware-*.uf2
|
|
||||||
./firmware-*.hex
|
|
||||||
./firmware-*-ota.zip
|
|
||||||
./device-*.sh
|
|
||||||
./device-*.bat
|
|
||||||
./littlefs-*.bin
|
|
||||||
./bleota*bin
|
|
||||||
./Meshtastic_nRF52_factory_erase*.uf2
|
|
||||||
retention-days: 30
|
|
||||||
|
|
||||||
- uses: actions/download-artifact@v6
|
|
||||||
with:
|
|
||||||
name: firmware-${{inputs.arch}}-${{ needs.version.outputs.long }}
|
|
||||||
merge-multiple: true
|
|
||||||
path: ./output
|
|
||||||
|
|
||||||
# For diagnostics
|
|
||||||
- name: Show artifacts
|
|
||||||
run: ls -lR
|
|
||||||
|
|
||||||
- name: Device scripts permissions
|
|
||||||
run: |
|
|
||||||
chmod +x ./output/device-install.sh
|
|
||||||
chmod +x ./output/device-update.sh
|
|
||||||
|
|
||||||
- name: Zip firmware
|
|
||||||
run: zip -j -9 -r ./firmware-${{inputs.arch}}-${{ needs.version.outputs.long }}.zip ./output
|
|
||||||
|
|
||||||
- name: Repackage in single elfs zip
|
|
||||||
uses: actions/upload-artifact@v5
|
|
||||||
with:
|
|
||||||
name: debug-elfs-${{inputs.arch}}-${{ needs.version.outputs.long }}.zip
|
|
||||||
overwrite: true
|
|
||||||
path: ./*.elf
|
|
||||||
retention-days: 30
|
|
||||||
|
|
||||||
- uses: scruplelesswizard/comment-artifact@main
|
|
||||||
if: ${{ github.event_name == 'pull_request' }}
|
|
||||||
with:
|
|
||||||
name: firmware-${{inputs.arch}}-${{ needs.version.outputs.long }}
|
|
||||||
description: "Download firmware-${{inputs.arch}}-${{ needs.version.outputs.long }}.zip. This artifact will be available for 90 days from creation"
|
|
||||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
23
.github/workflows/build_one_target.yml
vendored
23
.github/workflows/build_one_target.yml
vendored
@@ -15,7 +15,6 @@ on:
|
|||||||
- rp2040
|
- rp2040
|
||||||
- rp2350
|
- rp2350
|
||||||
- stm32
|
- stm32
|
||||||
- native
|
|
||||||
target:
|
target:
|
||||||
type: string
|
type: string
|
||||||
required: false
|
required: false
|
||||||
@@ -42,7 +41,6 @@ jobs:
|
|||||||
- rp2040
|
- rp2040
|
||||||
- rp2350
|
- rp2350
|
||||||
- stm32
|
- stm32
|
||||||
|
|
||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-24.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v6
|
||||||
@@ -60,7 +58,7 @@ jobs:
|
|||||||
echo "Arch: ${{matrix.arch}}" >> $GITHUB_STEP_SUMMARY
|
echo "Arch: ${{matrix.arch}}" >> $GITHUB_STEP_SUMMARY
|
||||||
echo "Ref: $GITHUB_REF" >> $GITHUB_STEP_SUMMARY
|
echo "Ref: $GITHUB_REF" >> $GITHUB_STEP_SUMMARY
|
||||||
echo "Targets:" >> $GITHUB_STEP_SUMMARY
|
echo "Targets:" >> $GITHUB_STEP_SUMMARY
|
||||||
echo $TARGETS >> $GITHUB_STEP_SUMMARY
|
echo $TARGETS | jq -r 'sort_by(.board) |.[] | "- " + .board' >> $GITHUB_STEP_SUMMARY
|
||||||
|
|
||||||
version:
|
version:
|
||||||
if: ${{ inputs.target != '' }}
|
if: ${{ inputs.target != '' }}
|
||||||
@@ -87,25 +85,6 @@ jobs:
|
|||||||
pio_env: ${{ inputs.target }}
|
pio_env: ${{ inputs.target }}
|
||||||
platform: ${{ inputs.arch }}
|
platform: ${{ inputs.arch }}
|
||||||
|
|
||||||
build-debian-src:
|
|
||||||
if: ${{ github.repository == 'meshtastic/firmware' && inputs.arch == 'native' }}
|
|
||||||
uses: ./.github/workflows/build_debian_src.yml
|
|
||||||
with:
|
|
||||||
series: UNRELEASED
|
|
||||||
build_location: local
|
|
||||||
secrets: inherit
|
|
||||||
|
|
||||||
package-pio-deps-native-tft:
|
|
||||||
if: ${{ inputs.arch == 'native' }}
|
|
||||||
uses: ./.github/workflows/package_pio_deps.yml
|
|
||||||
with:
|
|
||||||
pio_env: native-tft
|
|
||||||
secrets: inherit
|
|
||||||
|
|
||||||
test-native:
|
|
||||||
if: ${{ !contains(github.ref_name, 'event/') && github.event_name != 'workflow_dispatch' || !contains(github.ref_name, 'event/') && inputs.arch == 'native' && inputs.target != '' }}
|
|
||||||
uses: ./.github/workflows/test_native.yml
|
|
||||||
|
|
||||||
gather-artifacts:
|
gather-artifacts:
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
|
|||||||
@@ -13,6 +13,11 @@ extern MemGet memGet;
|
|||||||
#define LED_STATE_ON 1
|
#define LED_STATE_ON 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// WIFI LED
|
||||||
|
#ifndef WIFI_STATE_ON
|
||||||
|
#define WIFI_STATE_ON 1
|
||||||
|
#endif
|
||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
// DEBUG
|
// DEBUG
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
@@ -147,7 +152,9 @@ extern "C" void logLegacy(const char *level, const char *fmt, ...);
|
|||||||
// Default Bluetooth PIN
|
// Default Bluetooth PIN
|
||||||
#define defaultBLEPin 123456
|
#define defaultBLEPin 123456
|
||||||
|
|
||||||
#if HAS_ETHERNET && !defined(USE_WS5500)
|
#if HAS_ETHERNET && defined(USE_CH390D)
|
||||||
|
#include <ESP32_CH390.h>
|
||||||
|
#elif HAS_ETHERNET && !defined(USE_WS5500)
|
||||||
#include <RAK13800_W5100S.h>
|
#include <RAK13800_W5100S.h>
|
||||||
#endif // HAS_ETHERNET
|
#endif // HAS_ETHERNET
|
||||||
|
|
||||||
|
|||||||
@@ -38,14 +38,16 @@ template <typename T, std::size_t N> std::size_t array_count(const T (&)[N])
|
|||||||
return N;
|
return N;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(NRF52840_XXAA) || defined(NRF52833_XXAA) || defined(ARCH_ESP32) || defined(ARCH_PORTDUINO) || defined(ARCH_STM32WL)
|
#ifndef GPS_SERIAL_PORT
|
||||||
#if defined(GPS_SERIAL_PORT)
|
#define GPS_SERIAL_PORT Serial1
|
||||||
HardwareSerial *GPS::_serial_gps = &GPS_SERIAL_PORT;
|
|
||||||
#else
|
|
||||||
HardwareSerial *GPS::_serial_gps = &Serial1;
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(ARCH_NRF52)
|
||||||
|
Uart *GPS::_serial_gps = &GPS_SERIAL_PORT;
|
||||||
|
#elif defined(ARCH_ESP32) || defined(ARCH_PORTDUINO) || defined(ARCH_STM32WL)
|
||||||
|
HardwareSerial *GPS::_serial_gps = &GPS_SERIAL_PORT;
|
||||||
#elif defined(ARCH_RP2040)
|
#elif defined(ARCH_RP2040)
|
||||||
SerialUART *GPS::_serial_gps = &Serial1;
|
SerialUART *GPS::_serial_gps = &GPS_SERIAL_PORT;
|
||||||
#else
|
#else
|
||||||
HardwareSerial *GPS::_serial_gps = nullptr;
|
HardwareSerial *GPS::_serial_gps = nullptr;
|
||||||
#endif
|
#endif
|
||||||
@@ -1525,10 +1527,7 @@ GPS *GPS::createGps()
|
|||||||
int8_t _rx_gpio = config.position.rx_gpio;
|
int8_t _rx_gpio = config.position.rx_gpio;
|
||||||
int8_t _tx_gpio = config.position.tx_gpio;
|
int8_t _tx_gpio = config.position.tx_gpio;
|
||||||
int8_t _en_gpio = config.position.gps_en_gpio;
|
int8_t _en_gpio = config.position.gps_en_gpio;
|
||||||
#if HAS_GPS && !defined(ARCH_ESP32)
|
|
||||||
_rx_gpio = 1; // We only specify GPS serial ports on ESP32. Otherwise, these are just flags.
|
|
||||||
_tx_gpio = 1;
|
|
||||||
#endif
|
|
||||||
#if defined(GPS_RX_PIN)
|
#if defined(GPS_RX_PIN)
|
||||||
if (!_rx_gpio)
|
if (!_rx_gpio)
|
||||||
_rx_gpio = GPS_RX_PIN;
|
_rx_gpio = GPS_RX_PIN;
|
||||||
@@ -1602,16 +1601,28 @@ GPS *GPS::createGps()
|
|||||||
_serial_gps->setRxBufferSize(SERIAL_BUFFER_SIZE); // the default is 256
|
_serial_gps->setRxBufferSize(SERIAL_BUFFER_SIZE); // the default is 256
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// ESP32 has a special set of parameters vs other arduino ports
|
|
||||||
#if defined(ARCH_ESP32)
|
|
||||||
LOG_DEBUG("Use GPIO%d for GPS RX", new_gps->rx_gpio);
|
LOG_DEBUG("Use GPIO%d for GPS RX", new_gps->rx_gpio);
|
||||||
LOG_DEBUG("Use GPIO%d for GPS TX", new_gps->tx_gpio);
|
LOG_DEBUG("Use GPIO%d for GPS TX", new_gps->tx_gpio);
|
||||||
|
|
||||||
|
// ESP32 has a special set of parameters vs other arduino ports
|
||||||
|
#if defined(ARCH_ESP32)
|
||||||
_serial_gps->begin(GPS_BAUDRATE, SERIAL_8N1, new_gps->rx_gpio, new_gps->tx_gpio);
|
_serial_gps->begin(GPS_BAUDRATE, SERIAL_8N1, new_gps->rx_gpio, new_gps->tx_gpio);
|
||||||
#elif defined(ARCH_RP2040)
|
#elif defined(ARCH_RP2040)
|
||||||
|
_serial_gps->setPinout(new_gps->tx_gpio, new_gps->rx_gpio);
|
||||||
_serial_gps->setFIFOSize(256);
|
_serial_gps->setFIFOSize(256);
|
||||||
_serial_gps->begin(GPS_BAUDRATE);
|
_serial_gps->begin(GPS_BAUDRATE);
|
||||||
#else
|
#elif defined(ARCH_NRF52)
|
||||||
|
_serial_gps->setPins(new_gps->rx_gpio, new_gps->tx_gpio);
|
||||||
_serial_gps->begin(GPS_BAUDRATE);
|
_serial_gps->begin(GPS_BAUDRATE);
|
||||||
|
#elif defined(ARCH_STM32WL)
|
||||||
|
_serial_gps->setTx(new_gps->tx_gpio);
|
||||||
|
_serial_gps->setRx(new_gps->rx_gpio);
|
||||||
|
_serial_gps->begin(GPS_BAUDRATE);
|
||||||
|
#elif defined(ARCH_PORTDUINO)
|
||||||
|
// Portduino can't set the GPS pins directly.
|
||||||
|
_serial_gps->begin(GPS_BAUDRATE);
|
||||||
|
#else
|
||||||
|
#error Unsupported architecture!
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
return new_gps;
|
return new_gps;
|
||||||
|
|||||||
@@ -194,6 +194,8 @@ class GPS : private concurrency::OSThread
|
|||||||
/** If !NULL we will use this serial port to construct our GPS */
|
/** If !NULL we will use this serial port to construct our GPS */
|
||||||
#if defined(ARCH_RP2040)
|
#if defined(ARCH_RP2040)
|
||||||
static SerialUART *_serial_gps;
|
static SerialUART *_serial_gps;
|
||||||
|
#elif defined(ARCH_NRF52)
|
||||||
|
static Uart *_serial_gps;
|
||||||
#else
|
#else
|
||||||
static HardwareSerial *_serial_gps;
|
static HardwareSerial *_serial_gps;
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -330,7 +330,7 @@ void setup()
|
|||||||
|
|
||||||
#ifdef WIFI_LED
|
#ifdef WIFI_LED
|
||||||
pinMode(WIFI_LED, OUTPUT);
|
pinMode(WIFI_LED, OUTPUT);
|
||||||
digitalWrite(WIFI_LED, LOW);
|
digitalWrite(WIFI_LED, HIGH ^ WIFI_STATE_ON);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef BLE_LED
|
#ifdef BLE_LED
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ template class LR11x0Interface<LR1121>;
|
|||||||
template class SX126xInterface<STM32WLx>;
|
template class SX126xInterface<STM32WLx>;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if HAS_ETHERNET && !defined(USE_WS5500)
|
#if HAS_ETHERNET && !defined(USE_WS5500) && !defined(USE_CH390D)
|
||||||
#include "api/ethServerAPI.h"
|
#include "api/ethServerAPI.h"
|
||||||
template class ServerAPI<EthernetClient>;
|
template class ServerAPI<EthernetClient>;
|
||||||
template class APIServerPort<ethServerAPI, EthernetServer>;
|
template class APIServerPort<ethServerAPI, EthernetServer>;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#include "configuration.h"
|
#include "configuration.h"
|
||||||
#include <Arduino.h>
|
#include <Arduino.h>
|
||||||
|
|
||||||
#if HAS_ETHERNET && !defined(USE_WS5500)
|
#if HAS_ETHERNET && !defined(USE_WS5500) && !defined(USE_CH390D)
|
||||||
|
|
||||||
#include "ethServerAPI.h"
|
#include "ethServerAPI.h"
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "ServerAPI.h"
|
#include "ServerAPI.h"
|
||||||
#ifndef USE_WS5500
|
#if !defined(USE_WS5500) && !defined(USE_CH390D)
|
||||||
#include <RAK13800_W5100S.h>
|
#include <RAK13800_W5100S.h>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -384,13 +384,13 @@ static void WiFiEvent(WiFiEvent_t event)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
#ifdef WIFI_LED
|
#ifdef WIFI_LED
|
||||||
digitalWrite(WIFI_LED, HIGH);
|
digitalWrite(WIFI_LED, LOW ^ WIFI_STATE_ON);
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
case ARDUINO_EVENT_WIFI_STA_DISCONNECTED:
|
case ARDUINO_EVENT_WIFI_STA_DISCONNECTED:
|
||||||
LOG_INFO("Disconnected from WiFi access point");
|
LOG_INFO("Disconnected from WiFi access point");
|
||||||
#ifdef WIFI_LED
|
#ifdef WIFI_LED
|
||||||
digitalWrite(WIFI_LED, LOW);
|
digitalWrite(WIFI_LED, HIGH ^ WIFI_STATE_ON);
|
||||||
#endif
|
#endif
|
||||||
if (!isReconnecting) {
|
if (!isReconnecting) {
|
||||||
WiFi.disconnect(false, true);
|
WiFi.disconnect(false, true);
|
||||||
@@ -442,13 +442,13 @@ static void WiFiEvent(WiFiEvent_t event)
|
|||||||
case ARDUINO_EVENT_WIFI_AP_START:
|
case ARDUINO_EVENT_WIFI_AP_START:
|
||||||
LOG_INFO("WiFi access point started");
|
LOG_INFO("WiFi access point started");
|
||||||
#ifdef WIFI_LED
|
#ifdef WIFI_LED
|
||||||
digitalWrite(WIFI_LED, HIGH);
|
digitalWrite(WIFI_LED, LOW ^ WIFI_STATE_ON);
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
case ARDUINO_EVENT_WIFI_AP_STOP:
|
case ARDUINO_EVENT_WIFI_AP_STOP:
|
||||||
LOG_INFO("WiFi access point stopped");
|
LOG_INFO("WiFi access point stopped");
|
||||||
#ifdef WIFI_LED
|
#ifdef WIFI_LED
|
||||||
digitalWrite(WIFI_LED, LOW);
|
digitalWrite(WIFI_LED, HIGH ^ WIFI_STATE_ON);
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
case ARDUINO_EVENT_WIFI_AP_STACONNECTED:
|
case ARDUINO_EVENT_WIFI_AP_STACONNECTED:
|
||||||
|
|||||||
@@ -1227,7 +1227,7 @@ void AdminModule::handleGetDeviceConnectionStatus(const meshtastic_MeshPacket &r
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if HAS_ETHERNET && !defined(USE_WS5500)
|
#if HAS_ETHERNET && !defined(USE_WS5500) && !defined(USE_CH390D)
|
||||||
conn.has_ethernet = true;
|
conn.has_ethernet = true;
|
||||||
conn.ethernet.has_status = true;
|
conn.ethernet.has_status = true;
|
||||||
if (Ethernet.linkStatus() == LinkON) {
|
if (Ethernet.linkStatus() == LinkON) {
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
#include <WiFiClientSecure.h>
|
#include <WiFiClientSecure.h>
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#if HAS_ETHERNET && !defined(USE_WS5500)
|
#if HAS_ETHERNET && !defined(USE_WS5500) && !defined(USE_CH390D)
|
||||||
#include <EthernetClient.h>
|
#include <EthernetClient.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
26
variants/esp32s3/ELECROW-ThinkNode-G3/pins_arduino.h
Normal file
26
variants/esp32s3/ELECROW-ThinkNode-G3/pins_arduino.h
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
#ifndef Pins_Arduino_h
|
||||||
|
#define Pins_Arduino_h
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
#define USB_VID 0x303a
|
||||||
|
#define USB_PID 0x1001
|
||||||
|
|
||||||
|
// The default Wire will be mapped to PMU and RTC
|
||||||
|
static const uint8_t SDA = 17;
|
||||||
|
static const uint8_t SCL = 18;
|
||||||
|
|
||||||
|
// Default SPI will be mapped to Radio
|
||||||
|
static const uint8_t SS = 39;
|
||||||
|
static const uint8_t MOSI = 40;
|
||||||
|
static const uint8_t MISO = 41;
|
||||||
|
static const uint8_t SCK = 42;
|
||||||
|
|
||||||
|
// #define SPI_MOSI (11)
|
||||||
|
// #define SPI_SCK (10)
|
||||||
|
// #define SPI_MISO (9)
|
||||||
|
// #define SPI_CS (12)
|
||||||
|
|
||||||
|
// #define SDCARD_CS SPI_CS
|
||||||
|
|
||||||
|
#endif /* Pins_Arduino_h */
|
||||||
22
variants/esp32s3/ELECROW-ThinkNode-G3/platformio.ini
Normal file
22
variants/esp32s3/ELECROW-ThinkNode-G3/platformio.ini
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
[env:thinknode_g3]
|
||||||
|
extends = esp32s3_base
|
||||||
|
board = ESP32-S3-WROOM-1-N4
|
||||||
|
board_build.psram_type = opi
|
||||||
|
|
||||||
|
build_flags =
|
||||||
|
${esp32s3_base.build_flags}
|
||||||
|
-D ELECROW_ThinkNode_G3
|
||||||
|
-D HAS_UDP_MULTICAST=1
|
||||||
|
-D BOARD_HAS_PSRAM
|
||||||
|
-D PRIVATE_HW
|
||||||
|
# -D CONFIG_ETH_ENABLED=1
|
||||||
|
# -D CONFIG_ETH_USE_ESP32_EMAC=1
|
||||||
|
-I variants/esp32s3/ELECROW-ThinkNode-G3
|
||||||
|
-mfix-esp32-psram-cache-issue
|
||||||
|
|
||||||
|
lib_ignore =
|
||||||
|
Ethernet
|
||||||
|
|
||||||
|
lib_deps =
|
||||||
|
${esp32s3_base.lib_deps}
|
||||||
|
# file://../ESP32-CH390/ESP32-CH390-1.0.1.tar.gz
|
||||||
36
variants/esp32s3/ELECROW-ThinkNode-G3/variant.h
Normal file
36
variants/esp32s3/ELECROW-ThinkNode-G3/variant.h
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
#define HAS_GPS 0
|
||||||
|
#define HAS_WIRE 0
|
||||||
|
#define I2C_NO_RESCAN
|
||||||
|
|
||||||
|
#define WIFI_LED 5
|
||||||
|
#define WIFI_STATE_ON 0
|
||||||
|
|
||||||
|
#define LED_PIN 6 // The blue LORA LED
|
||||||
|
#define LED_STATE_ON 0
|
||||||
|
#define BUTTON_PIN 4 // the external user button of the device, BOOT and RESET are not accessible without opening it up.
|
||||||
|
|
||||||
|
#define USE_SX1262
|
||||||
|
#define LORA_SCK 42
|
||||||
|
#define LORA_MISO 41
|
||||||
|
#define LORA_MOSI 40
|
||||||
|
#define LORA_CS 39
|
||||||
|
#define LORA_RESET 21
|
||||||
|
|
||||||
|
#define SX126X_CS LORA_CS
|
||||||
|
#define SX126X_DIO1 15
|
||||||
|
#define SX126X_BUSY 47
|
||||||
|
#define SX126X_RESET LORA_RESET
|
||||||
|
#define SX126X_DIO2_AS_RF_SWITCH
|
||||||
|
#define SX126X_DIO3_TCXO_VOLTAGE 1.8
|
||||||
|
#define PIN_POWER_EN 45
|
||||||
|
|
||||||
|
// #define HAS_ETHERNET 1
|
||||||
|
// #define USE_CH390D 1 // this driver uses the same stack as the ESP32 Wifi driver
|
||||||
|
|
||||||
|
// #define ETH_MISO_PIN 47
|
||||||
|
// #define ETH_MOSI_PIN 21
|
||||||
|
// #define ETH_SCLK_PIN 48
|
||||||
|
// #define ETH_CS_PIN 45
|
||||||
|
// #define ETH_INT_PIN 14
|
||||||
|
// #define ETH_RST_PIN -1
|
||||||
|
// #define ETH_ADDR 1
|
||||||
@@ -116,13 +116,13 @@ No longer populated on PCB
|
|||||||
#define PIN_GPS_PPS (32 + 4)
|
#define PIN_GPS_PPS (32 + 4)
|
||||||
// Seems to be missing on this new board
|
// Seems to be missing on this new board
|
||||||
// #define PIN_GPS_PPS (32 + 4) // Pulse per second input from the GPS
|
// #define PIN_GPS_PPS (32 + 4) // Pulse per second input from the GPS
|
||||||
#define GPS_TX_PIN (32 + 5) // This is for bits going TOWARDS the CPU
|
#define GPS_TX_PIN (32 + 7) // This is for bits going TOWARDS the CPU
|
||||||
#define GPS_RX_PIN (32 + 7) // This is for bits going TOWARDS the GPS
|
#define GPS_RX_PIN (32 + 5) // This is for bits going TOWARDS the GPS
|
||||||
|
|
||||||
#define GPS_THREAD_INTERVAL 50
|
#define GPS_THREAD_INTERVAL 50
|
||||||
|
|
||||||
#define PIN_SERIAL1_RX GPS_TX_PIN
|
#define PIN_SERIAL1_RX GPS_RX_PIN
|
||||||
#define PIN_SERIAL1_TX GPS_RX_PIN
|
#define PIN_SERIAL1_TX GPS_TX_PIN
|
||||||
|
|
||||||
// PCF8563 RTC Module
|
// PCF8563 RTC Module
|
||||||
#define PCF8563_RTC 0x51
|
#define PCF8563_RTC 0x51
|
||||||
|
|||||||
@@ -167,13 +167,13 @@ No longer populated on PCB
|
|||||||
#define PIN_GPS_PPS (32 + 4)
|
#define PIN_GPS_PPS (32 + 4)
|
||||||
// Seems to be missing on this new board
|
// Seems to be missing on this new board
|
||||||
// #define PIN_GPS_PPS (32 + 4) // Pulse per second input from the GPS
|
// #define PIN_GPS_PPS (32 + 4) // Pulse per second input from the GPS
|
||||||
#define GPS_TX_PIN (32 + 5) // This is for bits going TOWARDS the CPU
|
#define GPS_TX_PIN (32 + 7) // This is for bits going TOWARDS the CPU
|
||||||
#define GPS_RX_PIN (32 + 7) // This is for bits going TOWARDS the GPS
|
#define GPS_RX_PIN (32 + 5) // This is for bits going TOWARDS the GPS
|
||||||
|
|
||||||
#define GPS_THREAD_INTERVAL 50
|
#define GPS_THREAD_INTERVAL 50
|
||||||
|
|
||||||
#define PIN_SERIAL1_RX GPS_TX_PIN
|
#define PIN_SERIAL1_RX GPS_RX_PIN
|
||||||
#define PIN_SERIAL1_TX GPS_RX_PIN
|
#define PIN_SERIAL1_TX GPS_TX_PIN
|
||||||
|
|
||||||
// PCF8563 RTC Module
|
// PCF8563 RTC Module
|
||||||
#define PCF8563_RTC 0x51
|
#define PCF8563_RTC 0x51
|
||||||
|
|||||||
@@ -116,13 +116,13 @@ No longer populated on PCB
|
|||||||
#define PIN_GPS_PPS (32 + 4)
|
#define PIN_GPS_PPS (32 + 4)
|
||||||
// Seems to be missing on this new board
|
// Seems to be missing on this new board
|
||||||
// #define PIN_GPS_PPS (32 + 4) // Pulse per second input from the GPS
|
// #define PIN_GPS_PPS (32 + 4) // Pulse per second input from the GPS
|
||||||
#define GPS_TX_PIN (32 + 5) // This is for bits going TOWARDS the CPU
|
#define GPS_TX_PIN (32 + 7) // This is for bits going TOWARDS the CPU
|
||||||
#define GPS_RX_PIN (32 + 7) // This is for bits going TOWARDS the GPS
|
#define GPS_RX_PIN (32 + 5) // This is for bits going TOWARDS the GPS
|
||||||
|
|
||||||
#define GPS_THREAD_INTERVAL 50
|
#define GPS_THREAD_INTERVAL 50
|
||||||
|
|
||||||
#define PIN_SERIAL1_RX GPS_TX_PIN
|
#define PIN_SERIAL1_RX GPS_RX_PIN
|
||||||
#define PIN_SERIAL1_TX GPS_RX_PIN
|
#define PIN_SERIAL1_TX GPS_TX_PIN
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* SPI Interfaces
|
* SPI Interfaces
|
||||||
|
|||||||
@@ -103,12 +103,12 @@ extern "C" {
|
|||||||
#define LR11X0_DIO_AS_RF_SWITCH
|
#define LR11X0_DIO_AS_RF_SWITCH
|
||||||
|
|
||||||
// GPS
|
// GPS
|
||||||
#define GPS_RX_PIN (0 + 19) // P0.19
|
#define GPS_RX_PIN (0 + 20) // P0.20
|
||||||
#define GPS_TX_PIN (0 + 20) // P0.20
|
#define GPS_TX_PIN (0 + 19) // P0.19
|
||||||
#define GPS_EN_GPIO (32 + 1) // P1.01
|
#define GPS_EN_GPIO (32 + 1) // P1.01
|
||||||
|
|
||||||
#define PIN_SERIAL1_RX GPS_TX_PIN
|
#define PIN_SERIAL1_RX GPS_RX_PIN
|
||||||
#define PIN_SERIAL1_TX GPS_RX_PIN
|
#define PIN_SERIAL1_TX GPS_TX_PIN
|
||||||
|
|
||||||
#define PIN_BUZZER (0 + 22) // P0.22
|
#define PIN_BUZZER (0 + 22) // P0.22
|
||||||
|
|
||||||
|
|||||||
@@ -182,13 +182,13 @@ External serial flash WP25R1635FZUIL0
|
|||||||
#define PIN_GPS_STANDBY (32 + 2) // An output to wake GPS, low means allow sleep, high means force wake
|
#define PIN_GPS_STANDBY (32 + 2) // An output to wake GPS, low means allow sleep, high means force wake
|
||||||
// Seems to be missing on this new board
|
// Seems to be missing on this new board
|
||||||
// #define PIN_GPS_PPS (32 + 4) // Pulse per second input from the GPS
|
// #define PIN_GPS_PPS (32 + 4) // Pulse per second input from the GPS
|
||||||
#define GPS_TX_PIN (32 + 9) // This is for bits going TOWARDS the CPU
|
#define GPS_TX_PIN (32 + 8) // This is for bits going TOWARDS the CPU
|
||||||
#define GPS_RX_PIN (32 + 8) // This is for bits going TOWARDS the GPS
|
#define GPS_RX_PIN (32 + 9) // This is for bits going TOWARDS the GPS
|
||||||
|
|
||||||
#define GPS_THREAD_INTERVAL 50
|
#define GPS_THREAD_INTERVAL 50
|
||||||
|
|
||||||
#define PIN_SERIAL1_RX GPS_TX_PIN
|
#define PIN_SERIAL1_RX GPS_RX_PIN
|
||||||
#define PIN_SERIAL1_TX GPS_RX_PIN
|
#define PIN_SERIAL1_TX GPS_TX_PIN
|
||||||
|
|
||||||
// PCF8563 RTC Module
|
// PCF8563 RTC Module
|
||||||
#define PCF8563_RTC 0x51
|
#define PCF8563_RTC 0x51
|
||||||
|
|||||||
Reference in New Issue
Block a user