esp-knx-ip icon indicating copy to clipboard operation
esp-knx-ip copied to clipboard

Port to ESP32?

Open sauvant opened this issue 4 years ago • 10 comments

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

sauvant avatar Dec 31 '20 07:12 sauvant

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 avatar Jan 11 '21 13:01 c-o-m-m-a-n-d-e-r

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.

c-o-m-m-a-n-d-e-r avatar Jan 11 '21 14:01 c-o-m-m-a-n-d-e-r

@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.

cbovy avatar Jan 26 '21 20:01 cbovy

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

c-o-m-m-a-n-d-e-r avatar Jan 26 '21 21:01 c-o-m-m-a-n-d-e-r

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?

NilsRo avatar Mar 14 '21 16:03 NilsRo

@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?

spacegaier avatar Mar 14 '21 17:03 spacegaier

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

c-o-m-m-a-n-d-e-r avatar Mar 15 '21 08:03 c-o-m-m-a-n-d-e-r

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".

mrWheel avatar Mar 20 '22 17:03 mrWheel

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 avatar Oct 04 '23 13:10 jamel-86

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];

jamel-86 avatar Oct 04 '23 13:10 jamel-86