VanLiveConnect
Live data from your PSA vehicle (Peugeot, Citroën) on your smartphone or tablet, directly from the VAN bus
Install / Use
/learn @0xCAFEDECAF/VanLiveConnectREADME
📝 Table of Contents
- Screenshots
- Description
- Technical Details
- Schematics
- Building the Project
- Hints and tips
- Used Libraries
- Work to be Done
- Frequently Asked Questions
- References
- License
📟 Screenshots<a name = "screenshots"></a>
Don't bore us, give us the screenshots!
👉 See some exciting live videos and pics at https://drive.google.com/drive/folders/1PScPrWulKUc7Rnl3Ug-_TO_tbdkDwQCP !
Main entry screen:

Tuner:

Tuner presets popup:

Audio settings:

CD player:

CD changer:

Second trip counter:

"Pre-flight" checks:

Instrument cluster (YMMV 🤣):

Current location:

Sat nav main menu:

Sat nav enter destination - city:

Sat nav - personal address entry (not mine!):

Sat nav guidance:

Door open popup:

Warning popup:

🎈 Description <a name = "description"></a>
This application creates a Wi-Fi access point to which you can connect with your smartphone. It contains a captive portal so as soon as you are connected a message gets displayed on your phone to log in. If you tap the message, a browser opens, giving a live visual display of the data as read from the VAN bus.
- The SSID of the Wi-Fi access point is: "PSA display AP" (with the spaces, without the quotes).
- The password is "12345678" (without the quotes).
Of course you can modify the SSID and choose your own password (or have no password at all) by editing
the Config.h file.
🕹️ MFD functions supported
See also the screenshots above.
- Clock with exterior temperature
- Instruments (speed, RPM, fuel level, engine temperature, lights and indicators)
- "Pre-flight" checks (oil and fuel level, engine temperature)
- Odometer and trip counters
- Live fuel data (consumption, remaining distance)
- Radio (tuner)
- Cassette tape player (well... even CD is vintage these days 😉)
- Head unit internal CD player
- CD changer unit
- Notifications and warnings
- Satellite Navigation (maps are out of date but it's a nice gimmick 😇)
- Multiple languages: English, French, German, Spanish, Italian and Dutch
- Setting color theme and brightness
- Setting format and units
👉 Note: availability will depend on your vehicle's configuration.
Will not support:
- Setting date and time: your smartphone already knows...
⚙️ Technical Details<a name = "details"></a>
In the beginning of 2000's the PSA group (Peugeot and Citroën) used ["VAN" bus] as a communication protocol between the various comfort-related equipment. Later, around 2005, they started to replace this protocol in their newer cars with the CAN bus protocol, however some models had VAN bus inside them until 2009. This overview lists vehicles that are supposedly fitted with a VAN (comfort) bus.
The application will tap in on the vehicle's VAN bus and visualize the captured data in a browser on your smartphone, tablet, laptop or any other device that runs a web browser. The application will run on any ESP8266 / ESP8285 based board, e.g. [Wemos/Lolin D1 mini] is supported. ESP32 is also supported, e.g. [LilyGO TTGO T7 Mini32].
The application will host a HTML web page on standard port 80. It will also host a WebSocket server on standard port 81. The served web page comes with some JavaScript that connects to this WebSocket server in order to stream the live data to be visualized.
The web page itself, as served by this sketch, uses and self-hosts the following open-source bundles:
- jQuery v3.5.1 - compressed, production version - original download here.
- FontAwesome v5.15.2 - original download here.
As said, the served web page self-hosts all resources. No Internet connection is needed!
🔌 Schematics <a name = "schematics"></a>
You can usually find the VAN bus on pins 2 and 3 of ISO block "A" of your head unit (car radio). See http://web.archive.org/web/20230315215552/https://en.wikipedia.org/wiki/Connectors_for_car_audio and https://github.com/morcibacsi/esp32_rmt_van_rx#schematics .
There are various possibilities to hook up a ESP32/ESP8266 based board to your vehicle's VAN bus:
-
Use a [MCP2551] transceiver, connected with its CANH and CANL pins to the vehicle's VAN bus. As the MCP2551 has 5V logic, a 5V ↔ 3.3V [level converter] is needed to connect the CRX / RXD / R pin of the transceiver, via the level converter, to a GPIO pin of your ESP board.
A board with the MCP2551 transceiver can be ordered e.g. here or here.
Two variants are possible:
- Using +12 Volt switched line (pin 4 of the "A" block of the ISO connector):

- Using +12 Volt permanent line (pin 7 of the "A" block of the ISO connector). To prevent battery drain,
the ESP board will go to sleep after 5 minutes (configurable in
Config.h). This setup requires GPIO line D1 to be connected, so that the ESP board wakes up as soon as any activity occurs on the VAN bus.
- The same as above (using +12 Volt permanent line), with an ESP32 board:

- Using +12 Volt switched line (pin 4 of the "A" block of the ISO connector):
👉 Notes:
- <img src="extras/Schematics/MCP2551%20terminator%20resistors.jpg" align="right" width="200px"/>The two terminator resistors R3 and R4 (2 x 100 Ohm, near the CANH and CANL pins) on this transceiver board are meant for operating inside a CAN bus network, but are not necessary on a VAN bus. In fact, they may even cause the other equipment on the bus to malfunction. If you experience problems in the vehicle equipment, you may want to remove (unsolder) these terminator resistors. See also this issue.
- CANH of the transceiver is connected to VAN BAR (DATA B), CANL to VAN (DATA). This may seem illogical but in practice it turns out this works best.
- The clamping circuit (D1, D2, R1) seems to (somehow) help in reducing the amount of bit errors (packet CRC errors).
-
Use a [SN65HVD230] transceiver, connected with its CANH and CANL pins to the vehicle's VAN bus. The SN65HVD230 transceiver already has 3.3V logic, so it is possible to directly connect the CRX / RXD / R pin of the transceiver to a GPIO pin of your ESP32/ESP8266 board.
A board with the SN65HVD230 transceiver can be ordered e.g. here or here.

The "+12 Volt permanent" variant as described above is possible for this setup too.
👉 Notes:
- <img src="extras/Schematics/SN65HVD230%20terminator%20resistor.jpg" align="right" width="200px"/>The terminator resistor R2 (120 Ohm, near the CANH and CANL pins) on this transceiver board is meant for operating inside a CAN bus network, but is not necessary on a VAN bus. In fact, it may even cause the other equipment on the bus to malfunction. If you experience problems in the vehicle equipment, you may want to remove (unsolder) the R2 terminator resistor. See also this issue.
- CANH of the transceiver is connected to VAN BAR (DATA B), CANL to VAN (DATA). This may seem illogical but in practice it turns out this works best.
