Connecting two machines wirelessly without router or ad-hoc network - networking

I have been struggling to find a definitive way to be able to connect my two computers wirelessly without a router and without setting up an ad-hoc network. I really hoped it would be as simple as changing my network adapter settings to have static IPs, say 192.168.5.10 on the first machine and then 192.168.5.11 on the other machine. But unfortunately, I can't even see these IPs on the output of ipconfig (or ifconfig). I have been researching this for quite a bit and no success yet... Any guidance would be greatly appreciated!!

Check WiFi-direct - it's designed for your use case. However, currently it's only supported by mobile devices (Android or iOS).
On desktop, maybe you could install an app and make one machine itself behave as a router, and let the other one connect to it. But I guess this solution doesn't solve your problem since it's no better than ad hoc mode.
The last solution I would suggest is a little painful: record MAC addresses of both machines, and generate the MAC frame by yourself somehow. This requires interception into the WiFi driver.

Related

Serial COM port data over WebRTC

I'm currently looking at options to allow me to build a remote COM-port solution.
The idea is to be able to access from my remote PC, another PC that's directly connected to a device locally via its serial COM-port.
I know that the obivous answer is to use a VPN between the 2 Internet connected PCs.
However, I need this solution to be as seamless to the end-user as possible.
i.e. no installing and configuring VPN software, etc.
So I was thinking that WebRTC would be great because the end-user can simply use their web-browser and not have to install any additional software.
My question is, is it possible to stream the COM port data between the 2 PCs via WebRTC?
If so, can you please point me in the right direction as to how I can go about achieving this?
Sorry if this is a ridiculous question, I'm very new to WebRTC, just exploring my options.
Thanks.
That should work great!
Networking wise you get NAT Traversal. That means the two computers can be in completely different networks, and still communicate. You may have to run a TURN server if P2P isn't possible.
Data wise you can exchange anything you want via data channels. It is datagram based and you can send/receive binary data. You get a callback telling you how much has been delivered, that way you can detect backpressure.
Are you ok with installing software on the remote host? You can do something like Pion WebRTC's data-channels. This shows you can have a browser connect to a Go process via WebRTC. Then use tarm/serial on the remote host to interact with the device.
If you want a browser on both ends there is the Web Serial API I haven't used it myself though. That locks you into only doing Chromium which might be an issue.

Implementing VPN in an embedded system using LwIP

I've been asked to implement VPN capabilities in an existing software project on an embedded system, in order to make the device available via network to an external server while avoiding trouble with firewalls (no need for encryption, just to make it accessible).
Unfortunately, the embedded system is based on a Cortex-M4 MCU, therefore Linux, which would allow for VPN nearly out of the box, is not an option. All I've got is an RTOS and a working LwIP stack.
I've used VPNs in the past. However, my network knowledge is rather limited concerning implementing VPNs, so I'm rather stumped. As I think, I'd use the current LwIP instance for building up the tunnel connection, and the application would use a second instance for the actual network communication, while the network interface of the second instance is a virtual one (like a tap device on linux), encapsulating its low level data and tranceiving it via the tunnel connection of the first LwIP instance.
Maybe this way I'd be able to create a custom solution for the problem, but the solution should conform to any standards (as the server will be any kind of sophisticated system).
So I wonder if anyone has been confronted with a task like this, and would appreciate any hint what to do, at least a direction where to look at.
Thanks in advance!

is it possible to limit the network traffic from my PC to my PC?

Hi Guys I'm debugging some CS program and to view the performance of the application in slow internet I tried many different ways. However the best would be the Server and the client be in the same PC ---- my debugging environments for both the server side and the client is setup in one PC.
So I'm wondering is there anyway to limit the speed? I'm using TCP but I don't know too much in-depth knowledge of it.
Thank you
There are two important factors regarding a "slow" internet connection that you need to test out since they have different implications for your application: bandwidth and latency.
If you provide some more details about what os you are running your tests on, it would be easier to recommend a way to limit the network performance.
On a related side note, it's generally a bad idea to performance test any kind of networking using the loopback device on your machine, since many aspects of this will perform very different than the regular network device on your machine.
You mention in the comments this needs to be done on windows, while the Network Emulators I know of (e.g. netem, TCN, other variants) all require Linux. So one thing you could do is create a virtual machine (VirtualBox is fine, I did similar things with it), install linux on it, configure 2 network interfaces, emulate the slow/long/lossy/jittery network between them, and route the test traffic through it from windows.
Finally I found this does what I need.
http://www.nirsoft.net/utils/socket_sniffer.html
Captures Windows Socket traffic, no matter it's local or not.

Is there a packet sniffer for Windows Mobile?

I'm looking for a tool along the lines of Fiddler, or better yet Wireshark, that would run on a Windows Mobile 6.1 device.
I have an app which calls some webservices on one of our servers, and I want to make sure it it going out to the proper address.
Whenever I want to test something like that I connect the device to my PC and use ActiveSync. The mobile device then can send all of it's internet requests through the PC. Wireshark can then be used to sniff the traffic coming in and out of the device. Works good and is a stable approach.
I recently had to search for this myself. There are a few of these out there but most are old and have not been updated recently. If you are looking for one to sniff the WiFi traffic it should be simple and Google should provide something suitable. However the issue I ran into (and could not get around with about 3hrs invested) was trying to sniff the EV-DO/Cell data connection. Seems the cell radio uses a different type of network driver then the WiFi connections on a WinMo device. Not much of an answer, sorry, but I figured I would share my experiences.
There is an experimental version of WinPCap for windows CE.
Maybe it will work for you.

How do I tell if a bonjour service is wi fi or bluetooth?

I am building an app that sends information between two iPhones. The app is working great but the one problem I am having is that I have no way of telling whether bonjour is choosing wi-fi or bluetooth to make the connection. I would like to allow the user to be able to choose which they prefer. Also, is there way to programmatically tell is the device's bluetooth is on?
There is NO WAY TO TELL.
It's just one of those weird things.
And in fact there is no way to programmatically choose WiFi or Bluetooth. It's annoying but true.
Often, multidevice games will have a warning for users:
"Be sure to TURN OFF Bluetooth, to
ensure you are using your WiFi
connection."
That's the situation.
Bonjour is just a service discovery protocol - it doesn't care what kind of network you have. It will discover services across a mixture of networks (e.g. via bridges and routers), so it doesn't really make sense to try to map a service discovered via Bonjour to a single type of transport layer.

Resources