.net to QT networking outside home network [duplicate] - c#

This question already has an answer here:
making a p2p applicaion beteen QT and .Net [closed]
(1 answer)
Closed 8 years ago.
Hi I want develop a communicate from a.net application running on Amazon AWC or microsoft azure
to a QT application in a Linux device in a local network (connected to Internet using a router).
I tried with QTWebApp in Qt and create a server in the device. it work in a local network. but cant find the app without port directing in the router.
basically i want someting like p2p kind of connection.
when QT app switch on, it to send a message to .net application with ip,port etc witch can be use by .net app anytime to connect to the QT app.
Somthing like signalR or p2p or any good solution....

If you want to do it without any changes to the port redirection in the router, you'd be best off opening a connection from the Qt app and polling the .net application on the server for data and then acting upon it in the Qt application. Trying to do it so you're opening a connection to the Qt application from the .net application will require a fixed IP and a redirected port.

Related

developing UWP Remote dekstop viewer

I wants to develop a UWP remote desktop viewer application. I had already gone through many tutorials but those are all of winform application and I can't port them into uwp. So that desktop can be viewed from windows 10 mobile. I have zero knowledge regarding this so anyone can help me from where should I start and also if someone having UWP remote desktop code so that I can understand its working easily.
I am afraid you cannot develop such application easily in the Universal Windows Platform. Microsoft has its own Remote Desktop app, but it is definitely using some APIs which are not publicly available for the connection to remote computer.
To develop such app you would need to capture / record the screen on desktop as well as capture all input and relay the input from the remote device to the source.
You could create the desktop side of the app using Windows Forms / WPF and connect to it remotely from a phone, which would just act as a display and would capture and send the user input to the desktop counterpart.
There is also a small chance you could implement the desktop app in UWP with the help of Brokered Windows Runtime components, but that would be very tedious work.
Once again however, developing this is a major task, which is more suitable for a team of developers.

Handling gpio value using localhost

i am making a Universal windows Application for home automation, the app UI and hardware interfacing is ready and working
i'm using raspberry pi 2 to serve as gpio
and i plan to use the same app on my windows phone to trigger the ON/OFF request over same local network
the GPIO Hardware interfacing is done and is working
i'm stuck at a point "How do i communicate between my phone app and raspberry pi?"
they are connected to same wifi network
i am a C#/.Net person, and any solution available over internet is for Python/Java.
There are several solutions for your question but none will involve only C# on the raspberry side. What I did (is one of the solutions available but you can choose to use pyton, for example) was to use Node.JS and run a server on a raspberry pi and connect to that server (it could be any type of server TCP server, telnet, web, etc.) and connect from C# to that server and then interact with your GPIO normally. There are libraries in Node.JS (https://www.npmjs.com/package/pi-gpio) to control GPIO so you can write code to handle a connection from your C# app and when connected turn on/off a certain GPIO.
Something like the following will create a TCP server on the raspberry pi and from your C# program you will need to connect to that IP (raspberry IP) and port (1337) and do whatever you want to do.
It is worth the time it will take learn Node.JS (it won't be complicated if you already know C# but it will take time to get used to the syntaxis but you can do so much after you know how it works).
var net = require('net');
var server = net.createServer(function(socket) {
socket.write('Echo server\r\n');
socket.pipe(socket);
});
server.listen(1337, '127.0.0.1');
NodeJs is probably a good portable choice.
But if you want to do it from Windows in C#, ASP.NET, check out the Nusbio device.
You can control gpios from a web site. See the Console demo which use the Nancy web server.

I want to remotely run linux programs and return output using C# or similar language

I am planning for my Capstone for my degree.
In this project I will be utilizing an ARM board loaded with a specific linux distribution. (Currently either Debian or Ubuntu based.)
This ARM board will be sitting on a network using either WiFi or wired LAN or combinations of both or multiple WiFi connections.
I will be using a PC likely running Windows to access this ARM board. Due to the nature of the intention of this setup I will NOT be using the LAN connection to control the ARM board but will be using a USB connection from the PC to the board.
I have seen some applications on an Android tablet where they install a Ubuntu host and run it on the android box in the background. They can then access this via VNC, telnet or ssh. They then have built native applications for the Android that communicate with the Ubuntu host and remotely run software on the Ubuntu host and use the data returned. Basically they are building a GUI that remotely runs the commands and displays the results in some form.
I want to build a system for my capstone that uses 1 or more ARM boards to do menial work while the PC listens to them and returns status as it becomes available.
I have seen mention of using socket programming and the Expect package written in tcl. Are these the best technologies I can use or is there something better for me to look at? Currently I am doing a bunch of work in both C# and Java but the end result program I will be building is likely to be in C# so I am looking for information to head me in the right direction. I am 3-5 years away from my degree so I am not against making a new library in C or C# to do the work for me. So porting Expect COULD be an option. I ultimately need something that works very quickly due to the nature of my intended application and I need isolation of the PC from the LAN so I will NOT be using the LAN for the control connection.
Thanks for any help or guidance!
Rodney

C# application to connect to a mobile application using bluetooth

I`m asking this question again as I got no answer for about a week now ...
I want to know how to write a C# desktop application that can connect to the mobile version of the same application (that I will create). The desktop application will be used as a backup/restore for the mobile application.
I want to know also how to write the mobile version (using C# if possible).
May i know, in what way you want to communicate with the mobile version of the application? Ideally the cross domain/application communication is possible using services(WCF/Webservices).
I hope the following link may be useful for you : Bluetooth in C#, Which stack, Which SDK?

Terminating and Starting Data Connection on Windows Mobile 6.5 in C#?

I want to create an easy application for windows mobile devices, i have recently got a HTC HD2 and the connection is being eaten by the weather app, email accounts and windows live service :#
I am getting rather annoyed with this and well I have set myself a project to give myself a small piece of glory and create a working application that will Terminate an idle connection on my phone.
I am using C# and the latest WM6.5 sdk.
How do I access these controls?
You should use the ConnectionManager APIs to access device connections. It will create them or hand existing connections to your application. Closing a connection is actually very difficult to do (probably becasue it's not terribly nice to tear a connection out from under another running app) and has to be done via P/Invoking to RAS.

Categories

Resources