Skip to content

Add vl_link_status package - #112

Open
chargedup3d wants to merge 1 commit into
vedderb:mainfrom
chargedup3d:vl-link-status
Open

Add vl_link_status package#112
chargedup3d wants to merge 1 commit into
vedderb:mainfrom
chargedup3d:vl-link-status

Conversation

@chargedup3d

@chargedup3d chargedup3d commented Aug 11, 2026

Copy link
Copy Markdown

Bring-up and status package for the VL Link board (ESP32-C3 + SIMCom SIM7070G).

What it does

  • Enables the CAN transceiver. hw_init() for this board is empty, so GPIO 6 sits in standby at boot and a CAN scan finds only the local device with no bus errors to explain it.
  • Reports LTE state — carrier, SIM, network attach, signal — and mirrors CAN and LTE status on the two onboard LEDs.
  • Logs to SD using the firmware's own log subsystem, so files open directly in VESC Tool's log analysis page. The Logs tab can pull a file off the card, which is the only way to get one on mobile.
  • Optional SMS control, trip metering, and a movement alert. Sender numbers are only caller ID and therefore forgeable, so the command set can only ever remove capability from the vehicle, never grant it — there is no command that applies throttle, releases a brake or raises a limit.
  • Optional remote lock. The Link sends (lock) / (unlock) over can-cmd and the ESC package latches app-disable-output -1; every request is confirmed by a (lock-ack) callback and resent until it lands, and an ack older than 15 s is treated as unknown. This requires a package on the ESC providing (lock), (unlock) and (lock-report id).
  • Optional MQTT telemetry over LTE. Off by default; host, port, credentials, client id and topic all configurable and stored in EEPROM. Plain TCP — the SIM7070G's TLS stack is not reachable through the SM* command set.

Hardware-gated in pkgdesc.qml to hwType == "custom module" and hwName == "vl link" — it drives GPIO 6/7/8 and the SIM7070G UART, none of which exist elsewhere.

Uses const memory and the image system. Lisp data is 84604 / 131072 bytes.

Usage is in the package README, including the settings table and a section on diagnosing MQTT.

Lightly tested: SMS and MQTT share the modem thread, and a connect attempt can block it up to 30 s. I haven't run both enabled for long.

@chargedup3d
chargedup3d force-pushed the vl-link-status branch 4 times, most recently from 273aad5 to ce6aaa0 Compare August 11, 2026 14:36
@chargedup3d

Copy link
Copy Markdown
Author

Pushed the stack changes from your review — all threads are down to 200 and everything still runs. They'd been inflated while chasing a modem issue and I never walked them back.

Also rewrote the telemetry JSON builder to append one field at a time instead of nesting str-merge, which was the only thing plausibly wanting more than 200 on the modem thread.

@chargedup3d
chargedup3d force-pushed the vl-link-status branch 4 times, most recently from 0a13eb5 to b55df07 Compare August 11, 2026 14:43
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.

1 participant