Skip to content
Merged

Dev #62

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
96 commits
Select commit Hold shift + click to select a range
3bd24e7
chore: add claude.md to gitignore
anarchyysm Apr 14, 2026
934c9ad
feat(rfid): add YS-RFID2 UART stream parser
anarchyysm Apr 14, 2026
b1d18fd
feat(rfid): add YS-RFID2 types and public API header
anarchyysm Apr 14, 2026
54dbef7
feat(rfid): add YS_RFID2 HAL UART abstraction layer
anarchyysm Apr 14, 2026
47d0f37
feat(rfid): add YS-RFID2 core driver with reader task
anarchyysm Apr 14, 2026
eeed33e
feat(rfid): integrate YS-RFID2 driver into build and boot sequence
anarchyysm Apr 14, 2026
b7b6d78
feat(sx1262): add SX1262 LoRa driver
lthiagovs Apr 15, 2026
912194a
style(rfid): apply clang-format to driver sources
anarchyysm Apr 16, 2026
19bc299
feat(rfid): add protocol decoder interface and registry
anarchyysm Apr 16, 2026
9e066e9
feat(rfid): add RFID manager bridging driver to protocol layer
anarchyysm Apr 16, 2026
ce9a618
feat(rfid): add EM4100 protocol decoder
anarchyysm Apr 16, 2026
ec8176f
feat(rfid): add HID Prox H10301 26-bit protocol decoder
anarchyysm Apr 16, 2026
a7beed3
feat(rfid): add HID Corporate 1000 35-bit protocol decoder
anarchyysm Apr 16, 2026
5e31101
feat(rfid): add Indala 26-bit protocol decoder
anarchyysm Apr 16, 2026
a1e1cb5
feat(rfid): add AWID 26-bit protocol decoder
anarchyysm Apr 16, 2026
548472b
feat(rfid): add FDX-B ISO 11784 animal tag protocol decoder
anarchyysm Apr 16, 2026
54e46c5
feat(rfid): register RFID application in build system
anarchyysm Apr 16, 2026
e77db17
fix(tools): use arrays instead of string concatenation in format.sh
anarchyysm Apr 16, 2026
e966314
feat(rfid): add Viking 26-bit protocol decoder
anarchyysm Apr 16, 2026
546fcbf
feat(rfid): add Pyramid/Farpointe 26-bit protocol decoder
anarchyysm Apr 16, 2026
7ce19aa
feat(rfid): add Keri 26-bit protocol decoder
anarchyysm Apr 16, 2026
37a0cf9
feat(rfid): add PAC/Stanley 26-bit protocol decoder
anarchyysm Apr 16, 2026
3e17b02
feat(rfid): add Paradox proprietary protocol decoder
anarchyysm Apr 16, 2026
410a958
feat(rfid): add Jablotron 26-bit protocol decoder
anarchyysm Apr 16, 2026
605e8fb
feat(rfid): add Kantech ioProx XSF protocol decoder
anarchyysm Apr 16, 2026
21a9993
feat(rfid): add Gallagher enterprise protocol decoder
anarchyysm Apr 16, 2026
e9a90b4
feat(rfid): add Nexwatch/Honeywell QuadraKey protocol decoder
anarchyysm Apr 16, 2026
d5ad6c6
feat(rfid): add Noralsy protocol decoder
anarchyysm Apr 16, 2026
65500e0
feat(rfid): add Securakey protocol decoder
anarchyysm Apr 16, 2026
be4adc8
feat(rfid): register all 17 protocols in registry
anarchyysm Apr 16, 2026
d756263
feat(rfid): add RFID card storage with NVS backend
anarchyysm Apr 16, 2026
6f21ed8
chore: json-format
anarchyysm Apr 16, 2026
6bccc37
fix(tools): correct format.sh path in error message
Jestriker Apr 16, 2026
c37785a
fix(about): show ESP32-P4 on P4 firmware build
Jestriker Apr 16, 2026
c60a9ea
Merge pull request #50 from Jestriker/fix/p4-about-chip-label
anarchyysm Apr 17, 2026
9607ad9
Merge pull request #48 from Jestriker/fix/format-sh-path
anarchyysm Apr 17, 2026
f0a472e
feat(lora): scaffold component with NVS persistence
lthiagovs Apr 22, 2026
09651ae
feat(lora): add region tables, modem presets and device roles
lthiagovs Apr 22, 2026
7f653ce
feat(lora): add multi-PSK channels and PacketHistory dedup
lthiagovs Apr 22, 2026
d693518
feat(lora): add core - wire format, AES-CTR, TX queue, CSMA/CA
lthiagovs Apr 22, 2026
6731efa
feat(lora): add module dispatcher and Data protobuf parser
lthiagovs Apr 22, 2026
8df5a8a
feat(lora): add core modules, text, routing, nodeinfo, position
lthiagovs Apr 22, 2026
5ec92bb
feat(lora): add telemetry, traceroute and admin modules
lthiagovs Apr 22, 2026
f48d26a
feat(lora): add PhoneAPI FSM for config handshake
lthiagovs Apr 22, 2026
ecf00b1
feat(lora): add BLE NimBLE and WiFi AP/TCP transports
lthiagovs Apr 22, 2026
7b6e56c
fix(lora/meshtastic): correct protocol encoding and admin variants
lthiagovs Apr 23, 2026
43f6ca5
feat(lora/meshtastic): implement 12-state PhoneAPI handshake with Que…
lthiagovs Apr 23, 2026
491dda6
feat(lora/meshtastic): add ReliableRouter with ACK/NAK and CSMA jitter
lthiagovs Apr 23, 2026
1197ff5
feat(lora/meshtastic): add roles, NodeDB and channel settings
lthiagovs Apr 23, 2026
7c32ea3
feat(lora/meshtastic): add E2E PKI with X25519 + AES-CCM
lthiagovs Apr 28, 2026
7acf26e
feat(lora/meshtastic): reliable peer discovery (boot burst, fast phas…
lthiagovs Apr 28, 2026
9218ae3
feat(lora/meshtastic): NeighborInfo module
lthiagovs Apr 28, 2026
a54c7a4
feat(lora/meshtastic): expand admin module (SecurityConfig, GET_CONFI…
lthiagovs Apr 28, 2026
5652030
feat(lora/meshtastic): Unishox2 compression for text port=7
lthiagovs Apr 28, 2026
151a62b
fix(lora/meshtastic): correct Routing ACK encoding (error_reason fiel…
lthiagovs Apr 28, 2026
22c8a07
fix(lora/meshtastic): emit NodeInfo update to phone + parse want_resp…
lthiagovs Apr 28, 2026
a144327
fix(lora/meshtastic): silence NimBLE GATT notify log spam
lthiagovs Apr 28, 2026
9bece74
feat(lora/meshtastic): MQTT bridge skeleton (disabled, AP-only safe)
lthiagovs Apr 28, 2026
4bbb4e9
chore(lora/meshtastic): update channels, position, telemetry, tracero…
lthiagovs Apr 28, 2026
f0e5574
feat(lora/meshtastic): split radio (P4) and phone transports (C5) ove…
lthiagovs May 5, 2026
b58ff10
chore(lv_port_disp): descrease LVGL_BUF_LINE to /2, better user perfo…
anarchyysm May 5, 2026
b161728
feat(spi_bridge): session lifecycle for long-running ops
anarchyysm May 7, 2026
9a3eee8
fix(sys_monitor): pin task to core 0 (C5 is unicore)
anarchyysm May 7, 2026
86a02be
fix(led_control): no-op blink when strip not initialized
anarchyysm May 7, 2026
95c1638
feat(spi_bridge): session lifecycle, alive flag, and centralized time…
anarchyysm May 7, 2026
8eb239a
feat(c5_flasher): SYNC handshake, 921600 baud, and ACK flow control
anarchyysm May 7, 2026
2a95e36
feat(buttons): log button presses with name and GPIO
anarchyysm May 7, 2026
eff596b
feat(lora/meshcore): add contact db + flood router
lthiagovs May 7, 2026
3bc5bf7
feat(lora/meshcore): add crypto + NVS foundation
lthiagovs May 7, 2026
934f046
feat(lora/meshcore): add BLE companion + public API
lthiagovs May 7, 2026
c221420
feat(lora/meshcore): split radio (P4) and phone transport (C5) over SPI
lthiagovs May 8, 2026
a954704
fix(lora/meshcore): companion protocol interop fixes
lthiagovs May 13, 2026
80e789d
fix(lora/meshcore): align companion protocol with upstream
lthiagovs May 16, 2026
6cfc168
Revert "fix(lora/meshcore): align companion protocol with upstream"
lthiagovs May 16, 2026
e114279
fix(lora/meshcore): companion protocol interop fixes
lthiagovs May 16, 2026
418ca46
feat(lora/rnode): add KISS framing and serial transport
lthiagovs May 19, 2026
827b7b8
feat(lora/rnode): add config persistence and airtime tracker
lthiagovs May 19, 2026
bb8451d
feat(lora/rnode): add command dispatcher and Reticulum command handlers
lthiagovs May 19, 2026
5edfef2
feat(lora/rnode): wire core lifecycle and CSMA listen-before-talk
lthiagovs May 19, 2026
0616317
build(lora/rnode): include sources and headers
lthiagovs May 19, 2026
c2d39a9
refactor(nfc): move key dictionary from hardcoded arrays to .dic file…
lthiagovs May 26, 2026
502872e
feat(build): added sdkconfig.defaults and remove de sdkconfig & sdkco…
anarchyysm May 28, 2026
d441e1f
chore(gitignore): update gitignore with sdkconfig
anarchyysm May 28, 2026
5e05613
chore(build): swapped PT_br to EN comments
anarchyysm May 28, 2026
e010070
feat(license): New license for tentacleOS
anarchyysm May 28, 2026
d6ca41a
chore(license): migrate from Apache 2.0 to GPL v3
anarchyysm May 28, 2026
e31c726
chore(license): migrate from Apache 2.0 to GPL v3
anarchyysm May 28, 2026
851fdb5
chore(format): json format files
anarchyysm May 28, 2026
a8431be
fix(build): added meshcore gatt into C5 Cmake
anarchyysm May 28, 2026
1e12191
chore(sdkconfig): remove firmware_p4/sdkconfig from version control
anarchyysm May 28, 2026
ef5bbcb
fix(ci): specify IDF target per firmware and update container to v5.5.3
anarchyysm May 28, 2026
cd0c888
feat(lora/meshtastic): bootstrap stack and enable companion path
lthiagovs May 28, 2026
5670e2f
fix(sdkconfig): enable LVGL Montserrat fonts 12 and 14 for P4
anarchyysm May 28, 2026
cff0d08
chore(clang): clangd format
anarchyysm May 28, 2026
1f5cbff
fix(build): hardcode IDF_TARGET in CMakeLists to prevent wrong toolch…
anarchyysm May 29, 2026
b0a8c08
fix(sdkconfig): enable FreeRTOS trace facility for P4 sys_monitor
anarchyysm May 29, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
name: Build Firmware
runs-on: ubuntu-latest
container:
image: espressif/idf:v5.5.1
image: espressif/idf:v5.5.3

steps:
- uses: actions/checkout@v4
Expand Down
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# ESP-IDF auto generated by build
sdkconfig
sdkconfig.old

# compiled output
/build/
**/build/
Expand Down Expand Up @@ -1050,3 +1054,6 @@ dependencies.lock

!components/Applications/
!components/Applications/**

# Claude Code
CLAUDE.md
864 changes: 674 additions & 190 deletions LICENSE

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,4 +96,4 @@ Special thanks to the partners supporting this project:


## License
This project is licensed under the **Apache License, Version 2.0**. See the [LICENSE](LICENSE) file for details.
This project is licensed under the **GNU General Public License v3.0**. See the [LICENSE](LICENSE) file for details.
2 changes: 1 addition & 1 deletion README.pt.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,4 +102,4 @@ Agradecemos especialmente aos parceiros que apoiam este projeto:
---

## Licença
Este projeto está licenciado sob a **Apache License, Version 2.0**. Veja o arquivo [LICENSE](LICENSE) para mais detalhes.
Este projeto está licenciado sob a **GNU General Public License v3.0**. Veja o arquivo [LICENSE](LICENSE) para mais detalhes.
1 change: 1 addition & 0 deletions firmware_c5/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
cmake_minimum_required(VERSION 3.16)

set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set(IDF_TARGET "esp32c5")

include($ENV{IDF_PATH}/tools/cmake/project.cmake)

Expand Down
19 changes: 10 additions & 9 deletions firmware_c5/components/Applications/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
# Copyright (c) 2025 HIGH CODE LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# TentacleOS is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# http://www.apache.org/licenses/LICENSE-2.0
# TentacleOS is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# You should have received a copy of the GNU General Public License
# along with TentacleOS. If not, see <https://www.gnu.org/licenses/>.


#APPLICATION
Expand Down
19 changes: 10 additions & 9 deletions firmware_c5/components/Applications/bluetooth/android_spam.c
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
// Copyright (c) 2025 HIGH CODE LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// TentacleOS is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// http://www.apache.org/licenses/LICENSE-2.0
// TentacleOS is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// You should have received a copy of the GNU General Public License
// along with TentacleOS. If not, see <https://www.gnu.org/licenses/>.

#include "android_spam.h"

Expand Down
19 changes: 10 additions & 9 deletions firmware_c5/components/Applications/bluetooth/apple_juice_spam.c
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
// Copyright (c) 2025 HIGH CODE LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// TentacleOS is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// http://www.apache.org/licenses/LICENSE-2.0
// TentacleOS is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// You should have received a copy of the GNU General Public License
// along with TentacleOS. If not, see <https://www.gnu.org/licenses/>.

#include "apple_juice_spam.h"

Expand Down
19 changes: 10 additions & 9 deletions firmware_c5/components/Applications/bluetooth/ble_connect_flood.c
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
// Copyright (c) 2025 HIGH CODE LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// TentacleOS is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// http://www.apache.org/licenses/LICENSE-2.0
// TentacleOS is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// You should have received a copy of the GNU General Public License
// along with TentacleOS. If not, see <https://www.gnu.org/licenses/>.

#include "ble_connect_flood.h"

Expand Down
19 changes: 10 additions & 9 deletions firmware_c5/components/Applications/bluetooth/ble_hid_keyboard.c
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
// Copyright (c) 2025 HIGH CODE LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// TentacleOS is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// http://www.apache.org/licenses/LICENSE-2.0
// TentacleOS is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// You should have received a copy of the GNU General Public License
// along with TentacleOS. If not, see <https://www.gnu.org/licenses/>.

#include "ble_hid_keyboard.h"

Expand Down
19 changes: 10 additions & 9 deletions firmware_c5/components/Applications/bluetooth/ble_l2cap_flood.c
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
// Copyright (c) 2025 HIGH CODE LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// TentacleOS is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// http://www.apache.org/licenses/LICENSE-2.0
// TentacleOS is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// You should have received a copy of the GNU General Public License
// along with TentacleOS. If not, see <https://www.gnu.org/licenses/>.

#include "ble_l2cap_flood.h"

Expand Down
19 changes: 10 additions & 9 deletions firmware_c5/components/Applications/bluetooth/ble_scanner.c
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
// Copyright (c) 2025 HIGH CODE LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// TentacleOS is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// http://www.apache.org/licenses/LICENSE-2.0
// TentacleOS is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// You should have received a copy of the GNU General Public License
// along with TentacleOS. If not, see <https://www.gnu.org/licenses/>.

#include "ble_scanner.h"

Expand Down
19 changes: 10 additions & 9 deletions firmware_c5/components/Applications/bluetooth/ble_screen_server.c
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
// Copyright (c) 2025 HIGH CODE LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// TentacleOS is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// http://www.apache.org/licenses/LICENSE-2.0
// TentacleOS is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// You should have received a copy of the GNU General Public License
// along with TentacleOS. If not, see <https://www.gnu.org/licenses/>.

#include "ble_screen_server.h"

Expand Down
38 changes: 28 additions & 10 deletions firmware_c5/components/Applications/bluetooth/ble_sniffer.c
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
// Copyright (c) 2025 HIGH CODE LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// TentacleOS is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// http://www.apache.org/licenses/LICENSE-2.0
// TentacleOS is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// You should have received a copy of the GNU General Public License
// along with TentacleOS. If not, see <https://www.gnu.org/licenses/>.

#include "ble_sniffer.h"

Expand All @@ -24,6 +25,7 @@
#include "freertos/task.h"

#include "bluetooth_service.h"
#include "session_manager.h"
#include "spi_bridge.h"

static const char *TAG = "BLE_SNIFFER";
Expand All @@ -45,6 +47,7 @@ static TaskHandle_t s_sniffer_task_handle = NULL;
static StackType_t *s_sniffer_task_stack = NULL;
static StaticTask_t *s_sniffer_task_tcb = NULL;
static uint8_t *s_sniffer_queue_storage = NULL;
static uint32_t s_session_id = SPI_SESSION_INVALID_ID;
static StaticQueue_t *s_sniffer_queue_struct = NULL;

static void sniffer_task(void *pvParameters);
Expand Down Expand Up @@ -119,7 +122,18 @@ esp_err_t ble_sniffer_start(void) {
return bluetooth_service_start_sniffer(packet_handler);
}

void ble_sniffer_bind_session(uint32_t session_id) {
s_session_id = session_id;
}

void ble_sniffer_session_killed(spi_id_t op_id) {
(void)op_id;
s_session_id = SPI_SESSION_INVALID_ID;
ble_sniffer_stop();
}

void ble_sniffer_stop(void) {
s_session_id = SPI_SESSION_INVALID_ID;
bluetooth_service_stop_sniffer();

if (s_sniffer_task_handle != NULL) {
Expand Down Expand Up @@ -173,7 +187,11 @@ static void sniffer_task(void *pvParameters) {
stream.rssi = (int8_t)packet.rssi;
stream.len = packet.len;
memcpy(stream.data, packet.data, packet.len);
spi_bridge_stream_push(SPI_ID_BT_APP_SNIFFER, (const uint8_t *)&stream, sizeof(stream));
if (s_session_id != SPI_SESSION_INVALID_ID) {
session_manager_try_emit(s_session_id, (const uint8_t *)&stream, sizeof(stream));
} else {
spi_bridge_stream_push(SPI_ID_BT_APP_SNIFFER, (const uint8_t *)&stream, sizeof(stream));
}
}
}
}
Expand Down
19 changes: 10 additions & 9 deletions firmware_c5/components/Applications/bluetooth/ble_tracker.c
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
// Copyright (c) 2025 HIGH CODE LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// TentacleOS is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// http://www.apache.org/licenses/LICENSE-2.0
// TentacleOS is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// You should have received a copy of the GNU General Public License
// along with TentacleOS. If not, see <https://www.gnu.org/licenses/>.

#include "ble_tracker.h"

Expand Down
19 changes: 10 additions & 9 deletions firmware_c5/components/Applications/bluetooth/canned_spam.c
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
// Copyright (c) 2025 HIGH CODE LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// TentacleOS is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// http://www.apache.org/licenses/LICENSE-2.0
// TentacleOS is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// You should have received a copy of the GNU General Public License
// along with TentacleOS. If not, see <https://www.gnu.org/licenses/>.

// BLE Spam Indices:
// 0: AppleJuice (Airpods, Beats, etc)
Expand Down
Loading
Loading