Go Down

Topic: Arduino - WiFi connection through serial (Read 2192 times) previous topic - next topic

360modena_cs

Jul 06, 2018, 06:07 pm Last Edit: Jul 06, 2018, 06:08 pm by 360modena_cs
Hello,

I want to connect a Wifi module (Xbee) to the Arduino MEGA through serial. My question is can this work simple by sending data to the serial and be transmitted through Wifi? On the other end I will have another Wifi connected to another Arduino to get the data. So simple as this.. Because as I show on this page,

 https://www.arduino.cc/en/Tutorial/ConnectNoEncryption

things are a bit complicated. I just want to open a Serial and send data, without so much configuration...

pylon

Quote
My question is can this work simple by sending data to the serial and be transmitted through Wifi?
No. WiFi is a network connection and not a serial channel. So you have to open a connection on the network to send a data stream.

Quote
I just want to open a Serial and send data, without so much configuration..
In this case WiFi is probably not the best choice. Provide more information about the needs you have on that communication (speed, distance, reliability, obstacles, etc.), maybe we can suggest alternatives.

360modena_cs

#2
Jul 06, 2018, 08:54 pm Last Edit: Jul 06, 2018, 08:55 pm by 360modena_cs
No. WiFi is a network connection and not a serial channel. So you have to open a connection on the network to send a data stream.

In this case WiFi is probably not the best choice. Provide more information about the needs you have on that communication (speed, distance, reliability, obstacles, etc.), maybe we can suggest alternatives.
Open space, around 100-200m, no obstacles (maybe some trees), as reliable as possible. Use of battery. I need an inexpensive solution because in the future I will need more nodes.

Thank you

pert



srnet

#5
Jul 07, 2018, 12:11 pm Last Edit: Jul 07, 2018, 12:12 pm by srnet
There are many different views as to what 'inexpensive' means, whats yours ?
http://www.50dollarsat.info/
http://www.loratracker.uk/

hammy

Have a look at Moteino, Anarduino, and rfm69 .

They Are good alternatives. I've just bought 4 Moteino with rfm69 attached and there are good examples for getting  them to take to one another - the plan being to eventually just buy the rfm69 which is very cheap, and build my own system up.

360modena_cs

Ok, Xbees are expensive if you want to use many, I need a solution with 2-5 euros for each wireless module...

wvmarle

The NodeMCU is at the lower end of that price point and has WiFi built in. Set one to host, the rest as clients. I think they can even do mesh networking between them.
Quality of answers is related to the quality of questions. Good questions will get good answers. Useless answers are a sign of a poor question.

Robin2

#9
Jul 07, 2018, 09:35 pm Last Edit: Jul 08, 2018, 09:41 am by Robin2
The NodeMCU is at the lower end of that price point and has WiFi built in. Set one to host, the rest as clients. I think they can even do mesh networking between them.
Will it give reliable 200 m range?  I know I got a pair of ESP8266's working at about 120m using ESP-NOW and clear line of sight. ESP-NOW is not WiFi and I have not done any range checks with WiFi. The OP mentioned trees - they are not good for 2.4GHz wireless.

I would expect the high-power nRF24L01+ modules (with the external antenna) to work at 200m, but they are not WiFi. If the OP is interested in those modules this Simple nRF24L01+ Tutorial may be of interest.

I think for reliable long range communication a lower wireless frequency - such as the 433MHz HC12 modules or LoRa would be better. But they, also, are not WiFi and they may be a little more expensive.


The obvious financial advantage of the ESP8266 is that it an work on its own without an Arduino whereas the other modules need to be connected to an Arduino.

The ESP8266-07 has a connector for an external antenna but I have no idea whether or by how much that improves its range.

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

srnet

Ok, Xbees are expensive if you want to use many, I need a solution with 2-5 euros for each wireless module...
Are you saying that if the only solution will cost 5.5 euros, your project is not viable ?
http://www.50dollarsat.info/
http://www.loratracker.uk/

wvmarle

Will it give reliable 200 m range
Depends largely on the layout of the project. Line of sight or indoors or city or forest all make a big difference.
Host node in the middle, everything else <100m away - also helps. Maybe mesh networking if there are lots of nodes, all 20-50 meters apart would definitely allow all to connect to one another - again depending on the general environment it has to operate in.
LoRa will indeed get the job done (433 Mhz or ~900 Mhz - depending on what's legal in OP's locality), but those modules by themselves blow just about all of OPs budget - which anyway is very low for a complete node (MCU + comms module + power supply + case + presumable some kind of sensors).
Quality of answers is related to the quality of questions. Good questions will get good answers. Useless answers are a sign of a poor question.

360modena_cs

#12
Jul 11, 2018, 08:00 pm Last Edit: Jul 11, 2018, 08:04 pm by 360modena_cs
Thank you all for the information!!

Does this (which has also encryption - something that I need):

https://www.ebay.com/itm/331976853568?ViewItem=&item=331976853568

cooperate with this:

https://www.ebay.com/itm/Mini-USB-Nano-V3-0-ATmega328-16M-5V-Micro-controller-CH340G-board-For-Arduino/201539955347?hash=item2eecb7aa93:g:VKcAAOSwk4RbMvVf

??

Robin2

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

360modena_cs

#14
Jul 11, 2018, 08:18 pm Last Edit: Jul 12, 2018, 11:31 am by 360modena_cs
The problem is that I cannot figure out how to interface it with Arduino...

Go Up