Wireless connection to PI4 Bullseye ad-hoc mode

We have sucessfully programmed our application to run python scripts on a Pi4 when it is connected to our network via the ethernet lan connection.
We need to go to the next phase where the comptuer connects wirelessly to the PI without a network present. Matlab indicated that this was possible when we reviewed the project during the software decision proesses.
We think we need to turn the PI into a server, however we are not finding a resource with a working link that actually accomplishes this task. Any guidance or direction to links that are known to work would be greatly appreciated.
Hardware Pi4B
PI OS - bullseye
Matlab 2024a

6 Commenti

Hi @Paul Elliot,
We meet once again. To address your query, try setting up the Raspberry Pi as an access point which will allow the computer to connect directly to the Pi. To achieve this, you have to configure the Raspberry Pi to act as a wireless access point using tools like hostapd and dnsmasq. These tools help create a Wi-Fi network hosted by the Pi itself.Once the access point is set up, your computer can connect to the Pi wirelessly. Matlab can then communicate with the Pi over this wireless connection. For detailed steps and guidance, you can refer to resources like the official Raspberry Pi documentation or online tutorials specific to setting up a Raspberry Pi access point. This setup should enable wireless communication for your project. Please let me know if you have any further questions.
Thanks. That is the direction we are working toward. Appreciate knowing that we are heading the right direction only.
@ Paul Elliott, Glad to know that you guys are making progress by heading in the right direction.
Posting our solution for others in the future.
In a previous Pi project 8 years ago the ad hoc connection was used. We found that not to be as relevant given today's Pi OS's. Setting it up as an access point was the better documented solution.
After several trials we can were able to get this to work. Again our efforts only worked for a Pi4 and Bullseye. I stand by the notion that this is not an unexpected application. It would be nice if Matlab had a document outlining the setup, but at least could mention that configuring the PI as an access point would provide a solution when a network does not exist.
All of the Matlab briefs and documents with regard to connecting to the PI and installing the PI support package worked well. I'd advise doing that with the Pi plugged into the network via cable though. I'd also advise getting everything working in this state and then setting up the Pi as an access point. We tried a few guides that simply do not work with our combination of Pi and OS.
1- Setting up the Pi as an access point. We did this in both full and lite versions.
2- Additional steps not covered above: 1- we found you had to set the country in both raspi-config and in the step in the above link. 2- you have to enalbe SSH in raspi-config. Other than that this worked fine. It may very well be that not all countries work. Our project used US in both and it worked though.
Maybe this will help someone down the road.
Hi @Paul Elliot,
While you were going through setup issues as mentioned by you, “ It would be nice if Matlab had a document outlining the setup, but at least could mention that configuring the PI as an access point would provide a solution when a network does not exist”, did you try to reach out mathworks technical support (https://www.mathworks.com/support/contact_us.html), please let us know.
I sent a note to Tech support giving them where I found the solution and reiterating that I was needing a solution where a netowrk was nonexistant.
We currently have the system working with regard to Matlab. The issues now involve the python scripts for the daqhats from MCC. There is next to no support either written or otherwise there.

Accedi per commentare.

Risposte (0)

Prodotti

Release

R2024a

Richiesto:

il 30 Lug 2024

Commentato:

il 7 Ago 2024

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by