mirror of
https://github.com/meshtastic/firmware.git
synced 2025-08-11 07:57:22 +00:00
Merge branch 'meshtastic:master' into master
This commit is contained in:
commit
cfeb0b47e9
16
.github/workflows/main.yml
vendored
16
.github/workflows/main.yml
vendored
@ -59,14 +59,14 @@ jobs:
|
|||||||
pio upgrade
|
pio upgrade
|
||||||
|
|
||||||
# We now run integration test before other build steps (to quickly see runtime failures)
|
# We now run integration test before other build steps (to quickly see runtime failures)
|
||||||
#- name: Build for native
|
- name: Build for native
|
||||||
# run: platformio run -e native
|
run: platformio run -e native
|
||||||
#- name: Integration test
|
- name: Integration test
|
||||||
# run: |
|
run: |
|
||||||
# .pio/build/native/program &
|
.pio/build/native/program &
|
||||||
# sleep 20 # 5 seconds was not enough
|
sleep 20 # 5 seconds was not enough
|
||||||
# echo "Simulator started, launching python test..."
|
echo "Simulator started, launching python test..."
|
||||||
# python3 -c 'from meshtastic.test import testSimulator; testSimulator()'
|
python3 -c 'from meshtastic.test import testSimulator; testSimulator()'
|
||||||
|
|
||||||
# - name: Build for tbeam
|
# - name: Build for tbeam
|
||||||
# run: platformio run -e tbeam
|
# run: platformio run -e tbeam
|
||||||
|
2
.github/workflows/release.yml
vendored
2
.github/workflows/release.yml
vendored
@ -49,7 +49,7 @@ jobs:
|
|||||||
|
|
||||||
# Will be available in steps.version.outputs.version
|
# Will be available in steps.version.outputs.version
|
||||||
- name: Get version string
|
- name: Get version string
|
||||||
run: echo "::set-output name=version::$(./bin/buildinfo.py)"
|
run: echo "::set-output name=version::$(./bin/buildinfo.py long)"
|
||||||
id: version
|
id: version
|
||||||
|
|
||||||
- name: Build everything
|
- name: Build everything
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
|
set -e
|
||||||
|
|
||||||
echo "This script is only for developers who are publishing new builds on github. Most users don't need it"
|
echo "This script is only for developers who are publishing new builds on github. Most users don't need it"
|
||||||
|
|
||||||
VERSION=`bin/buildinfo.py`
|
VERSION=`bin/buildinfo.py long`
|
||||||
|
|
||||||
# Must have a V prefix to trigger github
|
# Must have a V prefix to trigger github
|
||||||
git tag "v${VERSION}"
|
git tag "v${VERSION}"
|
||||||
|
9
bin/test-simulator.sh
Executable file
9
bin/test-simulator.sh
Executable file
@ -0,0 +1,9 @@
|
|||||||
|
set -e
|
||||||
|
|
||||||
|
echo "Starting simulator"
|
||||||
|
.pio/build/native/program &
|
||||||
|
sleep 20 # 5 seconds was not enough
|
||||||
|
|
||||||
|
echo "Simulator started, launching python test..."
|
||||||
|
python3 -c 'from meshtastic.test import testSimulator; testSimulator()'
|
||||||
|
|
@ -2,25 +2,21 @@
|
|||||||
|
|
||||||
You probably don't care about this section - skip to the next one.
|
You probably don't care about this section - skip to the next one.
|
||||||
|
|
||||||
## before next release
|
* admin remote nodes reboot sometimes https://github.com/meshtastic/Meshtastic-device/issues/811
|
||||||
|
* router mode dropping messages? https://meshtastic.discourse.group/t/router-mode-missing-messages/3329/3
|
||||||
* fix python tool problem with windows and the heartbeat
|
|
||||||
* fix ttgo eink screen
|
* fix ttgo eink screen
|
||||||
* fix this sleep problem: https://meshtastic.discourse.group/t/new-device-release-1-2-30-ready-for-alpha-testing/3272/13?u=geeksville
|
* list portduino on platformio
|
||||||
* make native sim not touch hardware
|
|
||||||
* reenable sim in CI builds
|
|
||||||
* figure our wss for mqtt.meshtastic - use cloudflare? 2052 ws, 2053 crypt
|
* figure our wss for mqtt.meshtastic - use cloudflare? 2052 ws, 2053 crypt
|
||||||
* release android APK - fix recent 1.2.28 crash report
|
|
||||||
* turn on setTx(timeout) and state = setDioIrqParams(SX126X_IRQ_TX_DONE | SX126X_IRQ_TIMEOUT, SX126X_IRQ_TX_DONE | SX126X_IRQ_TIMEOUT); in sx1262 code
|
|
||||||
* pine64 lora module
|
* pine64 lora module
|
||||||
* @havealoha fixedposition not working
|
* @havealoha fixedposition not working
|
||||||
* @luxonn reports that after a while the android app stops showing new messages
|
|
||||||
* ask for vercel access
|
* ask for vercel access
|
||||||
* finish plan for riot.im
|
* finish plan for riot.im
|
||||||
|
* turn on setTx(timeout) and state = setDioIrqParams(SX126X_IRQ_TX_DONE | SX126X_IRQ_TIMEOUT, SX126X_IRQ_TX_DONE | SX126X_IRQ_TIMEOUT); in sx1262 code
|
||||||
* add rak4600 support (with rf95 radio and limited ram)
|
* add rak4600 support (with rf95 radio and limited ram)
|
||||||
|
|
||||||
* Switch to use https://github.com/adafruit/Adafruit_nRF52_Arduino.git when available (see arduino code for examples)
|
* Switch to use https://github.com/adafruit/Adafruit_nRF52_Arduino.git when available (see arduino code for examples)
|
||||||
|
* DONE @luxonn reports that after a while the android app stops showing new messages
|
||||||
|
* DONE release android APK - fix recent 1.2.28 crash report
|
||||||
* DONE remote admin busted?
|
* DONE remote admin busted?
|
||||||
* DONE check android code - @havealoha comments about odd sleep behavior
|
* DONE check android code - @havealoha comments about odd sleep behavior
|
||||||
* ABANDONED test github actions locally on linux
|
* ABANDONED test github actions locally on linux
|
||||||
|
@ -425,13 +425,24 @@ lib_deps =
|
|||||||
SparkFun BQ27441 LiPo Fuel Gauge Arduino Library
|
SparkFun BQ27441 LiPo Fuel Gauge Arduino Library
|
||||||
TFT_eSPI
|
TFT_eSPI
|
||||||
|
|
||||||
; The Portduino based sim environment on top of linux
|
; The Portduino based sim environment on top of any host OS, all hardware will be simulated
|
||||||
[env:native]
|
[env:native]
|
||||||
platform = https://github.com/geeksville/platform-native.git
|
platform = https://github.com/geeksville/platform-native.git
|
||||||
src_filter = ${env.src_filter} -<esp32/> -<nimble/> -<nrf52/> -<mesh/http/> -<plugins/esp32>
|
src_filter = ${env.src_filter} -<esp32/> -<nimble/> -<nrf52/> -<mesh/http/> -<plugins/esp32>
|
||||||
build_flags = ${arduino_base.build_flags} -O0 -lgpiod
|
build_flags = ${arduino_base.build_flags} -O0
|
||||||
framework = arduino
|
framework = arduino
|
||||||
board = native
|
board = cross_platform
|
||||||
|
lib_deps =
|
||||||
|
${arduino_base.lib_deps}
|
||||||
|
rweather/Crypto
|
||||||
|
|
||||||
|
; The Portduino based sim environment on top of a linux OS and touching linux hardware devices
|
||||||
|
[env:linux]
|
||||||
|
platform = https://github.com/geeksville/platform-native.git
|
||||||
|
src_filter = ${env.src_filter} -<esp32/> -<nimble/> -<nrf52/> -<mesh/http/> -<plugins/esp32>
|
||||||
|
build_flags = ${arduino_base.build_flags} -O0 -lgpiod
|
||||||
|
framework = arduino
|
||||||
|
board = linux_hardware
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${arduino_base.lib_deps}
|
${arduino_base.lib_deps}
|
||||||
rweather/Crypto
|
rweather/Crypto
|
||||||
|
@ -45,7 +45,7 @@ int32_t StreamAPI::readStream()
|
|||||||
} else if (ptr >= HEADER_LEN - 1) { // we have at least read our 4 byte framing
|
} else if (ptr >= HEADER_LEN - 1) { // we have at least read our 4 byte framing
|
||||||
uint32_t len = (rxBuf[2] << 8) + rxBuf[3]; // big endian 16 bit length follows framing
|
uint32_t len = (rxBuf[2] << 8) + rxBuf[3]; // big endian 16 bit length follows framing
|
||||||
|
|
||||||
console->printf("len %d\n", len);
|
// console->printf("len %d\n", len);
|
||||||
|
|
||||||
if (ptr == HEADER_LEN - 1) {
|
if (ptr == HEADER_LEN - 1) {
|
||||||
// we _just_ finished our 4 byte header, validate length now (note: a length of zero is a valid
|
// we _just_ finished our 4 byte header, validate length now (note: a length of zero is a valid
|
||||||
|
@ -32,11 +32,10 @@ bool isWifiAvailable()
|
|||||||
{
|
{
|
||||||
// If wifi status is connected, return true regardless of the radio configuration.
|
// If wifi status is connected, return true regardless of the radio configuration.
|
||||||
if (isSoftAPForced()) {
|
if (isSoftAPForced()) {
|
||||||
return 1;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *wifiName = radioConfig.preferences.wifi_ssid;
|
const char *wifiName = radioConfig.preferences.wifi_ssid;
|
||||||
const char *wifiPsw = radioConfig.preferences.wifi_password;
|
|
||||||
|
|
||||||
// strcpy(radioConfig.preferences.wifi_ssid, "meshtastic");
|
// strcpy(radioConfig.preferences.wifi_ssid, "meshtastic");
|
||||||
// strcpy(radioConfig.preferences.wifi_password, "meshtastic!");
|
// strcpy(radioConfig.preferences.wifi_password, "meshtastic!");
|
||||||
@ -47,10 +46,10 @@ bool isWifiAvailable()
|
|||||||
// radioConfig.preferences.wifi_ap_mode = true;
|
// radioConfig.preferences.wifi_ap_mode = true;
|
||||||
// radioConfig.preferences.wifi_ap_mode = false;
|
// radioConfig.preferences.wifi_ap_mode = false;
|
||||||
|
|
||||||
if (*wifiName && *wifiPsw) {
|
if (*wifiName) {
|
||||||
return 1;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
return 0;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -96,7 +95,10 @@ void initWifi(bool forceSoftAP)
|
|||||||
const char *wifiName = radioConfig.preferences.wifi_ssid;
|
const char *wifiName = radioConfig.preferences.wifi_ssid;
|
||||||
const char *wifiPsw = radioConfig.preferences.wifi_password;
|
const char *wifiPsw = radioConfig.preferences.wifi_password;
|
||||||
|
|
||||||
if ((*wifiName && *wifiPsw) || forceSoftAP) {
|
if (!*wifiPsw) // Treat empty password as no password
|
||||||
|
wifiPsw = NULL;
|
||||||
|
|
||||||
|
if (*wifiName || forceSoftAP) {
|
||||||
if (forceSoftAP) {
|
if (forceSoftAP) {
|
||||||
|
|
||||||
DEBUG_MSG("Forcing SoftAP\n");
|
DEBUG_MSG("Forcing SoftAP\n");
|
||||||
@ -178,8 +180,6 @@ void initWifi(bool forceSoftAP)
|
|||||||
DEBUG_MSG("Not using WIFI\n");
|
DEBUG_MSG("Not using WIFI\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Called by the Espressif SDK to
|
// Called by the Espressif SDK to
|
||||||
static void WiFiEvent(WiFiEvent_t event)
|
static void WiFiEvent(WiFiEvent_t event)
|
||||||
{
|
{
|
||||||
@ -304,12 +304,15 @@ void handleDNSResponse()
|
|||||||
|
|
||||||
void reconnectWiFi()
|
void reconnectWiFi()
|
||||||
{
|
{
|
||||||
const char *wifiName = radioConfig.preferences.wifi_ssid;
|
|
||||||
const char *wifiPsw = radioConfig.preferences.wifi_password;
|
|
||||||
|
|
||||||
if (radioConfig.has_preferences) {
|
if (radioConfig.has_preferences) {
|
||||||
|
|
||||||
if (*wifiName && *wifiPsw) {
|
const char *wifiName = radioConfig.preferences.wifi_ssid;
|
||||||
|
const char *wifiPsw = radioConfig.preferences.wifi_password;
|
||||||
|
|
||||||
|
if (!*wifiPsw) // Treat empty password as no password
|
||||||
|
wifiPsw = NULL;
|
||||||
|
|
||||||
|
if (*wifiName) {
|
||||||
|
|
||||||
DEBUG_MSG("... Reconnecting to WiFi access point");
|
DEBUG_MSG("... Reconnecting to WiFi access point");
|
||||||
|
|
||||||
|
@ -22,6 +22,9 @@ class WiFiServerAPI : public StreamAPI
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
|
/// We override this method to prevent publishing EVENT_SERIAL_CONNECTED/DISCONNECTED for wifi links (we want the board to stay in the POWERED state to prevent disabling wifi)
|
||||||
|
virtual void onConnectionChanged(bool connected) {}
|
||||||
|
|
||||||
virtual int32_t runOnce(); // Check for dropped client connections
|
virtual int32_t runOnce(); // Check for dropped client connections
|
||||||
|
|
||||||
/// Check the current underlying physical link to see if the client is currently connected
|
/// Check the current underlying physical link to see if the client is currently connected
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
#include "CryptoEngine.h"
|
#include "CryptoEngine.h"
|
||||||
#include "PortduinoGPIO.h"
|
#include "PortduinoGPIO.h"
|
||||||
|
#include "SPIChip.h"
|
||||||
#include "mesh/RF95Interface.h"
|
#include "mesh/RF95Interface.h"
|
||||||
#include "sleep.h"
|
#include "sleep.h"
|
||||||
#include "target_specific.h"
|
#include "target_specific.h"
|
||||||
@ -48,7 +49,7 @@ class PolledIrqPin : public GPIOPin
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
GPIOPin *loraIrq;
|
static GPIOPin *loraIrq;
|
||||||
|
|
||||||
/** apps run under portduino can optionally define a portduinoSetup() to
|
/** apps run under portduino can optionally define a portduinoSetup() to
|
||||||
* use portduino specific init code (such as gpioBind) to setup portduino on their host machine,
|
* use portduino specific init code (such as gpioBind) to setup portduino on their host machine,
|
||||||
@ -58,26 +59,45 @@ void portduinoSetup()
|
|||||||
{
|
{
|
||||||
printf("Setting up Meshtastic on Porduino...\n");
|
printf("Setting up Meshtastic on Porduino...\n");
|
||||||
|
|
||||||
// FIXME: remove this hack once interrupts are confirmed to work on new pine64 board
|
#ifdef PORTDUINO_LINUX_HARDWARE
|
||||||
// loraIrq = new PolledIrqPin();
|
SPI.begin(); // We need to create SPI
|
||||||
loraIrq = new LinuxGPIOPin(LORA_DIO1, "ch341", "int", "loraIrq"); // or "err"?
|
bool usePineLora = !spiChip->isSimulated();
|
||||||
loraIrq->setSilent();
|
if(usePineLora) {
|
||||||
gpioBind(loraIrq);
|
printf("Connecting to PineLora board...\n");
|
||||||
|
|
||||||
// BUSY hw was busted on current board - just use the simulated pin (which will read low)
|
// FIXME: remove this hack once interrupts are confirmed to work on new pine64 board
|
||||||
auto busy = new LinuxGPIOPin(SX1262_BUSY, "ch341", "slct", "loraBusy");
|
// loraIrq = new PolledIrqPin();
|
||||||
busy->setSilent();
|
loraIrq = new LinuxGPIOPin(LORA_DIO1, "ch341", "int", "loraIrq"); // or "err"?
|
||||||
gpioBind(busy);
|
loraIrq->setSilent();
|
||||||
//auto fakeBusy = new SimGPIOPin(SX1262_BUSY, "fakeBusy");
|
gpioBind(loraIrq);
|
||||||
//fakeBusy->writePin(LOW);
|
|
||||||
//fakeBusy->setSilent(true);
|
|
||||||
//gpioBind(fakeBusy);
|
|
||||||
|
|
||||||
gpioBind(new LinuxGPIOPin(SX1262_RESET, "ch341", "ini", "loraReset"));
|
// BUSY hw was busted on current board - just use the simulated pin (which will read low)
|
||||||
|
auto busy = new LinuxGPIOPin(SX1262_BUSY, "ch341", "slct", "loraBusy");
|
||||||
|
busy->setSilent();
|
||||||
|
gpioBind(busy);
|
||||||
|
|
||||||
auto loraCs = new LinuxGPIOPin(SX1262_CS, "ch341", "cs0", "loraCs");
|
gpioBind(new LinuxGPIOPin(SX1262_RESET, "ch341", "ini", "loraReset"));
|
||||||
loraCs->setSilent();
|
|
||||||
gpioBind(loraCs);
|
auto loraCs = new LinuxGPIOPin(SX1262_CS, "ch341", "cs0", "loraCs");
|
||||||
|
loraCs->setSilent();
|
||||||
|
gpioBind(loraCs);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
#endif
|
||||||
|
|
||||||
|
{
|
||||||
|
auto fakeBusy = new SimGPIOPin(SX1262_BUSY, "fakeBusy");
|
||||||
|
fakeBusy->writePin(LOW);
|
||||||
|
fakeBusy->setSilent(true);
|
||||||
|
gpioBind(fakeBusy);
|
||||||
|
|
||||||
|
auto cs = new SimGPIOPin(SX1262_CS, "fakeLoraCS");
|
||||||
|
cs->setSilent(true);
|
||||||
|
gpioBind(cs);
|
||||||
|
|
||||||
|
gpioBind(new SimGPIOPin(SX1262_RESET, "fakeLoraReset"));
|
||||||
|
gpioBind(new SimGPIOPin(LORA_DIO1, "fakeLoraIrq"));
|
||||||
|
}
|
||||||
|
|
||||||
// gpioBind((new SimGPIOPin(LORA_RESET, "LORA_RESET")));
|
// gpioBind((new SimGPIOPin(LORA_RESET, "LORA_RESET")));
|
||||||
// gpioBind((new SimGPIOPin(RF95_NSS, "RF95_NSS"))->setSilent());
|
// gpioBind((new SimGPIOPin(RF95_NSS, "RF95_NSS"))->setSilent());
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
[VERSION]
|
[VERSION]
|
||||||
major = 1
|
major = 1
|
||||||
minor = 2
|
minor = 2
|
||||||
build = 30
|
build = 38
|
||||||
|
Loading…
Reference in New Issue
Block a user