7 votes

Multiple client server over wifi

You need to keep track of multiple WiFiClients - declare an array of them, for example, and each time server.available() gives you a new one, store it in the array. Then you need to make sure your ...
Mark Smith's user avatar
  • 2,181
5 votes
Accepted

Using c_str() on String for IPAddress with NTPClient provides wrong values

The String object created as return from IPAddress.toString() as parameter to constructor of NtpClient is temporary. It contains the char array returned by c_str(). NTPClient doesn't copy the string, ...
Juraj's user avatar
  • 18.1k
4 votes
Accepted

Is there any good working MODBUS TCP master library available for Arduino?

Check out the library Modbus-TCP on Github. It has the facility for all the function codes as asked. It has provision for Wiznet W5100 and ENC28J60 Ethernet IC. All tested with Arduino Mega. See the ...
goddland_16's user avatar
3 votes
Accepted

ESP8266 TCP connection WiFiClient issue

You have declared WiFiClient client; in the scope of setup() only. Move it's declaration to the global scope by placing it above the declaration of void setup()
Mazaryk's user avatar
  • 1,149
3 votes
Accepted

Scan IP address of ESP8266

The de-facto standard way for devices to broadcast their IP address to clients is through the Multicast DNS system (mDNS). In this system the server sends a UDP message to a specific multicast group ...
Majenko's user avatar
  • 105k
2 votes

Can't connect to my Arduino via W5100 Ethernet shield

"...Please any help? Do I have to assume that my shield is faulty?..." Before trashing the shield, I'd run through a sligtly more comprehensive troubleshooting approach, from the lowest level of the ...
Damiano Verzulli's user avatar
2 votes
Accepted

ESP8266 check if TCP client disconnected...informally

You have the inherent problem that a TCP connection is terminated by an explicit "FIN" message from the terminating party, followed by a FIN-ACK and ACK. Refer to here. If your client (or server) ...
Maximilian Gerhardt's user avatar
2 votes

ESP8266 ASyncTCP class example

There are examples in the ESP8266 library https://github.com/me-no-dev/ESPAsyncTCP/tree/master/examples
renatobo's user avatar
2 votes
Accepted

How to access GPS location without internet

If you want to send data to a server on the internet, you will need an internet connection, or at least a connection to a internet gateway. Which type of connection you use, and how you set up that ...
ocrdu's user avatar
  • 1,775
2 votes

Ethernet shield and IPv6 support

I have been working on an IPv6 library for Arduino, called EtherSia, that works with the ENC28J60 chip, but with a lower overhead compared with libraries that use Contiki / uIP. It is comparable to ...
njh's user avatar
  • 243
1 vote

ESP8266 Wemos D1 min pro - how to change TCP_SND_BUF?

No, you can't. The macro you are trying to tweak is for reference only and does not control the size of the buffer. On the ESP8266 the IP stack (and much of the rest of the system) is precompiled as ....
Majenko's user avatar
  • 105k
1 vote

Static IP for ESP8266 based on gateway

You can either set the router to allocate a static IP address based on your ESP8266's MAC address, or go the DHCP-way first, read the gateway IP address you got, and then do a WiFi.config(), something ...
ocrdu's user avatar
  • 1,775
1 vote

Multiple WiFi client/server connections

The server.available() in Arduino networking libraries returns always the first connected client. This is in contrary with ESP8266 and ESP32 WiFi libraries for Arduino. They flag the returned ...
Juraj's user avatar
  • 18.1k
1 vote

ESP8266 Webserver not reachable after 2 minutes from reset

It worked when the IP was in the range because there are no valid IP addresses outside the range. WW.XX.YY.0 and WW.XX.YY.255 are reserved. The router is using the .1 and .2 addresses. That leaves 3-...
djsfantasi's user avatar
1 vote
Accepted

ESP8266 Webserver not reachable after 2 minutes from reset

The short answer: Config a static IP! After looking at Git Issue #2371 I found out that I need to create a static IP address to fix this issue. I can do this by inserting WiFi.config(ip, gateway, ...
Brandon Pillay's user avatar
1 vote

creating HTTP persistent connection, to create 'smooth' data over GSM sending

The ArduinoHttpCliemt library's HttpClient.stop() method does two things. It resets the state of the HttpClient object and stops the underlying Client connection (TCP connection). If HttpClient.stop() ...
Juraj's user avatar
  • 18.1k
1 vote

How to run TCP socket server on Arduino Uno WiFi?

I suspect these delays are caused by TCP buffering. For some theory on this sort of thing, perhaps read about Nagle's Algorithm which covers some of the issues with small packet buffering. It ...
Kingsley's user avatar
  • 773
1 vote

How to create TCP server on Arduino UNO WiFi?

For Arduino UNO Wifi, you have to use library "UnoWiFi-Developer-Edition-Lib". You can directly download and install it through library manager or can get it offline through the following link "https:/...
Anant Mitra's user avatar
1 vote

ESP8266 ASyncTCP class example

If there are no examples provided with the library then you will have to make do with the example you have :( If you think about what a web server does it is really just a glorified Telnet server ...
Code Gorilla's user avatar
  • 5,637
1 vote

ESP8266 cannot create TCP connections to this particular server

Not a cookie cutter answer, I did a quick test and my ESP8266 does connect to you nginx. Of course you do not accept the params from my fridge, but this is what I see in the log. 7007 : 7010 : For ...
PaulV's user avatar
  • 11
1 vote

How to send MFRC522 data to a C# app using a NodeMCU TCP server?

MFRC522::uid is a struct (see source code). There's no defined way to print it. If you want to write the raw bytes over the TCP connection, you can just use client.write((uint8_t*)mfrc522.uid....
tttapa's user avatar
  • 1,320
1 vote
Accepted

Communication with socketserver fails after specific number of packets

I found my stupid mistake: By using try without catching specific exceptions (I know one shouln't do that) in my Laptop-Server script I didn't recognize that I was trying to send unencoded strings. So,...
Sim Son's user avatar
  • 1,859
1 vote

Communication with socketserver fails after specific number of packets

close the disconnected socket before reconnecting if (!client.connected()) { client.stop(); client=TCPserver.available(); }
Juraj's user avatar
  • 18.1k
1 vote

ESP8266 send TCP HEX packet with 4 chars

After searching and experimenting on this, I believe the short answer to the question is that you need to send the command string like a buffer of characters AND put your Hex Coded command for the LED ...
Genetipetz's user avatar
1 vote
Accepted

Sending JSON message to web api via post. Why does HTTP 1.0 versus 1.1 make a difference?

HTTP/1.1 requires you to provide the host name of the server. And it will keep the connection open for some time unless you explicitly opt out of this. Thus, the equivalent of the basic HTTP/1.0 ...
Edgar Bonet's user avatar
  • 43.1k
1 vote

Data transmission Serial to TCP

The numbers are ASCII Codes (here is a chart from the Arduino website). 49 is the number 1, and 13 is a carriage return ('\n'). There should be a setting in the bottom right corner of Serial Monitor ...
PiGuy2's user avatar
  • 56
1 vote

Scan IP address of ESP8266

Have the app send a broadcast UDP packet, and have the ESP listen for such broadcasts. Now the ESP knows the IP address of the device on which the app is running, and it can somehow let it know its ...
Mark Smith's user avatar
  • 2,181
1 vote

Is it possible to print client IP or MAC address from Arduino WiFi web server?

***** Assuming it is an ESP8266 based WI-FI shield: ***** Wifi shield > PC Open serial monitor. Baud rate 155200. Also check COM ports. Test AT commands by typing AT. If it responds OK, you're ...
Dat Ha's user avatar
  • 2,913
1 vote

Modbus RTU over TCPip

Modbus TCP simply put is a Modbus packet wrapped in a TCP packet. There is no 'additional layer of Modbus' added on top. If we look at the osi model pictured below you can see there is only one ...
Ben Southwell's user avatar
1 vote

ESP2866 and java ServerSocket

The ESP trys to connect to port 4160, but the server is listing on port 20.
wiomoc's user avatar
  • 121

Only top scored, non community-wiki answers of a minimum length are eligible