0xCAFEDECAF / VanBus

Vehicle Area Network (VAN) bus packet reader/writer for ESP8266 and ESP32
MIT License
40 stars 5 forks source link

Wrong Iden #11

Closed Romain-GABET closed 3 months ago

Romain-GABET commented 3 months ago

Hello, I would like to read VAN frames from a COM2000, but when I attempt to read them, I receive strange results. For instance, I uploaded PacketParser.ino to my ESP32 and used an SN65HVD230 transceiver. I connected a USB-MUX-C3VL to send frame ID 450, and, of course, a COM2000 DAV. In the USB-MUX-C3VL software, everything works fine; I can see the status from the COM2000. However, on my ESP32 terminal, the displayed data seems incorrect, and I can't see updates from the COM2000. I'm pretty sure I messed something up, but I can't figure out what.

USB-MUX-C3VL software CaptureMUX

esp32 terminal CaptureESP32

All the data appears to be corrupted, and I expected that all identifiers would be equal to 0x450.

morcibacsi commented 3 months ago

image

Romain-GABET commented 3 months ago

Oh yeah... sorry for bothering you for nothing. I missed that information. Thanks for your reply.

0xCAFEDECAF commented 3 months ago

Thanks @morcibacsi !

@Romain-GABET , I would like to do some testing on the 62.5 kbit/s bus. Do you have a test setup? Or are you tapping a wire from your vehicle? I would be interested in setting up a small test environment, maybe you can give me some hints.

Romain-GABET commented 3 months ago

My ultimate goal is to handle requests solely through the ESP32.

I've got everything set up on my workbench.

Using a DOIT ESP32 DEVKIT V1 connected to a SN65HVD230D, following a similar schematic from your repository.

I've got a COM2000 DAV, but a Delphi version would do the job too. Here's the pinout on the grey connector:

VAN Data: 1 VAN Data\ : 3 GND: 4 +12V: 5, 6

For testing, I'm using a USB-MUX-C3V, which can send and receive Van frames.

If there's anything I missed, feel free to ask.

Considering adding 62.5 kbit/s support on my end. I'll update you if I make any progress.

0xCAFEDECAF commented 3 months ago

Thanks @Romain-GABET ! Will the COMM2000 unit start sending VAN packets even in when not connected to any other equipment (i.e., standalone)?

My test setup for the 125 kbit/s system required at least a head unit and an MFD, like the one shown in this forum post *) (I think the original picture is from @morcibacsi ?)

*) btw, that schematic is wrong: as drawn there, pins 4 and 18 of the MFD socket must be swapped. MFD pin 4 is "VAN data bar" or "/DATA", pin 18 is "VAN data" or "DATA". As is pin 17 btw.

Romain-GABET commented 3 months ago

Oh yeah, I forgot about that. Well, thanks again to @morcibacsi who previously helped me with that. The COM2000 won't send packets on its own; it needs a specific packet sent by the BSI with the ID 450 and a reply in request type of frame. Basically, the BSI only sends the beginning of a packet (SOF, ID, and Command flags), and the COM2000 adds its status in the next 8 bytes. I can find some resources about that if you want.

Romain-GABET commented 3 months ago

So, I assume you can either use a BSI or simulate it with a microcontroller.