Go Down

Topic: Portenta UDP and Multicast (Solved - See github repo msg) (Read 438 times) previous topic - next topic

jwestmoreland

Jul 09, 2020, 12:36 pm Last Edit: Jul 24, 2020, 12:08 am by jwestmoreland
Hello All,

Can someone point me to where the UDP reference is for Portenta?


// A UDP instance to let us send and receive packets over UDP

WiFiUDP Udp;


The usual way to do this in the past apparently doesn't work.

I get the following error message when trying to build:

....ino:145:9: error: cannot declare variable 'Udp' to be of abstract type 'arduino::WiFiUDP'
 WiFiUDP Udp;
         ^~~
In file included from C:\...\AppData\Local\Arduino15\packages\arduinobeta\hardware\mbed\1.2.1\libraries\WiFi\src/WiFi.h:32:0,
                 

Thanks,
John W.

sbhklr

Hi John!

It hadn't been implemented yet. However, I've given it a shot today. If you want to lend me a hand with testing it, here is the branch containing the updated library: https://github.com/sbhklr/ArduinoCore-mbed/tree/wifi-udp

jwestmoreland

Hello sbhklr,

Taking a look at it now.

Will let you know hopefully shortly.

Thanks!
John W.

jwestmoreland

Hello sbhklr,

UDP compile issue appears to be solved but I was hoping to use the MRK-RGB shield on the Portenta and I'm getting this error now:

\Arduino-Pro-Sketch\libraries\Arduino_MKRRGB\src\MKRRGBMatrix.cpp:25:29: error: 'sercom0' was not declared in this scope
 static SPIClass SPI_MATRIX(&sercom0, A3, A4, A3, SPI_PAD_0_SCK_1, SERCOM_RX_PAD_0);
                             ^~~~~~~
\Arduino-Pro-Sketch\libraries\Arduino_MKRRGB\src\MKRRGBMatrix.cpp:25:29: note: suggested alternative: 'strcoll'
 static SPIClass SPI_MATRIX(&sercom0, A3, A4, A3, SPI_PAD_0_SCK_1, SERCOM_RX_PAD_0);
                             ^~~~~~~
                             strcoll
\Arduino-Pro-Sketch\libraries\Arduino_MKRRGB\src\MKRRGBMatrix.cpp:25:50: error: 'SPI_PAD_0_SCK_1' was not declared in this scope
 static SPIClass SPI_MATRIX(&sercom0, A3, A4, A3, SPI_PAD_0_SCK_1, SERCOM_RX_PAD_0);
                                                  ^~~~~~~~~~~~~~~
\Arduino-Pro-Sketch\libraries\Arduino_MKRRGB\src\MKRRGBMatrix.cpp:25:50: note: suggested alternative: 'SPI_CFG2_SP_1'
 static SPIClass SPI_MATRIX(&sercom0, A3, A4, A3, SPI_PAD_0_SCK_1, SERCOM_RX_PAD_0);
                                                  ^~~~~~~~~~~~~~~
                                                  SPI_CFG2_SP_1
\Arduino-Pro-Sketch\libraries\Arduino_MKRRGB\src\MKRRGBMatrix.cpp:25:67: error: 'SERCOM_RX_PAD_0' was not declared in this scope
 static SPIClass SPI_MATRIX(&sercom0, A3, A4, A3, SPI_PAD_0_SCK_1, SERCOM_RX_PAD_0);
                                                                   ^~~~~~~~~~~~~~~
\Arduino-Pro-Sketch\libraries\Arduino_MKRRGB\src\MKRRGBMatrix.cpp: In member function 'virtual int RGBMatrixClass::begin()':
\Arduino-Pro-Sketch\libraries\Arduino_MKRRGB\src\MKRRGBMatrix.cpp:74:21: error: 'PIO_SERCOM_ALT' was not declared in this scope
   pinPeripheral(A3, PIO_SERCOM_ALT);
                     ^~~~~~~~~~~~~~
\Arduino-Pro-Sketch\libraries\Arduino_MKRRGB\src\MKRRGBMatrix.cpp:74:21: note: suggested alternative: 'PIN_SERIAL_TX'
   pinPeripheral(A3, PIO_SERCOM_ALT);
                     ^~~~~~~~~~~~~~
                     PIN_SERIAL_T
\Arduino-Pro-Sketch\libraries\Arduino_MKRRGB\src\MKRRGBMatrix.cpp:74:3: error: 'pinPeripheral' was not declared in this scope
   pinPeripheral(A3, PIO_SERCOM_ALT);
   ^~~~~~~~~~~~~
\Arduino-Pro-Sketch\libraries\Arduino_MKRRGB\src\MKRRGBMatrix.cpp:74:3: note: suggested alternative: 'pinmap_peripheral'
   pinPeripheral(A3, PIO_SERCOM_ALT);
   ^~~~~~~~~~~~~
   pinmap_peripheral
Compilation error: Error: 2 UNKNOWN: exit status 1


I'll modify this so it'll work just with checking the UDP stuff - but thought the above was worth mentioning as well.

Thanks,
John

jwestmoreland

Hello sbhklr,

I'm also going to post the two files that are what's different in the branch that enable the UDP code to build.

For others, just replace the existing files with the attached (for now anyway).  Saves you from downloading the repo branch if you just want to check the UDP code.

Current path for these files:
<YOUR PATH>\Arduino15\packages\arduinobeta\hardware\mbed\1.2.1\libraries\WiFi\src

Regards,
John W.

jwestmoreland

Does anyone know if multicast is working with the Portenta-H7?

jwestmoreland

#6
Jul 21, 2020, 09:07 am Last Edit: Jul 21, 2020, 09:08 am by jwestmoreland
Hello All,

Wanted to report this has been fixed - please see:

https://github.com/arduino/ArduinoCore-mbed/pull/14
https://github.com/arduino/ArduinoCore-mbed/pull/14

Thanks!
John

Go Up