networking - Is it possible to create a WiFi TCP socket between two computers in a LAN?

05
2014-04
  • Shaun Luttin

    Here is our setup.

    The documentation says that:

    This allows for real "Socket" connection over WiFi...

    and

    ... [the Wifi module] is a complete IEEE 802.11bgn WiFi client device

    We have succeeded at the following:

    1. Connect the Wifi module to our home wireless network.
    2. Make an HttpWebRequest to an arbitrary Internet server.
    3. Open a socket to an arbitrary Internet server and receive data.

    What we want to do now is to open a TCP socket to our Desktop Computer (ASUS A55A with a standard setup). Here are two options:

    • Connect the Cobra and the PC via the Internet (WAN). This seems like overkill.
    • Connect the Cobra and the PC via the Intranet (LAN). This seem preferable.

    That's the question. How do we create a LAN between the Cobra and the PC? Here are some sub-questions:

    • Does this entail turning the Cobra into an Ad-Hoc Host?
    • Is the router required?
    • Or, can we circumvent the router and communicate directly between the Cobra and PC?

    Diagram of the Goal

    Application on Cobra II
       |
       |
       |
    Wifi Module in Cobra II
       |
       |
       |
    Wireless TCP Socket
       |
       |
       |
    Router 
    (required?)
       |
       |
       |
    Wireless TCP Socket
       |
       |
       |
    Wireless Card in Desktop Computer
       |
       |
       |
    Application on Desktop
    
  • Answers
  • ultrasawblade

    If two computers are going to communicate via Wifi without an access point, they need to be in ad-hoc or IBSS mode.

    If you literally want to create a LAN, you will need a wireless bridge capable of running in AP mode. A typical consumer router does this, and also bridges the wireless interface to the wired, so it all is on the same network.


    Consumer-level wireless routers are a couple devices in one:

    • a router
    • a wireless bridge that can work in AP mode
    • a wired switch

    You don't need the first component of this. As long as you don't connect anything to the WAN port of the router, you ought not to be bothered by the actual routing functionality.


  • Related Question

    wireless networking - Comtrend 536+ selectively blocks web pages when using it via wifi. No problem whatsoever via LAN
  • friguron

    I've just obtained a Comtrend 536+ ADSL2+ router and I've easily managed to setup a proper LAN/wifi configuration for my home machines, laptops, smartphones and such. I'm more than used to do it.

    The awful thing comes when I'm using its wifi capabilities, because I've discovered that certain webpages/domains are just being blocked when connecting via wifi. On the other hand, when I browse these pages via my main desktop PC (XP), which I connect to the router via LAN, I have no problem whatsoever. So I'm basically clueless, because I've started to look for some kind of wifi/filter configuration menu inside the router's web management interface, but no luck.

    One could say "probably it's your firewall/antivirus/whatever on your wifi machines the one interfering". Well, I've discarded that because it happens with a XP machine (no antivirus), but also with a Jolicloud netbook, an iTouch and an Android phone. And no matter the web-browser I use (Opera, IE, wget, telnet:80) web browsing these pages causes a time-out connection error. BTW, it's not only happening when web browsing but also with other programs, like for example Dropbox, which remains always in "connecting" state, when run on my wifi machines.

    Examples of webpages working:
    -ALL google services/pages/market
    -www.elperiodico.com
    -some FEW other...

    Examples of webpages NOT working:
    -facebook.com
    -lavanguardia.es
    -www.dropbox.com
    -MANY other

    I can't seem to perceive a pattern on the working/non-working pages, so I'm still clueless. I've tweaked my DNS settings (inside the router and inside my non-working devices) and no luck either. I CAN access webpages living inside my "working PC"'s apache from the "faulty" devices, but as soon as the router needs to look for webpages on the real world internet, no luck.

    BTW, pinging ALL the faulty webpages/services works ALWAYS, so I would say it's not a DNS problem, as I can even see how DNS appears as properly solved when pinging.

    Whenever I reconnect my old (and sometimes faulty) Amper Xavi 7768R wifi router, and with no change on the non-working devices wifi settings, EVERYTHING works seamlessly again. So it's something inside my new router which I should address.

    Any hint? I don't know what to look for now...

    Greetings


  • Related Answers
    Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.