nuttx-apps/examples/tcp_ipc_server
yinshengkai ee4d8b738f Makefile: replace INCDIR to INCDIR_PREFIX
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2022-11-10 02:38:58 +08:00
..
lorawan Improve tcp_ipc_server LoraWAN module communication 2022-11-05 12:55:40 +08:00
Kconfig Fixed unused variable and improved Kconfig for TCP IPC Client & Server 2022-10-19 15:51:04 +08:00
Make.defs Client & Server examples to use TCP/IP socket as an IPC Channel for LoRaWAN 2022-10-17 18:54:55 -03:00
Makefile Makefile: replace INCDIR to INCDIR_PREFIX 2022-11-10 02:38:58 +08:00
protocol.c Improve tcp_ipc_server LoraWAN module communication 2022-11-05 12:55:40 +08:00
protocol.h Client & Server examples to use TCP/IP socket as an IPC Channel for LoRaWAN 2022-10-17 18:54:55 -03:00
README.md Client & Server examples to use TCP/IP socket as an IPC Channel for LoRaWAN 2022-10-17 18:54:55 -03:00
tcp_ipc_server_main.c Client & Server examples to use TCP/IP socket as an IPC Channel for LoRaWAN 2022-10-17 18:54:55 -03:00
uart_lorawan_layer.c Improve tcp_ipc_server LoraWAN module communication 2022-11-05 12:55:40 +08:00

Server TCP

What's this?

This program consists of a server socket & custom messages to establish IPC for multiple applications (client_tcp) and one process that controls LoRaWAN connectivity (server_tcp). For more details about client side, please see client_tcp example.

This approach using TCP/IP sockets as IPC channel ensures controlled access to LoRaWAN connectivity. The goals of using this approach are:

  • Having a solid and reliable infrastructure to ensure IPC works fine for multiple applications simultaneously
  • Having the possibility to host different IoT projects and solutions that use LPWAN in a single ESP32
  • Having the possibility to validate, test and debug multiple IoT projects and solutions at the same time, under the same connectivity conditions (same signal strength, same antenna, same modem/transceiver, etc.)

Both client and server work on local network scope.

How do I use this?

In order to test client_tcp & server_tcp together, there are two ways to proceed:

  1. Init server manually (command: SERVER &), and after successfull server init, also init client manually (CLIENT 127.0.0.1)
  2. init server automatically after boot using NuttShell start up scripts (check: https://nuttx.apache.org/docs/latest/applications/nsh/installation.html#nuttshell-start-up-scripts )

Additional info

Both client_tcp and server_tcp examples have been full covered in NuttX International Workshop 2022. You can watch the full presentation here: https://www.youtube.com/watch?v=hr0OfTt1KeY The server_tcp and client_tcp examples have been developed by Flavio Ipirranga and Pedro Bertoleti from Instituto de Pesquisas Eldorado (IPE) in Brazil.