VB 2010: Connect Application To an IP address - vb.net

I am trying to modify a program I have built in using VB 2010.
It is a Race Manager for Car Races.
I would like to connect my application to an IP address where the time and scoring sends out laptimes for each car and driver and the position of every car on track.
I know the IP address and the Port.
Any idea about the path i need to follow to be able to show the data from Time and scoring on my software correctly?
Thank you

I'm not sure of your question, but to connect to another computer you can try using sockets and I suppose this app you are doing is a client side (in Networking terms) because if its a server it would only listen for incoming connection requests so here is what I have used on my project.
I've installed Visual Basic 5.0 because I also use it to create unInstalled programs. So it came with a very nice tool called Winsock which I used to make my apps communicate with one another over network so it you have it on your computer I think your life will be a bit easier so you need to load it to VB 2010 as a tool and add it to your project then depending on how you want your app to connect to remote pc but I made mine connect on form load meaning on startup. So here is how you connect it using Winsock:
' Connecting
AxWinsock1.RemoteHost = "The IP address you want to connect to here"
AxWinsock1.RemotePort = "The Port you planing to use here"
AxWinsock1.Connect()
' Send data
AxWinsock1.SendData("Your data here")
There you are connecting and sending data.
Hope this answered your question.

Related

What is the best way to send data to PC from "MCU + Wifi Module"?

I don't know anything about wireless protocols. With this quick setup i want to get inside. I just want to write a windows desktop application which receives only a couple of bytes of data from a mcu+wifi module "NodeMCU" which is connected to the same router. I can write a simple desktop app with visual studio. But sending data over ip has many methods as far as i read.
What is the simplest way to achieve? (I'm experienced in STM32 mcu's and electronics except internet protocols.)
You can send the data from the embedded board (with the mcu) to a TTL-To-WiFi module. Then from your PC application you should open a socket and connect to the module IP to listen in the correct port the data from your board.. There are a lot of module in the market used as "bridge" or converter: you have only to setup in it the local IP address, the destination IP (your PC) and the TCP port where you want to send data. From point of view of the board you use a standard USART and the message is sent to the destination IP. In your PC application you should be able to create a socket and connect it to the wi-fi module.

How to run desktop application using SQL Server database on other computer without LAN or on different ip address like as web based

i have a problem i'm new in window form application in C#. Currently finished
a app that run on LAN means on the same network.
my Question is that i want to run the this application on different places
means online this app using single sever .
please suggest me what i do for that
Thanks to every one.

how to transmit serial data from GPS device to computer through IP?

Well..I have found some third party application regarding sending data from com port to IP. but I have not found any basic tutorial regarding them. so can anyone help me with this? I have a GPS device which I will connect to my laptop through usb to serial adapter.Now I need to send that data from a laptop to another laptop on same network. Can I use putty to view that data in another laptop(receiver)? Is virtual serial port driver meant for this kind of application?
If you do not want to write your own tool for it, you can simply use ncat and set up a daemon that reads piped data from one process and broadcasts it to all connected clients.
If you want something that reads the data from the serial port and then transmits it to clients, you'll need to write a server application that accepts connections and sends data around, but there's entire books on this. It should be easy to do for your purposes as written here, but it depends on the amount of control you need.
Alternatively you can use a virtual serial port application as you had mentioned, which might be the easiest route. The two devices will need to be on the same network unless the application supports TCP based virtualization instead of the common Ethernet based implementation.
This Python script works very well as a free "device server". Just enter the serial port configuration and the IP address and port information.
https://github.com/jaredly/pydbgp/blob/master/symbian/serial_tcp_redirect.py
This can work on both Windows and Linux.
You need pyserial.
You can always try using stand alone hardware such as the SENA LS100 device server.

How to get VPN user through Excel VBA

My scenario is: I have a server in the main office (where few users work) and the majority of the users are in remote locations, and they connect to this server through VPN. In the remote locations the computer have its own name and user, and then the user connects to VPN to get access to main office's server.
I am using excel to send some information to a database in the main office's server and I need to achieve 2 things through VBA Excel:
1.- Know if the remote user is connected to the VPN or not.
2.- If is connected which is the VPN user that is logged in.
I have been researching a lot all the articles related to this, but the functions explained in the articles, returned me the PC Name or the user name in the PC, not the VPN user. I need to get the 2 points that I explained before. How I could do it?
Thanks in advance.
I don't know exact answer and i couldn't find useful solution in VBA, but this VB code might help you. But i need to warn you, this solution is proper only for MS VPN connections and won't work with Cisco ones.
For Cisco VPN - check: AnyConnect VPN Client API. with few examples in C++ and full documentation.
See similar question too:
Find and start a VPN connection in VB .NET
VBscript VPN (PPP adapter) IP address
VBS script using WMI objects to get IP address of VPN PPTP connection

Server-Client Data Exchange using MySQL (VB.Net)

Here's the situation. I developed a simple examination system with registration forms. I used VB.Net as the programming language. I haven't tried manual coding for my problem yet.
Anyway this is a project for the company from which I am an intern.
The plan is to get every client pc to have this examination/registration application and this application will send the personal info and the score to a central database(server pc).
I used MySql as the dbms and developed the application on the same machine which means that the Database server I used is only on the local host.
Now I was about to try to implement the application to one client pc(as a beta test) and installed the necessary files(.net framework) and I also installed MySQL Server(and workbench) in the server pc.
When I run the application in the client PC it didn't detect/connect to the ServerPC's MySQL server instance and therefore was not able to record the dummy values I input in the client application. Take note I changed the connection string of my app to point to the ip address of the serverPC.
Now my questions are the following:
1)What have I done wrong?
2)Should I install the MySQL Server(and Workbench) to every ClientPC so that I can create a server instance that uses the REMOTE HOST option and configure it such that it will connect to the SERVERPC's Database?
3)How should I setup the server so it gives access to the application I installed in all clientPCs?
I'm pretty new to VB.net and mostly learned from internet sources. I haven't tried manual coding. Mainly because the tools in VB.net are slightly easy to understand thanks to intellisense,the drag and drop tools and also the help topics.
Anyway I hope anyone helps me. Advance Thanks and If the information i've given is not quite complete please point out to me which info I forgot to add.
EDIT:
Additional info, the client pcs and the server pc is in one network.
I also granted every privelege to the serverPC settings of MySQL.(it's just for the test run)
Did you enable the MySQL user for localhost only access? You can check this in MySQL control center by browsing to your 'mysql' database, 'users' table, am ensure the host field of the user is set to % and not localhost, allowing them to connect on any NIC, not just the loopback (localhost) adapter.