Code Monkey home page Code Monkey logo

wican-fw's Introduction

Please update to the latest firmware version

Order on Mouser or Crowd Supply!




WiCAN PRO

Launching soon! If you would like to support this project, please subscribe for updates on Crowd Supply!

image

WiCAN

65465

WiCAN-USB Pinout

*** To activate the 120R termination resistor, simply connect the TR pin to CANH. The other end of the termination resistor is connected to CANL internally.

WiCAN-OBD2 Pinout


webCAN Comming soon!

Features Wishlist:

  • CAN Auto baudrate DONE
  • Support ELM327 OBD2 protocol DONE (Basic support)
  • Home Assistant Integrations DONE
  • Extended ELM327 support
  • Support ELM327 protocol and Realdash protocol simultaneously on WiFi and BLE
  • Add option to send an Email on battery alert
  • Expand alerts to include other CAN parameters parsed from DBC files.
  • Support for extra wifi settings

Important Notes:

  • The OBD2 adapter is not designed to powered of the USB connecter. The USB connector can power the adapter to flash custom firmware or hardreset the deivce and can also be used for debuging.
  • It is highly recommanded to turn OFF the BLE if not used. Otherwise it might affect the preformance.
  • When the BLE is connected, the device configuration access point will be disabled i.e you won't be able to configure the device unless you disconnect the BLE, by turning off the BLE on your phone or device.
  • If AP+Station mode is enabled, only use station IP to communicate with the device and AP must be used for configuration only.

API

API Documentation

Programing examples

Build:

  1. Install ESP-IDF >= v5.1.
  2. Clone project.
  3. Open project and build.

Description:

WiCAN is a powerful ESP32-C3-based CAN adapter for car hacking and general CAN-bus development. It is available in two form factors, OBD-II and standard USB-CAN. The original firmware can use Wi-Fi or BLE to interface directly with RealDash, which allows you to create your own custom dashboards with stunning graphics. It is available for Android, iOS, and Windows 10. WiCAN connects to your existing Wi-Fi network and any device on that network, where it allows you to configure Wi-Fi and CAN settings through a built-in web interface. Both versions have a power-saving mode that detects when the voltage drops under 13 V or some other preset value. When this power-saving mode is engaged, WiCAN is capable of entering sleep mode, which drops current consumption below 1 mA.

WiCAN is a simple, ready-to-use solution for CAN-bus development and hacking. It accelerates development by providing vehicle-diagnostic APIs and libraries in various languages and for various operating systems. WiCAN works with a large array of pre-existing vehicle-diagnostic libraries, including RealDash, SavvyCAN, BUSmaster, python-can/SocketCA, and more. APIs are also available for LabView, C#, VB.Net, Delphi, and Python in case you’re writing your own software.

WiCAN-OBD

image

WiCAN-OBD will be of great interest to car enthusiasts and tinkers who want to modernize or customize the head-unit displays in their cars using RealDash. Check out some examples of the available graphic interfaces, which are supported by a robust collection of Manuals & Tutorials to get you started with RealDash.

Another great feature of WiCAN-OBD is its MQTT battery alerts. It can monitor your battery voltage and send an alert if that voltage drops under a set threshold. This feature is especially important for users who own multiple cars they do not use regularly.

WiCAN-USB

image

WiCAN-USB can be powered through USB or through a screw-terminal connector. The hardware and firmware is almost identical to WiCAN-OBD, but with an extended voltage range up to 36 V. Many of the projects we work on involve 12 V or 24 V trucks, and WiCAN-USB comes in handy when we need to monitor those trucks remotely, from the comfort of our desks, by configuring them to connect to Wi-Fi. And, thanks to its low cost, we don’t need to worry about breaking or losing it the WiCAN-USB device itself.

WiCAN-USB can also be used as a USB-to-CAN adapter when Wi-Fi connectivity is not available or when a hardwired connection is needed.

Features and Specifications:

  • Supports CAN2.0A/B up to 1Mbits.
  • Works with Realdash, based on "realdash 66"
  • Supports SocketCAN and works with BUSMaster
  • Supports TCP and UDP
  • WiFi can be used in AP and station mode
  • WiFi and CAN configured using web interface.
  • Diode protection for the USB port

Modes

Features:


1. Sleep Mode:

WiCAN can be permanently attached to the car without worrying about draining the battery. It monitors the battery voltage and can detect when the alternator is ON. When the engine is ON the battery continuously charging and the voltage will be about 13.5V(can vary with different car models). When the engine is OFF the battery voltage drops to about 12.8V(full battery) - WiCAN can detect this drop, and if the voltage remains under the threshold for 3 min it will go to sleep and the current consumption will drop below 1mA. If the engine is turned ON it will immediately wake up and enable the WiFi/BLE. The threshold voltage is configurable and can be set in the configuration page, the default value is 13V.

2. Battery Alert:

This is an important feature for most car enthusiast who own multiple cars that are only driven few times a year. Basically if a car is not used in few month the battery will go flat and needs to be jumped. WiCAN can be configured to send an alert when the battery voltage drops under a certain level. Sleep mode has to be enabled for this feature to be useful. For now alerts can be sent on MQTT, more protocols are coming soon. If there is a specific protocol you want to be supported let me know.

image

Configuration:


1. WiFi/CAN Configuration:

  1. Power up the device using the USB cable, or by plugging into the OBD-II connector.
  2. The blue LED will light ON, and a WiFi device access point will start. The SSID will look like: WiCAN_xxxxxxxxxxxx
  3. Connect to the SSID using the default password: @meatpi#
  4. Using a web browser, go to http://192.168.80.1/
  5. The status menu shows the device current configuration, if in Ap+Station mode it will show the device IP on your local network if connected successfully.
  6. The WiFi menu lets you configure the WiFi parameters. It is recommended that you change the AP access point.
  7. The CAN menu allows to choose the protocol set the bitrate and TCP/UPD port number.
  8. When ready click submit Changes button and the device will store the configuration reboot immediately.

Note: If you intend to use the device in AP mode it is recommand that you disable the BLE function

Configuration page

2. BUSMaster

You need to download the right version of BUSMaster provided in this Link. Here is how to setup the hardware.

Device Configuration:

  1. Go to configuration webpage.
  2. Baudrate can be set in BUSMaster configuration
  3. Set "Port Type" = TCP
  4. Set "Protocol" = slcan
  5. Click submit changes.

BUSMaster Configuration:

  1. Select VSCom CAN-API by clicking on 'Driver Selection -> VSCom CAN-API"
  2. Then Click on 'Channel Configuration -> Advanced'
  3. Fill in the IP and port. Example: 192.168.80.1:3333
  4. Check the 'Hardware Timestamps' check box.
  5. Choose the Baudrate.
  6. Click 'OK', then Click the Connect button on the top left corner.

3. RealDash

WiCAN-OBD and WiCAN-USB can connect with RealDash using either WiFi or BLE. The protocol and CAN bitrate must be set using the configuration page. BLE is supported only on Android and iOS. Windows 10 supports only WiFi connections. Additionally, WiCAN-USB can connect using the USB interface.

USB Device Configuration (WiCAN-USB only):

  1. Go to garage then click on the dashboard.
  2. Click Add connection.
  3. Select Adapter (CAN/LIN)
  4. Select RealDash CAN
  5. Select SERIAL/USB
  6. Select device
  7. Set Baud RATE: 4000000 (This is the usb/serial buadrate not the CAN bitrate)
  8. Click next then Done

WiFi Device Configuration:

  1. Go to configuration webpage.
  2. Select the baudrate
  3. Set "Port Type" = TCP
  4. Set "Protocol" = reladash 66
  5. Click submit changes.

RealDash Configuration:

  1. Go to garage then click on the dashboard.
  2. Click Add connection.
  3. Select Adapter (CAN/LIN)
  4. Select RealDash CAN
  5. Select WIFI/LAN
  6. Enter IP and Port
  7. Click Done

BLE Device Configuration:

If you're using firmware verion v1.64 or below please update to the latest version before enabling BLE

  1. Go to configuration webpage.
  2. Select the baudrate
  3. Set the "BLE Status" to enable

Note: When the BLE is connected, the device will automatically turn off the WiFi configuration access point. Once BLE is disconnected the configuration access point will turn back on.

4. SavvyCAN

  1. Download SavvyCAN
  2. Connect to the device AP.
  3. Open SavvyCAN and Click Connection->Open Connection Window->Add New Device
  4. Select "Network Connection", if you're on the same network it auto detect the IP.
  5. Click Create New Connection.
  6. Then select "Enable Bus" checkbox.

SocketCAN

1. WIFi:

Change to protocol in the device configuration page to "slcan", then create a virtual serial port over TCP on your Linux machine. If WiCAN is connected to your home network replace "192.168.80.1" with device IP.

sudo socat pty,link=/dev/netcan0,raw tcp:192.168.80.1:3333 &
sudo slcand -o -c -s8 /dev/netcan0 can0
sudo ifconfig can0 txqueuelen 1000
sudo ifconfig can0 up

2. USB

sudo slcand -o -s6 -t sw -S 4000000 /dev/ttyACM0 can0
sudo ifconfig can0 txqueuelen 1000
sudo ifconfig can0 up

ELM327 OBD2 Protocol

If you're using firmware verion v1.64 or below please update to the latest version before enabling BLE

  1. Go to configuration webpage.
  2. Select the baudrate
  3. Set "Port Type" = TCP
  4. Set "Protocol" = elm327
  5. Enable BLE if needed. Note
  6. Click submit changes.

OBD2 in RealDash

  1. Go to garage then click on the dashboard.
  2. Click Add connection.
  3. Select Adapter OBD2
  4. Select Bluetooth or WiFi
  5. If WiFi fill in the IP 192.168.80.1 and port 3333.
  6. Click on OBD2 PROTOCOL and select your car protocol, (11 bit ID, 500Kbit) or (11 bit ID, 250Kbit)
  7. Activate Request Only First Reply
  8. Click Done.

MQTT

If you're using firmware verion v1.64 or below please update to the latest version before enabling MQTT

Currently only non-secure MQTT is supported, it's highly recommended that you only use it with local MQTT broker and not use public brokers otherwise your CAN bus might be publicly exposed.

image

To use MQTT client simply Enable in the configuration page and fill in the broker details. You also need to note the device ID, which will be used to communicate with the device. The device ID "xxxxxxxxxxxx" is part of the AP ssid mentioned in WiFi/CAN Configuration WiCAN_xxxxxxxxxxxx. This will alow you to communicate with multiple WiCAN device if needed.

Example: If the AP ssid is "WiCAN_112233445566", the device ID is 112233445566.

1. Status:

When the device connects to the MQTT broker it will publish a status message to the status topic.

- Status Topic: wican/xxxxxxxxxxxx/status

- Status Message JSON:

{"status": "offline"} or {"status": "online"}

2. MQTT TX RX Frame:

bus: Is always 0. Thats reserved for future application
type: tx or rx 
dlc: 0 to 8
rtr: true or false
extd: true or false
id: 11 or 29 bit ID

Example: { "bus": "0", "type": "tx", "frame": [{ "id": 2015, "dlc": 8, "rtr": false, "extd": false, "data": [2, 1, 70, 170, 170, 170, 170, 170] }] };

3. Receive Frames:

To receive CAN frames simply subscribe to the receive topic. Each MQTT message might contain more than 1 frame.

- Receive Topic: wican/xxxxxxxxxxxx/can/rx

- Received Message JSON:

{"bus":0,"type":"rx","ts":34610,"frame":[{"id":123,"dlc":8,"rtr":false,"extd":false,"data":[1,2,3,4,5,6,7,8]},{"id":124,"dlc":8,"rtr":false,"extd":true,"data":[1,2,3,4,5,6,7,8]}]}

- Received Message JSON Schema:

image

4. Transmit Frames:

- Transmit Topic: wican/xxxxxxxxxxxx/can/tx

- Transmit Message JSON:

{"bus":0,"type":"tx","frame":[{"id":123,"dlc":8,"rtr":false,"extd":true,"data":[1,2,3,4,5,6,7,8]},{"id":124,"dlc":8,"rtr":false,"extd":true,"data":[1,2,3,4,5,6,7,8]}]}

- Transmit Message JSON Schema:

image

5. OBDII PID Request Over MQTT

bus: Is always 0. Reserved for future application
dlc: Always 8
rtr: false
extd: false, if the car obd2 protocol is 11bit ID, 500 kbaud or 250 kbaud
extd: true, if the car obd2 protocol is 29bit ID, 500 kbaud or 250 kbaud
id: 11 bit OBD2 request ECU ID should be 2015 (that's 0x7DF in HEX)
id: 29 bit OBD2 request ECU ID should be 417018865 (that's 0x18DB33F1 in HEX)

image

Example: Get ambient temp request, PID is 70

{ "bus": "0", "type": "tx", "frame": [{ "id": 2015, "dlc": 8, "rtr": false, "extd": false, "data": [2, 1, 70, 170, 170, 170, 170, 170] }] };

6. Request Battery SoC MQTT Example

This PID request should work on most EVs, however it's not possible to know it will work on certain EV model unless it's tested on that specific car model.

Request

{"bus":"0","type":"tx","frame":[{"id":2015,"dlc":8,"rtr":false,"extd":false,"data":[2,1,91,170,170,170,170,170]}]}

Response

{"bus":"0","type":"rx","ts":51561,"frame":[{"id":2024,"dlc":8,"rtr":false,"extd":false,"data":[3,65,91,170,0,0,0,0]}]}

The SoC = (170 x 100)/255 = 66.67%

7. CAN to JSON interpreter - Filtring

This feature enables you to convert CAN messages into JSON format, apply calculations as specified by your expressions, and send the resulting data to an MQTT broker at predefined intervals. Below, we provide a comprehensive guide on how to effectively utilize this powerful feature.

Note: When a filter is added, all other CAN messages will be ignored, ensuring that only the configured filtered messages are sent.

image

Configuration Parameters:

CAN ID: Frame ID in DEC This parameter refers to the CAN message identifier in decimal format.

Name Specify the JSON key under which the extracted value will be stored.

PID: PID Number in DEC If the frame is a response to a PID request, set this parameter to the relevant PID number. Otherwise, for non-PID frames, it should be set to -1.

Index: PID index For all standard PID requests, this should be set to 2, referring to byte 2 in the response. In certain special cases, this value may differ from 2. If the PID is set to -1, the interpreter will disregard this value.

Start Bit Indicate the bit from which you want to commence extracting the value. For instance, if Byte 0 is represented as 0xA0 in binary (b1010 0000), 'Bit 0' would correspond to 1, 'Bit 1' to 0, and so forth.

Bit Length This parameter denotes the number of bits comprising the value you intend to extract.

Expression Define the mathematical operations to apply to the extracted value. It's crucial to include the letter 'V' to represent the extracted value within your expression.

Cycle Specify the time interval in milliseconds between JSON messages sent to MQTT. The cycle time should fall within the range of 100 to 10,000 milliseconds.

JSON Format

WiCAN processes CAN frames, and the resulting JSON data follows this structure:

{"VehicleSpeed": 23.000000}
{"EngineSpeed": 1165.000000}
{"CustomID": 3594.400000}

PID response frames Example:

Name CAN ID Byte 0 Byte 1 Byte 2 Byte 3 Byte 4 Byte 5 Byte 6 Byte 7
Engine Speed 2024 4 65 12 18 52 170 170 170
PID Value 1 Value 2

The Engine Speed is PID response so "PID" must be set 12. The value we need to extract is 16bit in Byte 3 and Byte 4. So we set the "Start Bit" to 24 and "Bit Length" to 16. The extracted value will be (11 * 256)+68 = 4660. Now to get the engine speed in rpm we must multiple by 0.25. So the "Expression" will be V * 0.25= 1165

Name CAN ID Byte 0 Byte 1 Byte 2 Byte 3 Byte 4 Byte 5 Byte 6 Byte 7
Vehicle Speed 2024 4 65 13 23 170 170 170 170
PID Value 1

The Vehicle Speed is PID response so "PID" must be set 13. The value we need to extract is 8bit in Byte 3. So we set the "Start Bit" to 24 and "Bit Length" to 8. The extracted value will be 23. No need for any operation to get the speed so we set the "Expression" to V, so the value will be 23.

Other CAN Frames Example:

Name CAN ID Byte 0 Byte 1 Byte 2 Byte 3 Byte 4 Byte 5 Byte 6 Byte 7
Custom ID 356 170 170 35 16 170 170 170 170

The PID in the configuration needs to set to -1. The value we need to extract is 16bit in Byte 2 and Byte 3. So we set the "Start Bit" to 16 and "Bit Length" to 16. The extracted value will be (35*256)+16 = 8976. Now to get the value we must add 10 to the Value and divide by 2.5. So the "Expression" will be (V+10)/2.5 = 3594.4

Name CAN ID Byte 0 Byte 1 Byte 2 Byte 3 Byte 4 Byte 5 Byte 6 Byte 7
Custom ID 355 170 170 170 170 5 34 170 170

The PID in the configuration should be set to -1. The values to extract are from Byte 4 and Byte 5. The formula used here is (5 + 34)/2, so the expression to set is (B4 + B5)/2.

Home Assistant

1. EV Battery Examples Wiki Page

In this example, we will learn how to set up Home Assistant to request the battery State of Charge (SoC) without using Node-RED. This example has been tested on an ORA Funky Cat vehicle and can also serve as a reference for requesting other Parameter IDs (PIDs) in addition to SoC. EV Battery Examples Wiki Page

2. Node-RED Example

WiCAN is able to send CAN bus messages to Home Assistant using MQTT protocol. I found that using Node-RED is the simplest way to create automation based on the CAN messages received. This short video highlights some of the steps https://youtu.be/oR5HQIUPR9I

  1. Install Home Assistant Mosquitto broker add-on
  2. Create Home Assistant new user account for WiCAN. These user credentials will be used to set up the MQTT setting for WiCAN.
  3. Connect to WiCAN access point WiCAN_xxxxxxxxxxxx then, using a web browser, go to http://192.168.80.1/
  4. Set the "Mode" to Ap+Station
  5. Fill in your Home WiFi network SSID and Password.
  6. Enable MQTT and fill in the Home Assistant credentials created in step 2
  7. Install Home Assistant Node-RED Add-on
  8. Download wican_example_flow.json and replace device_id with your WiCAN ID.
  9. Open Node-RED Add-on and import the edited "wican_example_flow.json"
  10. Double click on the subsction Node and edit the server fill in MQTT broker IP address and credentials created in step 2
  11. Click deploy.
  12. To create a new MQTT sensor, you’ll need to edit the configuration.yaml file by adding the following lines:
mqtt:
  sensor:
    - name: "Amb Temp"
      state_topic: "CAR1/Amb_Temp"
      unit_of_measurement: "C"
      value_template: "{{ value_json.amb_temp }}"
    - name: "Fuel Level"
      state_topic: "CAR1/Fuel_Level"
      unit_of_measurement: "%"
      value_template: "{{ value_json.fuel_level }}"
  1. Restart Home assistant
  2. After restart go to dashboard and Add new Card entity.

Workflow summery

In this example we've got one Node subscribed to topic wican/device_id/status, when WiCAN connects to the local network it will publish {"status": "online"} . Once the Node function Send Get Amb Temp req receives online status it will send a OBD2 request to get the ambient temperature. The OBD2 request message looks like this:

{ "bus": "0", "type": "tx", "frame": [{ "id": 2015, "dlc": 8, "rtr": false, "extd": false, "data": [2, 1, 70, 170, 170, 170, 170, 170] }] }

Frame ID : 2015 or 0x7DF PID: 70 or 0x46

Here is a good reference on how to construct a PID request. Note select DEC from drop down list.

We have another Node subscribed to topic wican/device_id/can/rx, once the car ECU responds to the request the function Parse Amb Temp RSP will parse the message and publish a message to topic CAR1/Amb_Temp. Notice that when you edited configuration.yaml file create an MQTT Entity that subscribes to CAR1/Amb_Temp and expects a message { value_json.amb_temp } with unit_of_measurement C.

image

Firmware Update

1. OTA:

  1. Download the latest release version, or compile your own.
  2. Go the device configuration page.
  3. Click on the "About" tab.
  4. Click on "Choose File".
  5. Select the binary file. Eample: wican-fw_v130.bin
  6. Click update, update should take about 30sec.

NOTE: After flashing, the device configuration might be erased.

Note: for firmware version v1.00 use USB cable to flash the unit.

2. USB Flash:

Use the ESP flash tool to update the firmware, just follow the same setting in the picture below. Make sure to select ESP32-C3 and USB mode. esptool.py also can also be used to flash a new firmware.

  1. Download ESP flash tool
  2. Download the latest firmware zip file from the releases page.
  3. Select ESP32C3, develop and USB then click ok

image

  1. Set the configuration as the picture below, select and fill in the address for each binary.

  1. Short the pins as shown, then plug in the USB cable.

OBD

image

USB

image

  1. After you plug in the USB cable the Orange LED will light up. Now click START button on the flash tool.

NOTE: After flashing, the device configuration might be erased.


© 2023 meatPi Electronics | www.meatpi.com | PO Box 5005 Clayton, VIC 3168, Australia

wican-fw's People

Contributors

arlosi avatar jay-oswald avatar meatpihq avatar puni2k avatar scytacki avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wican-fw's Issues

Overwhelming the bus with polls?

I have identified a number of PIDs I want to pull into Home Assistant, and to view the data live, maybe 15 PID's or so. Using the NodeRed example in the documentation I was able to pull in the PID's I desired. Then to continuously pull them to constantly have an updated live value in HA I set an inject node to make the request on an interval and tested 1m, 30s, 10s, 5s, 2s. Seems the WiCAN device locks up, stops responding to requests and the web interface stops responding after sending sending a number or requests. And quicker in accordance to a faster polling time. Then I have to unplug the device to reset it.

Is this an appropriate way to use the WiCAN? When connecting to WiCAN from the Android Torque Pro app over WIFI it seems to have no problem with maintaining an updated live value without crashing the device.

Q: CAN Standby GPIO 6

As you may know, I'm using the WiCAN as the "prototype" for our own ESP-based CAN-adapter optimized for reprogramming ECUs with a completely custom firmware. Pretty early in the process I noticed from reading your firmware that I need to set GPIO 6
to LOW to make it work ­– which is what I do in the board-specific setup, i.e. early in the process, but way before initializing the rest of the CAN subsystem (which gets triggered on the first open of the L2CAP connection).

That worked fine in my test scenarios, but when recently working on a car, I noticed that the WiCAN was interfering with the bus when plugged in ­– as long as it's not properly initialized. It almost looks like it's sending garbage on a wrong bitrate before the TWAI driver is installed & started. Is that possible and if so, why? I could not notice that in my breadboard-based designs. Is that the reason for you adding the GPIO 6? What does it do exactly? Cut the power off the Transceiver?

It would be nice, if you could shed some light on that.

Multiple MQTT Messages in one

I noticed I was losing some MQTT messages in my application. After looking through the messages in detail, I noticed some sometimes multiple CAN bus messages are being sent as a single MQTT message with multiple frame values.

Here is an example:

“{"bus":"0","type":"rx","ts":32343,"frame":[{"id":436207005,"dlc":8,"rtr":false,"extd":true,"data":[1,255,20,1,0,0,0,0]},{"id":436207005,"dlc":8,"rtr":false,"extd":true,"data":[1,255,20,1,0,0,0,0]},{"id":436207005,"dlc":8,"rtr":false,"extd":true,"data":[1,255,20,1,0,0,0,0]}]}”

Is this the expected way that the MQTT function is supposed to work? It is fine if it is. I can account for it in my code, I just wanted to ensure this was the intent.

Matching plug for female extension header

I'd like to connect a passive piezo buzzer to the board. I noticed a female extension header in the middle of the board where you have exposed a bunch of GPIOs as well as GND and 3.3V. Would you know a matching plug for that header?

Filtering for mpCAN-USB not working

Hi Ali,
I use .Net C# and here is my code that fails at the designated line below.
As you know the C# code uses the wrapper file: vs_can_api_wrapper.cs

               // set one filters
                VSCAN_FILTER[] filter = new VSCAN_FILTER[1];

                filter[0].Size = 1;
                filter[0].Id = 0x200;
                filter[0].Mask = 0xff;
                filter[0].Extended = 0;
                
                CanDevice.SetFilterMode(VSCAN.VSCAN_FILTER_MODE_SINGLE);
                CanDevice.SetFilter(filter);  <==== This line fails

Can you assist?
Thanks,
Wyatt

WiCAN causing intermittent issue with stability control

On plugging WiCAN in on my Land Rover Discovery 4/LR4 with engine off all functions as expected. Having configured via the web interface and started engine I get intermittent errors from the car saying that the stability control in unavailable. Once started theses errors fire constantly (normally such errors can be dismissed but these re fire every few seconds). On stopping engine and removing WiCAN all errors seem to be cleared.

Does the device broadcast on the CANBus in default config? I had assumed by default it would just be passively listening (but that might betray my lack of knowledge on how such things work).

My use case for WiCAN is first and foremost battery monitoring (reporting to mqtt) but I was also hoping to look at other use cases such as logging button presses to MQTT to trigger automations in Home Assistant/Node Red via MQTT.

Thanks!

Skoda Enyaq connection problems 0100 BUS INIT: ...ERROR

Hi,
I‘m unable to get the wican adapter to work properly with my enyaq ev.
The wican adapter itself (wifi,accesspoint,webui) works fine so far. I‘m on newest version v1.65.
I tried many protocols, but I‘m focusing on elm327 + wifi + ios carscanner now:
The elm connection is fine, but the ecu connection always fail with the „elm327 wasn‘t able to establish connection with your car“ message …

I own a normal bluetooth obd2 adapter (Vlink icar pro) too, and here everything is working properly. See carscanner logfile of a working connection here:

===== LOG STARTED: 06.03.2023 22:31:31=====
=====Version=1.97.0 Build=1.97.0 P=True NoDelayELM327Init=False
====Connection profile=Skoda EV MEB: ID.3, ID.4, ID.5, ID.6, ID.Buzz, Enyaq, Q4 E-tron, Cupra Born, etc.
[Connection type: BluetoothLE; DeviceName=IOS-Vlink]
[Connecting to 4b87a826-xxx…]
[Connected to 4b87a826-xxx…]
ATZ
ATE0
[ELM RESET]
ATZ
ELM327 v2.3
>
Initialize(initMode=Default)
InitializeDefaultInitString(ProtocolNumber=7,initMode=Default,useATST96=False)
ATE0
ATE0
OK
>STI
?
>VTI
IcarPro v2.3
>
[ELM RESET]
ATD
OK
>ATD0
ATD0
OK
>ATE0
ATE0
OK
>ATSP7
OK
>ATE0
OK
>ATH1
OK
>ATM0
OK
>ATS0
OK
>ATAT1
OK
>ATAL
OK
>ATST32
OK
>0100
18DAF10A037F0111
18DAF10506410098180001
18DAF10106410080080011
>
[cmd_reply=] 18DAF10A037F0111
18DAF10506410098180001
18DAF10106410080080011
>
[Trying to decode:
OK
>
ELMFormat=CAN29bit]
[DecodeResult=True]
0100
18DAF10506410098180001
18DAF10A037F0111
18DAF10106410080080011
>0120
18DAF10506412000000001
18DAF10A037F0111
18DAF10106412000000001
>0140
18DAF105064140C0800021
18DAF10A037F0111
18DAF10106414040800000
>0160
18DAF10A037F0111
18DAF10506416000000001
>0180
18DAF10A037F0111
18DAF10506418000000040
>
[FUELRATE: FuelRate;FuelRate=123:False:Engine fuel rate;MAF=16:False:MAF air flow rate;MAP=11:False:Intake manifold absolute pressure;IAT=15:False:Intake air temperature;RPM=12:True:Engine RPM;AFR_LAMBDA=92:False:Fuel/Air commanded equivalence ratio;FSS=null;LOAD_ABS=91:False:Absolute load value;LOAD_PCT=4:True:Calculated engine load value;Economizer=229:False:Fuel economizer (based on fuel system status and throttle position);BARO=67:False:Barometric pressure;AMBIENT_TEMP=94:False:Ambient air temperature;O2_V1=null;O2_V2=null;INJECTOR=122:False:Fuel injection timing;CYCLE_CONSUMPTION=null;]
…

So i know that ProtocolNumber=7 (ISO 15765-4 CAN 29 bit ID, 500 kbaud) is the correct mode. But with wican (can bitrate: 500K, mqtt: off) i always got a 0100 BUS INIT: ...ERROR message. Some of the AT commands seem to work …
Here is complete log, where ProtocolNumber=7 is chosen in advanced settings. Probing other Protocolmodes does not work either. Always the same error …

===== LOG STARTED: 06.03.2023 22:40:02=====
=====Version=1.97.0 Build=1.97.0 P=True NoDelayELM327Init=False
====Connection profile=Skoda EV MEB: ID.3, ID.4, ID.5, ID.6, ID.Buzz, Enyaq, Q4 E-tron, Cupra Born, etc.
[Connection type: WIFI]
[WiFi name: <null>]
[Connecting to 192.168.42.190:3333]
client = new TcpClient();
BEFORE await client.ConnectAsync(server, port);
client.Connected
got stream from client
[Connected to 192.168.42.190:3333]
ATZ
ATE0
[ELM RESET]
ELM327 v1.3a
>OK
>
Initialize(initMode=Default)
InitializeDefaultInitString(ProtocolNumber=7,initMode=Default,useATST96=False)
ATE0
OK
>STI
?
>VTI
?
>
[ELM RESET]
ATD
OK
>ATD0
OK
>ATE0
OK
>ATSP7
OK
>ATE0
OK
>ATH1
OK
>ATM0
OK
>ATS0
OK
>ATAT1
OK
>ATAL
?
>ATST96
OK
>0100
BUS INIT: ...ERROR
>
[cmd_reply=] BUS INIT: ...ERROR
>
[Trying to decode:
OK
>
ELMFormat=CAN29bit]
[DecodeResult=False]
0100
BUS INIT: ...ERROR

The enyaq should behave similar to the ID3, so I tried the custom init-codes in:
https://github.com/nickn17/evDash/blob/master/src/CarVWID3.cpp
but this does not work either …

Regardless of my connections problem, it would be very nice if the wican could somehow provide an interface (perhaps using mqtt or via web-ui) where multiple PIDs can be individually predefined, so that similar to the loop-functionality like in the above code for the ID3, the wican continously work on the given PIDs in a loop with a user defined delay and combined with the mqtt-feature, send the results of each pid to mqtt. This would be very usefull, because no additional app needs to be executed and the mqtt-results can be used in node-red for further processing (for example to use influxdb and create grafana dashboards).

Feature request: Emulation mode

Would be super nice to be able to record some obd traffic, leave the car, and use the usb port of the WiCAN-OBD2 to power it on and run that record emulated for debugging purpose.

Cannot establish ODB2 connection

I have a 2002 Audi A6 which I currently connect with a Veepeak OBDCheck BLE+ connector. This works fine. However, I now have the WICAN-ODB-C3 and it simply will not connect at all. It is currently on v1.68 firmware.

My Veepeak connector shows the connected interface as: ISO 14230-4 KWP (5 baud init, 10.4 kbaud) - is this supported by the WiCAN adapter?

I cannot get any CAN messages at all from the Monitor - it shows nothing.

However, I have setup the MQTT Battery alert into Home Assistant (over WiFi) and this is working correctly.

Power LED Hardwired?

Is the blue LED hardwired to power? I noticed I couldn't get it off when toggling GPIO pin 7.

Open Source License

I noticed that the license on all of the source files is GPL, while the top level repository LICENSE says public domain.

I wonder if you'd consider changing all or some of the source files to be MIT? I imagine some of them would be useful to other projects/companies such as the elm327.c file. With an MIT license these other projects could more easily use the file and hopefully contribute changes or at least identify issues.

I just wanted to ask since I prefer contributing to MIT licensed code. That is mainly because I like my efforts to benefit as many people as possible and in my experience haven't found copy left licenses help with this goal.

I totally understand if you don't want to make the change. I hope to contribute either way. I can imagine you might be concerned about some other company taking the firmware and making a clone of the WiCAN without contributing back.

[SUGGESTION] Add "discussions" and "wiki" sections to some WiCAN repo(s) on GitHub?

@meatpiHQ Suggest that you consider adding "discussions" and "wiki" sections to one or some WiCAN repo(s) on GitHub?

(not sure if best would be to add to https://github.com/meatpiHQ/WiCAN and/or https://github.com/meatpiHQ/wican-fw ?)

Anyway, while "issues" in a GitHub repo is good for reporting specific bugs/problems, the "GitHub Discussions" feature/section is better as a community forum for generic support + discussing general ideas or feature requests, and "GitHub Wiki" feature/section i better for hosting an open public wiki for documentation to let others help with contributing guides and other docs without having to submit a pull request.

GitHub Discussions

GitHub Wiki

Support custom IP address range

When in AP mode, the device uses 192.168.80.x as address range. It would be helpful to have an option to change the address range used, in case that address range happens to be used 😅

SLCAN messages/MQTT dependency?

I am trying to access raw can bus messages over TCP. It seems, however that it only works when MQTT is active. When MQTT is disabled, I am not seeing the messages on TCP 3333.

Here are my setting:

Screenshot 2023-04-24 at 11 25 39 AM

I created this simple python script for the test:

import socket

HOST = '192.168.50.103'  # Replace with the server's IP address
PORT = 3333  # Use the same port number as the server

def receive_can_messages():
    with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
        s.connect((HOST, PORT))
        while True:
            data = s.recv(1024)
            if not data:
                break
            print(f'Received CAN message: {data.decode()}')

if __name__ == '__main__':
    receive_can_messages()

As long as MQTT is enabled, I will get messages. However, if MQTT is disabled, I get no messages. The should not be a dependency between TCP and MQTT right?

MeatPI reports ~30V instead of ~12V

The web-interface reports 28V - 31V as the 'Battery Voltage' on WiCAN-OBD in my Chevy Bolt EV instead of the 'normal' 12V.

Reading out the voltages with an external voltage meter shows around ~12V at all pins of the CAN bus.

Is this a software bug and/or EV related?

Some Questions

Congratulations for releasing the interface and the software!

Having just purchased the WiCAN (which should be shipping soon), I wonder about some things ­– perhaps you can clarify.

1.) What is "the native" protocol on the TCP socket? Right now it looks like "realdash" and "saavycan" protocols are implemented ­– guessing that the former refers to https://github.com/janimm/RealDash-extras/blob/master/RealDash-CAN/realdash-can-protocol.md, could you point me to a documentation for the saavycan protocol?

2.) Is the current firmware implementing ISOTP on the controller level, so that we can send the full 4095 bytes of payload in one go?

3.) Can we configure the CAN bitrates through the API? For the use with arbitrary vehicles, it would be a pity, if customers would have to edit the settings via web.

4.) Is there any documentation beyond the https://github.com/meatpiHQ/programming_examples/tree/master/CAN ­– which seems to refer to VSCAN API. Is this the same API that slcand speaks?

5.) Does the device support BLE5 queued writes?

6.) Are all the supported protocols active in parallel?

Thanks a lot. Looking forward to working with the device.

i cant see any canbus messages

Ive been trying for 2 days now to get anything out of my meatpi-usb, I tripple checked the connections, but neither mqqt not the monitor tab or the webcan.meatpi.com spit out anything, neither with engine running or key in pre-starting position. All i found online about Ford canbus says the 500k is correct. What could I be missing?
I use mqqt-explorer for monitoring mqtt, all I get on mqtt wican is the status online/offline. I also tried the obd2 port with a bluedriver and get data from it.
Any tips for debugging this would be awesome, I imagined the monitor tab should show a stream on canbus data when the truck is running?

Too many problems!

Good morning! Las week I received the wifi Wican. It comes with 1.68 firmware. First thing that I did, was to upgrade firmware to 1.71 from web interface. After that, I tried to connect it to canbus but no way....
After a lot of test of configurations... I decided to upgrade firmware following github instructions from usb and this time I am luck.

I manage to work but not as expected.... When I try it with RealDash or openMonitor, Wicam have a lot of delay of send information... Same thing when I try to get data from MQTT..

Some one can help me....????

Thanks in advance

Enabling MQTT in v1.71 breaks web interface by enforcing HTTPS(?)

Hi all,

Thanks for the great device -- the flexibility is great. By now I've spent about 30 hours getting to know everything about CAN busses and the proprietary PIDs my EV is using. Fun times!

Current question: I had a working setup without MQTT, but after enabling MQTT submit + reboot, the web-interface is no longer accessible.

Strangly it seems that HTTPS is now enabled used instead of HTTP, which was not the case before:

Firefox seems to hang while retrieving the web-interface.

Using wget gives (192.168.114.175 is the MeatPI's address):

$ wget http://192.168.114.175/index.html
--2023-06-18 19:12:21--  http://192.168.114.175/index.html
Connecting to 192.168.114.175:80... connected.
HTTP request sent, awaiting response... 308 Permanent Redirect
Location: https://192.168.114.175/index.html [following]
--2023-06-18 19:12:21--  https://192.168.114.175/index.html
Connecting to 192.168.114.175:443... connected.
OpenSSL: error:0A000438:SSL routines::tlsv1 alert internal error
Unable to establish SSL connection.

Other observatons:

  • ELM327 interface seems to be working still;
  • Port 80 is still reacting (as you can see from above)
  • MQTT did post a 'status online' message, so it seems to be working
  • BLE is disabled

However, I require the web-interface for changing the settings.

What can I do?

MQTT not getting any can/rx messages.

I am trying to get MQTT working to integrate wican into ioBroker using Node Red.
After upgrading to the latest firmware V1.64 I receive the status (online / offline) as MQTT message.
I impoprted your NodeRed example for HomeAssistant as iobroker also implements NodeRed.

The Node red flow gets triggered when status changes to online and sets the paylod to:
"msg.payload = { "bus": "0", "type": "tx", "frame": [{ "id": 2015, "dlc": 8, "rtr": false, "extd": false, "data": [2, 1, 70, 170, 170, 170, 170, 170] }] };"
The payload is published via MQTT to the topic "wican/mydev_id/can/tx"

Using MQTT FX I suscribed everything under "wican/mydev_id/#" and I receive the message as follows.
"{"bus":"0","type":"tx","frame":[{"id":2015,"dlc":8,"rtr":false,"extd":false,"data":[2,1,70,170,170,170,170,170]}]}"

I was expecting to get a new MQTT message from the wican under the topic "wican/mydev_id/con/rx"
But nothing happens.

Any idea how to get values via MQTT?

My car is VW e-UP and my goal was to read the State of Charge from the battery.

Many thanks in advance.
Stefan.

MQTT not sending any requests

Recently received the WiCAN module. I was able to get the battery alert setup and publishing to MQTT successfully, but can't seem to get the MQTT module to work by itself. Using the same MQTT settings I cannot see anything published to the MQTT server. Not sure on the best way to check the logs on this device. Any help would be appreciated.

VSCAN_MSG.Id is wrong when writing to CAN BUS

Hello
I am using the mpUSB-CAN V2.0 adapter and coding in C# example TestDrive.cs.
The program uses the vs_can_api_wrapper.cs and the vs_can_api.dll.

The issue is with the CanDevice.Write() which calls the Write() function in the wrapper.
The VSCAN_MSG.Id is set to 0x215 and the bus sees 0x2051.
My guess is the Id nibbles are reversed somewhere in the DLL or the driver.

Thanks for taking my issue
-Wyatt

Disable Wifi-AP

For security reasons I would like to use the WiCan only in Station Mode.

If the Station is not in range. try to reconnect every x seconds.

Alternative: At least make the SSID hidable.

Reading out battery voltage?

Is it possible with the current hardware design to read the voltage present at the OBD2 port? For ECU reflashing (which can take hours for some vehicles), you typically want to monitor battery closely while operating and stopping when the voltage goes under a certain threshold.

CAN Bus to MQTT Message flow

It appears from the documentation that the current way the MQTT integration is written, it works on a question/response standard where a request is sent (ie for a temp) and a response comes in. In my application I need to see new messages as they come across the bus. I would like to see the device watch for events that meet a filter and then send those directly to MQTT.

Thanks.

ETA and status on ELM327 support?

What is your roadmap of development plans and timeline for adding ELM327 support to your WiCAN OBD adapter?

Noticed that ELM327 support was on your feature wishlist but that there was no informtion on development status or estimated date on when ELM327 support will be available? I am sure more potential buyers than me like to know if and when ELM327 support will be available before ordering multiple adapters from your crowdfunding campaign on Crowd Supply:

https://github.com/meatpiHQ/wican-fw/blob/main/README.md#features-wishlist

Features Wishlist:

  • Support ELM327 OBD2 protocol
  • Support ELM327 protocol and Realdash protocol simultaneously on WiFi and BLE

PS: As we have two relatively old cars I use my ELM327 WiFi/BLE OBD2 adapters a lot which I have lying around in the glove box in each of our cars all the time in order to read + clear trouble codes from diagnostics logs and turn off the MIL. Thus it would be great to have one unified adapter that did it all, and I would be one for each car and my parent's cars + recommend it to others too if there was one all-in-one inexpensive adapter that could do it all and is compatible with the simple smart phone car diagnostics apps that already support ELM327 over WiFi and BLE.

[SUGGESTION] Offer "ESP Web Tools" (ESP32 web installer and finder) via WiCAN website

FYI, "ESP Web Tools" for ESP8266/ESP32 flashing is a free and open source project that is released and maintained by Nabu Casa as custodians of ESPHome and Home Assistant.

https://esphome.github.io/esp-web-tools/

ESP Web Tools allow firmware re-flashing and updating of ESP32/ESP8266 SoC projects via an web installer that prduct developers can easy offer on their homepage, allowing users to get access to the tools directly from their browser without having to install anything.

Suggest @meatpiHQ offer "ESP Web Tools" (ESP32 web installer and finder) via WiCAN website as an option for manually flashing firmware upgrades, alternative firmware such as example Alpha/Beta firmware for testers test, or firmware recovery.

ESP Web Tools has already been adopted by more and more ESP-based the great projects ever since the introduction of ESP Web Tools, as for example check out the website of these ESP8266/ESP32 based products thjat now offers "ESP Web Tools" (ESP32 firmware flasher) via their website:

PS: They recently expanded that project to support additional MCU devices that are not based on ESP8266/ESP32, and now they also introduced SL Web Tools for Silicon Labs EFR32 based based chips such as EFR32MG21.

[SUGGESTION] Run a new crowdfunding campaign on Kickstarter or IndieGoGo for next-generation WiCAN hardware?

Suggest you consider running a new crowdfunding campaign on Kickstarter or IndieGoGo for next-generation WiCAN hardware?

Related to the existing WiCAN next-gen (i.e. version 2) hardware discussion -> #9

@meatpiHQ With all the current hype around better interoperability of IoT (Internet-of-Things) devices, open-source hardware/firmware getting mentioned more in the press, and open-source (DIY) home automation applications like Home Assistant gaining popularity I believe that the idea of next-gen WiCAN hardware could really be the perfect timing for potentially having huge success if you now re-launched the WiCAN project on a larger crowdfunding campaign platform like Kickstarter or IndieGoGo, especially if included a short promotion video showing off what the existing WiCAN products can already do when show/mention that it can be integrated with many different compatible apps/applications/programs (e.i. CANbus, ELM327, RealDash, Torque, BUSmaster, SavvyCAN, SocketCAN, python-can, MQTT, Home Assistant, and potentially also interface for Thread/OpenThread in addition to WiFi and Bluetooth Low Energy).

The main benefit of Kickstarter is it has more than twice as many monthly visitors, as products launched there has a higher success rate as all project is reviewed by Kickstarter staff before launch and who are much more hands-on with helping projects succeed, and thus Kickstarter project usually get more press compared IndieGoGo which projects are not reviewed and have a much lower success rate, while IndieGoGo can be said to benefit from being marketed internationally and being more flexible with things such as offering expansions after a successful campaign.

Your track record of already running a successful crowdfunding campaign on Crowd Supply should help such a campaign, and crowdfunding campaign platforms like Kickstarter or Indiegogo have still a much broader reach so could increase the WiCAN userbase which normally on the software side to crowdsourcing more independent developers onboard with developing third-party integrations for other software applications.

Note that regardless of which you go with you should still really have to do your own personal marketing on social media platforms like Facebook and Instagram with posts that try to draw traffic to your crowdfunding campaign. Also should reach out to both YouTubers and technical bloggers or press to let them know about the product as an upcoming/ongoing campaign, and preferably send prototype samples to influencers on YouTube, such as for example the YouTubers that are part of the "Home Assistant Creator Network":

Maybe also try reaching out to some well-known related tech enthusiasts channels with audiences interested in technical DIY, like:

As well as other tech and hacking news/blogs/vloggers

Suggesting that you attempt to put together updated SoC and new boards or custom enclosure designs + retail packaging/boxing with an included small printed quick-start manual so to also make it attractive as a final commercial product that can be sold on the shelf of brick-and-mortar stores(?).

  • Based on ESP32-C6 SoC for WiFi, BLE, and future-proof for Thread/OpenThread even if support is not included on day-one?
  • USB-C port (not Micro-USB) with circuits for stand-alone powering it for manual firmware upgrades and firmware recovery flashing?
    • USB-to-serial interface for use with a computer for both flashing firmware and protocols direct connect?
  • Retail packaging/boxing?
  • Small printed quick-start manual.

Maybe also add an onboard expansion port with available GPIO pins to allow optional expansion modules (like example GPS and/or LTE modem)?

FYI, as proof-of-concept there are for example LilyGO T-SIM7080G and which are both ESP32-based development boards that QuickSpot Walter include GPS + LTE built-in, but it from a DIY IoT perspective optional expansion modules via a expansion port could be awesome:

Perhaps code a plug-and-play custom component official integration for Home Assistant or HACS (Home Assistant Community Store)?

What is TR pin?

Is TR Termination Resistor? If so, can please document how to use?

[Next-Gen] Look into using ESP32-C6 instead of ESP32-C3 in next-generation hardware?

Suggest looking into if possible to replace ESP32-C3 SoC with ESP32-C6 in next-generation of WiCAN hardware for the future.

https://www.cnx-software.com/2023/01/12/esp32-c6-wifi-6-ble-802-15-4-module-development-board/

https://www.espressif.com/en/products/socs/esp32-c6

https://espressif-docs.readthedocs-hosted.com/projects/espressif-esp-dev-kits/en/latest/esp32c6/esp32-c6-devkitc-1/index.html

https://www.espressif.com.cn/en/news/ESP32-C6_Available?position=0&list=WQQQ-4A66v8oesBoFKp-rNz9bSQ9dg5w7wc_nNvDt_I

Note! The official Espressif ESP-IDF v5.1, which is currently still in development, will include initial support for the new ESP32-C6 chip, however, while Espressif ESP-IDF v5.1 has not yet been released it should mostly work if using the master branch in esp-idf repository. If you want to track the development status then follow these the updates made to these other issues for ESP32-C6:

espressif/esp-idf#10423

espressif/arduino-esp32#7713

espressif/arduino-esp32#7852

espressif/esp-idf#10423

ESP32-C6-WROOM-1 module is already available on Aliexpress at $14.25(US) for a pack of 5 modules (lower price if buy in bulk).

The main reason to use ESP32-C6 instead of ESP32-C3 is that it should be more future proof because it supports more modern interfaces yet it should be backwards compatible while remaining competitive in price so should not raising total cost of the product my much, at least not compared to the added value for that small additional sum.

  • WiFi 6 (802.11ax) capable radio (instead of a radio only capable of 802.11bgn, though still only on the 2.4GHz frequency range) - Fully backward-compatible.
  • Bluetooth 5.3 LE (instead of Bluetooth 4.2 LE) - Bluetooth 5.3 Certified but should be fully backward-compatible.
  • 802.15.4 IoT radio which supports Zigbee and Thread/OpenThread (inc. Matter over Thread) though not at the same time.
  • Dual core? " It consists of a high-performance (HP) 32-bit RISC-V processor, which can be clocked up to 160 MHz, and a low-power (LP) 32-bit RISC-V processor, which can be clocked up to 20 MHz."
  • 512KB SRAM instead of 400KB SRAM (internal RAM)
  • 320KB ROM instead of 384 KB (internal flash storage)?

ESP32-C6-WROOM-1 radio module has ESP32-C6 single-core 32-bit RISC-V clocked up to 160 MHz 320KB ROM, 512KB SRAM, low-power RISC-V core @ up to 20 MHz Wireless – 2.4 GHz WiFi 6, Bluetooth 5.0 LE, 802.15.4 radio for Zigbee 3.0 and Thread. Matter compatible. PCB antenna, 8MB SPI flash.

As an IoT (Internet-of-Things) device it would great if could enable basic capability over Thread via the new Matter standard for IoT:

https://en.wikipedia.org/wiki/Matter_(standard)

Obviously, the initial Matter 1.0 standard is rather limited so mostly just hype now but future versions of the standard do have potential.

https://csa-iot.org/all-solutions/matter/

For example; as of right now version 2.0 of the Matter specification is expected to be published in March or April 2024 so progress is moving relatively fast now in extending the capability to expose new device types (clusters) and more attributes in future versions.

wifi cant get hdcp ip

when ble disconnect , wifi restart. but cant connect it ,seems not hdcp
W (26804) wifi_network: wifi restart
I (26808) config_server_restart: Starting server on port: '80'
I (26816) config_server_restart: Registering URI handlers
I (26823) BLE: advertising start success
I (27766) app_main: free heap : 13952
I (29766) app_main: free heap : 13620
I (31766) app_main: free heap : 13952
I (33766) app_main: free heap : 13952
I (33842) wifi:new:<6,0>, old:<6,0>, ap:<6,0>, sta:<255,255>, prof:6
I (33842) wifi:station: 82:0a:1b:cb:5d:65 join, AID=1, bgn, 20
W (34072) wifi:idx:2 (ifx:1, 82:0a:1b:cb:5d:65), tid:0, ssn:0, winSize:64
W (34984) wifi:idx:3 (ifx:1, 82:0a:1b:cb:5d:65), tid:6, ssn:2, winSize:64

BLE send message crashed at xQueueSend lead to reboot

ESP-ROM:esp32c3-api1-20210207
Build:Feb 7 2021
rst:0x1 (POWERON),boot:0xf (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fcd6100,len:0x182c
load:0x403ce000,len:0xc18
load:0x403d0000,len:0x2d28
entry 0x403ce000
I (30) boot: ESP-IDF HEAD-HASH-NOTFOUND 2nd stage bootloader
I (30) boot: compile time 12:29:30
I (30) boot: chip revision: 3
I (33) qio_mode: Enabling default flash chip QIO
I (38) boot.esp32c3: SPI Speed : 80MHz
I (43) boot.esp32c3: SPI Mode : QIO
I (48) boot.esp32c3: SPI Flash Size : 4MB
I (52) boot: Enabling RNG early entropy source...
I (58) boot: Partition Table:
I (61) boot: ## Label Usage Type ST Offset Length
I (69) boot: 0 nvs WiFi data 01 02 00009000 00004000
I (76) boot: 1 otadata OTA data 01 00 0000d000 00002000
I (84) boot: 2 phy_init RF data 01 01 0000f000 00001000
I (91) boot: 3 ota_0 OTA app 00 10 00010000 001b3000
I (99) boot: 4 ota_1 OTA app 00 11 001d0000 001b3000
I (106) boot: 5 storage Unknown data 01 82 00383000 0004b000
I (114) boot: End of partition table
I (118) esp_image: segment 0: paddr=00010020 vaddr=3c120020 size=42e40h (273984) map
I (165) esp_image: segment 1: paddr=00052e68 vaddr=3fc93200 size=05820h ( 22560) load
I (169) esp_image: segment 2: paddr=00058690 vaddr=40380000 size=07988h ( 31112) load
I (176) esp_image: segment 3: paddr=00060020 vaddr=42000020 size=11b0fch (1159420) map
I (342) esp_image: segment 4: paddr=0017b124 vaddr=40387988 size=0b70ch ( 46860) load
I (350) esp_image: segment 5: paddr=00186838 vaddr=50000010 size=00010h ( 16) load
I (357) boot: Loaded app from partition at offset 0x10000
I (357) boot: Disabling RNG early entropy source...
I (371) cpu_start: Pro cpu up.
I (379) cpu_start: Pro cpu start user code
I (379) cpu_start: cpu freq: 160000000
I (379) cpu_start: Application information:
I (382) cpu_start: Project name: wican-fw_v156_hv300
I (388) cpu_start: App version: v156_hv300
I (393) cpu_start: Compile time: Oct 22 2022 12:35:33
I (399) cpu_start: ELF file SHA256: 4fdc8a3ce349aae4...
I (405) cpu_start: ESP-IDF: HEAD-HASH-NOTFOUND
I (411) heap_init: Initializing. RAM available for dynamic allocation:
I (419) heap_init: At 3FCA2860 len 0001D7A0 (117 KiB): DRAM
I (425) heap_init: At 3FCC0000 len 0001F060 (124 KiB): STACK/DRAM
I (432) heap_init: At 50000020 len 00001FE0 (7 KiB): RTCRAM
I (438) spi_flash: detected chip: generic
I (443) spi_flash: flash io: qio
I (447) sleep: Configure to isolate all GPIO pins in sleep state
I (453) sleep: Enable automatic switching of GPIO sleep configuration
I (460) coexist: coexist rom version 9387209
I (465) cpu_start: Starting scheduler.
I (473) gpio: GPIO[6]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
I (473) gpio: GPIO[7]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
I (483) gpio: GPIO[8]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
I (493) gpio: GPIO[9]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
I (503) config_server_start: Starting webserver
I (513) config_server_init: Initializing SPIFFS
I (523) config_server_init: Partition size: total: 275096, used: 1004
I (523) config_server_init: Opening file
I (523) config_server_init: File size: 706
I (533) config_server_init: config.json: {"wifi_mode":"AP","ap_ch":"6","sta_ssid":"MeatPi","sta_pass":"TomatoSauce","can_datarate":"500K","can_mode":"normal","port_type":"tcp","port":"3333","ap_pass":"@meatpi#","protocol":"slcan","ble_pass":"123456","ble_status":"enable","sleep_status":"disable","sleep_volt":"13.1","batt_alert":"disable","batt_alert_ssid":"MeatPi","batt_alert_pass":"TomatoSauce","batt_alert_volt":"11.0","batt_alert_protocol":"mqtt","batt_alert_url":"mqtt://mqtt.eclipseprojects.io","batt_alert_port":"1883","batt_alert_topic":"CAR1/voltage","batt_alert_time":"1","batt_mqtt_user":"meatpi","batt_mqtt_pass":"meatpi","mqtt_en":"disable","mqtt_url":"mqtt://127.0.0.1","mqtt_port":"1883","mqtt_user":"meatpi","mqtt_pass":"meatpi"}
I (603) config_server_load_cfg: device_config.wifi_mode: AP
I (603) config_server_load_cfg: device_config.ap_ch: 6
I (613) config_server_load_cfg: device_config.sta_ssid: MeatPi
I (613) config_server_load_cfg: device_config.sta_pass: TomatoSauce
I (623) config_server_load_cfg: device_config.can_datarate: 500K
I (633) config_server_load_cfg: device_config.can_mode: normal
I (633) config_server_load_cfg: device_config.port_type: tcp
I (643) config_server_load_cfg: device_config.port: 3333
E (653) config_server_load_cfg: device_config.ap_pass: @meatpi#
E (653) config_server_load_cfg: device_config.protocol: slcan
E (663) config_server_load_cfg: device_config.ble_pass: 123456
E (673) config_server_load_cfg: device_config.sleep_status: disable
E (673) config_server_load_cfg: device_config.ble_status: enable
E (683) config_server_load_cfg: device_config.sleep_volt: 13.1
E (693) config_server_load_cfg: device_config.batt_alert: disable
E (693) config_server_load_cfg: device_config.batt_alert_ssid: MeatPi
E (703) config_server_load_cfg: device_config.batt_alert_pass: TomatoSauce
E (713) config_server_load_cfg: device_config.batt_alert_volt: 11.0
E (713) config_server_load_cfg: device_config.batt_alert_protocol: mqtt
E (723) config_server_load_cfg: device_config.batt_alert_url: mqtt://mqtt.eclipseprojects.io
E (733) config_server_load_cfg: device_config.batt_alert_port: 1883
E (743) config_server_load_cfg: device_config.batt_alert_topic: CAR1/voltage
E (743) config_server_load_cfg: device_config.batt_mqtt_user: meatpi
E (753) config_server_load_cfg: device_config.batt_mqtt_pass: meatpi
E (763) config_server_load_cfg: device_config.batt_alert_time: 1
E (773) config_server_load_cfg: device_config.mqtt_en: disable
E (773) config_server_load_cfg: device_config.mqtt_url: mqtt://127.0.0.1
E (783) config_server_load_cfg: device_config.mqtt_port: 1883
E (793) config_server_load_cfg: device_config.mqtt_user: meatpi
E (793) config_server_load_cfg: device_config.mqtt_pass: meatpi
I (803) config_server_init: Starting server on port: '80'
I (813) config_server_init: Registering URI handlers
I (813) websocket_task: websocket_task started
I (823) system_api: Base MAC address is not set
I (823) system_api: read default base MAC address from EFUSE
I (833) config_server_get_can_rate: device_config.can_datarate:500K
E (833) wifi_network: AP Channel:6
I (843) pp: pp rom version: 9387209
I (843) net80211: net80211 rom version: 9387209
I (863) wifi:wifi driver task: 3fcb9d3c, prio:23, stack:6656, core=0
I (863) wifi:wifi firmware version: eeaa27d
I (863) wifi:wifi certification version: v7.0
I (863) wifi:config NVS flash: enabled
I (873) wifi:config nano formating: disabled
I (873) wifi:Init data frame dynamic rx buffer num: 32
I (873) wifi:Init management frame dynamic rx buffer num: 32
I (883) wifi:Init management short buffer num: 32
I (883) wifi:Init dynamic tx buffer num: 32
I (893) wifi:Init static tx FG buffer num: 2
I (893) wifi:Init static rx buffer size: 1600
I (903) wifi:Init static rx buffer num: 10
I (903) wifi:Init dynamic rx buffer num: 32
I (903) wifi_init: rx ba win: 6
I (913) wifi_init: tcpip mbox: 32
I (913) wifi_init: udp mbox: 6
I (923) wifi_init: tcp mbox: 6
I (923) wifi_init: tcp tx win: 5744
I (923) wifi_init: tcp rx win: 5744
I (933) wifi_init: tcp mss: 1440
I (933) wifi_init: WiFi IRAM OP enabled
I (943) wifi_init: WiFi RX IRAM OP enabled
I (1593) phy_init: phy_version 912,d001756,Jun 2 2022,16:28:07
I (1623) wifi:mode : softAP (a0:76:4e:19:90:2d)
I (1623) wifi:Total power save buffer number: 16
I (1623) wifi:Init max length of beacon: 752/752
I (1623) phy: chan:1,max_power:80
I (1623) phy: chan:2,max_power:80
I (1633) phy: chan:3,max_power:80
I (1633) phy: chan:4,max_power:80
I (1633) phy: chan:5,max_power:80
I (1643) phy: chan:6,max_power:80
I (1643) phy: chan:7,max_power:80
I (1653) phy: chan:8,max_power:80
I (1653) phy: chan:9,max_power:80
I (1653) phy: chan:10,max_power:80
I (1663) phy: chan:11,max_power:80
I (1663) phy: chan:12,max_power:80
I (1673) phy: chan:13,max_power:80
I (1673) phy: chan:14,max_power:80
I (1683) wifi:Init max length of beacon: 752/752
I (1683) wifi_network: WIFI_EVENT_AP_START
I (1683) wifi_network: wifi_init finished.
I (1693) tcp_server_task: Socket created
I (1693) tcp_server_task: Socket bound, port 3333
I (1703) tcp_server_task: Socket listening
W (1703) BLE: ble passkey: 123456
I (1713) BTDM_INIT: BT controller compile version [05195c9]
I (1713) BTDM_INIT: Bluetooth MAC: a0:76:4e:19:90:2e

I (1723) BLE: ble_init init bluetooth
I (1743) BLE: The number handle = 6
I (1753) BLE: advertising start success
I (1753) app_main: Running firmware version: v156_hv300
I (1753) app_main: Project Name: wican-fw_v156_hv300
I (1753) app_main: project_hardware_rev: OBD
Guru Meditation Error: Core 0 panic'ed (Load access fault). Exception was unhandled.

Stack dump detected
Core 0 register dump:
MEPC : 0x4200d3ae RA : 0x4200d394 SP : 0x3fccd6f0 GP : 0x3fc93a00
0x4200d3ae: gatts_profile_event_handler at D:/Project/wican-fw/main/ble.c:504

0x4200d394: gatts_profile_event_handler at D:/Project/wican-fw/main/ble.c:502

TP : 0x3fc8b3b8 T0 : 0x00000009 T1 : 0x3fccd26c T2 : 0xffffffff
S0/FP : 0x3fccd980 S1 : 0x3fc9a8f4 A0 : 0x3fc9a8f8 A1 : 0x3fc9a8f4
A2 : 0xffffffff A3 : 0x00000000 A4 : 0x3fc9a90a A5 : 0x00000000
A6 : 0x3fe00000 A7 : 0x00000001 S2 : 0x3fc9b000 S3 : 0x3fccd980
S4 : 0x00000000 S5 : 0x00000000 S6 : 0x00000000 S7 : 0x00000000
S8 : 0x00000000 S9 : 0x00000000 S10 : 0x00000000 S11 : 0x00000000
T3 : 0x00000000 T4 : 0x0fffffff T5 : 0x00000019 T6 : 0x3fccda5c
MSTATUS : 0x00001881 MTVEC : 0x40380001 MCAUSE : 0x00000005 MTVAL : 0x00000000
0x40380001: _vector_table at ??:?

MHARTID : 0x00000000

Failed to run gdb_panic_server.py script: Command '['riscv32-esp-elf-gdb', '--batch', '-n', 'd:\project\wican-fw\build\wican-fw_v156_hv300.elf', '-ex', 'target remote | "D:\Users\Auto\.espressif\python_env\idf4.4_py3.8_env\Scripts\python.exe" "D:\Users\Auto\esp\esp-idf\tools\idf_monitor_base\..\gdb_panic_server.py" --target esp32c3 "C:\Users\Auto\AppData\Local\Temp\tmp9zhlsecm"', '-ex', 'bt']' returned non-zero exit status 1.
b'D:\Users\Auto\.espressif\tools\riscv32-esp-elf\esp-2021r2-patch3-8.4.0\riscv32-esp-elf\bin\riscv32-esp-elf-gdb.exe: warning: Couldn't determine a path for the index cache directory.\r\nerror starting child process '"D:\Users\Auto\.espressif\python_env\idf4.4_py3.8_env\Scripts\python.exe" "D:\Users\Auto\esp\esp-idf\tools\idf_monitor_base\..\gdb_panic_server.py" --target esp32c3 "C:\Users\Auto\AppData\Local\Temp\tmp9zhlsecm"': CreateProcess: No such file or directory\r\nNo stack.\r\n'

Core 0 register dump:
MEPC : 0x4200d3ae RA : 0x4200d394 SP : 0x3fccd6f0 GP : 0x3fc93a00
TP : 0x3fc8b3b8 T0 : 0x00000009 T1 : 0x3fccd26c T2 : 0xffffffff
S0/FP : 0x3fccd980 S1 : 0x3fc9a8f4 A0 : 0x3fc9a8f8 A1 : 0x3fc9a8f4
A2 : 0xffffffff A3 : 0x00000000 A4 : 0x3fc9a90a A5 : 0x00000000
A6 : 0x3fe00000 A7 : 0x00000001 S2 : 0x3fc9b000 S3 : 0x3fccd980
S4 : 0x00000000 S5 : 0x00000000 S6 : 0x00000000 S7 : 0x00000000
S8 : 0x00000000 S9 : 0x00000000 S10 : 0x00000000 S11 : 0x00000000
T3 : 0x00000000 T4 : 0x0fffffff T5 : 0x00000019 T6 : 0x3fccda5c
MSTATUS : 0x00001881 MTVEC : 0x40380001 MCAUSE : 0x00000005 MTVAL : 0x00000000
MHARTID : 0x00000000

Stack memory:
3fccd6f0: 0x63653938 0x0a336664 0xffffffff 0x00104204 0xa32f9743 0x635f7462 0x6b5f6766 0x00307965
3fccd710: 0x00000000 0xffff01dc 0xff5f3de2 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
3fccd730: 0x00000000 0x00000000 0x00000000 0x3fcd2474 0x3fccd85c 0x3fccd828 0x3fcd262c 0x4038ce4e
3fccd750: 0x00000000 0x00000000 0x3fca352c 0x4038a7fe 0x00000000 0x00000000 0x3fca352c 0x4038adee
3fccd770: 0x00000006 0x3c1544b8 0x00000003 0x00000000 0x3fcbfba8 0x00000006 0x3fca352c 0x4038b3ec
3fccd790: 0x00000004 0xffff0224 0x00000003 0x00000001 0x3c155870 0x3c1544b8 0x00000000 0x40390a26
3fccd7b0: 0x7ffffffc 0xffff0208 0x3fccd857 0x4211ae54 0x3c155870 0x3c1544b8 0x00000003 0x3fccd82c
3fccd7d0: 0x3c155870 0x3c1544b8 0x00000003 0x4211b0fa 0x00000000 0x00000000 0x3fcd19c8 0x3fcbfba8
3fccd7f0: 0x3fcbfba8 0x00000006 0x00000006 0x40390958 0x00000070 0x00000067 0x00000000 0x3fccd82c
3fccd810: 0x3c136da4 0x3c1544b8 0x00000000 0x420a89ee 0x3fcbfc04 0x00000000 0x00000006 0x00001ca5
3fccd830: 0x3c1544b8 0x3fccd848 0x3fe00000 0x00000001 0x3c136da4 0x3c1544b8 0x64203735 0x30372032
3fccd850: 0x20373620 0x64203634 0x00002032 0x00000000 0x3fccd924 0x3fcbfba8 0x00000000 0x00000000
3fccd870: 0x3fccd924 0x3fcbfba8 0x3fca2860 0x403907dc 0x3fccd924 0x3fcbfba8 0x3fcbfba8 0x40380da2
3fccd890: 0x00000000 0x00000000 0x00000001 0x40391224 0x3fccd924 0x3fcbfba8 0x00000000 0x4200ccee
3fccd8b0: 0x00000001 0x0000000d 0x3fccd924 0x00000001 0x3c1544b8 0x00001ca5 0x3fccd924 0x4200ce62
3fccd8d0: 0x6770d257 0x0000d246 0x3fccd8f4 0x4201ec88 0x40385088 0x4038db10 0x3fccd960 0x3fc93a00
3fccd8f0: 0x3fc8b3b8 0x00000009 0x3fccd42c 0xffffffff 0x3fcccaf4 0x00000001 0x00000001 0x00000001
3fccd910: 0x00000006 0x00000004 0x00000001 0x600c0000 0x3fe00000 0x00000001 0x00000001 0x00000000
3fccd930: 0x00000000 0x00000000 0x00000000 0x4038ce4e 0x00000000 0x00000000 0x3fccc8a0 0x4038a7fe
3fccd950: 0x00000002 0x00000003 0x00000000 0x4200cc44 0x00000001 0x00000001 0x3fccc8f8 0x00000000
3fccd970: 0x00000003 0x3fcbf018 0x3fcb4990 0x42022b6a 0x3fcb0000 0x00000001 0x6770d257 0x002ad246
3fccd990: 0x01000000 0x3fcb0012 0x3fca56b6 0x4204f454 0x3fccc868 0x3fcb9eb0 0x3fcbf018 0x4204bf7e
3fccd9b0: 0x3fccc868 0x00000000 0x00000000 0x4204f07a 0x00000000 0x00000000 0x00000000 0x4038da70
3fccd9d0: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5
3fccd9f0: 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0x00000154 0x3fccd8e0 0x000002a1 0x3fc993d4 0x3fc993d4
3fccda10: 0x3fccda00 0x3fc993cc 0x00000006 0x3fcccb20 0x3fcccb20 0x3fccda00 0x00000000 0x00000013
3fccda30: 0x3fcccbfc 0x5f435442 0x4b534154 0x6ed73f00 0x0071ac77 0x00000000 0x3fccd9f0 0x00000013
3fccda50: 0x00000000 0x3fca5124 0x42000260 0x00000000 0x3fca3218 0x3fca3280 0x3fca32e8 0x00000000
3fccda70: 0x00000000 0x00000001 0x00000000 0x00000000 0x00000000 0x4210707e 0x00000000 0x00000000
3fccda90: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
3fccdab0: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
3fccdad0: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000

ELF file SHA256: 4fdc8a3ce349aae4
ELF file SHA256: 4fdc8a3ce349aae4

Rebooting...
ESP-ROM:esp32c3-api1-20210207
Build:Feb 7 2021
rst:0x3 (RTC_SW_SYS_RST),boot:0xf (SPI_FAST_FLASH_BOOT)
Saved PC:0x403806ba
0x403806ba: esp_restart_noos_dig at D:/Users/Auto/esp/esp-idf/components/esp_system/esp_system.c:44 (discriminator 1)

Initital CAN bitrate

I am attempting to use the WICAN to interface with an CAN bus running the rv-c spec. When I plug in the device to my CAN bus, other devices on the bus become unavailable and eventually things on the bus stop communicating. My guess is that this is because the device defaults to the 500K bitrate when it boots and the RV-C standard uses 250K and this mismatch is causing problems on the bus. Is there a way to set a different default bitrate on boot? Is there a reason it is not retaining the previously set rate?

[Suggestion] Create a Discord server

It would be awesome to be able to meet other people using wican to share ideas for i.ex. home assistant node-red flows or other automations, perhaps the community at the end will help create a addon to i.ex. Home Assistant?

Feature request: Openvehicles support

Currently Openvehicles.com maintains information on obd PIDs for a large amount of EVs. This information is used in proprietary apps and their dongle.

Their dongle is overkill and their apps don't allow me to connect to HomeAssistant. Would there be a way to get the vehicles supported in Openvehicles in WiCan?

I would love to buy a WiCan that sends my EVs state of charge to Home Assistant over WiFi

No data using SavvyCAN but ELM327 does work

I have an Audi A3 8Y 2022 and I'm trying to read the CAN bus data.

Yesterday I received my WiCan OBD but I'm having trouble sniffing using savvycan. When I use the ELM327 protocol and connect Car Scanner Android app it can read most of the sensors which tells me the can bus communication actually works. It seems to be at 500000 baudrate.

When I try protocol savvycan and connect from my Linux laptop I simply don't receive any data in the sniffer. In the connection window everything seems alright because I can see serial communication going back and forth.

After googling a bit I found posts about the CAN bus needing a kind of wake up signal. I think savvycan does not do this but Car Scanner Android app seems to do something like that.

I also enabled the monitor in the webui of the WiCan to maybe find the wakeup signal data Car Scanner uses but it's quite difficult to figure out what is what.

Here is some info about the ECUs from Car Scanner.

OBD-II
ECU protocol: 6) ISO 15765-4 CAN (11 bit ID, 500 kbaud)
ECU address/CAN Id: 7E8
ECU name:  _
Calibration ID: 05C
In-use Performance Tracking for spark ignition engines: OBD Monitoring Conditions Encountered Counts: 50505

ECU address/CAN Id: 7E9
Calibration ID: 0CW
In-use Performance Tracking for spark ignition engines: OBD Monitoring Conditions Encountered Counts: 64482

Also in the Car Scanner app settings I found an advanced setting to override the ECU initialization mode. Which default seems to do the following:

ATZ
ATE0
ATH1
ATSP0
ATS0
ATM0
ATAT1

[Suggestion] Support for extra wifi settings

Some of us have wifi in car and in garage / home, it would be a nice feature if one could setup multiple wifi configurations so the wican obd could jump over to the house/garage wifi when the car is home and turned off / the in-car-wifi is off.

WiCAN-USB fails to start WiFi AP until CAN disconnnected

Under certain conditions the WiCAN USB fails to start the WiFI AP during 12v power on, if CAN Hi/Lo are connected

Tested with Firmware v174

  • With AP/Station or AP mode on, MQTT off - WiCAN WiFi AP won't start until CAN Hi/Lo disconnected.
    Upon CAN disconnection, WiFi AP starts immediately.
    image

  • With AP/Station or AP mode on, MQTT on - WiCAN WiFi AP is enabled at power up and functional, regardless of CAN Hi/Lo connection.
    image

WiCAN BLE also pairs when configured, but refuses connections regardless of MQTT, WiFi AP configuration

RC2/RC3 output possible?

First off, my USB WiCAN and the code you wrote is amazing.

I'm trying to see if I can send data to an app "RaceChrono" via Wi-Fi. I think it uses a format called RC2/RC3 but I'm not sure how it could be implemented. Here is an explanation from the app developer: https://racechrono.com/forum/discussion/1380/input-format-rc2-and-rc3-used-by-racedac-and-diy-loggers

Would it be possible to do something like RealDash where you define where the data is in an XML doc or something?

Also, I tried ELM but it's extremely slow compared to the other modes (2000+ vs 40-50).

Suggest engage the Home Assistant community to encurage an integration for WiCAN-OBD2 over WiFi/BLE and other CAN Bus OBD-II/OBD2 adapters

Not exactly an issue, however, I would like to suggest and recommend that you try to engage with the Home Assistant community to encourage a Home Automation "integration" (also referred to as "integration component" and "custom component") for WiCAN-OBD2 over WiFi/BLE and other Wi-Fi/BLE specifically or a generic integration for CAN Bus OBD-II/OBD2 (OBD/EOBD+CANbus) adapters which supports the same APIs and protocols for third-party integrations.

Check out feature request discussion -> https://community.home-assistant.io/t/support-for-can-bus-peak-ixxat-canable-etc/249639/

Home Assistant is an open-source home automation software application and is currently the world's most popular platform for home automation enthusiasts, primarily because it makes it relatively easy for developers to make third-party integrations for it so it, therefore, has more third-party integrations than other home automation framework, and it is also one of the most active Python-based projects on GitHub.

https://en.wikipedia.org/wiki/Home_Assistant

https://github.com/home-assistant/

https://www.home-assistant.io/

Home Assistant community members have requested support for different OBD-II/OBD2 adapters for a long time in order to both use it as a device tracker and/or presence detection of their cars and trucks (when it connects you to your Wi-Fi at home) as well as get data information about things like battery and fuel level status which is useful in home automation use cases like sending status notifications when the car/truck arrive at home or when battery or fuel is low.

See example:

https://developers.home-assistant.io/docs/development_index/

https://developers.home-assistant.io/docs/dev_101_services/

https://developers.home-assistant.io/docs/creating_component_index/

https://www.youtube.com/watch?v=e3VwPb72Bbg

https://www.youtube.com/watch?v=6LHeoUS1R40

https://www.youtube.com/watch?v=_yVzgrGt1ok

Personally, I would love to have a new integration which combine sensors, binary sensors, and device tracker and/or presence detection (person tracking) for knowing vehicles location prioritized if there is developer interest in that:

https://www.home-assistant.io/integrations/device_tracker/

https://www.home-assistant.io/integrations/#presence-detection

https://www.home-assistant.io/integrations/person/

https://www.home-assistant.io/integrations/proximity/

https://www.home-assistant.io/integrations/ping/

https://www.home-assistant.io/integrations/zone/

Filtering CAN Messages for MQTT on the WICAN?

Are there any plans for filtering CAN messages to be sent via MQTT directly on the device?

My use case is just to get the SOC of my BEV while it’s parked and charging in the driveway to use it with a custom PV surplus power charging algorithm based on Home Assistant and ESPHome. Therefore it would be very handy if I could filter the CAN bus frames on the device already to not flood the MQTT server and to keep the receiving end as simple as possible.

Another option would be to - optionally - include the CAN ID in the MQTT topic and then just subscribe to the ones that are of interest. I understand that it takes less resources to put multiple frames in a single message but if you‘re only interested in very specific ones this might be an acceptable trade-off while not having to manage filters on the device.

Thanks for the great product! And buying it also was a really smooth experience - I ordered it last week through Crowd Supply and had a professional looking product delivered to my door step just a few days later without any hassle about paying customs etc.!

Felix

Web interface unstable reachable

I am starting using WiCAN and I have problems to reach the web interface.
Sometimes it is working, sometimes and most of the times not.
This is independent from the OS and the browser I am using.
I tried Windows, Mac, IOS, Safari, Firefox and Chrome.
WiCAN ist configured in AP+Station mode.
WiCAN messages are received via MQTT over the station network..
I already updated to v1.71 via esptool.
What is wrong and what can I do ?

SavvyCAN v213 AP+STA mode == Comm validation failed?

With the following settings on the MeatPi OBD web interface and latest firmware flashed v1.71:

Screenshot 2023-05-20 at 3 04 00 pm

I add a new network connection to SavvyCAN:

Screenshot 2023-05-20 at 3 05 08 pm

It connects, shows some packets flowing and then it stops, here's the output from the "Device Console" on SavvyCAN's "Connection Settings":

~GVRetSerial()
~GVRetSerial()
TCP Connection to a GVRET device
Created TCP Socket
Connecting to GVRET Device!
Connecting to GVRET Device!
Write to serial -> e7 e7 f1 c f1 6 f1 7 f1 1 f1 9 
Write to serial -> e7 e7 f1 c f1 6 f1 7 f1 1 f1 9 
Got data from serial. Len = 3
Got data from serial. Len = 3
Write to serial -> f1 d 
Write to serial -> f1 d 
f1 0c 01 
f1 0c 01 
Got data from serial. Len = 26
Got data from serial. Len = 26
f1 06 00 20 a1 07 00 00 00 00 00 00 f1 07 6a 02 20 00 00 00 f1 01 8b 3e b1 0a 
f1 06 00 20 a1 07 00 00 00 00 00 00 f1 07 6a 02 20 00 00 00 f1 01 8b 3e b1 0a 
Got data from serial. Len = 17
Got data from serial. Len = 17
f1 0d 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
f1 0d 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
Write to serial -> f1 9 
Write to serial -> f1 9 
Write to serial -> f1 9 
Write to serial -> f1 9 
Write to serial -> f1 9 
Write to serial -> f1 9 
Write to serial -> f1 9 
Write to serial -> f1 9 
Write to serial -> f1 9 
Write to serial -> f1 9 
Write to serial -> f1 9 
Write to serial -> f1 9 
Got data from serial. Len = 4
Got data from serial. Len = 4
f1 09 de ad 
f1 09 de ad 
Got data from serial. Len = 20
Got data from serial. Len = 20
f1 09 de ad f1 09 de ad f1 09 de ad f1 09 de ad f1 09 de ad 
f1 09 de ad f1 09 de ad f1 09 de ad f1 09 de ad f1 09 de ad 
Write to serial -> f1 9 
Write to serial -> f1 9 
Got data from serial. Len = 4
Got data from serial. Len = 4
f1 09 de ad 
f1 09 de ad 
Write to serial -> f1 9 
Write to serial -> f1 9 
Got data from serial. Len = 4
Got data from serial. Len = 4
f1 09 de ad 
f1 09 de ad 
Write to serial -> f1 9 
Write to serial -> f1 9 
Got data from serial. Len = 4
Got data from serial. Len = 4
f1 09 de ad 
f1 09 de ad 
Write to serial -> f1 9 
Write to serial -> f1 9 
Got data from serial. Len = 4
Got data from serial. Len = 4
f1 09 de ad 
f1 09 de ad 
Write to serial -> f1 9 
Write to serial -> f1 9 
Write to serial -> f1 9 
Write to serial -> f1 9 
Write to serial -> f1 9 
Write to serial -> f1 9 
Got data from serial. Len = 4
Got data from serial. Len = 4
f1 09 de ad 
f1 09 de ad 
Got data from serial. Len = 8
Got data from serial. Len = 8
f1 09 de ad f1 09 de ad 
f1 09 de ad f1 09 de ad 
Write to serial -> f1 9 
Write to serial -> f1 9 
Write to serial -> f1 9 
Write to serial -> f1 9 
Write to serial -> f1 9 
Write to serial -> f1 9 
Write to serial -> f1 9 
Write to serial -> f1 9 
Write to serial -> f1 9 
Write to serial -> f1 9 
Write to serial -> f1 9 
Write to serial -> f1 9 
Got data from serial. Len = 4
Got data from serial. Len = 4
f1 09 de ad 
f1 09 de ad 
Got data from serial. Len = 20
Got data from serial. Len = 20
f1 09 de ad f1 09 de ad f1 09 de ad f1 09 de ad f1 09 de ad 
f1 09 de ad f1 09 de ad f1 09 de ad f1 09 de ad f1 09 de ad 
Write to serial -> f1 9 
Write to serial -> f1 9 
Got data from serial. Len = 4
Got data from serial. Len = 4
f1 09 de ad 
f1 09 de ad 
Write to serial -> f1 9 
Write to serial -> f1 9 
Got data from serial. Len = 4
Got data from serial. Len = 4
f1 09 de ad 
f1 09 de ad 
Write to serial -> f1 9 
Write to serial -> f1 9 
Got data from serial. Len = 4
Got data from serial. Len = 4
f1 09 de ad 
f1 09 de ad 
Write to serial -> f1 9 
Write to serial -> f1 9 
Got data from serial. Len = 4
Got data from serial. Len = 4
f1 09 de ad 
f1 09 de ad 
Write to serial -> f1 9 
Write to serial -> f1 9 
Write to serial -> f1 9 
Write to serial -> f1 9 
Write to serial -> f1 9 
Write to serial -> f1 9 
Got data from serial. Len = 4
Got data from serial. Len = 4
f1 09 de ad 
f1 09 de ad 
Got data from serial. Len = 8
Got data from serial. Len = 8
f1 09 de ad f1 09 de ad 
f1 09 de ad f1 09 de ad 
Write to serial -> f1 9 
Write to serial -> f1 9 
Got data from serial. Len = 4
Got data from serial. Len = 4
f1 09 de ad 
f1 09 de ad 
Write to serial -> f1 9 
Write to serial -> f1 9 
Write to serial -> f1 9 
Write to serial -> f1 9 
Got data from serial. Len = 4
Got data from serial. Len = 4
f1 09 de ad 
f1 09 de ad 
Got data from serial. Len = 4
Got data from serial. Len = 4
f1 09 de ad 
f1 09 de ad 
Write to serial -> f1 9 
Write to serial -> f1 9 
Got data from serial. Len = 4
Got data from serial. Len = 4
f1 09 de ad 
f1 09 de ad 
Write to serial -> f1 9 
Write to serial -> f1 9 
Write to serial -> f1 9 
Write to serial -> f1 9 
Write to serial -> f1 9 
Write to serial -> f1 9 
Got data from serial. Len = 4
Got data from serial. Len = 4
f1 09 de ad 
f1 09 de ad 
Got data from serial. Len = 8
Got data from serial. Len = 8
f1 09 de ad f1 09 de ad 
f1 09 de ad f1 09 de ad 
Write to serial -> f1 9 
Write to serial -> f1 9 
Got data from serial. Len = 4
Got data from serial. Len = 4
f1 09 de ad 
f1 09 de ad 
Write to serial -> f1 9 
Write to serial -> f1 9 
Got data from serial. Len = 4
Got data from serial. Len = 4
f1 09 de ad 
f1 09 de ad 
Write to serial -> f1 9 
Write to serial -> f1 9 
Got data from serial. Len = 4
Got data from serial. Len = 4
f1 09 de ad 
f1 09 de ad 
Write to serial -> f1 9 
Write to serial -> f1 9 
Got data from serial. Len = 4
Got data from serial. Len = 4
f1 09 de ad 
f1 09 de ad 
Write to serial -> f1 9 
Write to serial -> f1 9 
Write to serial -> f1 9 
Write to serial -> f1 9 
Write to serial -> f1 9 
Write to serial -> f1 9 
Write to serial -> f1 9 
Write to serial -> f1 9 
Write to serial -> f1 9 
Write to serial -> f1 9 
Write to serial -> f1 9 
Write to serial -> f1 9 
Write to serial -> f1 9 
Write to serial -> f1 9 
Write to serial -> f1 9 
Write to serial -> f1 9 
Write to serial -> f1 9 
Write to serial -> f1 9 
Comm validation failed.
Comm validation failed.

I'm based in Melbourne if you want to see it for yourself, happy to drive wherever you might be and show this in person ;)

reboot via webinterface

There is a prompt that reads "reboot after monitoring". Would be great if this is possible from the web interface.

Bluetooth Connectivity with RealDash

Hi I seem to be having a problem with Bluetooth connectivity between my Samsung Galaxy S8 Android device which is running RealDash and the MeatPi OBD2 device v1.80 firmware v3.00 hardware. I am operating in realdash66 mode to access canbus data and not in elm327 mode. It seems to make initial connection, requests the passcode and I can even see a burst of canbus data in the RealDash CAN Monitor then it asks for the passcode again and again and again. Any ideas what might be going on?

Any experience with Nissan Leaf EV?

Has anyone had experience using the MeatPi in a Nissan Leaf?
I''m trying to find a way to get things like Battery SoC into Home Assistant...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.