Re: No comprende
> Except when the device has to communicate its data elsewhere. Or talk to the smartphone app that controls it. Etc,
Those don't need complex layered protocols. If the functionality is simple, the protocol can be simple. e.g. a sensor application will be returning the same data over and over - so it can be as simple as encapsulating the binary data in a UDP packet & handing that over to the network hardware. (I won't go into security question here, the trade-offs involved would make for an essay but suffice it to say that cheap microcontrollers like the XMEGAs have AES encryption support in hardware...).
Bluetooth is handy for smartphone comms - and is increasingly integrated in microcontroller hardware and supporting bare-metal software stacks. e.g. Cypress PSoC BLE (which would be my favourite platform for hobbyist projects). So, don't need an OS for that.
lwIP is a free TCP/IP stack that can integrated with an RTOS (e.g. FreeRTOS) or be used bare-metal. Doesn't force a requirement for an OS. There are also wi-fi modules available that allow one to offload the wi-fi and TCP stacks.