Running an interactive console on a NETMF device
#1
Posted 06 June 2012 - 09:35 AM
#2
Posted 06 June 2012 - 09:54 AM
My .NETMF projects: .NETMF Toolbox / Gadgeteer Light / Some PCB designs
#3
Posted 06 June 2012 - 09:55 AM
As I'm currently working on a monitoring device that will sit in my cellar I want to be able to communicate to the device through my LAN. This communication can be necessary to read statistics or modify the configuration of the app running on it.
I suppose there are multiple ways to do this and I was wondering if anyone here has done this before.
Search the Project Forums for web servers.
If you are interested I wrote a Silverlight client which communicated with a web server on the N+. You caould easily modify this to write configuration parameters to and SD card so they survive resets.
Hope this helps,
Mark
- Giuliano likes this
To be or not to be = 0xFF
Blogging about Netduino, .NET, STM8S and STM32 and generally waffling on about life
Follow @nevynuk on Twitter
#4
Posted 06 June 2012 - 09:58 AM
Search the Project Forums for web servers.
If you are interested I wrote a Silverlight client which communicated with a web server on the N+. You caould easily modify this to write configuration parameters to and SD card so they survive resets.
Hope this helps,
Mark
Hi Mark,
Thanks for the info. I was indeed thinking about a web server as a possibility. Although a "terminal" service would be cool too (using a prompt to give commands).
Cheers,
Niels R.
#5
Posted 06 June 2012 - 10:03 AM
I think the memory restrictions on the N+ make things like that difficult.Thanks for the info. I was indeed thinking about a web server as a possibility. Although a "terminal" service would be cool too (using a prompt to give commands).
I suppose you could investigate sockets on the N+ as an alternative. You will have to write your own parsing on the N+ and as memory is at a premium this could get expensive. The web server route allows you to control the data sent between the client and the server. You can pass the burden of parsing to the PC which should have the power to ensure only good data is sent to the N+.
Regards,
Mark
To be or not to be = 0xFF
Blogging about Netduino, .NET, STM8S and STM32 and generally waffling on about life
Follow @nevynuk on Twitter
#6
Posted 06 June 2012 - 10:08 AM
Why is that? My guess would be it would actually be way lighter then a webserver. Now I know for sure, I'm going to dive into thisI think the memory restrictions on the N+ make things like that
My .NETMF projects: .NETMF Toolbox / Gadgeteer Light / Some PCB designs
#7
Posted 06 June 2012 - 12:15 PM
#8
Posted 06 June 2012 - 12:24 PM
Hi emg,How much data is passed to/from the device? I've got a ND+ running a pump and taking 3 temp/1 light readings. I've arranged 2 'comms' threads using 2 different sockets/ports, one send, one receive. I send simple text string commands and receive single lines of text that I parse at the PC end (temp logs, command results, etc). Each end uses a simple queue collection to buffer data. I have another thread that reads the queue of commands and acts on them (turns pump on/off, set new config, reboots, etc). Simples.
The monitoring and logging logic is decoupled from the console interface. The console interface would be used to interactively query the device and change configuration settings.
Since I've asked my initial question I've worked out an idea in my head, but I've to get some stuff sorted before I can start implementing.
Cheers,
Niels
#9
Posted 06 June 2012 - 01:18 PM
http://diybrewery.com
#10
Posted 06 June 2012 - 01:21 PM
Thanks for the offer, but I already have most of the software written. It happens that I'm writing a monitoring/controlling device for our home brewery to keep track of (and control) the fermentation process.I have a Temperature Monitoring Project out on codeplex that I put together for my Walk-In Beer Cooler. It might be a good start for what you want.
You can find the code at http://diybrewerytem...r.codeplex.com/
Hope this helps you out.
Cheers,
Niels R.
#11
Posted 06 June 2012 - 02:44 PM
#12
Posted 06 June 2012 - 04:43 PM
My .NETMF projects: .NETMF Toolbox / Gadgeteer Light / Some PCB designs
#13
Posted 06 June 2012 - 09:40 PM
My .NETMF projects: .NETMF Toolbox / Gadgeteer Light / Some PCB designs
#14
Posted 07 June 2012 - 09:04 AM
I fully agree for a full experience you would want to implement telnet, how ever a lot of devices i work with simply stream a serial ascii text via a socket and or a serial link, for maximum configurability i.e. not every device is patched into a network so an engineer with a laptop is sent to the remote device for configuration.
I wonder if you could get telnet star wars running off a ND+? Would be pretty sweet albeit quite pointless...
#15
Posted 07 June 2012 - 09:18 AM
It will be possible I suppose. It's just sending some ASCII back.I wonder if you could get telnet star wars running off a ND+? Would be pretty sweet albeit quite pointless...
I will work out my lib a bit more this week and hope to publish source code by the end of the week.
My .NETMF projects: .NETMF Toolbox / Gadgeteer Light / Some PCB designs
#16
Posted 09 June 2012 - 03:56 PM
#17
Posted 09 June 2012 - 04:02 PM
Darn, I have completed such a thing last week, I should have known thisI wrote the code you are looking for over a year ago... It is open source. Check out this thread.
http://forums.netdui...et-server-rev-2
It has the Telnet protocol implemented, complete with listeners and socket setup. It is configured as a basic command prompt in the source code.
The code is well documented and you should be able to alter it to suit your needs without much trouble.
shell.png 61.87KB 29 downloads
Haven't looked at your code yet, but did you also encounter this problem? http://forums.netdui...055-wsaenobufs/
My .NETMF projects: .NETMF Toolbox / Gadgeteer Light / Some PCB designs
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users