Question

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:

  1. A single wireless card can be configured to operate in adhoc mode programmatically using the Windows Wireless-ADHOC API
  2. Ad hoc mode usually excludes infrastucture mode unless the adapter's driver supports it, so connection from a node to the real internet would need a second adapter.
  3. Our program would have/need exclusive control of the WiFi adapter.
  4. The mesh aspect is achieved independently of the adhoc connectivity by a routing protocol such as Babel.
  5. Internet would have to be provided through some new virtual adapter that is created by our program. (What role does this new adapter play that makes it the adapter that any network aware program should choose to consult for internet access?)
  6. If a real internet connection is available on a node, this would be shared by that node to other nodes on the mesh through the Babel implementation
  7. Whether or not internet is available from any node, not sure what services could be hosted within the mesh itself. How is resource/domain name resolution provided?
  8. If the current node has internet, any requests to internet resources would go directly through it and any resources within the mesh would go through Babel. If direct internet is lost by that node, all traffic would go through Babel. Does this need to be programmed for or does the windows network stack know how to deal with this, assuming our program is written correctly?
  9. Since this is Windows 7+, IPv6 is a legitimate choice for addressing nodes in the mesh, however, not all internet connectivity is expected to support IPv6. Some might. How do we define the internet segment from the mesh segment?
  10. The mesh can be arbitrarily large and Babel and the other components would be able to handle it with good bandwidth, low memory usage, and optimal path convergence.

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.

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top