geeksville
00d55c9daa
require min app version 172
2020-06-09 18:20:06 -07:00
geeksville
a05e45f84b
make txQueue private
2020-06-09 15:47:05 -07:00
geeksville
a8a5e036f5
turn off serial debug output once we are using the protocol on the stream
2020-06-09 10:35:06 -07:00
geeksville
009f05b61d
temp workaround for sleep bug #167
2020-06-09 06:38:09 -07:00
geeksville
ce9bac34d6
add a new SERIAL psm state, to ensure device doesn't sleep while
...
connected to the phone over USB.
In support of
https://github.com/meshtastic/Meshtastic-Android/issues/38
2020-06-08 16:37:49 -07:00
geeksville
bdbaf9c655
remove old BLE api
2020-06-08 16:08:02 -07:00
geeksville
7473a6c27a
unify activity detection in PhoneAPI, turn off BLE API while serial API in use
2020-06-08 16:06:59 -07:00
geeksville
739f497bbd
Merge branch 'master' into longaddr
2020-06-07 22:16:43 -07:00
geeksville
2d2ed591e9
set num_bits for nodenum and packet id after loading save file
2020-06-07 22:12:06 -07:00
geeksville
871a85d688
force all devices to discard old settings
2020-06-07 17:22:07 -07:00
geeksville
e124d2094f
PROTOCOL CHANGE! activate 32 bit nodenums/packetids
2020-06-06 13:16:36 -07:00
geeksville
9ea65c6793
Fix #153 - details below
...
Somehow nodenum was getting reset to zero (and saved to flash - which is
bad because it makes the failure permanent). So I've changed nodenum
selection to occur after we load the saved preferences (and we try to keep
nodenum stable in that case).
I'm puzzled as to how it ever got set to zero (unless there *shudder*
is some errant pointer that clobbered it). But next week I'm turning
4 byte nodenums back on, which will make this moot - because they
will always be based on macaddr and the current process where nodes
haggle with the mesh to pick a unique one-byte nodenum will be gone.
2020-06-06 08:30:01 -07:00
geeksville
8d14e97dfa
oops - we were not saving radio state
2020-06-06 08:07:21 -07:00
geeksville
1c63a70673
cubecell WIP
2020-06-05 17:30:09 -07:00
geeksville
4db176867b
WIP - bringup on PPR
2020-06-05 11:00:58 -07:00
geeksville
4b5cfaf9ba
changes from bringing up PPR
2020-06-05 11:00:18 -07:00
geeksville
99437d931e
fix #153
2020-06-03 16:08:11 -07:00
geeksville
5166717298
confirm randomSeed is set correctly
2020-06-03 14:24:34 -07:00
geeksville
49b5738f4f
add min_app_version so apps can warn if they are too old
2020-06-03 13:57:30 -07:00
geeksville
c753ea7cd1
don't use a fixed randomSeed.
2020-06-03 13:51:53 -07:00
geeksville
5b1488ddf0
Allow packet and nodenums to be 32 bits long (but don't change yet)
2020-06-03 13:46:31 -07:00
geeksville
a34cfb0ee0
Populate metainfo for apps to allow 32 bit node and packet ids
2020-06-03 13:15:45 -07:00
geeksville
e522e47544
Full DSR WIP
2020-06-03 12:49:36 -07:00
geeksville
ed0f79b683
Merge branch 'master' into nrf52
2020-05-27 15:54:44 -07:00
geeksville
1b34a0c6d8
Help make sx1262 go for @dafeman 's board. See below for details:
...
Hi, I think the problem you were having building for ESP32 was due to
a funny thing. Notice the #define for INTERRUPT_ATTR. That macro expands
to IRAM_ATTR - which is a special flag the ESP32 requires for _any_ code
that is going to be called from an ISR. So that the code is guaranteed
to be in RAM (the ESP32 uses a clever scheme where the FLASH is actually
high speed serial flash and all reads/writes are actually only happening
to a small number of pages in RAM and they have a driver that is constantly
copying blocks they need into that ram. This essentially how VM works
for desktop computers, but in their case they are paging to FLASH.
But for code that runs in an interrupt handler must _always_ be in RAM
because if you took a 'page fault' for that code being missing in RAM they
can't nicely do their clever VM scheme.
So that's all good. The problem was - apparently GCC for the ESP32 has a
a bug when that attribute is applied in the class declaration. So
I moved it out into the cpp file and all seems well now.
2020-05-27 15:47:59 -07:00
geeksville
313380381b
no need for this old debug output
2020-05-27 15:40:47 -07:00
geeksville
f56ff2ca20
DSR WIP
2020-05-27 15:31:32 -07:00
geeksville
f3a1c5e679
Possible fix for https://meshtastic.discourse.group/t/a-note-about-limited-support-for-the-neo-8m-gps-boards/233/3?u=geeksville
2020-05-26 13:10:34 -07:00
geeksville
a96c8fd4db
nrf52 debugging is supported as long as BLE is not advertising
2020-05-25 17:16:09 -07:00
geeksville
da3ed9926b
add monitor mode debugging support
2020-05-25 15:56:06 -07:00
geeksville
fd386d9d7f
UC1701 WIP
2020-05-25 15:55:38 -07:00
geeksville
5d1614989e
Only add interfaces to the router if they can be initied
2020-05-25 15:47:45 -07:00
geeksville
f4b1678535
my DSR changes broke acks for flood routing also. Fix #146
2020-05-25 11:55:42 -07:00
geeksville
03999e9d56
fix build for esp32
2020-05-25 10:46:26 -07:00
geeksville
d5f177b1ee
begin UC1701 driver
2020-05-25 10:41:46 -07:00
geeksville
fdaed7e323
Fix MIN_BAT_MILLIVOLTS per @spattinson
2020-05-25 10:41:19 -07:00
geeksville
d39e775c95
make flash filesystem work on NRF52
2020-05-25 10:07:42 -07:00
geeksville
829e0b6e26
fix extra free
2020-05-25 08:19:14 -07:00
geeksville
1656c8d0cb
use my Timer class on all platforms, it works better than the freertos version
2020-05-25 07:48:36 -07:00
geeksville
2770cc7de3
Use the SX1262 receive duty cycle mode to get radio current draw down to
...
about 2.5mA @ 3V while in receive mode.
2020-05-24 19:23:50 -07:00
geeksville
48de631e04
disable activelyReceiving for sx1262 for now - it doesn't yet work
2020-05-24 16:34:18 -07:00
geeksville
66b11bcbd7
print RF52 reset reason
2020-05-24 16:20:21 -07:00
geeksville
cda7487cbe
add a NRF52 hardfault handler
2020-05-24 16:08:58 -07:00
geeksville
e8f6504ec4
Make an accelerated NRF52 implementation for AEX256-CTR crypto
2020-05-24 14:45:50 -07:00
geeksville
8f1b26bdda
DSR wip still kinda busted (rx packets not working - even for regular router)
2020-05-24 12:59:10 -07:00
geeksville
5bd3e4bcd0
DSR WIP
2020-05-23 17:39:08 -07:00
geeksville
fb3b62f8f0
CSR WIP
2020-05-23 15:48:23 -07:00
geeksville
e89fe2f7d9
DSR WIP
2020-05-23 12:50:33 -07:00
geeksville
16812c3ee4
add ignore_incoming to user preferences, for automated testing of DSR topologies
2020-05-23 10:01:36 -07:00
geeksville
c9cb293bf2
cleanup virtual inheritence for Router/Reliable/Flooding/DSR
2020-05-23 09:24:22 -07:00
geeksville
8e2e154cdd
Merge remote-tracking branch 'root/master' into nrf52
2020-05-22 19:06:35 -07:00
geeksville
dd0209b192
Merge remote-tracking branch 'root/master' into nrf52
...
# Conflicts:
# docs/software/nrf52-TODO.md
# src/mesh/RadioLibInterface.cpp
# src/mesh/mesh.pb.h
2020-05-22 11:12:22 -07:00
geeksville
925e46da8c
make serial console work on nrf52
2020-05-21 21:17:53 -07:00
geeksville
2dadb4d7a2
make nrf52dk build again
2020-05-21 20:31:22 -07:00
geeksville
d2de04d5b2
Fix #59 no need for broadcasts when showing new node pane
2020-05-21 17:21:44 -07:00
geeksville
9dd88281af
reliable broadcast now works
2020-05-21 16:34:16 -07:00
geeksville
e75561016b
retransmissions work again
2020-05-21 15:55:57 -07:00
geeksville
e2cbccb133
add want_ack support for broadcast packets
2020-05-21 12:47:41 -07:00
geeksville
0271df0657
add beginnings of full DSR routing
2020-05-21 12:47:08 -07:00
geeksville
71041e8674
reliable unicast 1 hop works!
2020-05-19 15:51:07 -07:00
geeksville
c65b518432
less logspam
2020-05-19 14:54:58 -07:00
geeksville
6ba960ce47
one hop reliable ready for testing
2020-05-19 14:54:47 -07:00
geeksville
8bf4919576
wip reliable unicast (1 hop)
2020-05-19 11:56:17 -07:00
geeksville
cca4867987
want_ack flag added
2020-05-19 10:27:28 -07:00
geeksville
976bdad067
sniffReceived now allows router to inspect packets not destined for this node
2020-05-18 17:57:58 -07:00
geeksville
26d3ef529e
Use the hop_limit field of MeshPacket to limit max delivery depth in
...
the mesh.
2020-05-18 17:35:23 -07:00
geeksville
19f5a5ef79
oops - use correct battery shutoff voltage
2020-05-17 05:12:16 -07:00
geeksville
ef831a0b4d
Fix leaving display on in deep sleep.
...
We shutoff screen immediately, rather than waiting for our loop call()
2020-05-17 05:11:32 -07:00
geeksville
efc239533c
Fix #133 - force deep sleep if battery reaches 10%
2020-05-17 05:10:51 -07:00
geeksville
ef1463a6a9
have tbeam charge at max rate (450mA)
2020-05-17 04:44:48 -07:00
geeksville
6961853ed7
ble software update fixes
2020-05-15 10:16:10 -07:00
geeksville
5ec5248fe4
complete ble ota move
2020-05-14 14:22:11 -07:00
geeksville
14fdd33972
move bluetooth OTA back into main tree for now
2020-05-14 14:20:05 -07:00
geeksville
140e29840a
fix rare gurumeditation if we are unlucky and some ISR code is in serial flash
2020-05-14 12:46:29 -07:00
geeksville
a0b43b9a95
Send "unset" for hwver and swver if they were unset
2020-05-12 17:57:51 -07:00
geeksville
b6a202d68e
runs again with new protobufs
2020-05-12 13:35:22 -07:00
geeksville
9f05ad2927
remove random delay hack from broadcast, since we now do that for all transmits
2020-05-11 16:19:44 -07:00
geeksville
86ae69d360
refactor so I can track and ignore recent packets of any type
2020-05-11 16:14:53 -07:00
geeksville
c12fb69ca2
update protos
2020-05-10 14:17:05 -07:00
geeksville
8b911aba7f
Cleanup build for NRF52 targets
2020-05-10 12:33:17 -07:00
geeksville
2fa595523f
minor fixups to get nrf52 building again
2020-05-09 21:02:56 -07:00
geeksville
3e356e5866
Crypto works!
2020-05-09 19:08:04 -07:00
geeksville
1cc24de787
stub encryptor seems nicely backwards compatible with old devices and apps
2020-05-09 17:51:20 -07:00
geeksville
e6875d559c
Remove MeshRadio wrapper class - we don't need it anymore.
2020-05-09 16:32:26 -07:00
geeksville
28d21ecdcc
begin work on crypto
2020-05-09 16:15:01 -07:00
geeksville
8bfe9fa8fc
0.6.3 - fix the problem of BLE message receiption being busted in 0.6.2
2020-05-05 18:40:17 -07:00
geeksville
dcd1f7478a
fix 124 - we now fallback to nema if we can't talk ublox protocol to
...
the GPS. Though we are super power inefficient about it so TODO/FIXME
someday to decrease our power draw.
2020-05-04 20:02:43 -07:00
geeksville
c2be6c4068
WIP on #124
2020-05-04 17:39:57 -07:00
geeksville
101eef5495
oops lat/lon need to be signed ;-)
2020-05-04 11:21:24 -07:00
geeksville
933d5424da
abstract out the UBlox GPS driver
2020-05-04 11:15:05 -07:00
geeksville
ecf528f9b6
move gps before refactoring
2020-05-04 10:23:47 -07:00
geeksville
9b309fe0a0
Use int based lat/long from now on in the device code
...
for https://github.com/meshtastic/Meshtastic-device/issues/124
2020-05-04 08:09:08 -07:00
geeksville
624b95782d
fix missing carriage returns. thanks to @gregwalters in #119
2020-05-02 20:21:42 -07:00
geeksville
1d9290afc0
now that the rfinterfaces are smarter, no need to do backoff in
...
the flood router. the interfaces will handle it.
2020-05-02 19:53:58 -07:00
geeksville
ad2f639195
don't leak messages if they are handled locally
2020-05-02 19:53:13 -07:00
geeksville
07b4eea037
fix log msg
2020-05-02 19:52:54 -07:00
geeksville
79c61cf0e0
limit max power on rf95 to 17 (rather than 20, because 20 can...
...
burn up parts if you exceed 1% duty cycle)
2020-05-02 19:52:37 -07:00
geeksville
80268ea56a
send() is supposed to always free buffers, even if it returns an error
2020-05-02 19:51:55 -07:00
geeksville
bb9f595b8b
Fix #11
2020-05-02 19:51:25 -07:00
geeksville
2ad314f150
we now always listen before transmit - even if we have just completed a packet
2020-05-02 08:29:51 -07:00
geeksville
4f7a25f562
remove unneeded include
2020-05-01 16:33:40 -07:00
geeksville
4176d79ee9
fix warnings
2020-05-01 16:33:26 -07:00
geeksville
e084699704
SNR is now a float, fix the screen display
2020-05-01 12:31:36 -07:00
geeksville
50213d8323
move packet handling into its own thread
2020-05-01 12:11:04 -07:00
geeksville
71fcdba017
cleanup directory structure
2020-05-01 09:04:00 -07:00
geeksville
5a4fab2506
start msg sequence numbers with a random number each boot
2020-05-01 08:51:53 -07:00
geeksville
31eb2f5337
very important: don't allow immediate sends if we have pending ISRs
2020-05-01 08:32:16 -07:00
geeksville
82c1752d85
less logspam
2020-05-01 08:31:52 -07:00
geeksville
49a13bbfd3
increase gps config timeout, could take up to 2.5 secs
2020-05-01 08:31:31 -07:00
geeksville
0096f54ae9
better debug output
2020-04-30 22:53:21 -07:00
geeksville
4e106f4098
remove radiohead
2020-04-30 21:42:11 -07:00
geeksville
1f1d683f4f
add back the old code that checked if the radio was actvively receiving
2020-04-30 21:29:51 -07:00
geeksville
a8f64c3cc8
make a custom version fo rf95 class, so we can can deal with
...
chips that have bad version codes.
2020-04-30 21:11:03 -07:00
geeksville
968a2d7fbc
store SNR in received packets
2020-04-30 19:58:10 -07:00
geeksville
1fab9c5aac
temp hack to get new rf95 driver working
2020-04-30 19:31:17 -07:00
geeksville
22bca31ce3
properly set the RF95 iface
2020-04-30 18:05:06 -07:00
geeksville
48c045a253
move SPI init into main
2020-04-30 17:56:30 -07:00
geeksville
e9ca7792eb
new RF95 driver is written
2020-04-30 17:43:29 -07:00
geeksville
b1a55b4576
old RF95 API works again
2020-04-30 16:47:56 -07:00
geeksville
dd7452ad96
old RF95 code builds again
2020-04-30 16:36:59 -07:00
geeksville
d7d8188093
implement most of sleep handling for the new radio stack
2020-04-30 15:50:07 -07:00
geeksville
62a893c760
SX1262 approximately works top-to-bottom, but need to add sleep modes
2020-04-30 15:43:41 -07:00
geeksville
a2ba9d3c44
new receive code works a little better
2020-04-30 13:50:40 -07:00
geeksville
22720e9f63
ex1262 receiving kinda works
2020-04-30 12:37:58 -07:00
geeksville
11b79a942d
add todos
2020-04-30 10:54:53 -07:00
geeksville
3c3e722181
new sending kinda works
2020-04-30 10:00:40 -07:00
geeksville
fce31560c6
the mountain of changes needed to kinda make tx work compiles.
2020-04-30 09:44:16 -07:00
geeksville
2982e197e0
radio settings now work on real sx1262 hw
2020-04-29 19:04:59 -07:00
geeksville
f69ddf168b
we now hopefully apply the same radio settings as we did for the RF95
2020-04-29 18:46:32 -07:00
geeksville
8d985cfd37
cleanup so eventually rf95 can share common msg code with sx1262
2020-04-29 16:28:11 -07:00
geeksville
4693302d82
crummy sx1262 fake init kinda works
2020-04-29 16:06:23 -07:00
geeksville
814c126e67
ugly WIP on switching to RadioLib, still need to set freq etc...
2020-04-29 14:54:03 -07:00
geeksville
2ab34357d5
emit FromRadio.rebooted to serial test harness can detect reboots
2020-04-28 17:43:16 -07:00
geeksville
b704911603
minor protobuf update
2020-04-28 11:20:00 -07:00
geeksville
59086fd477
fixes after testing stream protocol with python client
2020-04-27 18:52:57 -07:00
geeksville
88a704c4d3
for now, allow debug out to be interleaved with protobufs
2020-04-27 09:46:06 -07:00
geeksville
cceecf5f8e
New serial protobuf transport approximately works and is backward
...
compatiable with the text debug output.
2020-04-27 09:36:39 -07:00
geeksville
eb40013ddc
Create RedirectablePrint and NoopPrint for serial debug redirection
2020-04-27 09:01:25 -07:00
geeksville
dda946d933
Stream API coded but not tested
2020-04-27 08:45:39 -07:00
geeksville
178e800969
add beginnings of StreamAPI
2020-04-27 08:10:17 -07:00
geeksville
dec4870649
begin cleaning up mesh library layer so that it could be split someday
2020-04-27 07:54:19 -07:00
geeksville
15cb599cd1
move nrf52 stuff to correct directory name
2020-04-27 07:39:50 -07:00
geeksville
def86131f0
Merge branch 'master' into nrf52
...
# Conflicts:
# src/main.cpp
2020-04-26 18:34:41 -07:00
geeksville
8f1c1a9049
move debug msg
2020-04-25 11:46:46 -07:00
geeksville
3f3a1a11df
when flooding, randomly delay sent packets to decrease chances of...
...
stomping on other senders that we can't even hear.
2020-04-25 11:43:28 -07:00
geeksville
64f6c0f5c0
clean up PeriodicTask so I can eventually use it with a scheduler
2020-04-25 10:59:40 -07:00
geeksville
db11d9280c
add nrf52 DFU app helper
2020-04-24 21:08:16 -07:00
geeksville
ca03110932
Update ESP32 build to work with latest NRF52 changes
2020-04-24 14:55:51 -07:00
geeksville
bebaa838c4
no need for LightSleep state on NRF52 CPUs
2020-04-24 11:21:10 -07:00
geeksville
7fa9d09d9f
placeholder guess at PMU code until I have HW
2020-04-24 09:33:45 -07:00