I'm working on a project and am looking for a way to connect with ESP8266 via WiFi module on ESP8266. I have to build use this method, through the windows desktop I can control the movement of robot. From C# to ESP just like remote control project. I have a lack of knowledge of C# same as basics of servers/internet but I have everything done in Arduino IDE code and control the robot through web browser but I'm stuck on Communication Wifi between C# and ESP866. I need some help. Thanks in advance
You can host a REST API Server in the ESP8266 with the using the ESP8266WebServer and use your usual REST Programming in C# like RestSharp or Flurl.
Related
I want to create a vpn application such as "Touch VPN" or "Hi VPN'
How to use xamarin to connect to vpn server using .open files in the background?
There are several example source codes in Java
But I never found any source code in xamarin c#
How can I use c# for that purpose?
Please see example Xamarin.Android VPN service demo: https://github.com/luqmanhussain/XamarinAndroidVPNExample
Accodring to your several examples, you can convert java to C# code as well. There are some tips when you want to do that.
https://learn.microsoft.com/en-us/xamarin/android/get-started/java-developers
It depends on which protocol you need. But if you need a custom protocol or want to develop your own protocol in .NET using Xamarin, you can see our VpnHood project, a component base VPN via NuGet packages. It is in C# and uses Xamarin to develop the client for Android.
https://github.com/vpnhood/VpnHood
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've got some piece of hardware that uses ModbusRTU. Using a TCP/IP Gateway for ModbusRTU I can now control the hardware using my C# application over TCP/IP. This works.
Now I would like to control it with my android phone.
Yes, I could make an Android app, what should be no problem for me, but I want to make it more special for myself to fix it with the web browser. That way I'm even more flexible since other OS's should be no problem too.
I'm interested where I should start looking if I want to control the hardware by using the web browser. What programming language, what are the server requirements.
Please mind that I've have very little experience with web browser programming but I'm eager to learn it. Did just some very simple things with PHP / Ajax.
Fyi, the ModbusTCP packeds are really simple, I only control some lights on/off/dimming at my home and to enable some equipment.
I am currently playing with the Marmalade Quick beta which can open a TCP port in Lua. This is a simple high level language, with a build system for Android.
http://quick-docs.madewithmarmalade.com/
Which Modbus lighting controller are you using?
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?
I would like to build an offline desktop application that could carry out the basic sms functions with the usage of a GSM modem. I currently have a HUAWEI modem which was given to me by the telco company to perform wireless surfing and sms messaging services.
Does anyone have a sample project that i could reference to.
Was intending on using dll libraries such as SMSLib and GSMCommunication Libraries but was fearful of the potential bugs and incompatibility issues that it might be carrying. Hence, i am learning the various AT commands but do not know exactly how to program it in Visual Studios. Hope you could advise me on it.
I was using ActiveExprerts SMS and MMS Toolkit, they have a good example on how you develop stuff from it and it supports a lot of GSM Modems, Mobile Phone and SMPP SMSC Providers. If you need further help I have an old project which I implemented but its in VB. Have a try and let me know its in www.activexperts.com.