Is there a simple TCP/IP server example with AWS?

Hi.

I need a simple TCP/IP server example.

I have analyzed the example aws_tcp_echo_client_single_task which is an example of type client.

I imagine it is something similar.

Thank you very much for any suggestions or comments.

There are some basic TCP demos including server role:

1 Like

Hi

Thank you very much for responding.

I was reviewing the manufacturer’s examples of the microcontroller that I am using and I have seen that there are indeed examples with RTOs.

But what happens is that I am using is the Shadow (AWS) example that uses the AmazonFreeRTOS component which seems to me to be independent in some way from FreeRTOs:

imagen_2021-09-24_153811

So what I would like to know is if with AWS there is an example of a TCP/IP server.

Seems the AWS shadow (example) is at a higher level than basic TCP/IP.
Sorry - I’m not sure what you’re looking for and unfortunately I’m not familiar with AWS IoT yet.

1 Like

Ok, thank you very much for writing. I am going to put up a technical ticket to the manufacturer of the microcontroller, any comments, I will answer it here. :slightly_smiling_face:

I’d like to understand your use case. The AWS IoT Device Shadow service is typically accessed through an MQTT client, for which I recommend coreMQTT. See:

1 Like

@gooddan

Thank you very much for answering.

The reason why I want to add a tcp/ip server to my hardware is because I want to configure and control the hardware without the need for the Internet.

That is to say that when for some reason the internet fails, but the local network remains active, the user can still continue to interact with the hardware independent of Alexa.

At a guess from the earlier image, you’re using a PIC32 - I stumbled across an article showing someone using a mongoose server on such:

On the other hand, if you can run an MQTT broker on the local network (I run mosquitto on raspberry pi zero w) then you can use the same MQTT client to connect to both the cloud and the local broker.

1 Like

Hi.

I have followed the following tutorial and I have managed to add a TCP / IP server in the AWS example, it works correctly.

Create, Configure and Bind a TCP Socket

Thanks @gooddan for the suggestion. It would be interesting to use MQTT instead of HTTP, but at the moment I’m still learning everything related to RTOs and AWS IoT, I hope to do so in the future.