Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3.0.0 version Migration related issues #8796

Closed
VojtechBartoska opened this issue Oct 23, 2023 · 208 comments
Closed

3.0.0 version Migration related issues #8796

VojtechBartoska opened this issue Oct 23, 2023 · 208 comments
Labels
3.0 migration issue relates to migration from 2.X to 3.X version
Milestone

Comments

@VojtechBartoska
Copy link
Collaborator

VojtechBartoska commented Oct 23, 2023

Hello,

purpose of this issue is to cover problems related to migration from 2.X (at the moment of writing the latest version is 2.0.14) to 3.X version.

💥 If you have any problems, please add comment to this issue. 💥

3.0.0 version introduces breaking changes in those APIs:

  • ADC
  • BLE
  • Hall Sensor
  • I2S
  • LEDC
  • RMT
  • SigmaDelta
  • TIMER
  • UART
  • WiFi

🎉 For more details plese take a look on MIGRATION GUIDE FROM 2.X TO 3.X. 🎉


List of all related issues: (will be updated)

Please take a look on those issue before adding comment to this ticket.

@VojtechBartoska VojtechBartoska added the 3.0 migration issue relates to migration from 2.X to 3.X version label Oct 23, 2023
@VojtechBartoska VojtechBartoska pinned this issue Oct 23, 2023
@VojtechBartoska VojtechBartoska changed the title 3.0.0 version Migration Related issues 3.0.0 version Migration related issues Oct 23, 2023
@TD-er
Copy link
Contributor

TD-er commented Oct 23, 2023

I think this is also related: #8774

@everslick
Copy link
Contributor

everslick commented Oct 27, 2023

The OneWire lib does not compile anymore, because GPIO is not defined.

libs/OneWire/OneWire.h:167:17: error: 'GPIO' was not declared in this scope; did you mean 'PI'?
  167 |         return (GPIO.in >> pin) & 0x1;
      |                 ^~~~
      |                 PI

This can be fixed by including:

#if ESP_ARDUINO_VERSION_MAJOR >= 3
#include <driver/gpio.h>
#include <hal/rtc_io_ll.h>
#else
#include <driver/rtc_io.h>
#endif

And then using the functions:

rtcio_ll_get_level, rtcio_ll_set_level, rtcio_ll_input_enable and rtcio_ll_output_enable

where appropriate.

Real fix is:

#if ESP_ARDUINO_VERSION_MAJOR >= 3
#include <soc/gpio_struct.h>
#else
#include <driver/rtc_io.h>
#endif

@me-no-dev
Copy link
Member

The OneWire lib does not compile anymore, because GPIO is not defined.

Probably needs particular include. Some have changed in IDF5

@everslick
Copy link
Contributor

I have difficulty porting the following code to IDF5. Please look at the line below FIXME! HELP NEEDED!.

error: cannot convert 'wifi_interface_t' to 'esp_netif_t*' {aka 'esp_netif_obj*'}
  esp_netif_get_ip_info(WIFI_IF_AP, &info);

Snippet:

#ifdef ESP32
#ifdef IDF5
  typedef esp_netif_ip_info_t ip_info_t;
#else
  typedef tcpip_adapter_ip_info_t ip_info_t;
#endif
#endif
#ifdef ESP8266
  typedef struct ip_info ip_info_t;
#endif

static ip_info_t ap_ip_info(void) {
  ip_info_t info = { 0 };

#ifdef ESP32
#ifdef IDF5
  // FIXME! HELP NEEDED!
  // esp_netif_get_ip_info(WIFI_IF_AP, &info);
#else // !IDF5
  tcpip_adapter_get_ip_info(TCPIP_ADAPTER_IF_AP, &info);
#endif // !IDF5
#endif // ESP32

#ifdef ESP8266
  wifi_get_ip_info(SOFTAP_IF, &info);
#endif

  return (info);
}

Are wifi_interface_t and esp_netif_t incompatible types or can I just take the address of the former and cast it to the latter?

@lbernstone
Copy link
Contributor

@everslick https://github.com/espressif/esp-idf/blob/v5.1/examples/protocols/http_server/captive_portal/main/dns_server.c#L152

@everslick
Copy link
Contributor

everslick commented Oct 29, 2023

One VERY peculiar thing I just witnessed: Calling yield() in a very tight loop seems to crash with exception 29 (LoadProhibited), while PC points to a few lines above the call to yield() which makes it especially difficult to debug. Luckily I have yield() wrapped in my own system_yield() so I can switch codepaths between versions (and work around the bug). Like:

void system_yield(void) {
#ifdef IDF5
  delay(1);
#else
  yield();
#endif

#ifdef HAVE_WATCHDOG
  watchdog_feed();
#endif
}

When the tight loop, yield() is called in, gets slowed down enough (with e.g. debug prints) it does not crash.

@me-no-dev
Copy link
Member

@everslick I am rewriting/restructuring the whole network stack in order to decouple WiFi from the rest of the network functions. Many things have changed and will be fixed/rewritten to work. Some APIs will change/get deprecated, but it's for the better.

@everslick
Copy link
Contributor

@everslick I am rewriting/restructuring the whole network stack in order to decouple WiFi from the rest of the network functions. Many things have changed and will be fixed/rewritten to work. Some APIs will change/get deprecated, but it's for the better.

Yes, I've seen the issue for it. I'm very much looking forward to it!

While we are at it. One of the things I do not really like about the Arduino API is the omnipresent instantiation of singleton like APIs. We have NO_GLOBAL_INSTANCES for that, but this is not always implemented for all interfaces. In case of WiFi, it is so baked in, that nothing works anymore if the global WiFi object is not there. Maybe, if possible, this is something to consider, when reworking the API.

@me-no-dev
Copy link
Member

WiFi would be able to not be global, but beware a new Network class will be, though it's very light and has only events and dns queries.

@Jason2866
Copy link
Collaborator

Jason2866 commented Oct 31, 2023

@me-no-dev Are you going to implement IPv6 with the rework of the network / wifi part?
Nice to have a working DNS when Ethernet and WiFi is used together in the future;-)

@me-no-dev
Copy link
Member

@Jason2866 IPv6 is planned for 3.0.0/1 it's coming for sure :)

@kapyaar
Copy link

kapyaar commented Jan 2, 2024

Not sure if this belongs here, w5500+ETH using latest git version, installed manually on windows 11. Running Example ETH_W5500_Arduino_SPI. I have two boards, very possible they have two different versions of W5500. One works fine, but one gives the following very randomly.

E (127) w5500.mac: W5500 version mismatched, expected 0x04, got 0xfe
E (128) w5500.mac: emac_w5500_init(795): vefiry chip ID failed
E (128) esp_eth: esp_eth_driver_install(228): init mac failed
E (3033) w5500.mac: w5500_send_command(204): send command timeout
E (3033) w5500.mac: emac_w5500_receive(675): issue RECV command failed
E (3034) w5500.mac: frame read from module failed
E (4139) w5500.mac: w5500_send_command(204): send command timeout
E (4139) w5500.mac: emac_w5500_receive(675): issue RECV command failed
E (4140) w5500.mac: frame read from module failed
Guru Meditation Error: Core  0 panic'ed (InstrFetchProhibited). Exception was unhandled.

Core  0 register dump:
PC      : 0x00380038  PS      : 0x00060930  A0      : 0x00000000  A1      : 0x3ffb5140  
A2      : 0x3ffb4960  A3      : 0x00380038  A4      : 0x40110378  A5      : 0x3ffb5ac4  
A6      : 0x000005f2  A7      : 0x00000000  A8      : 0x80110778  A9      : 0x3ffb5100  
A10     : 0x3ffb59d0  A11     : 0x3ffb5ac4  A12     : 0x0000fffc  A13     : 0x0000fffc  
A14     : 0x00000000  A15     : 0x00000000  SAR     : 0x0000001c  EXCCAUSE: 0x00000014  
EXCVADDR: 0x00380038  LBEG    : 0x40089948  LEND    : 0x4008995e  LCOUNT  : 0xffffffff  

Backtrace: 0x00380035:0x3ffb5140
ELF file SHA256: 2dd9d9d7fcebe907

Rebooting...
ets Jun  8 2016 00:22:57

If I repower the board, Sometimes it starts working. Other times, it may give a different set of error messages, like this one.

rst:0xc (SW_CPU_RESET),boot:0x17 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0030,len:1256
load:0x40078000,len:13832
load:0x40080400,len:4
load:0x40080404,len:3048
entry 0x40080590
E (127) w5500.mac: w5500_reset(302): reset timeout
E (128) w5500.mac: emac_w5500_init(793): reset w5500 failed
E (128) esp_eth: esp_eth_driver_install(228): init mac failed
E (3033) w5500.mac: w5500_send_command(204): send command timeout
E (3033) w5500.mac: emac_w5500_receive(675): issue RECV command failed
E (3034) w5500.mac: frame read from module failed
E (4139) w5500.mac: w5500_send_command(204): send command timeout
E (4139) w5500.mac: emac_w5500_receive(675): issue RECV command failed
E (4140) w5500.mac: frame read from module failed
Guru Meditation Error: Core  0 panic'ed (InstrFetchProhibited). Exception was unhandled.

Core  0 register dump:
PC      : 0x00380038  PS      : 0x00060930  A0      : 0x00000000  A1      : 0x3ffb5140  
A2      : 0x3ffb4960  A3      : 0x00380038  A4      : 0x40110378  A5      : 0x3ffb5ac4  
A6      : 0x000005f2  A7      : 0x00000000  A8      : 0x80110778  A9      : 0x3ffb5100  
A10     : 0x3ffb59d0  A11     : 0x3ffb5ac4  A12     : 0x0000fffd  A13     : 0x0000fffd  
A14     : 0x00000000  A15     : 0x00000000  SAR     : 0x0000001c  EXCCAUSE: 0x00000014  
EXCVADDR: 0x00380038  LBEG    : 0x40089948  LEND    : 0x4008995e  LCOUNT  : 0xffffffff  

Backtrace: 0x00380035:0x3ffb5140
ELF file SHA256: 2dd9d9d7fcebe907

Rebooting...
ets Jun  8 2016 00:22:57

And when it works, it connects and works fine, goes like this.

ETH Started
ETH Connected
ETH Got IP: 'eth0'
eth0: <UP,100M,FULL_DUPLEX,AUTO>
      ether 36:AB:95:6B:07:90 phy 0x1
      inet 192.168.2.30 netmask 255.255.255.0 broadcast 192.168.2.255
      gateway 192.168.2.1 dns 192.168.2.1

1
connecting to arduino.tips
HTTP/1.1 200 OK
Date: Tue, 02 Jan 2024 18:41:16 GMT....

And the rest of the contents are printed from /asciilogo.txt. I use wificlientsecure to do https.

Does espressif/esp-idf#11331 has any bearing on this?

@me-no-dev
Copy link
Member

@kostaond could you please comment on @kapyaar issue? Here the "bad" version is 0xFE

@kostaond
Copy link

kostaond commented Jan 4, 2024

@kapyaar how is the W5500 to the ESP32? Is it custom board or is it connected via wires? It seems to me like some SPI connection issue. You can also try to decrease SPI CLK frequency to see if it helps.

@kapyaar
Copy link

kapyaar commented Jan 5, 2024

@kostaond @me-no-dev Board is good, it is an assembled pcb, but the issue is totally on our side. This ETH section is part of a larger board, and the new version had a few additional SPI chips, CS of one of those chips was floating, likely responding to requests meant for W5500. Took me a while to think outside my section of the board, Fixed that part, and the ETH part works consistently. Really sorry. I have an ETH question, but unrelated to this. To keep this thread clean, let me know if you want me to delete my post and comment, I will be happy to do that.

@kostaond
Copy link

kostaond commented Jan 5, 2024

@kapyaar if you have Ethernet related question, please ask at forum.

@TD-er
Copy link
Contributor

TD-er commented Jan 5, 2024

@kapyaar
One tip for designing your board with Ethernet.
Please include a ferrite bead in the power line to the ETH power and make sure you only have a single point where GND of Ethernet and the rest is connected.
In my own designs I used a beefy 0 Ohm resistor (0805 or 1206) to connect both grounds.

You can have a look at the schematics provided by Olimex to get inspiration on how to implement the power nets when using Ethernet.
N.B. this is regardless of the used Ethernet chip as this is just typical for all Ethernet modules/chips.

@TD-er
Copy link
Contributor

TD-er commented Jan 6, 2024

Found another issue, where the DHCP service doesn't seem to work when starting softAP.
See: #9069

@everslick
Copy link
Contributor

everslick commented Jan 6, 2024

I2C HAL fails to compile if HAL LOCKS are disabled. this has been fixed.
See: #9073

@luc-github
Copy link
Contributor

luc-github commented Feb 18, 2024

Hello in latest git / 3.0.0 alpha I cannot find the API equivalent API of

/**
 * @brief Compatible version of former tcpip_adapter API of esp_netif_get_sta_list
*/
esp_err_t tcpip_adapter_get_sta_list(const wifi_sta_list_t *wifi_sta_list, tcpip_adapter_sta_list_t *tcpip_sta_list);

to get IP of connected clients

It seems now a component in IDF :
https://github.com/espressif/esp-idf/blob/release/v5.1/components/esp_wifi/include/esp_wifi_ap_get_sta_list.h

But cannot find it in latest arduino-esp32 git

Will this API be ported / available in esp32-arduino for final 3.0.0 ?

@me-no-dev
Copy link
Member

@luc-github no. IDF 5.x has many changes since 4.x. There should be something else that would work the same way though

@luc-github
Copy link
Contributor

so you mean esp_err_t esp_wifi_ap_get_sta_list_with_ip(const wifi_sta_list_t *wifi_sta_list, wifi_sta_mac_ip_list_t *wifi_sta_ip_mac_list); I linked ?
but I cannot find it in latest git, so it is may be a miss ?

@VojtechBartoska VojtechBartoska added this to the 3.0.0 milestone Feb 20, 2024
@Jason2866
Copy link
Collaborator

@Benik3 Arduino is not IDF. Why should there be an Arduino API for?

@Benik3
Copy link

Benik3 commented Jun 2, 2024

The old Arduino library has available the "tcpip_adapter_get_sta_list", so there is now no available replacement in the new Arduino API.

Or is there any way how to get MAC address of a connected client in the Arduino API 3.0.0 or another way to detect if the client was already connected or it is a new one?
I used the MAC address of a client to make a list of connected devices for which I have buffers of data. When the client disconnect and reconnect, I use the MAC to check, if the station was already connected and I can continue with sending of data from the buffer without any data lost (even when an IP of the client changes between re-connection).

Example:

bool getMacByIp(uint32_t ip, uint8_t mac[6])
{
    wifi_sta_list_t stationList;
    esp_wifi_ap_get_sta_list(&stationList);

    tcpip_adapter_sta_list_t adapter_sta_list;
    tcpip_adapter_get_sta_list(&stationList, &adapter_sta_list);

    for (int i = 0; i < adapter_sta_list.num; i++)
    {
        tcpip_adapter_sta_info_t station = adapter_sta_list.sta[i];

        if (station.ip.addr == ip)
        {
            memcpy(mac, station.mac, 6);
            return true;
        }
    }

    return false;
}

// in loop
if (server.hasClient())
        {

            bool accepted = false;

            WiFiClient client = server.accept();
            uint8_t mac[6];
            getMacByIp(client.remoteIP(), mac);

            for (byte i = 0; i < WIFI_CLIENTS_NUM; i++)
            {
                if (memcmp(TCPClient[i].mac, mac, 6) == 0)
                {
                    // this client was already connected
                    if (TCPClient[i].client)
                        TCPClient[i].client.stop();
                    TCPClient[i].client = client;

                    debug.printf("Client #%d reconnected\n", i);
                    accepted = true;
                    break;
                }
            }

// ... if not accepted it's new client...

@me-no-dev
Copy link
Member

you could also listen to the events and get all your needed info from there

@VojtechBartoska
Copy link
Collaborator Author

Hello everyone,

as 3.0.0-stable version was released I will close this ticket for tracking migration issues.

It contains already 189 comments and it will be hard to go through and find here relevant information.

Closed issue will be pinned at the top of issue tracker for reference for some time.

If you do face any problems with 3.0.0 version, please open a new ticket, it is easier for us to track it and also to replicate those problems as we receive more information if you fill issue report template.

Thanks for understanding and also your contribution in this ticket!

@wangxiangwangeuse
Copy link

gpio_deep_sleep_hold_en(),gpio_hold_en(),he substitution of these two functions.

@tuanvu251191
Copy link

Hi everyone,
I have a problem need to help. Before I used the library ESP32_PxMatrixpanel normal however I can't use it now because when I complie the IDE anount error. I don't know this error so hope guys help me fix it
Thank very much!
#include <Adafruit_GFX.h> // Core graphics library
#include <P3RGB64x32MatrixPanel.h>
//#include <PxMatrix.h>
#include <Fonts/FreeSans9pt7b.h>
#include <esp32-hal-timer.h>
/////////////////////////////////////////
//+---------+ Panel - ESP32 pins
//| R1 G1 | R1 - IO25 G1 - IO26
//| B1 GND | B1 - IO27 GND - GND
//| R2 G2 | R2 - IO21 G2 - IO22
//| B2 GND | B2 - IO23 GND - GND
//| A B | A - IO12 B - IO16
//| C D | C - IO17 D - IO18
//| CLK LAT | CLK - IO15 LAT - IO32
//| OE GND | OE - IO33 GND - GND
//+---------+
//neu muon thay doi chan ket noi matrix
P3RGB64x32MatrixPanel matrix(25, 26, 27, 21, 22, 23, 15, 32, 33, 12, 16, 17, 18);
//P3RGB64x32MatrixPanel matrix(25, 26, 27, 21, 22, 23, 15, 32, 33, 12, 13, 14, 18);
/// khai bao cac bien cua chuong tring nhanvaxulydulieu////

String inputString = ""; // a String to hold incoming data
bool stringComplete = false; // whether the string is complete
float dulieu1, dulieu2;
int Number = 0, Number2 = 0;

// constructor with default pin wiring
//P3RGB64x32MatrixPanel matrix;
const char* str = "C";
const char* str1 = "N: ";
////////////////
/*float Nhietdo, Nhietdo2;
int Number=0, Number2=0 ;
*/

/*void nhandulieu()
{
if (Serial.available()) {
Nhietdo = Serial.parseFloat();
if(Nhietdo==0){
// do not anything
}
else{
Serial.print(" Nhiet Do : ");
Serial.println(Nhietdo,1);
Nhietdo2=Nhietdo;
Serial.print("N : ");
Number = Number + 1;
Serial.println(Number);
Number2=Number;
}
}
}
*/
//----------------------------------------------------///

void xulydulieu(String inputString) {
/*
buoc 1 tim vi tri chuoi can lay
buoc 2 cat chuoi
buoc 3 gan bien
*/
int Timy, Timw, Timh = -1;
Timy = inputString.indexOf("T body");
Timw = inputString.indexOf(" C, weak low");
Timh = inputString.indexOf(", weak high");

if (Timy >= 0 && Timw >= 0) {
String Dulieunhietdolow = "";
Dulieunhietdolow = inputString.substring(Timy + 9, Timw);
dulieu1 = Dulieunhietdolow.toFloat();

Serial.print("Nhiet do binh thuong: ");
Serial.println(dulieu1, 1);
Serial.print("N : ");
Number = Number + 1;
Serial.println(Number);
Number2 = Number;

} else if (Timy >= 0 && Timh >= 0) {
String Dulieunhietdohigh = "";
Dulieunhietdohigh = inputString.substring(Timy + 9, Timh);
dulieu1 = Dulieunhietdohigh.toFloat();

Serial.print("Nhiet do qua cao: ");
Serial.println(dulieu1, 1);
Serial.print("N : ");
Number = Number + 1;
Serial.println(Number);
Number2 = Number;

}
}
void nhanvaxuDulieu() {
while (Serial2.available()) {

char inChar = (char)Serial2.read();

inputString += inChar;

if (inChar == '\n') {
  stringComplete = true;
}
if (stringComplete) {

  xulydulieu(String(inputString));
  inputString = "";
  stringComplete = false;
}

}
}

//---------------------------------------------------///
void HienThiNhiet(float dulieu1, float dulieu2) {
if (dulieu1 < 37.5) {
matrix.setCursor(5, 8);
matrix.setFont(&FreeSans9pt7b);
matrix.setTextColor(matrix.color444(0, 15, 0));
matrix.print(dulieu1, 1);
matrix.setFont();
} else {
matrix.setCursor(5, 8);
matrix.setFont(&FreeSans9pt7b);
matrix.setTextColor(matrix.color444(15, 0, 0));
matrix.print(dulieu1, 1);
matrix.setFont();
}
}

void Songuoi(int Number2) {

matrix.setCursor(22, 23);
matrix.setFont(&FreeSans9pt7b);
matrix.setTextColor(matrix.color444(15, 15, 15));
matrix.print(Number2);
matrix.setFont();
}

void hienthi1() {

matrix.setCursor(47, 8);
matrix.setFont(&FreeSans9pt7b);
matrix.setTextColor(matrix.color444(0, 15, 0));
matrix.print(str);
matrix.setFont();
}
////////////////////////////
void hienthi2() {

matrix.setCursor(5, 23);
matrix.setFont(&FreeSans9pt7b);
matrix.setTextColor(matrix.color444(15, 15, 15));
matrix.print(str1);
matrix.setFont();
}

void setup() {

Serial2.begin(115200);
Serial.begin(115200);
matrix.begin();

matrix.drawRect(0, 0, matrix.width(), matrix.height(), matrix.color444(0, 15, 0));
delay(500);
hienthi1();
hienthi2();

}

void loop() {
//matrix.setTextWrap(false); // Don't wrap at end of line - will do ourselves
matrix.drawRect(0, 0, matrix.width(), matrix.height(), matrix.color444(0, 15, 0));
nhanvaxuDulieu();
hienthi1();
matrix.drawCircle(45, 4, 2, matrix.color444(0, 15, 0));
hienthi2();
HienThiNhiet(float(dulieu1), float(dulieu2));
Songuoi(Number2);
hienthi1();
hienthi2();
matrix.fillScreen(0);
matrix.drawRect(0, 0, matrix.width(), matrix.height(), matrix.color444(0, 15, 0));
hienthi1();
matrix.drawCircle(45, 4, 2, matrix.color444(0, 15, 0));
hienthi2();
nhanvaxuDulieu();
hienthi1();
matrix.drawCircle(45, 4, 2, matrix.color444(0, 15, 0));
hienthi2();
HienThiNhiet(float(dulieu1), float(dulieu2));
Songuoi(Number2);
}

@tuanvu251191
Copy link

This is error :
c:\Users\home\Documents\Arduino\libraries\P3_64x32_RGB_Matrix_Panel\P3RGB64x32MatrixPanel.cpp: In member function 'void P3RGB64x32MatrixPanel::begin()':
c:\Users\home\Documents\Arduino\libraries\P3_64x32_RGB_Matrix_Panel\P3RGB64x32MatrixPanel.cpp:40:21: error: too many arguments to function 'hw_timer_t* timerBegin(uint32_t)'
40 | timer = timerBegin(0, 80, true);
| ~~~~~~~~~~^~~~~~~~~~~~~
In file included from C:\Users\home\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.2\cores\esp32/esp32-hal.h:84,
from C:\Users\home\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.2\cores\esp32/Arduino.h:36,
from c:\Users\home\Documents\Arduino\libraries\Adafruit_GFX_Library/Adafruit_GFX.h:5,
from c:\Users\home\Documents\Arduino\libraries\P3_64x32_RGB_Matrix_Panel\P3RGB64x32MatrixPanel.h:6,
from c:\Users\home\Documents\Arduino\libraries\P3_64x32_RGB_Matrix_Panel\P3RGB64x32MatrixPanel.cpp:1:
C:\Users\home\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.2\cores\esp32/esp32-hal-timer.h:35:13: note: declared here
35 | hw_timer_t timerBegin(uint32_t frequency);
| ^~~~~~~~~~
c:\Users\home\Documents\Arduino\libraries\P3_64x32_RGB_Matrix_Panel\P3RGB64x32MatrixPanel.cpp:41:23: error: too many arguments to function 'void timerAttachInterrupt(hw_timer_t
, void (*)())'
41 | timerAttachInterrupt(timer, &onTimer, true);
| ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
C:\Users\home\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.2\cores\esp32/esp32-hal-timer.h:50:6: note: declared here
50 | void timerAttachInterrupt(hw_timer_t *timer, void (*userFunc)(void));
| ^~~~~~~~~~~~~~~~~~~~
c:\Users\home\Documents\Arduino\libraries\P3_64x32_RGB_Matrix_Panel\P3RGB64x32MatrixPanel.cpp:42:3: error: 'timerAlarmWrite' was not declared in this scope; did you mean 'timerWrite'?
42 | timerAlarmWrite(timer, 30, true);
| ^~~~~~~~~~~~~~~
| timerWrite
c:\Users\home\Documents\Arduino\libraries\P3_64x32_RGB_Matrix_Panel\P3RGB64x32MatrixPanel.cpp:43:3: error: 'timerAlarmEnable' was not declared in this scope; did you mean 'timerAlarm'?
43 | timerAlarmEnable(timer);
| ^~~~~~~~~~~~~~~~
| timerAlarm

exit status 1

Compilation error: exit status 1

@me-no-dev
Copy link
Member

@tuanvu251191 the library needs to be updated to support v3. It is using the old Timer API

@tuanvu251191
Copy link

@tuanvu251191 the library needs to be updated to support v3. It is using the old Timer API

Thank you very much,
I had got it. The cause is version 1.0.6 for the DOIT ESP32 DEV before. I used it too old so when I update the library and new boards it had got a that problem. I did fix it areadly and It actioned again.

@tuanvu251191
Copy link

@tuanvu251191 the library needs to be updated to support v3. It is using the old Timer API

I don't use Timer API. I just intalled the library P3RGBMatrixPanel to use.

@sblantipodi
Copy link
Contributor

Core 3.0 completely ruined the excellent NeoPixelBus library.
You deleted most of the APIs used in the library, is this wise?
I think no.

@s-hadinger
Copy link
Contributor

@sblantipodi We have made some of the required changes in Tasmota to still use NeoPixelBus library with Core3.

@me-no-dev
Copy link
Member

Core 3.0 completely ruined the excellent NeoPixelBus library.

Changes were driven by the changes in ESP-IDF API. We could not keep the old API anymore and the new one makes more sense anyway.

@Jason2866
Copy link
Collaborator

@sblantipodi No one forces you to use espressif32 Arduino core 3.0.x.
Thats how software development works, major version number changes has major changes ;-)
To be clear Arduino core 3.0.x is the most reliable of all released cores!

@sblantipodi
Copy link
Contributor

@s-hadinger did you created a pull request to the original branch for this?
If no, why?

@Jason2866
Copy link
Collaborator

@sblantipodi No PR, since we use a older version which is not compatible to the actual upstream version. We don't plan to use the newer upstream version in Tasmota since the changes done there are not needed in project Tasmota. Feel free to port the changes to the actual version and provide a PR.

@Makuna
Copy link

Makuna commented Jul 11, 2024

If someone made changes to a cloned NeoPixelBus to support v3, why are these changes not being merged back to NeoPixelBus?

@sblantipodi
Copy link
Contributor

sblantipodi commented Jul 11, 2024

@Jason2866
I would like to share my disappointment on how the Tasmota team behave with other projects.
Tasmota is a well known piece of software that made hundreds if not thousands of contributions to the open source ecosystem and many many people should thanks Tasmota for this but...
... there are even a lot of contributions that aren't merged back in the upstream repos...
Tasmota creates a fork of something, it fixes/add something to that fork, and then it continue using this fork without creating pull requests.
I have seen this behaviour with many projects and this is not really fair in my opinion, at least, it's not how the open source software development works ;)

You don't even informed the author of NeoPixelBus about this, and that should be the least in my opinion.

Nothing personal, I have a lot of respect for the Tasmota project and for Jason8266 but I just wanted to share my two cents on this.

@s-hadinger
Copy link
Contributor

This is vastly inaccurate. We are contributing back to many upstream projects like Arduino, LVGL, Berry, IRRemoteESP8266...

What is true though, is that for the sake of speed, we often apply the changes into our fork first, and send changes upstream later. This is especially true when this is blocking Tasmota from supporting new versions or new chips.

NeoPixelBus is an exception for the reasons exposed by Jason. We use a tiny portion of NeoPixelBus and don't plan to catch up with versions. We also got feedback from the maintainers of NeoPixelBus that support for Core3 was not a priority for them.

I was just sharing that we have updated code, but not the resources to backport the changes to the latest version. Feel free to do the backport yourself.

@Jason2866
Copy link
Collaborator

Jason2866 commented Jul 11, 2024

@sblantipodi As said the changes made are not compatible to the current version. The implementation needs an old version of NeopixelBus. Sorry we don't have the resources to do the changes needed for the actual version.

I would like to share my disappointment on how the Tasmota team behave with other projects.

Wow! I think you wrote this having a bad day. You should better look where the few people of Tasmota made PRs. Aren't you using my fork of WebFlasher?

Are you using Platformio? Well many PRs here and in Platformio repo are from me.
Have you ever provided a PR in a other OpenSource project?
To say it clear, you should better inform you before writing such a sentence.

@sblantipodi
Copy link
Contributor

sblantipodi commented Jul 11, 2024

Wow! I think you wrote this having a bad day. You should better look where the few people of Tasmota made PRs. Aren't you using my fork of WebFlasher?

doesn't this confirm what I said previously?
your fork of WebFlasher 😅

Are you using Platformio? Well many PRs here and in Platformio repo are from me.

that's why I made a disclaimer, Tasmota is well known to be very active and useful in this ecosystem, never said the opposite, but sometimes you can improve on this. Like sharing your work with the author of other libs you use for example.
Just saying, hey, you know, we made this, is it useful for you?

Jason I'm in no position to teach you anything, if that's okay with you, that's fine.
As I told you, don't take it personally, I have a lot of respect for you and for your work.

@Jason2866
Copy link
Collaborator

You make assumptions. If you would do more PRs to OpenSource projects you would know some PRs do not fit in upstream (for whatever reasons).
My fork of WebFlasher is there because a PR will not be merged. I have talked about the owner of the orig. repo about.
That's the beauty of Open Source you can change to your needs.
Every fork I made which has changes worth a PR, I did a PR or contacted the author if interested in a PR. Once again you made (wrong) assumptions.

@VojtechBartoska VojtechBartoska unpinned this issue Sep 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.0 migration issue relates to migration from 2.X to 3.X version
Projects
Development

No branches or pull requests