arduino / ArduinoCore-mbed

347 stars 203 forks source link

Please clarify WiFi, BLE and Ethernet capabilities on the PortentaH7 M4 core. #360

Open hpssjellis opened 3 years ago

hpssjellis commented 3 years ago

As far as I can tell, WiFi, BLE and Ethernet only work when activated from the M7 core. Can someone clarify if any of these 3 can be run from the PortentaH7 M4 core, (using RPC if Serial print is needed etc) ?

Also if any of the 3 can't run from the M4 core is this a physical hardware issue or is it something that could be fixed using software?

I am also having some issues running (WiFi, BLE, Ethernet and LoRaWan) from within a thread, is that a known issue?

My reasoning for the question is: I do a lot of CPU intensive EdgeImpulse.com machine learning vision coding with the PortentaH7 connected to either the Ethernet or LoRa Vision Shields and the machine learning code must be on the faster M7 core, meaning communication needs to be done from the slower M4 core. The only communication success I have had using the M7 Core is with bare bones LoRa peer-to-peer communication directly using the Murata module (see MKRWAN issue 107), even Arduino LoRaWan using the MKRWAN library seems to have some threading issues.

Sorry to be a pain, but the whole point of the dual core Arduino is to be able to put extra processes on the other core.

Jeremy aka rocksetta on Twitter

hpssjellis commented 2 years ago

@facchinm does WiFi, BLE and Ethernet only work when activated from the M7 core?

Is it a hardwired issue or a software issue?

hpssjellis commented 1 year ago

These capabilities seem to be running fine now edited: They are working from the M7 core I still have no information from the M4 core.

MMirabel commented 1 year ago

Hi, how did you solve the problem? I would like to run an access point and a simple webserver with M4 Can you give me some pointers?

hpssjellis commented 1 year ago

Hi, how did you solve the problem? I would like to run an access point and a simple webserver with M4 Can you give me some pointers?

Hmmm, not sure what I did to close the issue. Sorry that was a while ago. Do you jave my library? The "portenta pro community solutions"? I may have put an example there?

MMirabel commented 1 year ago

Yes I'm looking at the examples you developed in "portenta pro community solutions" but I haven't found the solution to my problem yet. It seems that with M4 you can only control the led.

hpssjellis commented 1 year ago

@facchinm @MMirabel

So I tested wifi on the M4 PortentaH7 core after making sure the code worked on the M7 core using dot181-wifi-webserver.

I did run the STMH747_System-->wifiFirmwareUpdater but not sure if I had to.

Then cleaned the M7 core and setup the M4 core using dot122-dual-easy

and basically copied the first example into the M4 core. It compiled and ran but no WiFi connectivity.

I then cleaned the M4 core and tried to run the WiFi code on the M7 core and caused the Orange Led of Hell which I am excited that I now know the steps I took, but that is my 9th Portenta I have fried and it is getting a bit expensive.

Unfortunately @MMirabel my suggestion is to stay away from inner M4 core IOT. If anyone has had better luck can they please post here.

MMirabel commented 1 year ago

Good morning @hpssjellis @facchinm I'm sorry to hear about your portenta. Looking in the technical specifications maybe I found the reason why Wifi and BLE do not work with M4. WiFi/BLE chip is connected on SDMMC1. And CM4 does not have access to SDMMC1. 3c9fb77510894d37f6594bc39fd0d1620cfc259d

The solution might be to have the WiFi/BT (for SDMMC1) running on CM7 and use RPC from CM4 to request and get data.

But it is to be tried and tested

Do you think a good alternative is to connect a wifi chip like ESP8266 to a serial port managed by M4? In my project I wanted to use both portenta cores to handle different functionality.

Thanks

hpssjellis commented 1 year ago

Good detective work @MMirabel for your serial solution reminder the Portenta has several serial ports. Some of them are hard to find. This examples touches on some of them dot42-UART1-M4-to-M7.ino

razvanphp commented 2 months ago

Duplicate of #790

See my https://github.com/arduino/ArduinoCore-mbed/issues/790#issuecomment-2362681070, this is now mentioned in the documentation.

We should close thos.