1
votes

My question is regarding an ESP8266 board and the ESP-touch technology.

ESP-touch uses the length field of a UDP package to broadcast wifi ID and PW through a device (like a smartphone) to the chip (like in my case ESP 8266).

I want to turn this around, more specifically: I want the ESP8266 chip to broadcast UDP packets with some sort of identifier-number in the length field of the UDP packet, without beeing connected to any wifi connection. Then these UDP packets are recieved by an app on a smartphone so the identifier-number can be extracted and used on the smartphone.

I am relatively new to this topic and do not know if this can work.

When I try to find any information online they all say that the first step is to connect the chip to a wifi. But I don't want that. The smartphone and the chip don't know each other and are not connected in any way. So I want this type of "broadcasting" so that the smartphone can recieve the package without really beeing connected to the chip.

I guess there must be some way to make it function like I explained above, but I can't find a way how this can work.

I don't need the chip to send UDP packets explicitely, it can be any type of package. I took UDP packet as an example because there is already the ESP-touch technology which is more or less similar.

The important thing is that the package that I send has a field where I can put some identifier-number in (not encrypted), which can then be recieved by another device like a smartphone where this identifier-number is extracted.

For clarification: I don't need to use ESP touch or anything related to that. I only stated this technology as an example. I just want to achieve the behavior stated above and in the picture! :)

This is an example picture how I want it to work: enter image description here

2

2 Answers

1
votes

No, it's not possible to send any packages without being connected to the network. ESP-touch or TI Smart Config or similar technologies utilize Monitor mode. As the name suggests, in this mode one can listen for packages, but can't send them.

0
votes

It is relatively easy to connect Expressive devices to the internet for IoT projects but all the WiFi examples start with a network router connection. It seems the ESP software designers assume that a network is available. Unfortunately, there is no warning about including plain text network credentials in development files or IOT device memory. With an abundance of caution, I think there is some risk in this causual practice which I prefer to avoid. Other people do as well for various reasons.

The ESP devices are flashed with some program that makes them visible to network scans using the WiFiScan.ino example. At my location, I see any new ESP devices in a list of about 50 routers in my condo. So the ESP devices must be doing broadcast by default. I would like to know the parameters for this broadcast. Then it should be possible to freely connect two or more ESPs with a program based on class WiFiUDP which reveals remote IPs and ports.