Skip to content

Add tdeck example - #4

Closed
NyanHelsing wants to merge 5 commits into
meshcore-dev:mainfrom
NyanHelsing:add-tdeck-upport
Closed

Add tdeck example#4
NyanHelsing wants to merge 5 commits into
meshcore-dev:mainfrom
NyanHelsing:add-tdeck-upport

Conversation

@NyanHelsing

@NyanHelsing NyanHelsing commented Jan 26, 2025

Copy link
Copy Markdown

GOAL:

A simple instant message functionality: (cc @ripplebiz )
Create a single-room secure chat (room ID + user ID can be configured at build time)

  • Any t-deck device flashed with this firmware will be able to communicate in that room.
  • The UI is text-only, and shows a history of messages insofar as they fit on the screen.
    • after a message rolls off the screen it is not recoverable; there is no screen scrolling horixontal or vertical.
  • The bottom most line of text displays the message the user is currently typing; its length is limited to the screen width.
  • a new message displays on the line second from the bottom, and older messages are pushed up.

TODO:

  • Need to move tft lib to the examples dir
  • would like to run the t-deck example with platformio + project dir arg
    • giv the example dir its own platformio.ini + copies of board config
  • need to finish adjusting the config to work for t-deck board (helpers files aren't working yet)
  • need to actually get mesh instantiated for t-deck
  • need to write a data model to hold the messages that are presently displayed on the screen
  • need to write a view to actually render those strings to the display + wrap messages as needed.

DONE:

  • adds board config + deps for t-decks (non plus)
  • adds build scripts to build && flash to a t-deck
  • need to bring in the lilygo copy of the tft library since they made modifications to the init script

Comment thread platformio.ini
${Xiao_esp32_C3.build_flags}
-D RADIO_CLASS=CustomSX1262
-D WRAPPER_CLASS=CustomSX1262Wrapper
-D LORA_TX_POWER=22

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we get linter config? this'll be noisy if editors can't be consistent.

@NyanHelsing

Copy link
Copy Markdown
Author

WIP:

Right now wehen i try to build with platformio run -e T-Deck, i get:

PACKAGES: 
 - framework-arduinoespressif32 @ 3.20009.0 (2.0.9) 
 - tool-esptoolpy @ 1.40501.0 (4.5.1) 
 - toolchain-riscv32-esp @ 8.4.0+2021r2-patch5 
 - toolchain-xtensa-esp32s3 @ 8.4.0+2021r2-patch5
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 37 compatible libraries
Scanning dependencies...
Dependency Graph
|-- base64 @ 1.4.0
|-- RadioLib @ 7.1.2
|-- Crypto @ 0.4.0
|-- ed25519
|-- FS @ 2.0.0
Building in release mode
Linking .pio/build/T-Deck/firmware.elf
/home/nyan/.platformio/packages/toolchain-xtensa-esp32s3@8.4.0+2021r2-patch5/bin/../lib/gcc/xtensa-esp32s3-elf/8.4.0/../../../../xtensa-esp32s3-elf/bin/ld: .pio/build/T-Deck/libFrameworkArduino.a(main.cpp.o):(.literal._Z8loopTaskPv+0x8): undefined reference to `setup()'
/home/nyan/.platformio/packages/toolchain-xtensa-esp32s3@8.4.0+2021r2-patch5/bin/../lib/gcc/xtensa-esp32s3-elf/8.4.0/../../../../xtensa-esp32s3-elf/bin/ld: .pio/build/T-Deck/libFrameworkArduino.a(main.cpp.o):(.literal._Z8loopTaskPv+0xc): undefined reference to `loop()'
/home/nyan/.platformio/packages/toolchain-xtensa-esp32s3@8.4.0+2021r2-patch5/bin/../lib/gcc/xtensa-esp32s3-elf/8.4.0/../../../../xtensa-esp32s3-elf/bin/ld: .pio/build/T-Deck/libFrameworkArduino.a(main.cpp.o): in function `loopTask(void*)':
/home/nyan/.platformio/packages/framework-arduinoespressif32@3.20009.0/cores/esp32/main.cpp:42: undefined reference to `setup()'
/home/nyan/.platformio/packages/toolchain-xtensa-esp32s3@8.4.0+2021r2-patch5/bin/../lib/gcc/xtensa-esp32s3-elf/8.4.0/../../../../xtensa-esp32s3-elf/bin/ld: /home/nyan/.platformio/packages/framework-arduinoespressif32@3.20009.0/cores/esp32/main.cpp:48: undefined reference to `loop()'
collect2: error: ld returned 1 exit status
*** [.pio/build/T-Deck/firmware.elf] Error 1
=============== [FAILED] Took 2.80 seconds ===============

Environment    Status    Duration
-------------  --------  ------------
T-Deck         FAILED    00:00:02.799
========== 1 failed, 0 succeeded in 00:00:02.799 ==========

@NyanHelsing NyanHelsing changed the title Add tdeck support Add tdeck example Jan 26, 2025
@NyanHelsing

Copy link
Copy Markdown
Author

Ok grabbed the example from the tdeck repo; just need to figure out how to merge the bins now? any pointers would eb great; i see the merge-bins file and am comparing it with the one in the meshatastic firmware repos as well

@NyanHelsing

Copy link
Copy Markdown
Author

i added the espi_tft library; todo will move that into example/tdec-example/lib (need to figure out how to adjust the platformio.ini to make that work first

@ripplebiz ripplebiz closed this Mar 11, 2025
ripplebiz pushed a commit that referenced this pull request Aug 29, 2025
agessaman referenced this pull request in agessaman/MeshCore Nov 8, 2025
ripplebiz pushed a commit that referenced this pull request Jan 19, 2026
@weebl2000 weebl2000 mentioned this pull request Mar 2, 2026
yellowcooln pushed a commit to yellowcooln/MeshCore-washtastic-e22p that referenced this pull request Apr 8, 2026
…lavors

Fix nRF52 start ota to enter bootloader BLE DFU
vaizki pushed a commit to vaizki/MeshCore that referenced this pull request Apr 23, 2026
Refactor PsychicMqttClient to improve memory management and callback …
c03rad0r added a commit to c03rad0r/MeshCore that referenced this pull request Jun 24, 2026
liamcottle pushed a commit that referenced this pull request Jul 13, 2026
zfouts added a commit to zfouts/MeshCore that referenced this pull request Jul 13, 2026
…observer

Bot surface rework:
- Bot is channel-only: DMs ignored entirely (DM handler + ACK-resend
  machinery removed); writes (!relay/!ble/!wd/!advert/!time sync) authorized
  ONLY on the control channel (direct-0-hop DM auth path removed)
- Multi-channel: bot_channel_mask (uint64 @373), 'set bot_channel +#x/-#x';
  legacy single index auto-migrates and stays the primary (lowbatt beacon)
- Path-only channels: bot_path_mask (@381), 'set bot_path_channel #bot' --
  only !path answers there, and 0-hop requests stay silent (nothing to map)
- FIX: '@name ...' targeted admin was unreachable (dropped by the '!'-only
  prefix check) -- never worked over the air until now
- !path hop tag reads [4h] not [meshcore-dev#4]; !help control-channel-only, lists all
- New read-only cmds: !batt (min/max + 1h trend), !boot (reset cause +
  persisted boot_count @239), !heard <name|hex>, !rf, !time (drift), !wifi
- New control writes: !advert (flood now), !time sync, @name reboot
  (deferred 5s, targeted-only), @name set gps|advert_interval|obs_*

mesh-observer !path map links (WITH_RUNTIME_WIFI builds):
- 'set obs_url' / 'set obs_token' (NodePrefs @243/@308, token never echoed;
  ':' in the URL echoed as ';' to survive the custom-vars framing)
- !path POSTs the hop chain (+ own and wardrive-beacon positions) to
  /api/device/path and appends the returned short map URL; fails soft to
  the plain hex reply; blocks the radio up to ~5s; TLS unverified (token is
  the auth) -- both disclosed in README
- @name set obs_token [label:]token provisions the token over the mesh
  (label stripped node-side); FIX: obs_token 33->65 bytes, a 48-char
  openssl-hex-24 secret was silently truncated (403 on every post);
  oversize values now rejected, never clipped
dl9sau pushed a commit to dl9sau/MeshCore-fork-DL9SAU that referenced this pull request Jul 21, 2026
Bisher war das Advert-Verhalten nirgends auf einen Blick sichtbar (verstreut in
status/get + opt-in [adv]-Traces). Neuer Subbefehl 'advert status' zeigt:
Positions-Policy (none/gps-live/fixed), effektives Intervall + Grund (statisch/
bewegt/kein-Fix/keine-Position), next-Advert-ETA (HH:MM + in Ns), Scope (aktuell
zero-hop unscoped), nightly-Flood-Zeit, gps/fix_ever/moving. In 'advert ?'
gelistet. Surface fuer meshcore-dev#3 (advert type) + meshcore-dev#4 (min-interval).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
dl9sau pushed a commit to dl9sau/MeshCore-fork-DL9SAU that referenced this pull request Jul 21, 2026
…(Floor)

'advert periodic interval <N[h]|off>' setzt einen Floor (Minuten) fuer den
periodischen Advert -> effektives Intervall = max(Matrix, Floor). Fuer laengere
Intervalle als die 15/60/180-Presets. Neues NodePrefs uint16 advert_periodic_min_min
(append, Default 0=aus, vor loadPrefs vorbelegt), Backup + Restore (clamp 0..1440).
computeNextAdvertIntervalMs auf einen Return + Floor umgestellt. advert status zeigt
'[Floor Nmin]'; printAdvertHelp doku. Suffix 'h' = Stunden.

Damit ist die komplette Advert-Notizliste (#0-meshcore-dev#4) durch.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
dl9sau pushed a commit to dl9sau/MeshCore-fork-DL9SAU that referenced this pull request Jul 21, 2026
…Naechte, GPS-Guard SHARE

Drei zusammenhaengende Aenderungen nach Real-World-Tests:

1) 'advert periodic interval' redesigned (war verwirrender Minuten-Floor):
   jetzt das STATIONAERE Intervall in GANZEN STUNDEN (1..24, Default 1h).
   - Bewegung bleibt FIX 15min (nicht mehr durch den Floor verlangsambar).
   - "ohne Position" (NONE / kein Fix) = max(3h, N) -- richtet sich am
     laengeren Wert aus, damit die info-aermere Bake nie dichter beakt.
   Pref umbenannt advert_periodic_min_min -> advert_periodic_interval_h.
   Das '1min-zu-frei'-Problem entfaellt (kann nur >= Default sein, moving fix).

2) 'advert nightly interval <1..30>' NEU: Nightly-Flood alle N Naechte
   (Default 1 = jede Nacht). scheduleNextNightFlood schiebt (N-1) Tage weiter.
   Neuer Pref advert_nightly_interval_d.

3) GPS-Cache-Spiegelung (Commit 4dbb2f1) Guard praezisiert: node_lat wird
   aus Live-GPS nur aktualisiert/persistiert wenn advert_loc_policy==SHARE
   (Position soll in die Bake). Bei NONE bleibt 0,0 unangetastet (Repeater
   ohne Positions-Teilung -> keine Standort-Erfassung); bei PREFS ist die
   fixe Position autoritativ. Loest zugleich Wunsch meshcore-dev#4 (0,0 nur auto-setzen
   wenn Position-in-Advert konfiguriert) ohne Sonder-Boot-Pfad.

Persistenz (DataStore/Backup/Restore), advert status, get-dump und
printAdvertHelp entsprechend. Beide neuen Prefs append-only ans Datei-Ende.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants