-1

I would like to ask how to build a star topology network with several ESP8266s, pc and a home wifi router? I would like to connect my computer (as a client) and ESP8266s (as clients) together via a wifi router and exchange data between them.

Thanks in advance,

Best,

  • Sure, you can do that by making all of the devices log on to the same Wifi network (provided by your router presumably) as a client. You can then exchange data between them. But what is your actual question? – StarCat Apr 20 at 10:46
  • @StarCat That I have done already - that was simple. Now, I cannot find any sample code how to send my data from one client to another one - that is my problem. How to send it over? – user Apr 20 at 10:49
  • I can find many example sketches that feature two ESP8266's talking to each other. You might need to be clearer about what kind of data you want to exchange and what you're having difficulty with. – StarCat Apr 20 at 11:20
  • @StarCat Thank you for your help. You are right, apparently I have been missing some concepts. Now i am good to go. Thank :) – user Apr 20 at 12:02
0

The sending / receiving of data has nothing to do with the topology. In fact, when you have one ESP8266 as an access point and another as a station that is no different to having two ESP8266's as stations communicating through an access point. The topology is transparent to the communication of user data as that is a completely different (lower) layer of the OSI model and as such is hidden from the layers above.

You communicate in exactly the same way regardless of your topology. That is - one end opens a socket of some form and the other end connects to (for TCP) and sends data to (for both TCP and UDP) that socket. For TCP the "server" socket can then also send data back through the same connection. For UDP there is no "server" as such, but just two peers that send data to each other and for two-way communication both ends need to be a "server" to receive data.

What you need to do is define what data you want to send and what method of sending that data will be most suitable for your system - be that simple UDP packets, or something more complex like one of the many HTTP-based API systems.

| improve this answer | |
  • Thank you for the answer! It clarifies everything! Now I know what to do! :) – user Apr 20 at 12:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.