Just FYI, I’m new to Arduino and web development but I work using C# on desktop apps (mostly WPF related).
I have a project I’m doing for fun that has a couple of Yuns hooked up to ID20 RFID sensors. The Yuns connect to a wireless router that my pc is connected to (nothing else is on the network, so no web access or anything).
When the an RFID tag is sensed it sends to the C# app running on my PC and the app updates a database with the current location of that tag. I started working on the UNO, but when I discovered the YUN I switched over to try making the project wireless and ported most of my code resulting in some of the work being done in python.
Currently I have communication with the Yun working with two python scripts that send or receive over UDP via WIFI (as far as I understand there is no UDP library for the YUN like there is the UNO). When the Yun first powers on it writes these scripts to the linux side and then it loops sending broadcasts “I’m alive” until the C# recognizes the broadcast, responds and they are “connected” because they know each other’s IP address, from then on the C# app is just listening for rfid tag updates to update a database and the yun is waiting for RFID scans. When scanning a rfid tag the yun calls into the send python script and sends the tag info to the pc over UDP and I then store in the database that the tag was last scanned at that ip address.
This implementation works for the most part but it seems clunky to me, and there is no real way of preventing messages from getting lost since it is UDP.
Is there an easier/more reliable way to do the communication between a C# app and the arduino yun? I’d like to be able to have two way communication between them and be able to detect from C# when a Yun comes online and I’d prefer to not be dealing with passing data to python just to send it.
I’m sorry if this is a really newbie question, I’ve looked into the Server/Client examples and maybe it is just my lack of knowledge on web dev but I don’t understand how I would send and receive strings from them.