Remote access pc on usb 3G? - c#

I develop a application remote desktop on c#. it' work good on ADSL with router add NAT port.
but when i run on computer connect internet use usb modem 3g sim because usb modem not use connect like a ADLS (router), application not work. how i can connect pc use usb model? thanks

If your 3G phone service provider puts you behind NAT then you're short of luck as the NAT prevents any incoming connections to reach your computer.
A workaround is to set up a VPN connection from your 3G-connected computer and set up port-forwarding at the VPN server-side, that way your computer can receive new connections, but they would be tunneled.

Related

Serial Port Over Remote Desktop

need your help.
I have this scenario:
I have to comunicate to a Printer connected to Serial Port, over remote Desktop, in bidirectional communication, it means, i want to send comands to the Serial Port, and get the response of the remote printer, all of this in Remote Desktop.
I successfull can connect locally, i can send commands to the printer in the remote Desktop with a Spooler, but locally i can get the response that the Printer sends me when all finish (close Fiscal Document).
I have tried with c#, but this only works when i the Printer is connected in my local machine.
I am sharing ports, printers in my remote desktop communication, but i cannot get any response from the remote Printer.
How can i do that?
Any help, will be appreciated.
Normally I will send some code, but, i just want some help of you telling me if that is possible, or maybe if you have some examples or guides.
Regards
Firewall is blocking communications.

How to receive data over wifi router in C#

Hi I'm doing a research on wireless networks. I'm not good at C#. Normally, I use serial I/O to send data from Jennic JN5139's UART to PC via USB. I want to connect JN5139's UART output to a wireless router via a USB to Ethernet adaptor.
How can I read data which is sent to the router, and then send the data from the router to a computer over Wi-Fi? I don't even know where to start looking for a solution to this problem. Could anyone offer me a way to do this?
Assuming you have no control over the router, you can intercept the traffic outbound from the computer to the router via your Ethernet device. You can then capture the wireless traffic inbound to the computer from the wireless router using WireShark and a supported wireless NIC. Take a look here in the Wireshark Wiki for more detailed information on capture WLAN traffic and the caveats involved.
If you want to capture traffic programmatically with C# there are a number of frameworks available to you to use. Consider SharpPCap.
In order to have a serial port accessible over a network, you would need some sort of device server. I can highly recommend those from COMTROL and Digi, but there are also many cheaper versions out there.
Once the device is connected, it will be assigned an IP Address and Port. You can then connect to the serial port across the network using the TcpClient class which is a Stream in much the same way as a SerialPort class.
It also seems like Jennic has their own proprietary JenNET to Ethernet bridge. They may be able to provide further support or direction.

Connecting to TCP Server using GPRS Connection

I have Motorola MC75 and I can connect to my Office TCP Server from home using Wi-Fi connection without any problem and send/receive files. But when I use GPRS connection I can not connect to my Office TCP Server.
I have made sure that GPRS is connected to internet(i.e. I can go to explorer and surf the web using GPRS connection(I have turned off wireless at this point)). Can any one help me on this issue. Your help will be appreciated.
Interesting thing is that I have PC at my home and I have static address at home. I can run my TCP Server on my one of the PC at home and I can connect to my home PC from outside using GPRS connection and send and receive data files. But If I try to connect to my Office PC it does not work(My office has static IP address as well). But when I use wireless connection it works fine at my office PC.
I have tried Optus and Vodafone SIM Cards and it did not work.

TCP Server IP Client Connection Issue

OK so I've just started messing with TCP using c#, and I've successfully set up a server that i can send a 'Hello World' Message to, anyway I've been doing this locally (because both laptops are connected to the same router) i just use the 192.168 number to connect. but The whole purpose of it is to work over the internet, and the routers ip address is obviously the same for both computers, if i type the routers IP address it doesn't work, and if i type the 192.168 number that definitely won't work over the internet... So what IP do i use, or what is a better solution?
here's the line of code if it matters
var client = ScsClientFactory.CreateClient(new ScsTcpEndPoint("192.168.1.142", 10085));
Where 192.168.1.142 is the local ip of the laptop with the server started on it
and 10085 is the port.
You have to configure your router to forward any incoming connection to the port 10085 to you local IP adress. Then anyone will be able to connect using your external IP adress.
Each router has it's own configuration system so you have to search "port forwading" and your router model in google.
It depends on what your trying to acheive i guess. If for example your making a chat application. The client (behind the router) lets say its local IP is 192.168.1.111 and router IP is 80.120.78.100. The client would connect to the server.
Once that connection is made it doesn't matter about sending back to the client because the connection is already open between client and server so the server would just use the same connection. The router figures out where to "route" the packet, stuff which generally you dont need to know about.
If however your server is the one looking for clients, then thats different.
I'll try to explain a little about networks, but you'll have to search about it.
Basically, understand an IP mask, such as 192.168.1.0 as one network. Router's role is to connect different networks, that's why a router typically has 2 ports, WAN (wide) and LAN (local).
With this concept, you can see the internet as one big network made from the connection of various ISPs. Each ISP has a router to its network, and another one that gives you an internet connection. Finally, you have a router at your home. So, from this, you can understand that there are 3 networks connected: your home, your ISP and the internet.
In order for you to be able to connect to a computer at my home, I have to make this computer available from the internet, I have to publish it. I do this by setting up a NAT (network area translation) at my router. This NAT says "anything that comes from the internet on port 12345, forward to 192.168.1.10 (my server) at port 80".
This is an extremely simple explanation, ok?
Now, let's take a big step back. If you have another computer available on your network, you can test if your program is working with a much simpler approach.
Connect both computers to you LAN, so they will acquire similar IP addresses. Let's pretend they are 192.168.1.10 and 192.168.1.20
Run the server at 10 and disable all kind of firewalls (Windows and third party)
Run the client at 20 and try to connect to the server

Windows phone: cannot connect to a computer using socket

Situation: there are two programs - client and server.
Server is working on my computer, client program is working on windows phone.
Server is listening for incoming connections ant receive data. Windows phone creates a socket(tcp connection) and sends data.
If I connect win-phone to my computer using USB cable, all works: connection establishes and data is transferring.
But when I create an "infrastructure-network" using the program "connectify", or connect to real wi-fi router (computer and win-phone both are connected to the same network) it is not working. I disabled windows firewall, but it is still not working.
How can it be explained? Where is the problem?
The problem was in ip address string in python server code.
I used "127.0.0.1" instead of "localhost" :(

Categories

Resources