envy / esp-knx-ip

A KNX/IP library for the ESP8266 with Arduino
MIT License
135 stars 49 forks source link

Port to ESP32? #83

Open sauvant opened 3 years ago

sauvant commented 3 years ago

Hi,

I am very interested in this project but it would need to run on ESP32s for me. Do you have any plans to port it? Or has anybody done that already?

Thanks and best regards Keith

c-o-m-m-a-n-d-e-r commented 3 years ago

I#m very interessted too ... having some ESP8266 running with this Lib an it works great.

Now i will test some ESP32 Devices with KNX to :-)

EDIT : Ok i saw you don't own a ESP32 .. i will give it a try :-)

c-o-m-m-a-n-d-e-r commented 3 years ago

Please give it a try : https://github.com/c-o-m-m-a-n-d-e-r/esp-knx-ip

This is just a quick try ... first look was ok for me ... will do an PR if everything is fine.

cbovy commented 3 years ago

@c-o-m-m-a-n-d-e-r For me it works on ESP32 (Lolin D32) with your repo. Not sure why 'send_14byte_string' is removed though.

c-o-m-m-a-n-d-e-r commented 3 years ago

i'm also not sure haha ... will take a look why this was removed.

NilsRo commented 3 years ago

If everything fine? Have a ESP32 here and like to connect it to my KNX at home to control a dehumidifier, but your change is still not in the master if I am right?

spacegaier commented 3 years ago

@NilsRo There was never a PR for ESP32 created against this main repo here, so nothing to be merged exists yet.

@c-o-m-m-a-n-d-e-r Do you plan to create one?

c-o-m-m-a-n-d-e-r commented 3 years ago

Yeahr ... totally forgot this ... sorry guys ... will try to check changes and make PR then

mrWheel commented 2 years ago

Is there a chance this great library will be ported to ESP32 in the near future?

With the latest esp32-core I get tons of compiler errors. It looks like the WiFi lib for the esp32 is not compatible with this library.

This is the first error I encounter. is there a solution for this error:

In file included from …/esp-knx-ip.cpp:7:
esp32-knx-ip.h:231:33: error: flexible array member in union
    cemi_addi_t additional_info[];

According to an answer at stackoverflow:

No, unions do not support flexible array members, only structs. C11 6.7.2.1 §18

As a special case, the last element of a structure with more than one named member may have an 
incomplete array type; this is called a flexible array member.
In addition, zero-length arrays is not valid C, that's a gcc non-standard extension. The reason why 
you get this to work is because your compiler, gcc, is configured to compile code for the "non-standard 
GNU language".
jamel-86 commented 9 months ago

I got some errors in the newer versions of Arduino IDE. I have forked a new ESP32 port here: https://github.com/jamel-86/ESP32_KNX_IP_Library

hope someone finds it useful 👍

jamel-86 commented 9 months ago

Is there a chance this great library will be ported to ESP32 in the near future?

With the latest esp32-core I get tons of compiler errors. It looks like the WiFi lib for the esp32 is not compatible with this library.

This is the first error I encounter. is there a solution for this error:

In file included from …/esp-knx-ip.cpp:7: esp32-knx-ip.h:231:33: error: flexible array member in union cemi_addi_t additional_info[]; According to an answer at stackoverflow:

No, unions do not support flexible array members, only structs. C11 6.7.2.1 §18

As a special case, the last element of a structure with more than one named member may have an incomplete array type; this is called a flexible array member. In addition, zero-length arrays is not valid C, that's a gcc non-standard extension. The reason why you get this to work is because your compiler, gcc, is configured to compile code for the "non-standard GNU language".

Try to change:

cemi_addi_t additional_info[];

with:

cemi_addi_t additional_info[i];