vovagorodok / ArduinoBleOTA

Upload firmware over Bluetooth
MIT License
24 stars 8 forks source link

Switch Crc library #9

Closed Pikokosan closed 1 year ago

Pikokosan commented 1 year ago

switched crc library to avoid conflict with other crc libraries that include crc32.

vovagorodok commented 1 year ago

Nice, thanks for contributing! Good idea to change from old library.properties to new library.json

Not sure about changing bakercp/CRC32@^2.0.0 to robtillaart/CRC@^0.3.3. Looks that it less popular and version is lower than 1.0.0 (unstable?). What advanteges of robtillaart/CRC?

I have following plan for BLE OTA:

  1. Release ble_ota_app in Android and iOS stores. For this moment I dont know how to do that for apple store. And if it's possible to release opensource app there for free
  2. After 1. Release ArduinoBleOTA library in PlatformIO with version 1.0.0. And than increase versions
Pikokosan commented 1 year ago

Main advantage to robtillaart/CRC@^0.3.3 is that it's under active devopment the other library's hasn't been updated in 3 years with the last stable release being 5 years ago.

Another is that users code would have the library built in and it support multiple forms of crc. For instance. The firmware I'm working on needs crc16(modbus). I would have to use multipule libraries to get but crc32 and crc16.

vovagorodok commented 1 year ago

Good point. Discussed with @dkwach and decided to marge

vovagorodok commented 1 year ago

Reverted after tests, because of checksum error. I'll recommit it after fix

Pikokosan commented 1 year ago

Looks like the crc from the library defaults as little endian where as the app is big endian. As I don't have a working app I'm unable to confirm. The crc library does have void setReverseOut(bool reverseOut) reverse the bit pattern of CRC (MSB vs LSB).

vovagorodok commented 1 year ago

Are you trying this? : https://github.com/vovagorodok/ble_ota_app/issues/6#issuecomment-1522109151