Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bugs #839

Merged
merged 4 commits into from
Aug 15, 2021
Merged

bugs #839

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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