Arduino project on a server - asp.net

I am building a project with asp.net that connects to Arduino Uno. I am connecting some magnetic sensors to the Arduino and I want the results of the sensors to be updated in real time within my database in the project at asp.net.
So far everything worked fine.
My college gave me a server where I was supposed to set up my site and put up the project.
When I work on my computer (regardless of the server) I see that the Arduino is connected to COM3. But when I connect to the server the Arduino does not appear connected (I guess because the Arduino is connected to my computer and not to the server computer).
I know there is a possibility to buy an Ethernet shield / wifi shield but I want to avoid it.
Is there another possibility to transfer the data received from the Arduino in my computer, to the database on the server?
The server is a Windows server with IIS.
Thanks.

The Arduino needs to be able to connect to the server. You could connect it directly to the server or have a client on your computer talking to both the Arduino and the server.
Or you could use a Raspberry pi or other device capable of communicating directly to your database server over the network.

I've opened a sharing folder with premissions from the sever and then put the entire asp.net project and now he recognize tha Arduino.

Related

Discover raspberry's IP

I have a Raspberry with win 10 IoT, working as a main server for a cloud of sensors. In the raspberry I have a server that broadcast its IP using UDP broadcast. Then all my distributed sensors notice it and connect to the Raspberry via TCP and the fun can start.
I added a web server to the raspberry to be able to monitor the status of my sensors and then I encountered a funny problem .. how do I discover the IP of the raspberry to be able to enter the website ??
All my sensors (and the PI) have hardcoded the SSID and pass of my WiFi at home. But the thing will need to be portable. In theory I plan to set the pi as Access Point and hardcode in the sensors the SSID of the Pi and have a portable system.
Can a Pi on Windows IoT be set as AP ? When doing so can it's IP be forced ?
Can a Pi on Windows IoT be set as AP ?
Windows IoT Core device can be set as soft AP. When the Windows 10 IoT Device have access to the internet (e.g. through a wired LAN connection), it can share the Internet access with other devices connected to your device over the Wi-Fi SoftAP via Internet Connection Sharing (ICS). You can follow this tutorial to do this.
When doing so can it's IP be forced ?
You can set a static IP address to the device. For example, via the device portal, like this:
More information of setting static IP of the Raspberry Pi running Windows IoT Core you can reference this thread.

Unable to access Arduino Yun board using arduino.local

Windows machine: After configuring on-board WiFi, I cannot access Arduino Yun board using arduino.local. However while configuring, I gave name of the board exactly arduino.
Linux (Ubuntu): However if I repeat same steps configuring WiFi in Ubuntu, I can access its webpanel using arduino.local in browser.
Any solution how can I access from a Windows machine. Or how to figure out IP address of the board to access its webpanel?
You should follow the instructions on their site very carefully.
Specifically:
NB: The Yún uses Bonjour services for auto-discovery on a wireless network. This service is not included with Windows by default. If you do not have Bonjour already installed, you can download the service from here. Additionally, you should make sure any anti-virus software is not blocking communication on port 5353.

How to access to my personal computer from work using VNC

I want to access to all kind of webpages without restriction from work, so I thought I could set up a vnc server on my raspberry pi, forward 80 port to 5900 port (for example) on my router and try to access to my raspi from work using a client like RealVNC. Now the question would be, Is this going to work? If not, what would be the correct solution?
Start with this video overview: Raspberry Pi - How to put your Pi Online
Use the TightVNC Server as it is widely supported and compatible with the Raspberry Pi. Here's a tutorial on how to setup a Tight VNC server on the Raspberry Pi: Raspberry Pi - Installing VNC server
Setup Dynamic DNS on your Raspberry Pi. This will give you one address to point your VNC viewer at that will stay the same. With out it your address may change every now and then at the ISP's discretion.
Setup TightVNC Viewer on your work computer and point it to your new dynamic address and your TightVNC servers port. Then connect.

Moxa NPort 5210A Functioning

I need advice on this product Moxa NPort 5120A I use to convert the serial outputs of some ethernet cards in order to be able to connect to the network.
Using the Realcom Mode, but whenever I connect it to your network and want to use a software from the PC to control it I need to open the software NPort Administrator, add the device, and then open the Web console, otherwise the doors do not appear to be open and if I do not open the web console software NPort Administrator (with the appropriate button) and I type the IP address of the port in the browser always comes back to me that the server is not responding and I do not load the web page. Has anyone had experience with the Moxa and their products? And 'it possible to use this module that I always have to open the software and open the Web console without having to change any settings to enable the COM port?
Thank you.
Normally with these types of devices you use TCP/IP sockets for communication with the device(s) on the other end. In your application you create a socket and listen for connections. Once a connection is made you process the data coming in and send data out to the device.
You also configure the device on the other end to tell it to connect to a specific IP address/port which is the server or PC running your software which is listening for the connection.
It sounds like that device also offers a device driver that can be installed and causes it to emulate a serial port. In that case, you would configure it that way and have your application open a serial port and communicate with the device as if it were actually attached to a real serial (COM) port.

Communicate through a VPN link using Arduino UART WiFi Module

The following describes the configuration of the system and other details. The problem is mentioned after that. If the initial description is too much or not needed, please skip it.
I have a VPN (between two SIMs). One SIM is in a USB dongle, the other one is in a WiFi router. The dongle is connected to computer 'A', and another computer ('B') is wirelessly connected to the WiFi router which can access the dongle. The VPN is between the router and the computer 'A' (dongle). As the WiFi router leases 'B' a private IP, 'A' can't ping 'B'. But 'B' can ping 'A'. There is no issue up to now.
I have created a socket-based simple Java network application (client - server pair). The client is running on 'B', the server is running on 'A. Only the client can send data to the server, the other way around is not possible. This part also is OK. Now I need to replace the computer 'B' with an Arduino. I need to send some data from the Arduino to computer 'A' through the same network.
For this, the Arduino needs a WiFi module to access the router. I've this USART WiFi module with the shield. It can successfully connect to the router, (I can ping it from a computer, which is also connected to the router).
THE PROBLEM
Now the configuration is as below.
There's the (server) application running on computer 'A', which is listening on a given port (port 8090). How can I send some data (eg. some text "hello!"), from the Arduino to the computer 'A'?
Please note that for the WiFi module I'm using, I found some examples for applications based on the Arduino WiFi shield. But I can't apply them to my configuration (can I?).

Resources