I am working on a lighting control app and need to send command strings from smartphone to (and possibly from) a controller on the local wifi network with a fixed IP address. Just something simple like "@SS3 A1 F5#". The controller I'm sending to will recognise the @ and # as start/end message characters. Would it be as simple as this or is that wishful thinking?
I imagine that will send a complete HTTP message (with its header and other overhead) instead of the plain string you are defining.
You can install an IP traffic analyzer (maybe Wireshark but there are others simpler) in your PC, point the web component to the PC IP address and execute the app, to check what arrives.
Hope this helps. Best regards!
Pablo
For sending a simple "AAA123", the Web component adds all the HTTP overhead. I tried it both with POST and with PUT.
I guess a low-level extension would be the only way to do it.
Another solution, involving some hardware and Arduino software development, would be to connect the phone to an Arduino with a Bluetooth module (HC05/06), send the message via BT, and then forward it from the Arduino to the controller using a Wifi module with no HTTP, just plain TCP/IP connection and messaging. That may be *very* expensive (compared to the price of the controller) and somewhat complex, but it should work.