2018-09-02 - By Anubhab De, Sanjay Kshatriya, Zankrut Hiren Shukla, Robert Elder
This article is a review of a capstone project completed by Anubhab De, Sanjay Kshatriya, Zankrut Hiren Shukla. The goal for their project was to investigate the feasibility of attempting to use the ESP8266 wireless module to perform wireless bridging in order to route packets between isolated networks. In the end, the students found that it is not trivially possible to use the ESP8266 module to accomplish wireless bridging in dual station/AP mode. If it is indeed possible for this to work, the students were not able to find such a configuration, and I was unable to provide them with any insights that might lead them to a fruitful solution in the time available. I do still believe that wireless network bridging can be accomplished somehow, although the final solution will likely require deeper knowledge of the ESP8266 hardware and firmware internals, and possibly some clever hacks.
Results and Report
The remainder of this article is dedicated to the investigation that the students performed which may be of use to someone pursuing a similar type of investigation.
Despite the fact that the ESP8266 module supports a 'dual' (station and AP mode) that is intended for both connecting to another WiFi and offering connections to devices at the same time, it doesn't seem to be easy to use this feature easily through multiple ESP8266 modules in order to forward packets in both directions. It is possible that there was a hardware or configuration error in the setup that lead to this conclusion, however the students performed many steps to very that their setup functioned properly. The required voltage of 3.3V was used, and the students were able to successfully connect the modules to a router over WiFi and send data between the modules.
However, when the students attempted to set up two ESP8266 modules with static IP addresses that would only communicate with each other, only information flow in one direction was observed. Here is a quote from one of the students' report in relation to what they observed: "The problem arises when i try to send the data received via module B's softAp to module A. In the data receive callback of module B's softAP, i send the received data to module B's station TCP connection and i get error code (-12) which is illegal argument error."
You can read the full report produced by the students: Engineering Capstone Project ESP8266 Wireless Bridge.
It is possible that there is a fundamental limit on the capabilities of the ESP8266 device (or in the 802.11 WiFi standard) that may this goal difficult or even impractical/impossible, however this was not investigated due to time constraints. Here is an interested thread that discusses some of the hardware aspects of the ESP8266 that may be relevant to the topic discussed in this article.
The goal of this project was to use multiple ESP8266 modules to bridge a network connection over large distances. Unfortunately, this goal was not accomplished, however useful information and experience was gained. In the future it may be useful to consider other methods of accomplishing the same goal with ESP8266 modules that don't rely on the ESP8266 modules' 'dual mode'. For example, it may be possible to use two ESP8266 modules at each node, one in station and one in AP mode, and send the packet information in both directions of GPIO pin using a custom messaging protocol.