Closed cydanil closed 5 months ago
Hello Cyril, Thank you for reporting the issue. This problem appeared with ESP32 3.0.x cores, but this is non sense to pass a null pointer as an IPAddress object. Nevertheless, I prefer this solution:
ber = new IPAddressBER(IPAddress());
It compiles on all the platforms (AVR, ESP32 and STM32). Feel free to test it and if it works well for you, you can create a pull request if you want. Regards, Patrick
I indeed noticed the issue following upgrades of the arduino-esp toolchain to 3+.
I tested that with both ESP32 and STM32 hardware on my test setup, and it works as expected.
I'll create an MR with the change.
Thanks for your time,
Cyril
PR #10 merged. I let you close this issue. Best regards, Patrick
Sweet, thanks @patricklaf !
Hi Patrick,
Thank you for taking the time to develop and maintain this library, it's very useful to me. I'm using it with the Arduino framework and an esp32 (arduino-esp32 v.
3.0.1
).I see that in the latest release,
1.4.0
, you've added support for some remaining BER types, includingTYPE_IPADDRESS
.This kinda breaks compilation as the esp32
IPAddress
constructor expects one ofip_addr_t*
,char*
,uint8_t*
, oruint32_t
, whereasSequenceBER::decode
initializes anIPAddressBER
withnullptr
, resulting in the following error:An easy fix for me is to modify
BER.cpp
, line 422 with something like:ber = new IPAddressBER((uint32_t) 0);
I appreciate that this may not be the target platform, but I'm happy to contribute a solution if you give me some guidance :slightly_smiling_face:
Thanks,
Cyril