Is it possible to set up a simple client server application to send text and other data over a wireless network in a LAN situation between two computers without setting up any network shares? By just knowing the IP address?
Yes. WiFi is just like any other network, you use TCP/IP over it to implement any network protocol you like.
Related
I want to write an app, that establishes direct TCP\IP connection between two devices over the internet.
I have a server to exchange IP addresses and ports, but is it enough to establish a connection?
How to handle cases, where both devices are on the one IP (connected to the same Wi-Fi hotspot)?
Also, I don't understand how open ports on the device could be accessible without port forwarding settings on hotspot? Is there any range of ports open for apps usage?
You are correct about port forwarding for most cases.
TCP/IP is OSI Layer 4 protocol. You need to be able to send data to the sever application with a known IP address and port number. Now when on the internet, this can get more complicated because you normally do not directly interface with the IP address that the rest of the internet reaches you at. This is your public IP address. The modem you have from your ISP likely implements a NAT
, which turns your private address into your public address. You modem will block all TCP SYN requests unless there is forwarding rule specifically for it.
This is just the typical case, you can also look into setting your modem up for DMZ mode and even implementing your own reverse proxy like nginx.
Scenario: I want to have an iOS device connect to a LAN that has no upstream Internet connection, yet still retain and use its cellular data connection.
Theoretically, it strikes me that the iOS wifi NIC and the cellular data NIC are similar enough to dual NICs in a PC that I should be able to set up routing such that any request to, say, 192.168.. goes through the wifi connection, and any other request goes through the cellular data connection.
I did a test to see if both NICs are active when the iOS device is connected to wifi by the following steps.
Ensure that my iPhone's wifi is off and that I have a good cellular data connection.
Disconnect my wifi router's Ethernet cable to my cable modem.
Connect my iPhone to the wifi router.
Use another iPhone that's connected only via cellular data to create a game of Words with Friends.
As soon as the other iPhone completed the first move, my iPhone received a notification that there was a new game to play.
This confirmed that the cellular data connection was indeed alive and well enough to receive push notifications despite the wifi NIC's being connected.
The question becomes, then, can an app programmatically connect to a given wifi network, set the cellular data network to be the default route, and route any requests to, say, 192.168.. to go through the wifi network?
I know this post is old, but I happen to have done some work on using multiple network interfaces on iOS.
My experiments showed that accessing via hostname results in iOS choosing the network interface it wants to use, and not trying any further interfaces if the host cannot be resolved.
If you know the DNS Server IP address for any Ethernet/WiFi based network, you can send a DNS request yourself, convert the hostname into an IP address and access via IP address. iOS will then use the correct interface.
My guess is, that if you have the private class IP address space accessible over both connections, there's probably nothing you can do to specify which network interface should be used.
Is there a way to use a wireless router as some sort of Access Point + Repeater?
I have a LTE Box with a SIM Card that has a build-in router which is pretty shitty.
I now want to connect a proper router to this LTE Box (via WIFI, since the LTE Box has no LAN Port) to get internet access and then connect only to the router (via LAN Port, since I don't trust in WIFI).
The answer depends on your W-Lan Router.
Some devices got a function called WDS -> Wifi Distributed Service.
You need to specify the signal and the login data for the wlan router who should distribute the original signal.
I got a WiFi router connected to my PC.
What I want is to send from another device some data to my PC through the Wi-Fi adapter.
Program on the device is developed using EVC++. The one on PC - on VC++.
EDIT 1:
PC has an IP address.
Another device s IP is set at program execution. I mean WiFi IP address. And then connection to WiFi router is proceeded.
EDIT 2:
What if it uses an ethernet and wifi together?
How should I make a connection through WiFi?
WiFI is no different to usual Ethernel network.
So you just usually find out IP of other computer (in config/ask user/DNS), establish usual TCP/IP connection and send data on.
I am trying to create a RAS server in XP Pro. The idea is to log in to this server via a dialup connection. I have set up a new network connection via the New Connect Wizard in XP - according to this tutorial on techrepublic.
I am sure that the modem and the connection is working, I have tested it.
However, I want to monitor incoming network traffic on this connection. So I thought I would use Wireshark. The problem is that Wireshark does not list this incoming connection on the front page. It lists all my other network connections, ( e.g. my ethernet connection ) but not this one.
Whats the best way to monitor traffic on this connection?
Wireshark should be able to capture the traffic on your connection. I would check the protocol you're using for communication and make sure that Wireshark is monitoring those protocols. Also, I would make sure that Wireshark is actually capturing traffic on your dial up device. It sounds like it's currently monitoring your NIC card, not your modem.
I recently found Microsoft Network Monitor and it has ability to sniff on dialup adapter with Vista or Win7 as OS. Works great!
According to this Wireshark wiki page, you must use Winpcp 3.1 to be able to capture traffic on dial up modems.