You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
i am trying to use the PS5 controller via bluetooth with a microcontroller (ESP32) and the Arduino framework. This library offers the possibility to receive and process the input from the controller without problems. The previous version (for the PS4 controller) also offers the functionality to send an output and for example control the RGB LED of the controller. Unfortunately, this function is not adapted in the library for the PS5 controller, so it does not work. Therefore I try to implement this function based on this repository. I have already posted my current status here. My question:
Which algorithm must be used to calculate the CRC32 checksum? I have of course looked at the algorithm in DS_CRC32.cpp. However, when I run it on my ESP32 (32bit), it gives a result that I can't find in this online calculator that I use as a reference. Therefore, my question is how I can check whether the ESP32 calculates the checksum correctly.
I would be very happy if someone can help me further. If there are any uncertainties regarding my question, please bring them to my attention.
The text was updated successfully, but these errors were encountered:
For future reference, using zlib (c package), you don't need anything fancy. Information online is misleading.
If your report doesn't start with the report type seed, you'll need to crc it first.
input report : 0xA1
output report : 0xA2
feature report : 0xA3
Then you simply use zlib crc32 to encode the report (excluding the last 4 bytes which will hold your crc value). You can double check you have it right by reading a feature report, CRCing it, and comparing with the expected crc (last 4 bytes of recieved report).
Example (assuming feature report, which doesn't start with report type) :
constuint8_t seed = 0xA3; // feature reportuint32_t crc = crc32(0, &seed, 1); // report buffer doesn't start with type, preheat manually
crc = crc32(crc, your_buffer, your_buffer_size - 4); // compute plain boring crc// now compare with last 4 bytes of report, it should match
Note, according to zlib doc, you might want to start with a crc32(0L, Z_NULL, 0) value. Not sure it matters, not there yet.
Hi,
i am trying to use the PS5 controller via bluetooth with a microcontroller (ESP32) and the Arduino framework. This library offers the possibility to receive and process the input from the controller without problems. The previous version (for the PS4 controller) also offers the functionality to send an output and for example control the RGB LED of the controller. Unfortunately, this function is not adapted in the library for the PS5 controller, so it does not work. Therefore I try to implement this function based on this repository. I have already posted my current status here.
My question:
Which algorithm must be used to calculate the CRC32 checksum? I have of course looked at the algorithm in DS_CRC32.cpp. However, when I run it on my ESP32 (32bit), it gives a result that I can't find in this online calculator that I use as a reference. Therefore, my question is how I can check whether the ESP32 calculates the checksum correctly.
I would be very happy if someone can help me further. If there are any uncertainties regarding my question, please bring them to my attention.
The text was updated successfully, but these errors were encountered: