I have googled the heck out of this topic, but I still need help. There are similar questions on stackoverflow, but none match exact (nor do they have good answers).
I want to write a program (if it doesn't already exist and if it is possible) that allows Windows 7+ users to configure an ad-hoc mesh network using a single WiFi adapter and then somehow allows connectivity similar to normal internet connectivity for each node. Bonus is if devices like phones do not need extra software, but can connect to one or more mesh nodes as if it were a standard access point.
I don't know how to do this, but I think:
It's pretty clear that I don't have the background to actually complete this project, but I'd like to understand the outline of a solution. Can you comment on what is right about the outline, what is missing/wrong? What concepts are unnecessary or obsolete because of the advent of newer technologies?
How simple could a node be to operate? How secure can each node be from other nodes attacking them? Poisoning network traffic & routing?
I've read about projects that attempt similar goals for Linux, but nothing for current for Windows. Some discussions of vehicular and emergency responders, but this is different. My interest is, piqued by Hurricane Sandy, in connectivity for popular residential operating systems in situations of widespread urban connectivity outages. When power and communication systems for many are unavailable, the mesh can help.
Almost all mesh participants will not have configured their nodes in advance. Instead, they might look for other's wireless networks when theirs are down and find the SSID "Free Emergency Mesh WiFi" and connect. As with hotspots, they would be presented with a proxied login page that explains the project and offers an install link if they want to participate. If not, they can still connect to the mesh "access point" as a client.
The problem is that you're basically asking to put a single WiFi radio into three separate modes at the same time. In order for the node to talk to other nodes it needs to be in Ad-Hoc mode. In order to talk to the access point (AP) for Internet access it needs to be in Infrastructure mode. In order for mobile phones to connect, well most of them don't support Ad-Hoc networks so you'll need to put your nodes into Master mode as well (make them appear as normal access points). So on a single WiFi card you're trying to juggle three different modes of operation. In theory if the card and drivers you have support raw frame injection then you might be able to emulate the WiFi and networking stacks in your application and juggle all three modes on a single card, but I have a feeling that would lead to a very high rate of collisions, lost frames, high latency, and all the extra CPU cycles would burn through your battery if you're running this on a laptop.
Is it possible? Sure. Is it a practical idea? Not really. You're better off extending the laptop with small/cheap WiFi adapters like the ASUS USB-N10. The extra adapters can handle the extra modes, do the processing in firmware and kernel-space where it's faster and more efficient, and allow you to run each layer of the network on a separate channel for MUCH higher throughput.