Skip to content

Commit

Permalink
Merge pull request meshtastic#839 from geeksville/dev
Browse files Browse the repository at this point in the history
bugs
  • Loading branch information
geeksville authored Aug 15, 2021
2 parents 9f450cb + bcdc428 commit f2c9c55
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 10 deletions.
28 changes: 24 additions & 4 deletions geeksville-private/TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,33 @@

You probably don't care about this section - skip to the next one.

* list portduino on platformio
* assertion failur
22:57:36 64409 [PositionPlugin] FIXME-update-db Sniffing packet
22:57:36 64409 [PositionPlugin] Delivering rx packet (id=0x5851f437 Fr0xa1 To0xff, WantAck0, HopLim3 Ch0x0 Portnum=3 rxtime=1628895456 priority=10)
22:57:36 64409 [PositionPlugin] Forwarding to phone (id=0x5851f437 Fr0xa1 To0xff, WantAck0, HopLim3 Ch0x0 Portnum=3 rxtime=1628895456 priority=10)
22:57:36 64409 [PositionPlugin] Update DB node 0x85f4da1, rx_time=1628895456
22:57:36 64409 [PositionPlugin] Plugin routing considered
22:57:36 64409 [PositionPlugin] Add packet record (id=0x5851f437 Fr0xa1 To0xff, WantAck0, HopLim3 Ch0x0 Portnum=3 rxtime=1628895456 priority=10)
22:57:36 64409 [PositionPlugin] Expanding short PSK #1
22:57:36 64409 [PositionPlugin] Installing AES128 key!
22:57:36 64409 [PositionPlugin] enqueuing for send (id=0x5851f437 Fr0xa1 To0xff, WantAck0, HopLim3 Ch0xb1 encrypted rxtime=1628895456 priority=10)
22:57:36 64409 [PositionPlugin] (bw=125, sf=12, cr=4/8) packet symLen=32 ms, payloadSize=22, time 2596 ms
22:57:36 64409 [PositionPlugin] txGood=6,rxGood=10,rxBad=0
22:57:36 64409 [PositionPlugin] AirTime - Packet transmitted : 2596ms
22:57:36 64409 [RadioIf] assert failed src/mesh/RadioLibInterface.cpp: 240, void RadioLibInterface::handleReceiveInterrupt(), test=isReceiving


add segger systemview documentation

* USB nrf52 blocks on reads!!! https://github.com/meshtastic/Meshtastic-device/issues/838
* send debug info 'in-band'
* fix wifi connections for mqtt
* router mode dropping messages? https://meshtastic.discourse.group/t/router-mode-missing-messages/3329/3
* fix ttgo eink screen
* usb lora dongle from pine64

* list portduino on platformio
* figure our wss for mqtt.meshtastic - use cloudflare? 2052 ws, 2053 crypt
* measure rak4630 power draw and turn off power for GPS most of the time. We should be able to run on the small solar panel.
* pine64 lora module
* @havealoha fixedposition not working
* ask for vercel access
* 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
Expand Down
1 change: 1 addition & 0 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,7 @@ upload_protocol = jlink
# add our variants files to the include and src paths
# define build flags for the TFT_eSPI library - NOTE: WE NOT LONGER USE TFT_eSPI, it was for an earlier version of the TTGO eink screens
# -DBUSY_PIN=3 -DRST_PIN=2 -DDC_PIN=28 -DCS_PIN=30
# add -DCFG_SYSVIEW if you want to use the Segger systemview tool for OS profiling.
build_flags = ${nrf52840_base.build_flags} -Ivariants/t-echo
src_filter = ${nrf52_base.src_filter} +<../variants/t-echo>
lib_deps =
Expand Down
4 changes: 3 additions & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -646,7 +646,9 @@ void loop()
mainController.nextThread->tillRun(millis())); */

// We want to sleep as long as possible here - because it saves power
if (!runASAP && loopCanSleep())
if (!runASAP && loopCanSleep()) {
// if(delayMsec > 100) DEBUG_MSG("sleeping %ld\n", delayMsec);
mainDelay.delay(delayMsec);
}
// if (didWake) DEBUG_MSG("wake!\n");
}
6 changes: 5 additions & 1 deletion src/mesh/StreamAPI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@ int32_t StreamAPI::readStream()
return recentRx ? 5 : 250;
} else {
while (stream->available()) { // Currently we never want to block
uint8_t c = stream->read();
int cInt = stream->read();
if(cInt < 0)
break; // We ran out of characters (even though available said otherwise) - this can happen on rf52 adafruit arduino

uint8_t c = (uint8_t) cInt;

// Use the read pointer for a little state machine, first look for framing, then length bytes, then payload
size_t ptr = rxPtr;
Expand Down
8 changes: 5 additions & 3 deletions src/nrf52/main-nrf52.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include <ble_gap.h>
#include <memory.h>
#include <stdio.h>
#include <Adafruit_USBD_Device.h>
// #include <Adafruit_USBD_Device.h>

#include "NRF52Bluetooth.h"
#include "error.h"
Expand All @@ -22,7 +22,9 @@ static inline void debugger_break(void)

bool loopCanSleep() {
// turn off sleep only while connected via USB
return !(TinyUSBDevice.mounted() && !TinyUSBDevice.suspended());
// return true;
return !Serial; // the bool operator on the nrf52 serial class returns true if connected to a PC currently
// return !(TinyUSBDevice.mounted() && !TinyUSBDevice.suspended());
}

// handle standard gcc assert failures
Expand Down Expand Up @@ -92,7 +94,7 @@ void setBluetoothEnable(bool on)
}

/**
* Override printf to use the SEGGER output library
* Override printf to use the SEGGER output library (note - this does not effect the printf method on the debug console)
*/
int printf(const char *fmt, ...)
{
Expand Down
2 changes: 1 addition & 1 deletion version.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[VERSION]
major = 1
minor = 2
build = 43
build = 44

0 comments on commit f2c9c55

Please sign in to comment.