Commit Graph

861 Commits

Author SHA1 Message Date
Audun Foyen
bf0b598908 Include <algorithm> - required for 'lower_bound' 2021-07-31 21:56:31 +02:00
Audun Foyen
8a79663fa0 Drop lower priority packets when tx queue is full.
Track packet pointers in vector. Priority maintained using: push_heap, pop_heap, make_heap, and sort_heap.
2021-07-31 21:42:48 +02:00
Audun Foyen
986d44873a Issue-108. Track recent packets in unordered_set
Check individual packets seen recently for expiry - and purge.
Otherwise - only scan all of recentPackets for expired once
fill > 75% (of MAX_NUM_NODES).
2021-07-20 21:19:35 +02:00
Kevin Hester
17a1262382 pull in new epaper lib (which required importing configuration.h everywhere
for dumb reasons)
2021-06-27 10:56:28 -07:00
Kevin Hester
5c4d1a88a8 update protos 2021-05-29 13:19:27 +08:00
Kevin Hester
29ff778e22 fix #811 nodes rebooting due to invalid printf call, thanks @IZ1IVA
Ouch, this was nasty - printf format string wasn't matching the parameters
passed in causing a NPE due to a missing last param.

I'll investigate why printf format strings were
not being checked by the compiler (normally gcc offers that feature)
2021-05-26 10:00:23 +08:00
Kevin Hester
abe95ae1a4 most of the changes needed to build native on Windows 2021-05-25 05:08:57 +08:00
Kevin Hester
a8feb40ae9 cleanup 2021-05-24 09:42:25 +08:00
Kevin Hester
be410a3913 Fix #807 TCP API on ESP32. thanks @jfirwin your hint made the problem easy to find! 2021-05-24 09:42:21 +08:00
Kevin Hester
069b0d38be Fix wifi to allow usage with unsecured networks 2021-05-24 09:21:52 +08:00
Kevin Hester
7f2bbcd95e fix debug spam for api calls (possibly corrupting protocol) 2021-05-23 12:07:28 +08:00
Kevin Hester
7f51517961 better support for heltec 2021-05-11 09:44:41 +08:00
Kevin Hester
bc76c79e1e oops my latest change busted android connection detection 2021-05-03 15:37:37 +08:00
Kevin Hester
d179bda728 serious bug: connection to phones not being properly tracked 2021-05-03 14:46:30 +08:00
Kevin Hester
c15204fed1 better debug output 2021-05-03 10:53:06 +08:00
Kevin Hester
6dc4471bec fix serious bug! don't send NO-RESPONSE NAKs for messages sent by local node 2021-05-03 08:45:32 +08:00
Kevin Hester
4c1b7d4840 pinelora WIP 2021-05-01 11:27:37 +08:00
Kevin Hester
babc1b3613 include file/lineno in critical error logs 2021-04-29 09:52:15 +08:00
Kevin Hester
6e27856daa pinelora WIP 2021-04-22 08:49:05 +08:00
Kevin Hester
405f7e0caa Fix integration test found by CI! verstr field was too short 2021-04-16 11:51:04 +08:00
Kevin Hester
55b38a7b02 RAK4631 is almost feature complete 2021-04-12 13:25:55 +08:00
Kevin Hester
a43a04986d document peer_info 2021-04-11 09:24:36 +08:00
Kevin Hester
5e87ee338d add is_licensed for ham users 2021-04-10 11:39:13 +08:00
Kevin Hester
cec905914c Fix GPIO service and cleanup response handling 2021-04-06 10:34:23 +08:00
Kevin Hester
7abc3534c4 fix build for !wifi devices 2021-04-05 13:00:56 +08:00
Kevin Hester
a845406a19 cleanup packet encrypt/descrypt 2021-04-05 09:24:00 +08:00
Kevin Hester
8ef36bcc9c note about security 2021-04-05 08:56:11 +08:00
Kevin Hester
3cd64bb8b5 allow passing even encrypted packets through the plugins 2021-04-05 08:44:47 +08:00
Kevin Hester
55b8314a2a mqtt: only publish uplink_enabled channels 2021-04-05 07:57:06 +08:00
Kevin Hester
d19af8b83d mqtt: send packets after they are encrypted 2021-04-04 09:20:37 +08:00
Kevin Hester
dcf64dfacd MQTT at least talks to server, works in native and esp32 2021-04-03 14:54:10 +08:00
Kevin Hester
c798c0032c add frequency_offset 2021-04-02 09:14:12 +08:00
Kevin Hester
88716fc352 Merge remote-tracking branch 'root/master' into dev1.2 2021-03-31 09:14:43 +08:00
Kevin Hester
b68397a911 fix simradio init to work more like real radios 2021-03-30 23:39:51 +08:00
Kevin Hester
5fdcb72d46 cleanup applyModemConfig based on porduino testing, share with sim 2021-03-30 23:34:13 +08:00
Kevin Hester
a9c8564524 fix millisecond unsigned rollover errors found via portduino 2021-03-30 23:11:33 +08:00
Jm
d8669f860a Update fo #638 - Redid protobuf generation 2021-03-29 17:33:37 -07:00
Jm
2f8e663f03 Add serial_disabled for #638 2021-03-29 17:08:56 -07:00
Kevin Hester
525fe9b96c dramatically speed up message RX in some cases (we were sleeping much too long) 2021-03-28 12:16:37 +08:00
Kevin Hester
c7f411fc7c remove unused Preferences code (cc @mc-hamster for review)
(noticed because of a compiler warning)
2021-03-28 12:07:43 +08:00
Kevin Hester
fc96500329 fix unused prefs field 2021-03-28 12:06:16 +08:00
Kevin Hester
4e87c4411c fix serious nak bug reported by @havealoha and @luxoon 2021-03-28 11:44:19 +08:00
Kevin Hester
76269b397f Merge remote-tracking branch 'root/master' into dev1.2
# Conflicts:
#	src/esp32/main-esp32.cpp
#	src/mesh/generated/deviceonly.pb.h
#	src/mesh/generated/mesh.pb.h
2021-03-27 16:44:42 +08:00
Jm
57c82988e2 #669 - Add restart counter 2021-03-27 01:20:07 -07:00
Kevin Hester
1e3b037fea populate position.time for broadcast positions 2021-03-27 16:17:01 +08:00
Jm
4f4cdf4f9e #669 Add restart counter 2021-03-27 01:00:27 -07:00
Kevin Hester
37ec969f96 Merge remote-tracking branch 'root/master' into dev1.2
# Conflicts:
#	src/mesh/NodeDB.cpp
2021-03-27 11:10:47 +08:00
Kevin Hester
8ffd5a1d4f add reboot message 2021-03-27 10:19:59 +08:00
Jm Casler
7872cb050d
Merge branch 'master' into master 2021-03-25 19:32:13 -07:00
Jm
89029311c1 Update NodeDB.cpp 2021-03-25 19:28:15 -07:00
Jm
f6f586decb Remove my code that doesn't work with channels 2021-03-25 19:27:46 -07:00
Kevin Hester
7e9e33d462 fix has_gps reporting to phones 2021-03-26 09:30:33 +08:00
Kevin Hester
04225f7bc2 change! time of last packet rx in node->last_heard instead of node->position.time 2021-03-26 09:30:15 +08:00
Michał Adamski
97a5405293 captive portal for Android devices 2021-03-25 21:49:06 +01:00
Kevin Hester
0261c243e0 PhoneAPIs shouldn't register for messages until they have clients 2021-03-25 07:51:54 +08:00
Kevin Hester
b20930c111 move streamapi into a thread, saves power and increases responsiveness 2021-03-25 06:15:15 +08:00
Kevin Hester
e17fe7e075 update altitude in nodedb for received altitudes (reported by @iz1kga) 2021-03-24 19:24:33 +08:00
Kevin Hester
77c1112fe8 Merge remote-tracking branch 'root/master' into dev1.2 2021-03-24 13:28:21 +08:00
Kevin Hester
5b0e7c6e82 fix has_preferences init 2021-03-24 13:25:21 +08:00
Kevin Hester
78c665abb9 properly discard messages with fromradio queue is full (Rather than blocking forever) 2021-03-24 13:25:10 +08:00
Vadim Furman
8065dbb2b7 Merge remote-tracking branch 'origin/master' 2021-03-22 21:40:30 -07:00
Kevin Hester
49b16fdf0c fix channel !authorized check 2021-03-23 12:07:04 +08:00
Kevin Hester
1fcec8ce3b always fix up channel list, even if we just did factory reset 2021-03-23 11:54:53 +08:00
Kevin Hester
d32386a027 Return errors for unauthorized requests or out of bound channel nums 2021-03-23 11:44:51 +08:00
Vadim Furman
b9fd726c14 Push RSSI to the phone 2021-03-22 19:39:49 -07:00
Jm Casler
1eb37dded8 partial work for S&F 2021-03-21 19:45:35 -07:00
Vadim Furman
b6e197371d Removed SX1262_USE_DIO3_FOR_TCXO 2021-03-19 18:30:00 -07:00
Vadim Furman
7491af8ad7 Merge remote-tracking branch 'origin/master' 2021-03-19 17:07:16 -07:00
Kevin Hester
b4c379f5fc add sim exit cmd 2021-03-18 19:09:31 +08:00
Vadim Furman
2b9a8f0822 Merge remote-tracking branch 'origin/master' 2021-03-17 10:49:04 -07:00
Vadim Furman
ddcfff3b59 Fixed compilation on nrf52 and brownout code 2021-03-17 10:44:42 -07:00
Kevin Hester
999afdf05e wifi now works on portduino 2021-03-17 20:29:27 +08:00
Kevin Hester
f492f6deb6 progress on Wifi in portduino 2021-03-15 19:59:31 +08:00
Kevin Hester
3f401e8cac Merge branch 'dev' into portduino
# Conflicts:
#	.vscode/settings.json
2021-03-15 12:09:07 +08:00
Vadim Furman
c62863b1dc Merge from origin 2021-03-14 19:42:57 -07:00
Vadim Furman
98d878cdfe Port to lora_isp4520 board 2021-03-14 19:00:20 -07:00
Kevin Hester
53671283ae change hw_model_deprecated to intentionally break old apps 2021-03-14 10:57:26 +08:00
Kevin Hester
d9fc7b32c3 move hw_model into User 2021-03-14 10:48:20 +08:00
Kevin Hester
9a03536e3d Use enums for hw_model per @sachaw idea. 2021-03-14 10:37:32 +08:00
Kevin Hester
c0ac457cad lockdown plugins that touch hardware 2021-03-13 13:14:27 +08:00
Kevin Hester
6813a31895 fix hop limit defaults for android 2021-03-13 09:27:44 +08:00
Kevin Hester
c227143b53 @mc-hamster, I think storeandforward was accidentally wrong (no worries though) 2021-03-13 08:41:50 +08:00
Kevin Hester
3e6817cd18 fix board reboot due to forwarding packets we don't have keys for 2021-03-13 08:29:58 +08:00
Kevin Hester
1908d131ca turn on access control for admin plugin, only allow remote access over special channel 2021-03-12 20:22:40 +08:00
Kevin Hester
8cd2a00a25 fix nasty bug 2021-03-12 15:47:00 +08:00
Kevin Hester
c097852ab0 SERIOUS BUG: we've been discarding devicestate when we should not 2021-03-12 15:45:28 +08:00
Kevin Hester
b02212009a progress on remote settings 2021-03-12 14:10:36 +08:00
Kevin Hester
a97c2ae6eb minimize radioconfig file writes 2021-03-11 18:29:47 +08:00
Kevin Hester
76e2c39c63 completed moving prefs to new files 2021-03-11 17:54:16 +08:00
Kevin Hester
ab9fe42f58 wip - move channels 2021-03-11 13:02:00 +08:00
Kevin Hester
959b540c02 begin restricting admin ops to the admin channel 2021-03-11 10:01:57 +08:00
Kevin Hester
772f2a15ff check more error codes 2021-03-09 16:45:40 +08:00
Kevin Hester
87ec7b09aa add crude check for brownout 2021-03-08 18:12:21 +08:00
Kevin Hester
707ed75138 fix warnings found in nrf52 build 2021-03-08 15:20:43 +08:00
Kevin Hester
1f33506962 Add RU region 2021-03-06 21:10:36 +08:00
Kevin Hester
6f13966d19 fix missing acks for broadcasts 2021-03-06 17:48:35 +08:00
Kevin Hester
96cfad4e57 less logspam 2021-03-06 14:52:26 +08:00
Kevin Hester
49b1f4c5af oops - fix failed text message rx 2021-03-06 14:21:20 +08:00
Kevin Hester
aa6b29a4b5 fix from address on naks 2021-03-06 11:19:52 +08:00
Kevin Hester
c88b9732eb REALLY IMPORTANT: fix bug with retransmissions not happening 2021-03-06 11:13:33 +08:00
Kevin Hester
2c29e8b179 make nodeinfo & position plugins optional 2021-03-06 10:36:30 +08:00
Kevin Hester
d2d6b8e12f fix log formatting 2021-03-06 10:27:48 +08:00
Kevin Hester
badfaa8545 make error message clearer for packets that are too big 2021-03-06 10:27:31 +08:00
Kevin Hester
c9c44a934d don't generate acks for locally sourced msgs 2021-03-05 12:39:31 +08:00
Kevin Hester
8739469db3 oops typo 2021-03-05 11:49:37 +08:00
Kevin Hester
0c0c0babba combine acks works 2021-03-05 11:44:45 +08:00
Kevin Hester
950b32232f don't send messages the phone sent us back towards the phone 2021-03-05 10:19:27 +08:00
Kevin Hester
2cc2fa906a
Merge branch 'master' into improvements_to_env_plugin 2021-03-04 20:06:27 +08:00
Kevin Hester
955d03acb1 fix symbol conflict with new nrf52 libs 2021-03-04 11:28:50 +08:00
Charles Crossan
2af9e1431e Improvements to EnvironmentalMeasurementPlugin
Instead of holding onto only the last measurement, hold onto a copy of the last MeshPacket containing a measurement

This will make it easier to display the last time received

make DHT sensor reads more reliable

user preference for Farenheit vs Celsius
2021-03-03 08:23:03 -05:00
Kevin Hester
92e05bc438 release to devs 2021-03-03 11:46:09 +08:00
Kevin Hester
082101f99f wire compat 2021-03-02 12:44:48 +08:00
Kevin Hester
f6761d637f proto update 2021-03-02 11:46:00 +08:00
Kevin Hester
ef612d0b58 Merge remote-tracking branch 'root/master' into dev1.2
# Conflicts:
#	src/plugins/Plugins.cpp
#	version.properties
2021-03-01 10:26:16 +08:00
Kevin Hester
fb47c3a03d move channel and settings protos 2021-02-27 13:17:18 +08:00
Kevin Hester
63e0b53054 1 index channel index 2021-02-27 09:17:58 +08:00
Kevin Hester
989f52494d clean up ack packets 2021-02-26 20:36:22 +08:00
Kevin Hester
0307e4161e get settings message works 2021-02-26 20:10:41 +08:00
Kevin Hester
c7c8b34adf impl get channels/get radio remote api 2021-02-26 15:34:00 +08:00
Jm Casler
10dd2337fc
Merge branch 'master' into master 2021-02-25 08:04:41 -08:00
Kevin Hester
5ae4edf8fd move admin out of core proto 2021-02-25 20:36:37 +08:00
Kevin Hester
8ba43e1745 merge latest from master 2021-02-25 20:02:32 +08:00
Kevin Hester
e4eb7ab589 Merge branch 'dev' into dev1.2
# Conflicts:
#	proto
#	src/mesh/generated/deviceonly.pb.h
#	src/mesh/generated/mesh.pb.h
#	src/plugins/esp32/EnvironmentalMeasurementPlugin.cpp
2021-02-25 19:44:08 +08:00
Kevin Hester
b052928af2 Merge remote-tracking branch 'root/master' into dev 2021-02-25 19:33:06 +08:00
Jm Casler
0fe046b92d
Merge pull request #72 from meshtastic/master
Update from head
2021-02-24 20:27:58 -08:00
Kevin Hester
66638655a5 Merge branch 'dev' into dev1.2
# Conflicts:
#	src/mesh/NodeDB.cpp
2021-02-25 08:56:36 +08:00
Kevin Hester
2d214df76f Merge remote-tracking branch 'root/master' into dev 2021-02-25 08:52:26 +08:00
Kevin Hester
b2c47a7dea fix #710. nodes disappearing from map. thanks @DylanHoen for noticing! 2021-02-25 08:50:46 +08:00
Kevin Hester
f8d8dc25c0 properly route messages to phone again 2021-02-23 14:35:34 +08:00
Kevin Hester
aa8b86c6b2 multichannel send/rx kinda works 2021-02-23 11:43:30 +08:00
Kevin Hester
ae6b7e7259 multichannel code is done! (only basic testing completed though) 2021-02-23 10:45:03 +08:00
Kevin Hester
2761c85564 clean up the crypto api 2021-02-23 10:10:35 +08:00
Charles Crossan
3f1ada29ac support independently enabling/disabling the on-device screen and actual measurement 2021-02-22 20:47:35 -05:00
Charles Crossan
efaf669479 update Environmental Measurement plugin to use radio config prefs 2021-02-22 19:50:51 -05:00
Kevin Hester
94cd96cfde begin multichannel hash impl 2021-02-22 12:57:26 +08:00
Kevin Hester
d6c2e9063a 1.2 channel cleanup 2021-02-22 11:16:38 +08:00
Kevin Hester
3088fe3f91 Stay up-to-date wrt master (cc @mc-hamster)
# Conflicts:
#	src/plugins/Plugins.cpp
#	src/plugins/RangeTestPlugin.cpp
#	src/plugins/StoreForwardPlugin.cpp
2021-02-22 10:39:46 +08:00
Kevin Hester
008187caa4 1.2 wip - psk work 2021-02-22 10:26:11 +08:00
Charles Crossan
ae76ce4024 Implement interface for plugins to have custom UI Frames 2021-02-21 16:46:46 -05:00
Charles Crossan
087945d7cb udpate protobufs 2021-02-21 12:05:23 -05:00
Charles Crossan
5817afd4ac fix port number for ENVIRONMENTAL_MEASUREMENT_APP 2021-02-21 11:42:03 -05:00
Charles Crossan
3c564796e0 2021-02-21 10:55:33 -05:00
Jm
7ffe601743 Changes to how airtime noise is gathered. 2021-02-20 23:53:17 -08:00
Kevin Hester
c6091338ab admin ops 2021-02-21 14:03:44 +08:00
Kevin Hester
99467cd874 1.2 WIP at least doesn't crash 2021-02-21 12:59:47 +08:00
Kevin Hester
69a11e7375 WIP phone api changes for dev1.2 2021-02-17 19:04:41 +08:00
Kevin Hester
42ae27973e WIP 1.2 move routing into plugin 2021-02-17 13:06:23 +08:00
Kevin Hester
45caf394f0 WIP multichannel support 2021-02-16 15:41:52 +08:00
Charles Crossan
05d237ee84 add handleSetChannel 2021-02-15 21:02:30 -05:00
Kevin Hester
e35f137986 clean up nodeinfo broadcasts and move into plugin 2021-02-14 12:27:10 +08:00
Kevin Hester
c1733a4ac6 Merge remote-tracking branch 'root/master' into dev 2021-02-14 12:07:11 +08:00
Kevin Hester
66a7e8eab9 oops - we were never sending 'fixed' gps positions to other nodes 2021-02-14 12:02:24 +08:00
Kevin Hester
a872231f8a clean up position broadcasts, send them even if we don't have gps lock 2021-02-14 11:57:48 +08:00
Kevin Hester
52ec4d511c oops - we weren't properly stripping timestamps from new style positions 2021-02-14 11:37:32 +08:00
Sacha Weatherstone
875eeb699c Fix report formatting 2021-02-13 19:51:31 +11:00
Jm Casler
eecf89a9c0
Merge pull request #68 from meshtastic/master
from main to my fork
2021-02-12 18:49:39 -08:00
Jm
c9b1ee532d Update deviceonly.pb.h 2021-02-12 18:49:24 -08:00
Kevin Hester
8c225a3c65 disable lora while updating, show "Updating" on oled screen 2021-02-12 13:48:12 +08:00
Kevin Hester
bbc8fc0269 fix build for nrf52 2021-02-12 09:56:42 +08:00
Kevin Hester
9d81511153 fix warning 2021-02-12 09:56:35 +08:00
Kevin Hester
f2b7ff2b79 an optimization for #681 - make want_ack packets higher priority 2021-02-12 09:40:20 +08:00
Kevin Hester
2ff5046dcd for #681, add MeshPacketQueue (a priority queue) to ensure acks get sent quickly 2021-02-12 09:08:49 +08:00
Kevin Hester
917090856f partial for #681: Never let stale nodeinfos/positions stay in xmit queue 2021-02-11 18:19:43 +08:00
Kevin Hester
da03490310 Merge branch 'dev' into portduino 2021-02-10 16:20:29 +08:00
Kevin Hester
fdfe62edf0 updates to work with new protobuf names 2021-02-10 16:18:41 +08:00
Kevin Hester
aedca25fa8 Merge branch 'dev' into portduino 2021-02-10 15:51:34 +08:00
Jm
b29bcbbd41 #682 Exposing the actual radio center frequency to /static/report 2021-02-09 21:59:00 -08:00
Kevin Hester
2fa38c7dc4 update protos 2021-02-08 17:57:45 +08:00
Kevin Hester
58bb7169a0 use nodenum as the default nodeid 2021-02-08 10:15:02 +08:00
Jm
d678c48884 work on rangetestplugin and storeforwardplugin
done for the night.
2021-02-06 23:29:18 -08:00
Kevin Hester
486b03e985 bug 677. Don't assert fail for missing interfaces, instead return
nak packet to clients.
2021-02-07 10:26:11 +08:00
Kevin Hester
ccb232b6ac make route errors a more general 'message delivery failure' reason
in support of https://github.com/meshtastic/Meshtastic-device/issues/677
2021-02-07 09:46:35 +08:00
Kevin Hester
c25efac0c1 portduino wip 2021-02-07 09:17:46 +08:00
Kevin Hester
7f07725840 make improperly sized AES128/256 keys non fatal, instead pad with zeros
Fixes rebooting the board if someone specifies an invalid key
2021-01-29 10:15:48 +08:00
Kevin Hester
c81d090464 someone added storerequest app? 2021-01-29 10:14:46 +08:00
Kevin Hester
63c650c33e
Merge branch 'master' into log-tx-failure 2021-01-27 17:54:06 +08:00
Sacha Weatherstone
31b89e2932 Another header required 2021-01-24 10:48:48 +11:00
Sacha Weatherstone
9db5f9ff67 fix cors for API requsts & fix spiffs url 2021-01-23 17:42:15 +11:00
Jm
2a47819fd6 #649 More webserver refactoring 2021-01-19 21:38:17 -08:00
Jm
e4fdf26dc7 #649 - First pass on the refactoring of the webserver 2021-01-19 21:26:23 -08:00
Andrew Mark
dd511588a2 Oops, let's only try to reboot ESP32 when there's an ESP32 2021-01-19 20:13:19 -08:00
Andrew Mark
79dad8ec8c Set critical error and reboot when radio fails to generate tx IRQ 2021-01-19 18:21:54 -08:00
Jm
c0d27e2ce9 #635 Added web_request_count and fixed printf of psram 2021-01-17 10:30:34 -08:00
Jm
8e8264efb0 #635 - Added memory usage statistics 2021-01-17 00:29:29 -08:00
Jm
f435086a5a Update generated protobufs 2021-01-16 20:50:58 -08:00
Jm
4ec8986934 Fixed switching to uint32 from 16 for airtime in json report 2021-01-14 21:45:41 -08:00
Kevin Hester
3598c91c29 fix @mc-hamster build to work on linux/nrf52 2021-01-15 13:30:40 +08:00
Jm Casler
a827017bd2
Merge pull request #53 from crossan007/master
add power statistics for #635
2021-01-11 17:54:27 -08:00
Charles Crossan
0f573901d5 didn't need power.h 2021-01-11 20:28:09 -05:00
Charles Crossan
fdc9bf5783 add power statistics for #635 2021-01-11 20:25:02 -05:00
Jm
0c06d8db3c maybe this will fix the linux build? 2021-01-09 19:31:16 -08:00
Jm
69391e186b Fix for breaking the linux build 2021-01-09 13:47:10 -08:00
Jm
d458f673be Web server is now treaded and moved to mesh/wifi/* 2021-01-08 22:25:44 -08:00
Jm
cfcb00b943 that's enough for tonight. web server is in its own thread, needs to be further optimized but it works enough. next is to refactor. 2021-01-08 20:43:51 -08:00
Jm
977e47d109 partial work 2021-01-08 20:06:11 -08:00
Jm Casler
cfeb40f36d
Merge pull request #41 from mc-hamster/master
Updated osthread branch from master
2021-01-08 19:57:19 -08:00
Kevin Hester
7aacfd66ef add assertIsSetup() and use it from OSThread constructor
fixes nasty bug @mc-hamster discovered with plugin order of operations
2021-01-08 13:15:49 +08:00
Kevin Hester
3636b87db0 formatting 2021-01-08 11:52:43 +08:00
Jm
f7dcef39ce intermediate work 2021-01-05 23:21:14 -08:00
Jm Casler
35bcb5297a
Merge pull request #38 from mc-hamster/master
update from master to osthread
2021-01-05 19:04:15 -08:00
Kevin Hester
94a47dba7d fix #624 - update battery level and current time on mynodeinfo 2021-01-04 09:59:53 +08:00
Kevin Hester
edd1268f5f portduino: begin adding wifi implementation 2021-01-03 10:11:20 +08:00
Kevin Hester
aa176b6593 portuino now kinda works with the pinetab lora USB module.
still need to add an AEX256 impl for the linux port and optimize a bit
2021-01-02 12:38:18 +08:00
Kevin Hester
5ceee50bb5 bug: we've always been setting gpio 0 as an input on rf95 based devices
found because portduino provides full visibility to all IO operations
to the hw simulator.
2021-01-02 11:23:18 +08:00
Jm
925829dc58 Partial work to migrate to OSThread model 2021-01-01 12:31:46 -08:00
Kevin Hester
cdf416cb73 partial fix for #608 - when a new TCP API connection arrives, close old one completely 2020-12-31 10:02:18 +08:00
Kevin Hester
6e31ba30c7 move generated protobuf c code to own directory 2020-12-30 12:34:22 +08:00
Kevin Hester
8fe1c518d9 Merge branch 'mqtt' into dev
# Conflicts:
#	proto
2020-12-30 12:25:00 +08:00
Kevin Hester
adc71e7ed2 mqtt doc progress 2020-12-28 14:42:24 +08:00
Kevin Hester
4777e53c23 more mqtt design work 2020-12-28 13:36:11 +08:00
Kevin Hester
d6912cfd8e mqtt design progress 2020-12-28 13:22:10 +08:00
Jm Casler
0e507e1923
Merge branch 'master' into master 2020-12-27 12:39:36 -08:00
Jm Casler
58859848a3 Add RX and RX_ALL analytics for #588 2020-12-27 09:29:48 -08:00
Kevin Hester
c972197643 fix #598 don't corrupt the heap when a TCP connection drops 2020-12-27 16:58:32 +08:00
Jm Casler
e55c5e10bc
Merge branch 'master' into master 2020-12-26 22:43:56 -08:00
Kevin Hester
186a52172c fix #577 don't make invalid radio settings reboot the board
instead raise a critical fault (note though: this is still not ideal
because the radio will be in an undefined state until valid settings
are used)
2020-12-27 13:09:20 +08:00
Kevin Hester
0c74303e9d move criticalerror defs into .proto for cross platform support 2020-12-27 11:22:08 +08:00
Kevin Hester
651bd71454 show critical faults on the screen 2020-12-26 13:36:21 +08:00
Jm Casler
ded2b86e55 Calculate TX air time duty cycles #588 -- UNTESTED 2020-12-25 16:10:38 -08:00
Kevin Hester
031c58e21c remove logspam that was busting serial api 2020-12-23 17:12:48 +08:00
Kevin Hester
a8d7700295 move more of is_router out of python and into the device code 2020-12-21 11:38:03 +08:00
Kevin Hester
15e1a3870c When new node joins mesh, all other nodes reply with their current state 2020-12-17 10:53:29 +08:00
Kevin Hester
5bdc7216b3 begin support for multiple simultanous channels 2020-12-17 10:32:19 +08:00
Kevin Hester
be38a58a62 finish channel name cleanup 2020-12-15 16:13:16 +08:00
Kevin Hester
c9f2318e78 Use simpler names for standard channels 2020-12-15 13:14:36 +08:00
Kevin Hester
5cdc2f5142 Make ChannelSettings SUPER short for common channels 2020-12-14 21:09:29 +08:00
Kevin Hester
0cdc1fc959 make gpiowatch work correctly 2020-12-13 16:11:38 +08:00
Kevin Hester
e80c79edbe clean up debug msgs 2020-12-13 15:59:26 +08:00
Kevin Hester
ee8f4de5ab make plugin reply handling simpler 2020-12-13 12:57:37 +08:00
Kevin Hester
b9f1ce70cb begin plugin-api tutorial 2020-12-11 09:11:53 +08:00
Kevin Hester
df8b3ebbc7 always pull min_app_version from appload 2020-12-10 11:32:51 +08:00
Kevin Hester
a0076eb394 better position debug output 2020-12-09 13:42:36 +08:00
Kevin Hester
32b8e4f20a fix #536 allow fixed positions
meshtastic --setlat 32.7767 --setlon -96.7970 --setalt 1337
2020-12-09 12:05:15 +08:00
Kevin Hester
3753fef298 add debug_log_enabled 2020-12-09 11:56:41 +08:00
Kevin Hester
a4bb1937c1 Merge remote-tracking branch 'root/master' into udp 2020-12-09 11:21:59 +08:00
Kevin Hester
79a24c200e use autogened protobuf init code 2020-12-07 10:27:31 +08:00
Kevin Hester
90060e84c0 WIP on GPIO example 2020-12-07 10:18:11 +08:00
Kevin Hester
8f5a1f19d3 add remote gpio control as an example plugin
https://github.com/meshtastic/Meshtastic-device/issues/182
2020-12-06 18:33:42 +08:00
Kevin Hester
3e0dc44210 move want_replies into new plugin system 2020-12-05 11:15:06 +08:00
Kevin Hester
91b99bd584 require apps to be 1.1.20 or later 2020-12-05 10:27:04 +08:00
Kevin Hester
b6e21bcbcd add SinglePortPlugin to simpilify api 2020-12-05 10:14:15 +08:00
Kevin Hester
ae7d3ee5ed move nodeinfo messages into new plugin system 2020-12-05 10:00:46 +08:00
Kevin Hester
f1179bd3ea positions now sent using the new API 2020-12-05 08:46:19 +08:00
Kevin Hester
9b24cc6dd6 update protobufs 2020-12-04 18:54:00 +08:00
Kevin Hester
d3cb9bdd4a WIP moving positions to new system 2020-12-03 16:48:44 +08:00
Kevin Hester
7737123d0f begin moving position stuff into plugin 2020-11-28 18:10:31 +08:00
Kevin Hester
5138aff4b2 fix static initializer bug with mesh plugins 2020-11-28 13:25:03 +08:00
Kevin Hester
0b0d293a66 Move text message handling into the new plugin system 2020-11-28 12:10:19 +08:00
Kevin Hester
ddab4a0235 remove support for 8bit nodenums 2020-11-28 09:56:21 +08:00
Kevin Hester
f5e42b2533 update protos 2020-11-28 09:17:20 +08:00
Kevin Hester
cc36e3a9a6
Merge branch 'dev-https' into spiffs-bug496 2020-11-27 16:15:14 -08:00
Jm Casler
3ab9d2a50e Removing stuff I accidently checked in for the duplexer 2020-11-22 16:24:22 -08:00
Kevin Hester
d7d13d637c clean up filesystem goo, add spiffs to install scripts, fix #496
@mc-hamster seems to work pretty good for me, so I'll send a PR to you
for the dev-http branch.

I'll push out an android alpha build later today (once the build is
complete).  Once this new device load is out in the field _future_
device builds will support updating spiffs from android. (i.e. device
loads older than 1.1.9 must be updated to 1.1.9 or later before spiffs
support is implemented on the device side - so some users might need to
update twice before the new spiffs contents will appear on their device)
2020-11-19 09:25:02 +08:00
Jm Casler
a02979d564
Merge branch 'externalAmp' into master 2020-11-16 19:54:06 -08:00
Kevin Hester
ccc1600bc9 remove stale fixme 2020-11-14 10:19:55 +08:00
Kevin Hester
1839f8f7ca fix #513 scale retransmission times based on true packet time on wire 2020-11-14 10:07:25 +08:00
Kevin Hester
68937d52fe bug #503 wip 2020-11-12 17:49:04 +08:00
Jm Casler
e33657eb75 Toggle GPIO2 to HIGH when transmitting a packet out the LORA radio. 2020-11-09 19:47:31 -08:00
Kevin Hester
bbc36f7b6f switch to my new SD 7.2.0 S113 based bootloader 2020-10-31 12:22:20 +08:00
Kevin Hester
d7368d5a51 begin deep sleep support for nrf52 2020-10-30 17:05:32 +08:00
Kevin Hester
47bbde3c60 fix #505 allow forced standby mode to not assert fail 2020-10-29 16:13:44 +08:00
Kevin Hester
04942a3570 fix #505 - device can reboot due to race condition in sending 2020-10-29 15:27:05 +08:00
Kevin Hester
cfcb62bd18 Make region changes take effect immedately 2020-10-29 13:26:36 +08:00
Kevin Hester
0767c8be03 PPR1 fix screen mirroring on LCD 2020-10-24 08:16:15 +08:00
Kevin Hester
c078c08c3e Merge branch 'dev' into ppr1 2020-10-23 16:53:38 +08:00
Kevin Hester
a5d7bacdbf Show current region on the boot screen 2020-10-21 17:27:13 +08:00
Kevin Hester
e1f0e11cb8 ppr1 WIP DO NOT MERGE - will break other clients 2020-10-17 13:15:12 +08:00
Kevin Hester
c73ee98739 Merge branch 'master' into ppr1 2020-10-17 11:00:28 +08:00
Kevin Hester
d9dcb33576
Merge branch 'master' into dev-https 2020-10-16 17:05:06 -07:00
Kevin Hester
22f23bb07d Merge branch 'dev' into ppr1
# Conflicts:
#	src/gps/NMEAGPS.cpp
2020-10-16 15:59:55 +08:00
Jm Casler
4ccbe6ff71
Merge pull request #480 from meshtastic/master
Updating dev-https from master
2020-10-15 19:40:01 -07:00
Kevin Hester
9134faaed1 turn off segger debug in ttgo eink build 2020-10-15 16:11:40 +08:00
Kevin Hester
5f2f3c94b9 PPR1 and allow boards to set lower or higher sx1262 power limits 2020-10-15 13:47:10 +08:00
Kevin Hester
1ebd7b0c3e make lightsleep default time 5 minutes, with 1 minute in for BLE syncing 2020-10-14 08:53:12 +08:00
Kevin Hester
5457541244 fix #477: sleep behavior was broken in app due to device bug since 1.1.1
+        // NOTE: The phone app needs to know the ls_secs value so it can properly expect sleep behavior.
+        // So even if we internally use 0 to represent 'use default' we still need to send the value we are
+        // using to the app (so that even old phone apps work with new device loads).
2020-10-14 08:45:29 +08:00
Jm Casler
76b4be3b87
Merge pull request #469 from mc-hamster/master
Switched to esp32_https_server from the Espressif (Issue #452) and Enable RX LNA (#466)
2020-10-10 22:28:08 -07:00
Kevin Hester
999b292717 fixes for the posix port 2020-10-11 09:18:47 +08:00
Jm Casler
c16acb904e Merge branch 'master' of https://github.com/mc-hamster/Meshtastic-device 2020-10-10 17:59:46 -07:00
Jm Casler
5b777219be Enable the RX LNA #466
Enabling the RX LNA
2020-10-10 17:59:32 -07:00
Kevin Hester
49b4ed2a89 coroutine: kinda works now 2020-10-10 18:03:45 +08:00
Kevin Hester
4b9ea4f808 Merge branch 'dev' into coroutine 2020-10-10 09:22:23 +08:00
Kevin Hester
95cb6b06e4 fix #462 publish immediately on any GPS state change
(don't wait until end of aquisition window)
2020-10-10 09:20:38 +08:00
Kevin Hester
2044427e97 coroutines: wip compiles but does not link 2020-10-09 14:16:51 +08:00
Kevin Hester
4a70ba1f7a fix nodeinfo stored times (I think) for @lgoix 2020-10-09 10:01:13 +08:00
Kevin Hester
7a4b8cde11 keep rf95 max power at 20 dBm so users don't smoke their boards 2020-10-08 10:51:31 +08:00
Kevin Hester
113859e791 increase sx1272 max power
+#define MAX_POWER 27
 // if we use 20 we are limited to 1% duty cycle or hw might overheat.  For continuous operation set a limit of 17
+// In theory up to 27 dBm is possible, but the modules installed in most radios can cope with a max of 20.  So BIG WARNING
+// if you set power to something higher than 17 or 20 you might fry your board.
2020-10-08 09:57:59 +08:00
Kevin Hester
023f1c24fb RTC: add notion of 'quality' for different time sources
Allow use of mesh based time until a GPS time arrives
2020-10-08 07:46:20 +08:00
Kevin Hester
f00d07baa3 RTC: pull rtc code into own file for cleanup 2020-10-08 07:28:57 +08:00
Kevin Hester
1a3cc40c7e sx1262 better to check for header because preamble might never result in irq 2020-10-08 06:23:05 +08:00
Kevin Hester
c0c83ad389 If we are not supposed to share locations make sure phone doesn't either 2020-10-07 17:46:25 +08:00
Kevin Hester
7a5832ab8a SX1262: fix serious bug with detecting if we have a rx packet in progress
Could cause hangs on the way into sleep (and enormous power consumption).
Instead of checking for rx packet length (which only changes at completion)
check if we've received preamble bits but haven't yet received a completed
packet interrupt.

notes:


wait to sleep loop problem
radio wait to sleep, txEmpty=0
radio wait to sleep, txEmpty=0
radio wait to sleep, txEmpty=0
radio wait to sleep, txEmpty=0
radio wait to sleep, txEmpty=0
radio wait to sleep, txEmpty=0
Can not send yet, busyRx
radio wait to sleep, txEmpty=0
radio wait to sleep, txEmpty=0
radio wait to sleep, txEmpty=0
radio wait to sleep, txEmpty=0
radio wait to sleep, txEmpty=0
radio wait to sleep, txEmpty=0
radio wait to sleep, txEmpty=0
radio wait to sleep, txEmpty=0

vs normal run
radio wait to sleep, txEmpty=0
radio wait to sleep, txEmpty=0
radio wait to sleep, txEmpty=0
radio wait to sleep, txEmpty=0
radio wait to sleep, txEmpty=0
radio wait to sleep, txEmpty=0
radio wait to sleep, txEmpty=0
radio wait to sleep, txEmpty=0
radio wait to sleep, txEmpty=0
radio wait to sleep, txEmpty=0
radio wait to sleep, txEmpty=0
radio wait to sleep, txEmpty=0
radio wait to sleep, txEmpty=0
radio wait to sleep, txEmpty=0
radio wait to sleep, txEmpty=0
Starting low level send (id=0x53fe1dd0 Fr0xe5 To0xff, WantAck0, HopLim3 encrypted)
Completed sending (id=0x53fe1dd0 Fr0xe5 To0xff, WantAck0, HopLim3 encrypted)
2020-10-07 13:43:51 +08:00
Kevin Hester
943d5cb08d bug #376 we were not staying in light sleep as long as intended 2020-10-06 11:48:53 +08:00
Kevin Hester
7480eb1826 Change to use zeros for timeout values that are 'default' 2020-10-06 09:43:00 +08:00
Kevin Hester
b072eec4ac wip for #376 2020-10-05 14:43:44 +08:00
geeksville
d66cede7fc Merge branch 'eink' into power 2020-10-01 07:51:01 -07:00
geeksville
3a638090a2 update protos for #376 2020-09-30 07:47:16 -07:00
Jm Casler
423cbc2c6d Added frequency information to debug output (#447) and cleanup of screen.cpp and meshwifi.cpp 2020-09-29 00:59:26 -07:00
geeksville
3e5f81bf2a move region into userpreferences, to end region specific firmwares 2020-09-25 12:52:08 -07:00
geeksville
1a064a4666 Merge remote-tracking branch 'root/master' 2020-09-25 09:19:58 -07:00
Jm Casler
b39f6c96bd Merge remote-tracking branch 'origin/dev-wifi' 2020-09-22 22:00:07 -07:00
comgram
55cb0c52ee Add Korean Frequency 2020-09-21 16:10:20 +09:00
geeksville
3c0429deee Add new factory_reset preferences option clients can set 2020-09-19 11:19:42 -07:00
Kevin Hester
5fb0bf2575
Merge branch 'master' into anz 2020-09-18 10:19:43 -07:00
geeksville
d3e28e3e2c Merge branch 'dev' 2020-09-17 11:20:41 -07:00
r51n
91305c2c84
add AU/NZ channel definitions 2020-09-17 12:02:38 +00:00
Jm Casler
c83ff03d66
Merge pull request #4 from meshtastic/master
Updating form head
2020-09-16 22:51:19 -07:00
geeksville
8e988cc926 fix #397 from @a-f-G-U-C - bogus GPS positions during locking could be reported
btw - from my read of the NMEA, the lowest value that means 'has a valid
position' is 1 not 2.  But I only know this because you pointed me at
it ;-)

Thanks!
2020-09-16 09:18:44 -07:00
geeksville
8c240b59f6 fix #393. immediately save node db to disk if user changes name 2020-09-16 09:08:35 -07:00
geeksville
3e64d8439d Merge branch 'master' into dev 2020-09-15 21:13:24 -07:00
geeksville
435c955acd make hash prototype a bit stricter 2020-09-15 21:05:57 -07:00
Jm Casler
c656a95a84
Merge pull request #3 from meshtastic/master
Update from meshtastic main
2020-09-15 20:34:30 -07:00
geeksville
c6d93d1a28 fix #346 limit tx power in japan 2020-09-15 18:54:50 -07:00
geeksville
7d4058f49d let users set 20 dBm if they wish 2020-09-15 18:00:21 -07:00
geeksville
31fc8fafec make default power level radio chipset specific 2020-09-15 17:55:33 -07:00
Jm Casler
e508306395 Refactoring to break out HTTP from WiFi 2020-09-13 16:58:36 -07:00
Jm Casler
f129b458ad Initial Checkin for WiFi and HTTP Server Framework 2020-09-12 21:43:41 -07:00
geeksville
92df77f228 Merge remote-tracking branch 'root/master' into dev 2020-09-11 18:15:13 -07:00
geeksville
ee27c15c2c likely fix for bug #373. fix #339. great gps fixes from @a-f-G-U-C
fixes described in bug #376
2020-09-10 09:25:10 -07:00
geeksville
f3d38d84c9 fix nrf52 build 2020-09-07 13:03:37 -07:00
geeksville
2a067e7f6b make gps optional. Portduino almost works in sim! 2020-09-06 14:45:43 -07:00
geeksville
fefd3d78f3 Portduino WIP now compiles but does not link 2020-09-05 12:34:48 -07:00
geeksville
6a475d8288 WIP 2020-09-04 17:23:17 -07:00
geeksville
6cdaf8c600 fix #349 channel suffix letter didn't match between device and phone 2020-08-30 12:38:15 -07:00
geeksville
8dc4492ba3 add taiwan frequencies 2020-08-30 12:20:43 -07:00
geeksville
dffb6c2f06 If display is on on the @BigCorvus board and we xmit the board browns out? 2020-08-28 17:38:23 -07:00
geeksville
7f214ffbb0 TFT kinda correct now - but slow because of bit banging 2020-08-28 15:33:33 -07:00
geeksville
de196810a2 add debugging for SNR values on SX1262 2020-08-25 12:06:36 -07:00
geeksville
ff885ef215 Merge remote-tracking branch 'root/post1' 2020-08-21 10:50:49 -07:00
geeksville
d7a1cef046 fix #327 always factory reset the GPS once 2020-08-21 10:14:03 -07:00
geeksville
ca75dcd64d Add support for SX1262 based TBEAMs, see below for more details.
We probe dynamically for the SX1262 or RF95 based radios on TBEAM1.0
boards now.  If either is present it will be used.
2020-08-20 15:42:36 -07:00
geeksville
781077e799 Turn on buck converter for @BigCorvus board, now radio works 2020-08-17 11:42:19 -07:00
geeksville
9b25818a50 fix #249: report battery levels even if no GPS lock
@professr I noticed you added a "newStatus" observable to the GPS class.
Do you remember why you didn't remove the old GPS status (which seemed
to be dumber).  Is it just because you didn't want to risk breaking
MeshService?  (I assume) In this change I removed the old Observable
and all seems well (just using newStatus everywhere).
2020-08-12 15:51:57 -07:00
geeksville
55dafcbecb fix #269 see below
/**
 * Generate a short suffix used to disambiguate channels that might have the same "name" entered by the human but different PSKs.
 * The ideas is that the PSK changing should be visible to the user so that they see they probably messed up and that's why they
their nodes
 * aren't talking to each other.
 *
 * This string is of the form "#name-XY".
 *
 * Where X is a letter from A to Z (base26), and formed by xoring all the bytes of the PSK together.
 * Y is not yet used but should eventually indicate 'speed/range' of the link
 *
 * This function will also need to be implemented in GUI apps that talk to the radio.
 *
 * https://github.com/meshtastic/Meshtastic-device/issues/269
 */
const char *getChannelName();
2020-08-12 11:04:03 -07:00
geeksville
178958c165 allow advanced users to specify channel numbers if they wish 2020-08-12 10:46:44 -07:00
geeksville
d7cf7e2eb4 Allow advanced users to set arbitrary spreadfactor/codingrate/bandwidth 2020-08-12 10:42:25 -07:00
geeksville
047141eb34 make TXEN/RXEN immediately low once changed to be outputs 2020-08-03 11:29:26 -07:00
geeksville
12bf3795ea less logspam when debugging the serial API 2020-08-02 12:55:22 -07:00
geeksville
a5b7501a4e nimble add debug output 2020-07-24 10:12:25 -07:00
geeksville
014eea2f56 Nimble sleep almost works 2020-07-22 21:26:32 -07:00
geeksville
9e10ce487c Merge branch 'master' into post1 2020-07-18 13:32:30 -07:00
geeksville
d9f43d3e2f update protobufs related to https://github.com/meshtastic/Meshtastic-device/issues/269 2020-07-18 09:12:51 -07:00
geeksville
98dfecdb79 Add external RF switch management for RF95 (needed for RAK815) 2020-07-13 13:18:32 -07:00
geeksville
e12c057c31 RAK815 lora works 2020-07-10 14:37:01 -07:00
geeksville
dc54e7331f memory is tight on the nrf52832 board (for now) - so don't allocate too much 2020-07-10 13:52:26 -07:00
geeksville
311d1a56b4 make a bare nrf52840dk build which will work for everyone 2020-07-09 20:05:39 -07:00
geeksville
ed589727d6 Update NRF52 build to work again 2020-07-09 19:57:55 -07:00
grcasanova
9803141fe7 merged with master 2020-07-06 21:53:10 +02:00
grcasanova
92b30ebec6 fixes now compiles 2020-07-06 10:45:55 +02:00
Ellie Hussey
6f7f540c79
Added the option for forced NodeStatus updates on user change or text message, tweaked compass (#256) 2020-07-05 17:03:12 -07:00
Professr
f5b7c33d4e Refactored status handlers and merged 2020-06-28 18:17:52 -07:00
Professr
542b8b26ce Abstracted statuses, made display event-driven 2020-06-27 21:19:49 -07:00
geeksville
e7eee0995a fix line endings 2020-06-24 16:14:38 -07:00
geeksville
9f6e23754c Add a no_save development flag to allow using settings that
we don't want to save to flash.  Use that flag to guard BLE
stress testing code that makes device repeatedly sleep wake
to force numerous BLE resets
2020-06-24 13:10:36 -07:00
geeksville
60470211e5 expose battery level via the standard BLE battery service 2020-06-22 10:04:26 -07:00
geeksville
c5851a4a0c Report battery level to other nodes in mesh (and apps).
Also today I'll turn back on the the standard "has a battery" BLE
device profile, so the locally connected radio should show up in the
phone's bluetooth popup of battery levels (similar to how a BLE
headphone battery level appears)

cc @lgoix - using code from @professr

```
meshtastic --info
Connected to radio...
my_node_num: 2883444536
has_gps: true
num_channels: 13
region: "unset"
hw_model: "tbeam"
firmware_version: "unset"
packet_id_bits: 32
current_packet_id: 91018534
node_num_bits: 32
message_timeout_msec: 300000
min_app_version: 172

preferences {
  position_broadcast_secs: 900
  send_owner_interval: 4
  wait_bluetooth_secs: 120
  screen_on_secs: 300
  phone_timeout_secs: 900
  phone_sds_timeout_sec: 7200
  mesh_sds_timeout_secs: 7200
  sds_secs: 31536000
  ls_secs: 3600
}
channel_settings {
  tx_power: 23
  modem_config: Bw125Cr48Sf4096
  psk: "\324\361\273: )\007Y\360\274\377\253\317Ni\277"
  name: "Default"
}

Nodes in mesh:
{'num': 2883444536, 'user': {'id': '!2462abdddf38', 'longName': 'Unknown df38', 'shortName': '?38', 'macaddr': 'JGKr3d84'}, 'position': {'altitude': 96, 'batteryLevel': 100, 'latitudeI': 375210641, 'longitudeI': -1223090398, 'time': 1592843564, 'latitude': 37.5210641, 'longitude': -122.3090398}}
```
2020-06-22 09:36:19 -07:00
geeksville
8190098bb8 experiment with wifi connections for nodes 2020-06-21 14:11:38 -07:00
geeksville
7678540a93 For #187 was not reporting GPS status on new API 2020-06-17 17:25:55 -07:00
geeksville
463666aec5 oops - can't call DEBUG_MSG this early on ESP32 2020-06-17 16:04:37 -07:00
geeksville
03f019dea2 memory size debugging 2020-06-16 19:55:14 -07:00
geeksville
a47524b762 cubecell wip 2020-06-16 17:13:26 -07:00
geeksville
f35b15b09c Shrink devicestate for small mcus 2020-06-16 15:26:30 -07:00
geeksville
99dac51b9d Don't use a (huge - 16KB) scratch buffer for device state loading 2020-06-16 15:02:11 -07:00
geeksville
d9ab6986ad per @dafeman 1.8V works on E22 2020-06-16 12:02:13 -07:00
geeksville
514d45c219 oops supposed to be TXEN 2020-06-16 06:38:08 -07:00
geeksville
60ad1793e4 sx1262 improvements attn @dafeman 2020-06-16 06:26:21 -07:00
geeksville
477c62082d E22 SX1262 module now works!
Thanks mostly to an old github comment by @beegee-tokyo the fix was easy
(comment here https://github.com/jgromes/RadioLib/issues/12#issuecomment-520450429)

We now set DIO3 to 2.4 volts to power the oscillator inside the E22
module (undocumented in the E22 docs)
2020-06-15 14:38:09 -07:00
geeksville
aadba1f694 add printPacket for debug printing packets 2020-06-14 15:30:42 -07:00
geeksville
13307c502f misc debug output 2020-06-13 16:29:53 -07:00
geeksville
8caa075bc6 used fixed pool allocator for now - since that's how we've been testing 2020-06-13 11:05:36 -07:00
geeksville
dc7469c64b useful bluetooth debugging output 2020-06-13 08:29:25 -07:00
geeksville
f54b18f733 each tx packet might have a retransmission/ack copy, make pool bigger 2020-06-13 08:27:44 -07:00
geeksville
db66e4dc00 ensure we never get null from malloc 2020-06-13 08:27:25 -07:00
geeksville
f0b8f10665 Fix #149: Use a simple heap allocator for now, after 1.0 we can go to
fixed sized pools to protect against fragmentation.
2020-06-12 12:11:18 -07:00
geeksville
88b91de197 Prepare to make MemoryDynamic 2020-06-12 11:56:13 -07:00
geeksville
ddfdae64bf Fix #167 while in light sleep, allow loop() to still run occasionally 2020-06-10 14:11:56 -07:00
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
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
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
99437d931e fix #153 2020-06-03 16:08:11 -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
f56ff2ca20 DSR WIP 2020-05-27 15:31:32 -07:00
geeksville
f4b1678535 my DSR changes broke acks for flood routing also. Fix #146 2020-05-25 11:55:42 -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
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
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
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
14fdd33972 move bluetooth OTA back into main tree for now 2020-05-14 14:20:05 -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
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
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
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
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
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
82c1752d85 less logspam 2020-05-01 08:31:52 -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