Skip to content

BLE adapter silently hangs after hours of operation on Raspberry Pi Zero W (not a proxy bug) #155

@JohnnyFFM

Description

@JohnnyFFM

Background

This is not a bug in TeslaBleHttpProxy — the proxy itself works great. I'm opening this to share findings and see if other users (especially Pi Zero W users) have encountered this or found a workaround.

Hardware

  • Device: Raspberry Pi Zero W Rev 1.1
  • Bluetooth: Built-in Broadcom BCM43438, HCI 4.1, Bus: UART
  • Kernel: 6.12.62+rpt-rpi-v6 (Raspbian Bookworm, latest as of 2026-03)
  • BlueZ: 5.66
  • Setup: Systemd service (not Docker), charging_manager role
  • Integration: EVCC polling vehicle_data?endpoints=charge_state every ~2.5 minutes

Distance to car: 1 meter.

Problem

After approximately 5 hours of operation, the BLE adapter silently locks up. The proxy continues to receive HTTP requests, but BLE operations never execute. No errors or warnings are logged — requests just
silently hang.

Log pattern when working:

Received HTTP request (VehicleData)
VehicleData endpoint cache expired
Connecting to Vehicle ...
Scanning for vehicle ...
Beacon found
Creating vehicle object ...
Starting VCSEC session ...
Starting Infotainment session ...
Connection to vehicle established
Executing command (vehicle_data)
Successfully executed

Log pattern when hung:

Received HTTP request (VehicleData)
VehicleData endpoint cache expired
(nothing else — no scanning, no connecting, no errors)

The proxy accepts HTTP connections but times out without responding. Attempting sudo hciconfig hci0 reset returns:
Can't down device hci0: Device or resource busy (16)

The only fix is restarting the service first (sudo systemctl restart tesla), then resetting the adapter (sudo hciconfig hci0 reset).

What I've tried

Current workaround

Restarting the systemd service + resetting the HCI adapter recovers the connection immediately.

Questions for other users

  • Has anyone run this reliably on a Pi Zero W for extended periods (days/weeks)?
  • Are there any BlueZ or kernel parameters that improve long-running BLE stability?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions