JohnnyK
(Jan Kamidra)
March 15, 2021, 6:49am
2
Hello,
it seems you use some old version of MbedOS (older than 5.12), the TCPServer.h is obsolete and all necessary things (Server/client) are under under the TCPSocket in the MbedOS 5.12 - MbedOS 6.8 (latest).
Anyway you need to read Mbed documentation about Socket
So in your loop you only again and again set the number of connections.
The old TCPServer was something like is here
About current TCP Server you can read in topics below.
Hi, Im new to MBED
I tried this sample code and it crashes after first attempt. any idea ?
All help are welcome
Thanks
Dan
#include "mbed.h"
#include "EthernetInterface.h"
static const char* mbedIP = "192.168.10.50"; //IP
static const char* mbedMask = "255.255.255.0"; // Mask
static const char* mbedGateway = "192.168.10.254"; //Gateway
int main()
{
printf("TCP server example\n");
EthernetInterface eth;
eth.set_network(mbedIP,mbe…
Hi everyone,
I’m trying to build an application with TCPsocket.
My mbed device should be configured with a static ip.
I want to send a TCP package to an ip i can choose with port 4000.
Also i should be able to receive a TCP package from another device on the same port.
I’ve been struggling with this for some time but i can’t figure it out.
This is the code i have until now but i don’t know what to do next.
// Define Network interface
EthernetInterface net;
// Bring up the ethernet inte…
BR, Jan