• Skip to main content
  • Skip to primary sidebar

RNTLab.com

The Ultimate Shortcut to Learn Electronics and Programming with Open Source Hardware and Software

  • Courses
  • Forum
    • Forum
    • Ask Question
  • Shop
  • Account
  • Blog
  • Login

AsyncTCP on MacBook Pro M1 chip

Q&A Forum › Category: ESP32 › AsyncTCP on MacBook Pro M1 chip
0 Vote Up Vote Down
Daniele Gozzi asked 4 years ago

Hi Rui,
I am using the new MacBook Pro with M1 chip because my old one with Intel CPU died. All my sketches containing the AsyncTCP library in the code cannot be compiled but in the old MacBook no problem was never found.
You have to consider that this occurs only for this library. The problem persists even having reinstalled all the libraries in the Arduino library folder.
I repeated test on a loan Intel Mac running the same code and all was OK. No problem also with other codes (without AsyncTCP library) running on my M1 chip Mac. 

I hope you have direct information related to problems connected to M1 cheap or, may be, it is not responsible and some other strange mistakes occur.

Just to have a look at the kind of errors returned when I try compiling the code.

I thank you for your continuous work in showing new projects. I am grateful to you for my progress on Arduino projects even if my knowledge in the field is still poor.

Regards

Daniele

The errors list:
Arduino: 1.8.13 (Mac OS X), Board: “DOIT ESP32 DEVKIT V1, 80MHz, 115200, None”
/Users/danielegozzi/Documents/Arduino/libraries/AsyncTCP-master/src/AsyncTCP.cpp: In function ‘void _handle_async_event(lwip_event_packet_t*)’:
/Users/danielegozzi/Documents/Arduino/libraries/AsyncTCP-master/src/AsyncTCP.cpp:183:68: error: no matching function for call to ‘AsyncClient::_s_dns_found(const char*&, ip_addr_t*, void*&)’
AsyncClient::_s_dns_found(e->dns.name, &e->dns.addr, e->arg);
^
In file included from /Users/danielegozzi/Documents/Arduino/libraries/AsyncTCP-master/src/AsyncTCP.cpp:24:0:
/Users/danielegozzi/Documents/Arduino/libraries/AsyncTCP-master/src/AsyncTCP.h:137:17: note: candidate: static void AsyncClient::_s_dns_found(const char*, ip_addr*, void*)
static void _s_dns_found(const char *name, struct ip_addr *ipaddr, void *arg);
^
/Users/danielegozzi/Documents/Arduino/libraries/AsyncTCP-master/src/AsyncTCP.h:137:17: note: no known conversion for argument 2 from ‘ip_addr_t* {aka _ip_addr*}’ to ‘ip_addr*’
/Users/danielegozzi/Documents/Arduino/libraries/AsyncTCP-master/src/AsyncTCP.cpp: In function ‘bool _start_async_task()’:
/Users/danielegozzi/Documents/Arduino/libraries/AsyncTCP-master/src/AsyncTCP.cpp:221:141: error: ‘xTaskCreateUniversal’ was not declared in this scope
xTaskCreateUniversal(_async_service_task, “async_tcp”, 8192 * 2, NULL, 3, &_async_service_task_handle, CONFIG_ASYNC_TCP_RUNNING_CORE);
^
/Users/danielegozzi/Documents/Arduino/libraries/AsyncTCP-master/src/AsyncTCP.cpp: In function ‘void _tcp_dns_found(const char*, ip_addr*, void*)’:
/Users/danielegozzi/Documents/Arduino/libraries/AsyncTCP-master/src/AsyncTCP.cpp:322:59: error: invalid application of ‘sizeof’ to incomplete type ‘ip_addr’
memcpy(&e->dns.addr, ipaddr, sizeof(struct ip_addr));
^
/Users/danielegozzi/Documents/Arduino/libraries/AsyncTCP-master/src/AsyncTCP.cpp: At global scope:
/Users/danielegozzi/Documents/Arduino/libraries/AsyncTCP-master/src/AsyncTCP.cpp:350:32: error: field ‘call’ has incomplete type ‘tcpip_api_call_data’
struct tcpip_api_call_data call;
^
/Users/danielegozzi/Documents/Arduino/libraries/AsyncTCP-master/src/AsyncTCP.cpp:350:12: note: forward declaration of ‘struct tcpip_api_call_data’
struct tcpip_api_call_data call;
^
/Users/danielegozzi/Documents/Arduino/libraries/AsyncTCP-master/src/AsyncTCP.cpp: In function ‘esp_err_t _tcp_output(tcp_pcb*, int8_t)’:
/Users/danielegozzi/Documents/Arduino/libraries/AsyncTCP-master/src/AsyncTCP.cpp:390:70: error: invalid conversion from ‘err_t (*)(tcpip_api_call_data*) {aka signed char (*)(tcpip_api_call_data*)}’ to ‘tcpip_api_call_fn {aka signed char (*)(tcpip_api_call*)}’ [-fpermissive]
tcpip_api_call(_tcp_output_api, (struct tcpip_api_call_data*)&msg);
^
/Users/danielegozzi/Documents/Arduino/libraries/AsyncTCP-master/src/AsyncTCP.cpp:390:70: error: cannot convert ‘tcpip_api_call_data*’ to ‘tcpip_api_call*’ for argument ‘2’ to ‘err_t tcpip_api_call(tcpip_api_call_fn, tcpip_api_call*)’
/Users/danielegozzi/Documents/Arduino/libraries/AsyncTCP-master/src/AsyncTCP.cpp:350:12: note: class type ‘tcpip_api_call_data’ is incomplete
struct tcpip_api_call_data call;
^
/Users/danielegozzi/Documents/Arduino/libraries/AsyncTCP-master/src/AsyncTCP.cpp: In function ‘esp_err_t _tcp_write(tcp_pcb*, int8_t, const char*, size_t, uint8_t)’:
/Users/danielegozzi/Documents/Arduino/libraries/AsyncTCP-master/src/AsyncTCP.cpp:413:69: error: invalid conversion from ‘err_t (*)(tcpip_api_call_data*) {aka signed char (*)(tcpip_api_call_data*)}’ to ‘tcpip_api_call_fn {aka signed char (*)(tcpip_api_call*)}’ [-fpermissive]
tcpip_api_call(_tcp_write_api, (struct tcpip_api_call_data*)&msg);
^
/Users/danielegozzi/Documents/Arduino/libraries/AsyncTCP-master/src/AsyncTCP.cpp:413:69: error: cannot convert ‘tcpip_api_call_data*’ to ‘tcpip_api_call*’ for argument ‘2’ to ‘err_t tcpip_api_call(tcpip_api_call_fn, tcpip_api_call*)’
/Users/danielegozzi/Documents/Arduino/libraries/AsyncTCP-master/src/AsyncTCP.cpp:350:12: note: class type ‘tcpip_api_call_data’ is incomplete
struct tcpip_api_call_data call;
^
/Users/danielegozzi/Documents/Arduino/libraries/AsyncTCP-master/src/AsyncTCP.cpp: In function ‘esp_err_t _tcp_recved(tcp_pcb*, int8_t, size_t)’:
/Users/danielegozzi/Documents/Arduino/libraries/AsyncTCP-master/src/AsyncTCP.cpp:435:70: error: invalid conversion from ‘err_t (*)(tcpip_api_call_data*) {aka signed char (*)(tcpip_api_call_data*)}’ to ‘tcpip_api_call_fn {aka signed char (*)(tcpip_api_call*)}’ [-fpermissive]
tcpip_api_call(_tcp_recved_api, (struct tcpip_api_call_data*)&msg);
^
/Users/danielegozzi/Documents/Arduino/libraries/AsyncTCP-master/src/AsyncTCP.cpp:435:70: error: cannot convert ‘tcpip_api_call_data*’ to ‘tcpip_api_call*’ for argument ‘2’ to ‘err_t tcpip_api_call(tcpip_api_call_fn, tcpip_api_call*)’
/Users/danielegozzi/Documents/Arduino/libraries/AsyncTCP-master/src/AsyncTCP.cpp:350:12: note: class type ‘tcpip_api_call_data’ is incomplete
struct tcpip_api_call_data call;
^
/Users/danielegozzi/Documents/Arduino/libraries/AsyncTCP-master/src/AsyncTCP.cpp: In function ‘esp_err_t _tcp_close(tcp_pcb*, int8_t)’:
/Users/danielegozzi/Documents/Arduino/libraries/AsyncTCP-master/src/AsyncTCP.cpp:455:69: error: invalid conversion from ‘err_t (*)(tcpip_api_call_data*) {aka signed char (*)(tcpip_api_call_data*)}’ to ‘tcpip_api_call_fn {aka signed char (*)(tcpip_api_call*)}’ [-fpermissive]
tcpip_api_call(_tcp_close_api, (struct tcpip_api_call_data*)&msg);
^
/Users/danielegozzi/Documents/Arduino/libraries/AsyncTCP-master/src/AsyncTCP.cpp:455:69: error: cannot convert ‘tcpip_api_call_data*’ to ‘tcpip_api_call*’ for argument ‘2’ to ‘err_t tcpip_api_call(tcpip_api_call_fn, tcpip_api_call*)’
/Users/danielegozzi/Documents/Arduino/libraries/AsyncTCP-master/src/AsyncTCP.cpp:350:12: note: class type ‘tcpip_api_call_data’ is incomplete
struct tcpip_api_call_data call;
^
/Users/danielegozzi/Documents/Arduino/libraries/AsyncTCP-master/src/AsyncTCP.cpp: In function ‘esp_err_t _tcp_abort(tcp_pcb*, int8_t)’:
/Users/danielegozzi/Documents/Arduino/libraries/AsyncTCP-master/src/AsyncTCP.cpp:475:69: error: invalid conversion from ‘err_t (*)(tcpip_api_call_data*) {aka signed char (*)(tcpip_api_call_data*)}’ to ‘tcpip_api_call_fn {aka signed char (*)(tcpip_api_call*)}’ [-fpermissive]
tcpip_api_call(_tcp_abort_api, (struct tcpip_api_call_data*)&msg);
^
/Users/danielegozzi/Documents/Arduino/libraries/AsyncTCP-master/src/AsyncTCP.cpp:475:69: error: cannot convert ‘tcpip_api_call_data*’ to ‘tcpip_api_call*’ for argument ‘2’ to ‘err_t tcpip_api_call(tcpip_api_call_fn, tcpip_api_call*)’
/Users/danielegozzi/Documents/Arduino/libraries/AsyncTCP-master/src/AsyncTCP.cpp:350:12: note: class type ‘tcpip_api_call_data’ is incomplete
struct tcpip_api_call_data call;
^
/Users/danielegozzi/Documents/Arduino/libraries/AsyncTCP-master/src/AsyncTCP.cpp: In function ‘esp_err_t _tcp_connect(tcp_pcb*, int8_t, ip_addr_t*, uint16_t, tcp_connected_fn)’:
/Users/danielegozzi/Documents/Arduino/libraries/AsyncTCP-master/src/AsyncTCP.cpp:495:71: error: invalid conversion from ‘err_t (*)(tcpip_api_call_data*) {aka signed char (*)(tcpip_api_call_data*)}’ to ‘tcpip_api_call_fn {aka signed char (*)(tcpip_api_call*)}’ [-fpermissive]
tcpip_api_call(_tcp_connect_api, (struct tcpip_api_call_data*)&msg);
^
/Users/danielegozzi/Documents/Arduino/libraries/AsyncTCP-master/src/AsyncTCP.cpp:495:71: error: cannot convert ‘tcpip_api_call_data*’ to ‘tcpip_api_call*’ for argument ‘2’ to ‘err_t tcpip_api_call(tcpip_api_call_fn, tcpip_api_call*)’
/Users/danielegozzi/Documents/Arduino/libraries/AsyncTCP-master/src/AsyncTCP.cpp:350:12: note: class type ‘tcpip_api_call_data’ is incomplete
struct tcpip_api_call_data call;
^
/Users/danielegozzi/Documents/Arduino/libraries/AsyncTCP-master/src/AsyncTCP.cpp: In function ‘esp_err_t _tcp_bind(tcp_pcb*, ip_addr_t*, uint16_t)’:
/Users/danielegozzi/Documents/Arduino/libraries/AsyncTCP-master/src/AsyncTCP.cpp:514:68: error: invalid conversion from ‘err_t (*)(tcpip_api_call_data*) {aka signed char (*)(tcpip_api_call_data*)}’ to ‘tcpip_api_call_fn {aka signed char (*)(tcpip_api_call*)}’ [-fpermissive]
tcpip_api_call(_tcp_bind_api, (struct tcpip_api_call_data*)&msg);
^
/Users/danielegozzi/Documents/Arduino/libraries/AsyncTCP-master/src/AsyncTCP.cpp:514:68: error: cannot convert ‘tcpip_api_call_data*’ to ‘tcpip_api_call*’ for argument ‘2’ to ‘err_t tcpip_api_call(tcpip_api_call_fn, tcpip_api_call*)’
/Users/danielegozzi/Documents/Arduino/libraries/AsyncTCP-master/src/AsyncTCP.cpp:350:12: note: class type ‘tcpip_api_call_data’ is incomplete
struct tcpip_api_call_data call;
^
/Users/danielegozzi/Documents/Arduino/libraries/AsyncTCP-master/src/AsyncTCP.cpp: In function ‘tcp_pcb* _tcp_listen_with_backlog(tcp_pcb*, uint8_t)’:
/Users/danielegozzi/Documents/Arduino/libraries/AsyncTCP-master/src/AsyncTCP.cpp:533:70: error: invalid conversion from ‘err_t (*)(tcpip_api_call_data*) {aka signed char (*)(tcpip_api_call_data*)}’ to ‘tcpip_api_call_fn {aka signed char (*)(tcpip_api_call*)}’ [-fpermissive]
tcpip_api_call(_tcp_listen_api, (struct tcpip_api_call_data*)&msg);
^
/Users/danielegozzi/Documents/Arduino/libraries/AsyncTCP-master/src/AsyncTCP.cpp:533:70: error: cannot convert ‘tcpip_api_call_data*’ to ‘tcpip_api_call*’ for argument ‘2’ to ‘err_t tcpip_api_call(tcpip_api_call_fn, tcpip_api_call*)’
/Users/danielegozzi/Documents/Arduino/libraries/AsyncTCP-master/src/AsyncTCP.cpp:350:12: note: class type ‘tcpip_api_call_data’ is incomplete
struct tcpip_api_call_data call;
^
/Users/danielegozzi/Documents/Arduino/libraries/AsyncTCP-master/src/AsyncTCP.cpp: In member function ‘void AsyncClient::_dns_found(ip_addr*)’:
/Users/danielegozzi/Documents/Arduino/libraries/AsyncTCP-master/src/AsyncTCP.cpp:981:24: error: invalid use of incomplete type ‘struct ip_addr’
if(ipaddr && ipaddr->u_addr.ip4.addr){
^
In file included from /Users/danielegozzi/Documents/Arduino/libraries/AsyncTCP-master/src/AsyncTCP.cpp:24:0:
/Users/danielegozzi/Documents/Arduino/libraries/AsyncTCP-master/src/AsyncTCP.h:53:8: note: forward declaration of ‘struct ip_addr’
struct ip_addr;
^
/Users/danielegozzi/Documents/Arduino/libraries/AsyncTCP-master/src/AsyncTCP.cpp:982:33: error: invalid use of incomplete type ‘struct ip_addr’
connect(IPAddress(ipaddr->u_addr.ip4.addr), _connect_port);
^
In file included from /Users/danielegozzi/Documents/Arduino/libraries/AsyncTCP-master/src/AsyncTCP.cpp:24:0:
/Users/danielegozzi/Documents/Arduino/libraries/AsyncTCP-master/src/AsyncTCP.h:53:8: note: forward declaration of ‘struct ip_addr’
struct ip_addr;
^
exit status 1
Error compiling for board DOIT ESP32 DEVKIT V1.

This report would have more information with
“Show verbose output during compilation”
option enabled in File -> Preferences.

9 Answers
0 Vote Up Vote Down
Sara Santos Staff answered 4 years ago

Hi.

Are you using Arduino IDE or PlatformIO?

I found a similar issue here: https://github.com/me-no-dev/AsyncTCP/issues/21.
If you go to Boards > Boards Manager and search for ESP32, what’s the version you have installed? If there is a newest version, install it.

I also found this more recent discussion: https://forum.arduino.cc/index.php?topic=717398.

We also have this: https://rntlab.com/question/macintosh-big-sur-macos-11-0-1-breaks-esp32-programming-on-arduino-ide/, but I’m not sure it is related to your issue.

I hope this helps
Regards,
Sara

0 Vote Up Vote Down
Daniele Gozzi answered 4 years ago

Hi Sara,
Thank you for your prompt reply. I am checking your suggested links where I hope to find the solution to my problem.
Regards
Daniele

0 Vote Up Vote Down
Sara Santos Staff answered 4 years ago

Great.
Then, let me know if you suceeded.
Regards,
Sara

0 Vote Up Vote Down
Daniele Gozzi answered 4 years ago

Sorry Sara I forgot answer to your questions:

  • I am using Arduino IDE
  • The board installed is DOIT ESP32 DEVKIT V1

Thank you again
 

0 Vote Up Vote Down
Daniele Gozzi answered 4 years ago

Hi Sara,
I am asking you and people reading this issue to try the following test:

  • Arduino IDE compilation of your code “AsyncWebServerRNT” on any Mac with M1 chip and MacOS BigSur
  • Board DOIT ESP32 DEVKIT V1
  • Code link: https://randomnerdtutorials.com/esp32-async-web-server-espasyncwebserver-library/

I hope that someone can help me understand if the problem I am encountering is exclusively mine or it is common to users of new Macs.
Many thanks
Daniele
 

0 Vote Up Vote Down
Sara Santos Staff answered 4 years ago

Hi Daniele.
Can you post your issue in our Facebook group? I think if you post your issue there, you’ll be able to reach more people.
Here’s the link:https://www.facebook.com/groups/RandomNerdTutorials
Regards,
Sara
 

0 Vote Up Vote Down
Daniele Gozzi answered 4 years ago

Hi Sara
Thank you for your suggestion but I am not in Facebook.
Regards
Daniele

0 Vote Up Vote Down
Daniele Gozzi answered 4 years ago

Hi Sara,
Finally I resolved my problem. This was probably caused when I transfer by Time Machine on my new MacBook Pro the content of the old Mac. I found that some folders in the Arduino directory were not in the right position. Further, the final resolutive step was the update of the espressyf library by the board manager. Though the passage to the M1 CPU gives several problems with the applications of thirty parties, in the case of Arduino this does not fortunately occur, contrarily to my suspect.
Now, everything run as expected. So this issue can be closed.
Thank you for your assistance and the useful projects that RNTlab supplies.
Regards
Daniele

0 Vote Up Vote Down
Sara Santos Staff answered 4 years ago

Hi Daniele.
I’m glad that you solved the issue, and thanks for sharing the solution.
I’ll mark this issue as resolved. If you need further help, you just need to open a new project in our forum.
Regards,
Sara

Primary Sidebar

Login to Ask or Answer Questions

This Forum is private and it’s only available for members enrolled in our Courses.

Login »

Latest Course Updates

  • [eBook Updated] Learn Raspberry Pi Pico/Pico W with MicroPython eBook – Version 1.2 May 26, 2025
  • [New Edition] Build ESP32-CAM Projects eBook – 2nd Edition April 16, 2025

You must be logged in to view this content.

Contact Support - Refunds - Privacy - Terms - MakerAdvisor.com - Member Login

Copyright © 2013-2025 · RandomNerdTutorials.com · All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.