简体   繁体   中英

Data push to a cusom app on a Raspberry Pi from a windows server

The title basically says it all. I am running Debian GNU/Linux 7.0 (wheezy) on the Pi and .Net on the server. This will be for a consumer device so I expect it to just be behind someones wireless router.

I am trying to find someone code this for me and everyone I talk to has a completely different plan of attack and would appreciate some input.

My original plan was to use signalR for most of this

  1. Is there a way to simply get signalR to work on the RaPi?
  2. Will mono work to port the signalR code over? (I've heard mono doesn't work for the pi)
  3. Is there a simple way to accomplish this without signalR which would still easily implement the security features already built into it?
  4. A couple people said I may have to worry about port forwarding issues, why if it works in a web browser without issues.
  5. I can load up a web browser on the Pi and hit my windows site using signalR to push data and it works fine. Sounds fairly simple to me to copy the basic functionality of a browser in .net(my primary language), is it really that much more complicated in Linux?

Overall my main goal is to get data pushed to the RaPi, not polled as others have suggested.

Any suggestions would be great. Thanx

SignalR works on the Pi - see this github sample .

  • A IIS/Windows hosted MVC app runs the SignalR hub
  • The remote control / UI is an MVC page. It connects to SignalR via javascript
  • The pi runs a console app, connecting to the SignalR hub via the c# client

The only trick is to compile the mono.sln in the signalR repo to get the C# client binaries. The nuget C# signalr client binaries didn't connect to the server from the pi. The mono compiled client signalr binaries can be used to connect from a pi or windows hosted console app.

Note this code base targets mono 3 while the default package from apt-get is mono 2. Compiling from mono3 from source isn't hard.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM