Commit Graph

131 Commits

Author SHA1 Message Date
Daniel Pupius
b52834dd8a Add BaseSubscriber to reduce duplication between subscribers 2025-04-21 09:17:05 -07:00
Daniel Pupius
ef660b2025 Consolidate display and logging functionality in MessageLogger 2025-04-21 08:52:15 -07:00
Daniel Pupius
c129be3be6 Update MessageLogger to log all packet types 2025-04-20 20:13:04 -07:00
Daniel Pupius
a4be4caa55 "Add message broker for distributing packets to multiple consumers 2025-04-20 20:08:19 -07:00
Daniel Pupius
8c52664cc5 Refactor message handling to use switch statement
- Replace if-else chain with cleaner switch statement
- Add support for "c" format messages
- Improve code structure and readability

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-04-20 19:09:37 -07:00
Daniel Pupius
4eb98b7455 Simplify MQTT package API by embedding TopicInfo
- Created Packet to combine DecodedPacket and TopicInfo
- Updated MQTT client to return Packet instead of wrapper type
- Modified main.go to use the simplified structure
- Updated tests to use the new Packet type

This change simplifies the API and reduces the cognitive load
for consumers of the MQTT package.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-04-20 19:08:01 -07:00
Daniel Pupius
879877fa53 Refactor MQTT handling into separate package
- Created new mqtt package with simple client interface
- Implemented buffered channel for decoded messages
- Updated main.go to use the new MQTT client
- Added tests for the MQTT client
- Simplified message handling to focus on 'e' and 'map' formats
- Added TODO for handling JSON format messages

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-04-20 18:11:15 -07:00
Daniel Pupius
5bc956af55 Switch and handling of "c" messages 2025-04-20 17:58:45 -07:00
Daniel Pupius
bc9aff9d02 Enhance message decoder with additional port support
- Add support for decoding MAP_REPORT_APP, TRACEROUTE_APP, and NEIGHBORINFO_APP messages
- Create formatters for RouteDiscovery and NeighborInfo messages
- Remove JSON output from all formatters for cleaner display
- Update tests to check for proper formatting

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-04-20 17:40:17 -07:00
Daniel Pupius
f10111e37d Better handling of map reports 2025-04-20 17:18:26 -07:00
Daniel Pupius
c28957e34d Tests for decode 2025-04-20 17:09:55 -07:00
Daniel Pupius
2f8ee3c9e1 Use DecodeMessage for map format packets
- Simplify design by using DecodeMessage for map format too
- Remove redundant DecodeMapReport function
- Update FormatTopicAndMapData to format decoded packets
- Improve handling of map format packets

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-04-20 16:53:51 -07:00
Daniel Pupius
2a7bc97a80 Add MapReport decoding and formatting support
- Added DecodeMapReport function to decode protobuf MapReport messages
- Added FormatMapReport function to display MapReport data in human-readable format
- Updated FormatTopicAndMapData to use the proper decoder and formatter
- Improved error handling with fallback to raw display

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-04-20 16:07:46 -07:00
Daniel Pupius
42304465a3 Add support for map format messages
- Added handling for topics with "map" format (2/map)
- Display map data as readable text rather than hex
- Added new FormatTopicAndMapData function to formatter.go
- Added map format condition in main.go message handler

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-04-20 16:00:35 -07:00
Daniel Pupius
0c92ace2fa Separate decoding and formatting into dedicated files
- Created new formatter.go file with all formatting functions
- Replaced deprecated FormatData with improved FormatDataMessage
- Updated main.go to separate decoding and formatting steps
- Created specialized formatting functions for different message types
- Better separation of concerns for improved maintainability

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-04-20 15:32:44 -07:00
Daniel Pupius
ef3cd1a931 Separating decoder and formatter 2025-04-20 15:04:07 -07:00
Daniel Pupius
607ae2b7ed Separate decoding from formatting for Meshtastic packets
- Added DecodedPacket struct to simplify message hierarchy
- Implemented separate decoding and formatting functions for each message type
- Decoder extracts all relevant fields into a simplified structure
- Formatters now operate directly on the decoded message types
- Improved error handling during decoding and parsing
- Added type-safety via interfaces for proper packet handling

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-04-18 20:48:12 -07:00
Daniel Pupius
866f3dc0f2 Add specialized decoders for Meshtastic message types
- Implemented decoders for telemetry, position, node info and waypoint data
- Refactored ServiceEnvelope decoder to use specialized formatters
- Added proper indentation for nested output formatting
- Improved error messages for failed decryption attempts

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-04-18 20:33:47 -07:00
Daniel Pupius
cd648508c1 Beginning of message decryption 2025-04-18 18:40:30 -07:00
Daniel Pupius
b9767a3a7f Move key management functions to separate file 2025-04-18 18:05:24 -07:00
Daniel Pupius
044e229ab8 Implement channel-based encryption/decryption using XOR and AES 2025-04-18 17:58:24 -07:00
Daniel Pupius
5ea6dd3ab8 Enhance ServiceEnvelope formatter to display encryption info and detailed MeshPacket metadata 2025-04-18 17:49:23 -07:00
Daniel Pupius
93c0e9e94f Refactor decoder to use protocol buffers directly for ServiceEnvelope decoding 2025-04-18 17:48:21 -07:00
Daniel Pupius
cd7d469af1 Update decoder to handle ServiceEnvelope for encoded packets and improve format handling 2025-04-18 16:45:48 -07:00
Daniel Pupius
76f00b9a11 Update decoder to handle multi-part region paths in MQTT topics 2025-04-18 16:31:57 -07:00
Daniel Pupius
5537556d22 Update decoder to match correct Meshtastic MQTT topic structure 2025-04-18 16:28:09 -07:00
Daniel Pupius
c6013d1038 Improve packet decoding with more robust type detection and debug information 2025-04-18 16:21:37 -07:00
Daniel Pupius
5b8d0c6326 Update build process and add proper .gitignore and .env.example 2025-04-18 16:18:16 -07:00
Daniel Pupius
24dc17f45a Update README with decoder documentation 2025-04-18 16:14:16 -07:00
Daniel Pupius
af958ff295 Add protocol buffer generation and packet decoder 2025-04-18 16:13:41 -07:00
Daniel Pupius
d09bfb320f Initial commit: MQTT client for monitoring Meshtastic packets 2025-04-18 16:03:47 -07:00