Go Down

Topic: Arduino Uno WiFi Broadcasting Issues (Read 917 times) previous topic - next topic

Emnatz

Hello,

I am new to Arduino's Uno Wifi and I have connected 2 unos to the same Wifi and I need to make them communicate ( Broadcasting ). Does anyone have any ideas ?

Thank you

PieterP

Communication between two devices does not have to be broadcasting. Please explain what you actually want to do, without turning it into an XY-problem.

Pieter

Robin2

I am new to Arduino's Uno Wifi and I have connected 2 unos to the same Wifi
Does that mean you have two Unos and one WiFi module?   If so how have you connected everything? Post a diagram.

Also tell us what WiFi module you are using.

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

Juraj

#3
Jun 07, 2018, 06:10 pm Last Edit: Jun 07, 2018, 06:11 pm by Juraj
Arduino Uno WiFi Developer Edition? did you change the firmware or you still have the factory firmware?
You can't write an Arduino sketch if you didn't learn programming. Not the language, but the concepts of programming - algorithms and data types.

Emnatz

Does that mean you have two Unos and one WiFi module?   If so how have you connected everything? Post a diagram.

Also tell us what WiFi module you are using.

...R
I am using 2 Arduino Uno Wi-Fi with integrated Wi-Fi module(The ESP8266) for each one. What i want to do is to make the two arduinos communicate by broadcast Wifi, all arduinos must be able to listen to each other and speak

For the firmware yes it's UNOWiFiDev.Edition i followed these instructions to update it : https://store.arduino.cc/arduino-uno-wifi
What i did is a first configuration to join the same WiFi network

PieterP

You don't want broadcasting, you want multicasting.
What i want to do is to make the two arduinos communicate by broadcast Wifi, all arduinos must be able to listen to each other and speak
That's way too vague.

Do you want to send a continuous stream of data between the two at several Kbps, or just the occasional sensor reading or command?

We cannot recommend anything useful unless you tell us in detail what you want to do.

Juraj

#6
Jun 08, 2018, 12:08 pm Last Edit: Jun 08, 2018, 12:11 pm by Juraj
with UnoWiFiDevEd library only things from examples are possible, nothing more. there is a restsever example and a restclient example
You can't write an Arduino sketch if you didn't learn programming. Not the language, but the concepts of programming - algorithms and data types.

Emnatz

The communication is to broadcast the UDP packets to all IP addresses on the network
I don't know how to send and receive UDP packets from one UnoWifi arduino to the other. Is it the same as when ESP8266 is not integrated?

PieterP


SurferTim

Have you tried sending the UDP packets to the localnet broadcast address? That is the last IP address on the localnet.

As an example, if your network is
192.168.0.0/24
then the broadcast address is 192.168.0.255.

I haven't tried this on your device, but it seems to work with all others.

But as mentioned by PieterP, your library must support UDP. I haven't checked that particular library.

Juraj

I forgot about the UDP requirment. but why udp?


If you really need udp then change the firmware to WiFi Link.
You can't write an Arduino sketch if you didn't learn programming. Not the language, but the concepts of programming - algorithms and data types.

SurferTim

I forgot about the UDP requirment. but why udp?


If you really need udp then change the firmware to WiFi Link.

I use UDP broadcasts for multiple device timing. If on a localnet, it is much faster than TCP.

Robin2

It might be simpler just to ditch the Arduino WiFi boards and get some ESP8266-12 modules or something like the Wemos D1 boards.

Then just program them as straight ESP8266s with all of the ESP8266 features available.

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

PieterP

It might be simpler just to ditch the Arduino WiFi boards and get some ESP8266-12 modules or something like the Wemos D1 boards.

Then just program them as straight ESP8266s with all of the ESP8266 features available.

...R
+1

Emnatz

#14
Jun 08, 2018, 03:40 pm Last Edit: Jun 08, 2018, 03:41 pm by Emnatz
Have you tried sending the UDP packets to the localnet broadcast address? That is the last IP address on the localnet.

As an example, if your network is
192.168.0.0/24
then the broadcast address is 192.168.0.255.

I haven't tried this on your device, but it seems to work with all others.

But as mentioned by PieterP, your library must support UDP. I haven't checked that particular library.
...Have you tried sending the UDP packets to the localnet broadcast address using just ESP8266 modules ?


Go Up