Low latency wireless connection between Arduino and smartphone (Android)

Hi,

I want to send data from my android smartphone to an arduino and also receive data back from the arduino. My problem is that I need pretty low latency (~50ms or less).

As bluetooth would probably be the most convenient solution I tried switching the onboard led of an arduino nano on and off with a HC-05 Module I had lying around. I used some bluetooth terminal app on my smartphone to send the commands. It worked, but there was a noticable delay, around 0.75s I would say. That said, I did use the module with its standard configuration. Might there be some options to reduce the delay?

I also have a HM-10 BLE module, but haven't got it working so far.

Furthermore I found this article: Bluetooth HID gamepad using HC-05 module - mitxela.com. What does the HID firmware do different so it can send button presses and joystick position at such low latency?

Are there any other options to achieve a low latency wireless connection between arduino and android?

You can create a wireless hotspot on Android and connect your Arduino via. a wifi shield/breakout. That will give you a TCP/IP connection, which you would then need to use to send and receive your data. I've never measured the latency between the Arduino and the phone so can't help you with a number.

Do you know any tutorials or articles for a setup like you described?

Are there WIFI shields for Nanos? I don't have the space for using a bigger arduino. I was thinking about using the ESP8266, the NodeMcu in particular, as an alternative.
But then doesn't TCP/IP introduce much complexity?