OZ8ET's Content - Netduino Forums
   
Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.

OZ8ET's Content

There have been 46 items by OZ8ET (Search limited from 15-May 23)


By content type

See this member's


Sort by                Order  

#51434 Web server problems

Posted by OZ8ET on 15 July 2013 - 03:37 AM in General Discussion

Thanks again Anthony.I will study the code and do some experiments.

best regards

Erik




#51452 Web server problems

Posted by OZ8ET on 15 July 2013 - 01:17 PM in General Discussion

I found his article: http://blogs.msdn.co...work-netmf.aspx

It works quite good.

Erik




#51412 Web server problems

Posted by OZ8ET on 14 July 2013 - 08:29 AM in General Discussion

[font="arial, helvetica, sans-serif;"][color=rgb(34,34,34);]Hi[/color][/font]

[font="arial, helvetica, sans-serif;"][color=rgb(34,34,34);]I am running a web server on NP2 (previously on NP1) and it seems to run ok.[/color][/font]

[font="arial, helvetica, sans-serif;"][color=rgb(34,34,34);]The problem is, when I start pushing it - a little too much processing for each received message combined with hysterical pushing the refresh button on the browser (more than 4 times in Debug mode - a little more en Release mode) - it falls over!.[/color][/font]

 

[font="arial, helvetica, sans-serif;"][color=rgb(34,34,34);]I have tried most of the servers shown in this forum, and they usually works when testing, but when pushing them as above, the same thing happens. [/color][/font]

[font="arial, helvetica, sans-serif;"][color=rgb(34,34,34);]I have not been successful trying to multitask.[/color][/font]

 

[font="arial, helvetica, sans-serif;"][color=rgb(34,34,34);]I have nailed Down the problem to the "socket.Accept" statement.[/color][/font]

 

[font="arial, helvetica, sans-serif;"][color=rgb(34,34,34);]I get this exception: “[/color][color=rgb(30,30,30);]A first chance exception of type 'System.Net.Sockets.SocketException' occurred in Microsoft.SPOT.Net.dll[/color][color=rgb(34,34,34);]”, the first message is received and then everything stops. Other tasks (Onewire and display) are still running.[/color][/font]

 

[font="arial, helvetica, sans-serif;"][color=rgb(34,34,34);]Questions:[/color][/font]

[font="arial, helvetica, sans-serif;"][color=rgb(34,34,34);]Is there a limit to how many outstanding messages the socket Accept wil have? And if så – how many?[/color][/font]

[font="arial, helvetica, sans-serif;"][color=rgb(34,34,34);]Is there a way to overcome the problem?[/color][/font]

 

[font="arial, helvetica, sans-serif;"][color=rgb(34,34,34);]Any help is appreciated.[/color][/font]




#51439 Web server problems

Posted by OZ8ET on 15 July 2013 - 05:04 AM in General Discussion

I have tried this, but I still have problems. It gives me however et better control of what happens.

The Socket.Accept falls over when it has more than 3 outstanding messages. It then fires a socket excepton but it is not caught by the try-catch.

Because of this, the thread never dies and the clean-up wil not remove the thread from the array.

I cannot see how I can stop the socket from accepting messages.

This is odd!




#51417 Web server problems

Posted by OZ8ET on 14 July 2013 - 11:34 AM in General Discussion

Thanks Anthony.

It sounds like a good solution. Could you share some code please?

Erik




#45606 VPN Server on Netduino Plus

Posted by OZ8ET on 16 February 2013 - 06:32 AM in General Discussion

My intensions are to build a VPN server on a Netduino Plus (1).

 

Can any body point me in the right direction?

 

I do have the inolved RFC’s but is looking for something more (framework, code sample o.a.).

 

Tnx in advance

Erik  




#47636 SMTP_Client throws System.ArgumentOutOfRangeException

Posted by OZ8ET on 27 March 2013 - 02:51 PM in Netduino Plus 2 (and Netduino Plus 1)

I have the same problem - is it a v4.2 problem? I cannot get it to accept "IntegratedSocket".

 

I installed toolbox,

included Toolbox.NETMF.NET.SMTP_Client

using Toolbox.NETMF.NET;

 

IntegratedSocket integratedSocket = new IntegratedSocket("<smtp-server>", 587);SMTP_Client client = new SMTP_Client(integratedSocket, SMTP_Client.AuthenticationTypes.Login, "<username>", "<password>");client.Send(message, from, receiver);

?




#42381 OneWire ALPHA

Posted by OZ8ET on 29 December 2012 - 06:32 AM in Beta Firmware and Drivers

Has OneWire on 4.2 been skiped as a result of the comming of NetduiinoPlus 2???

I still have a bunch of old NetduinoPlus waiting for 4.2 upgrade with OneWire.

What is the status?




#41656 NP2 OneWire problem

Posted by OZ8ET on 17 December 2012 - 09:17 AM in Netduino Plus 2 (and Netduino Plus 1)

I converted my house-control application from NP to NP2 including moving from CW2's wonderful One wire implementation (FW 4.1) to the new standard NETMF One wire implementation. Everything worked in the test configuration, but when I exchanged the board in the 'real' configuration, One Wire did not Work. I am using GPIO 13 for One wire and using a pull up of 1.8K. This was ok with NP but not with NP2. Is there a difference between the two hardware interfaces? - Any advices? Well - I could do some tests with various resistors, but the distance between the test bench and my 'real' implementation is 150 miles, so I need to do it right Next time!



#45604 New: Netduino 4.3 SDK and VS2012 support!

Posted by OZ8ET on 16 February 2013 - 06:20 AM in General Discussion

Does the 4.3 implementation support OneWire?

 

Will the Gen.1 implementation of 4.3 support OneWire?

 

Netduino has been ignoring OneWire allthough it is an essential part of NETMF and should not be negleted.

 

The argument of saving flash/ram is like removing the wheels from a car beause they take up too much space!

 

I am a litle (very) frustrated waiting for OneWire on 4.2, Gen.1.

 




#47265 New: Netduino 4.3 SDK and VS2012 support!

Posted by OZ8ET on 16 March 2013 - 10:06 AM in General Discussion

Onewire support is also available on NETMF 4.2 through ToniA's firmware here

There was a problem deploying large software because the watchdog interupted the deploy. ToniA is looking into it and right now I am using the original boot-loader wihich  disables the watchdog.




#43169 Netduino Plus 2 Native OneWire Temp Sensor

Posted by OZ8ET on 11 January 2013 - 04:14 PM in Netduino Plus 2 (and Netduino Plus 1)

For reference - her is my OneWire Engine using Netduino Plus 2 and native OneWire. (it may not run without modifications as it is part of my home automation controller.).

The engine runs in a loop and maintain 2 tables - one for DS1820 and one for DS2438 as these are the once i use.

All use of the data from the devices, are retrieved from these tables.

 

I have used a similar module on Netduino Plus (ver.1) but with the use of CW2's implementation of OneWire. This requires the special firmware and is only availalbe on NETMF 4.1.

 

using System;using System.Collections;using System.Threading;using Config;using Microsoft.SPOT;using Microsoft.SPOT.Hardware;namespace EPD{	static class owCommands	{		public const byte SkipRom = 0xCC;		public const byte MatchRom = 0x55;		public const byte Convert1820 = 0x44;		public const byte ReadScratchpad = 0xBE;		public const byte CopyScratchpad = 0x48;		public const byte WriteScratchpad = 0x4E;		public const byte RecallMemory = 0xB8;		public const byte ConvertT = 0x44;		public const byte ConvertV = 0xB4;	}	static class OneWireExtension	{		public static bool isOwAddr(string parm)		{			if (parm.Length != 16) return false;			for (int i = 0; i < 16; i++)			{				bool ishex = (((parm[i] >= '0') & (parm[i] <= '9')) | ((parm[i] >= 'A') & (parm[i] <= 'F')) | ((parm[i] >= 'a') & (parm[i] <= 'f')));				if (!ishex) return false;			}			return true;		}		const string hexChar = "0123456789ABCDEF";		public static string AddrString(this byte[] buf)	//	{ 0x01, 0x23, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xEF } converts to 'FECDAB8967452301'		{			string s = string.Empty;			for (int i = 0; i < buf.Length; i++) s += buf[buf.Length - i - 1].toHex();			return s;		}		public static byte[] AddrBytes(this string s)	//	'0123456789ABCDEF' converts to { 0xEF, 0xCD, 0xAB, 0x89, 0x67, 0x45, 0x23, 0x01 }		{			int j = s.Length;			byte[] b = new byte[(j + 1) >> 1];			for (int i = 0; i < j; i++)			{				int ir = b.Length - (i >> 1) - 1;				int x = hexChar.IndexOf(s.ToUpper()[i]);				b[ir] = ((i & 1) == 0) ? (byte)(x << 4) : (byte)(b[ir] | (byte)x);			}			return b;		}		public static int inList(this ArrayList ar, string addr)		{			for (int i = 0 ; i< ar.Count; i++)				{ if ((ar[i] as byte[]).AddrString() == addr) return i;  }			return -1;		}		public static string getLocation(string addr)		{			//string place = HttpClient.webGet("http://palsbo.net/getLocation.php?addr=" + addr);			//if (place != "") Ini.setValue(addr, place);			//return place == "" ? Ini.getValue(addr, "(undefined)") : place;			return Ini.getValue(addr, "(undefined)");		}	}	class OneWireEngine : IDisposable	{		static OneWire core;		public static bool Pause = false;		private static bool ready = false;		public OneWireEngine(OutputPort _core)		{			core = new OneWire(_core);			ds1820.dev.Clear();			new Thread(Start).Start();			while (!ready) { Thread.Sleep(200); }			Debug.Print("OneWire Started");		}		public void Dispose() { GC.SuppressFinalize(this); }		public static void Start()		{			while (true)			{				core.TouchReset();				core.TouchByte(owCommands.SkipRom);				core.TouchByte(owCommands.Convert1820);				Thread.Sleep(750);				var devs = core.FindAllDevices();				lock (ds1820.dev) foreach (ds1820.Device d in ds1820.dev) { if (devs.inList(d.Addr) < 0) ds1820.dev.Remove(d); }				lock (ds2438.dev) foreach (ds2438.Device d in ds2438.dev) { if (devs.inList(d.Addr) < 0) ds2438.dev.Remove(d); }				foreach (byte[] _Rom in devs)				{					string addr = _Rom.AddrString();					if (addr.Substring(14) == "10")					{						double Temp = get1820(_Rom);						int index = ds1820.inList(addr);						if (index < 0)						{							string Place = OneWireExtension.getLocation(addr);							ds1820.dev.Add(new ds1820.Device(addr, Temp, Place));						}						else						{							ds1820.setTemp(index, Temp);						}					}					if (addr.Substring(14) == "26")					{						double Temp = 0.0;						double Current = 0.0;						double Volt = 0.0;						int index = ds2438.inList(addr);						if (index < 0)						{							init2438(_Rom);							get2438(_Rom, ref Temp, ref Current, ref Volt);							string Place = OneWireExtension.getLocation(addr);							ds2438.dev.Add(new ds2438.Device(addr, Temp, Current, Volt, Place));						}						else						{							get2438(_Rom, ref Temp, ref Current, ref Volt);							ds2438.setData(index, Temp, Current, Volt);						}					}					ready = true;					Thread.Sleep(2000);				}			}		}		public static void WriteBytes(byte[] data)		{			foreach (byte B in data) { core.TouchByte(B); }		}		public static void ReadBytes(byte[] buf)		{			for (var i = 0; i < buf.Length; i++) buf[i] = (byte)(core.ReadByte());		}		public static void Match(byte[] addr)		{			core.TouchReset();			core.TouchByte(owCommands.MatchRom); //match rom			WriteBytes(addr);		}		private static double get1820(byte[] _Rom)		{			Match(_Rom);			core.WriteByte(owCommands.ReadScratchpad);			byte[] buf = { 255, 255, 255, 255, 255, 255, 255, 255, 255 };			ReadBytes(buf);			return (float)((short)((buf[1] << 8) | buf[0]) >> 1) + (float)(buf[7] - buf[6]) / (float)buf[7] - .25;		}		private static void init2438(byte[] _Rom)		{			const byte IAD = 0x01;			const byte CA = 0x02;			const byte EE = 0x04;			//const byte AD = 0x08;			const byte Page0 = 0x00;			const byte Ctrl = IAD | CA | EE;			var buf = new byte[9];			Match(_Rom);			WriteBytes(new byte[] { owCommands.WriteScratchpad, Page0, Ctrl });			Match(_Rom);			WriteBytes(new byte[] { owCommands.ReadScratchpad, 0x00 });			ReadBytes(buf);			Match(_Rom);			WriteBytes(new byte[] { owCommands.CopyScratchpad, 0x00 });			while (core.ReadByte() != 0xFF) { };		}		private static void get2438(byte[] _Rom, ref double Temp, ref double Current, ref double Volt)		{			var buf = new byte[9];			Match(_Rom);			core.WriteByte(owCommands.ConvertT);			while (core.ReadByte() != 0xFF) { };			Thread.Sleep(10);			Match(_Rom);			core.WriteByte(owCommands.ConvertV);			while (core.ReadByte() != 0xFF) { };			Thread.Sleep(10);			Match(_Rom);			WriteBytes(new byte[] { owCommands.RecallMemory, 0x00 });			Match(_Rom);			WriteBytes(new byte[] { owCommands.ReadScratchpad, 0x00 });			ReadBytes(buf);			Temp = (double)((buf[2] << 8) + (buf[1])) / 256;			Volt = (double)((buf[4] << 8) + (buf[3])) - 224; // / 100;			//Volt = Volt / 1.75672;			Current = (double)((Int16)(buf[6] << 8) | (Int16)buf[5]);		}	}	class ds1820	{		public class Device		{			public string Addr { get; set; }			public string Place { get; set; }			public double Temp { get; set; }			public Device(string addr, double temp, string place = null)			{				Addr = addr;				Temp = temp;				if (place == null) Place = Ini.getValue(Addr, "(undefined)");				else Place = place;			}		}		public static int inList(string addr)		{			for (int i = 0; i< dev.Count; i++) { if ((dev[i] as Device).Addr == addr) return i; }			return -1;		}		public static string Addr(int i) { return (dev[i] as Device).Addr; }		public static string Place(int i) { return (dev[i] as Device).Place; }		public static void Place(int i, string Place) { (dev[i] as Device).Place = Place; }		public static double Temp(int i) { return (dev[i] as Device).Temp; }		public static void setTemp(int index, double Temp) { (dev[index] as Device).Temp = Temp; }		public static ArrayList dev = new ArrayList();		public static int Count { get { return dev.Count; } }		public class InUse		{			static string _InUse;			public static int Index			{				get				{					for (int i = 0; i < dev.Count; i++) { if (Addr(i) == _InUse) return i; }					if (dev.Count > 0) return 0; else return -1;				}			}			public static string Addr			{				get { return Index < 0 ? "" : Addr(Index); }				set				{					_InUse = value.ToUpper();					Ini.setValue("DS1820inUse", _InUse);				}			}		}	}	class ds2438	{		public class Device		{			public string Addr { get; set; }			public string Place { get; set; }			public double Temp { get; set; }			public double Volt { get; set; }			public double Current { get; set; }			public Device(string addr, double temp, double current, double volt, string place = null)			{				Addr = addr;				Temp = temp;				Current = current;				Volt = volt;				if (place == null) Place = Ini.getValue(Addr, "(undefined)");				else Place = place;			}		}		public static int inList(string addr)		{			for (int i = 0; i<dev.Count; i++) { if ((dev[i] as Device).Addr == addr) return i; }			return -1;		}		public static ArrayList dev = new ArrayList();		public static int Count { get { return dev.Count; } }		public static string Addr(int i) { return (dev[i] as Device).Addr; }		public static string Place(int i) { return (dev[i] as Device).Place; }		public static void Place(int i, string Place) { (dev[i] as Device).Place = Place; }		public static double Temp(int i) { return (dev[i] as Device).Temp; }		public static double Current(int i) { return (dev[i] as Device).Current; }		public static double Volt(int i) { return (dev[i] as Device).Volt; }		public static void setData(int index, double Temp, double Current, double Volt) { 			(dev[index] as Device).Temp = Temp; 			(dev[index] as Device).Current = Current; 			(dev[index] as Device).Volt = Volt;		}		public class InUse		{			static string _InUse;			public static int Index			{				get				{					for (int i = 0; i < dev.Count; i++) { if (Addr(i) == _InUse) return i; }					if (dev.Count > 0) return 0; else return -1;				}			}			public static string Addr			{				get { return Index < 0 ? "" : Addr(Index); }				set				{					_InUse = value.ToUpper();					Ini.setValue("DS2438inUse", _InUse);				}			}		}	}}

(this code block display needs to be fixed!!!)

 




#34582 Is this the end of NetduinoPlus?

Posted by OZ8ET on 03 September 2012 - 05:11 AM in Beta Firmware and Drivers

Your meaning on "watchdog" may be more complicated than mine, but this is how I do it - the simple way:

public static class WatchDog
	{
		const Int32 wdDelay = 1000*60*60*12;
		static Timer wdtimer = new Timer(on_TimerTick, null, wdDelay, 0);

		public static void Reset()
		{
			wdtimer.Change(wdDelay, 0);
		}

		static void on_TimerTick(Object state)
		{
			CLog.LogEvent("Watchdog Rebooting.");
			PowerState.RebootDevice(false, 1000);
		}
	}

The watchdogdelay (wDelay) is her set to 12 hours (100*60*60*12 miliseconds).
The Reset() command sits in a place I want to make sure that I excecute within the 12 hours, and it resets the wDelay counter.
On timeout (_TimerTick) the watchdog write a message to my log, and reboot the device. Simple but effective.

Erik



#32371 Is this the end of NetduinoPlus?

Posted by OZ8ET on 20 July 2012 - 04:26 PM in Beta Firmware and Drivers

I am not sure if the same issue is occurring that I had on my project but I was getting the same error message writing to the SD card.

In my project I have 6 sensors that are being polled up to 3 times a second then that data is written to 6 different log files using the same basic method as you.

I was getting this same error and it was due to trying to write the data too fast (or I assume that was the case). So I put a few Thread.Sleep(1) or Thread.Sleep(10) in certain places to allow for catch up and completion of the file create/close and write/close. This worked and it has never thrown an error again after running hundreds of hours now.


Thanks Dave - I tried this but with no luck.:)

Erik



#32379 Is this the end of NetduinoPlus?

Posted by OZ8ET on 20 July 2012 - 06:58 PM in Beta Firmware and Drivers

One thing is theory - annoter practise. anyway - the issues were onewire support ón 4.2 and OutOfMemoryExeption with streamwriter!



#32332 Is this the end of NetduinoPlus?

Posted by OZ8ET on 20 July 2012 - 07:15 AM in Beta Firmware and Drivers

Thanks for quick reply Stefan and Chris

I am now using NetduinoPlus_v4.1.1_beta1_CW.NETMF.OneWire-1.0.5.0

I was having problem with I2C because of som problem in firmware but this may have been with 4.1.0-6 - I gave up on I2C because of that.

Now I have probems with StreamWriter.
    #### Exception System.OutOfMemoryException - CLR_E_OUT_OF_MEMORY (4) ####
    #### Message: 
    #### System.IO.StreamWriter::.ctor [IP: 0023] ####
    #### Main.CIni::Save [IP: 0020] ####
    #### Main.Engine::update [IP: 0026] ####
    #### Main.OneWireEngine::onPoll [IP: 01e8] ####
A first chance exception of type 'System.OutOfMemoryException' occurred in System.IO.dll

This is the Code:
		public static void Save()
		{
			try
			{
				Debug.GC(true);
				if (File.Exists(_FileName)) File.Delete(_FileName);
				using (FileStream outFileStream = new FileStream(_FileName, FileMode.CreateNew, FileAccess.Write))
				{
					using (StreamWriter outStreamWriter = new StreamWriter(outFileStream))
					{
						foreach (object Sections in _Sections.Keys)
						{
							outStreamWriter.WriteLine("[" + Sections.ToString() + "]");
							Hashtable keyvalpair = (Hashtable)_Sections[Sections];
							//foreach (object key in keyvalpair.Keys)	outStreamWriter.WriteLine(key.ToString() + "=" + keyvalpair[key].ToString());
							string s = "";
							foreach (object key in keyvalpair.Keys) s += (key.ToString() + "=" + keyvalpair[key].ToString() + '\r');
							outStreamWriter.Write(s);
						}
						outStreamWriter.Close();
					}
					outFileStream.Close();
					_Dirty = false;
				}
			}
			catch (Exception Ex) { Fail.Create("Init Save: " + Ex.Message, 5); }
			Debug.GC(true);
		}

ways to (partly) deal with the problem are:
- spreading "Debug.GC(true);" all over the place in rich quanities.
- NOT making small chunks of date to write, but puttin everything in one string!!!

I can make a small program with only read and write of the file, and it will usually work but as soon as I add other code to it, problems begin.

Erik



#32365 Is this the end of NetduinoPlus?

Posted by OZ8ET on 20 July 2012 - 03:52 PM in Beta Firmware and Drivers

I find CW2's implementation very reliable. I use a digital port directly with a 1K8 resister to +5V - it drives about 5 meter with many drops and no problems. Implementing One-wire devices is not dificult. Erik



#32325 Is this the end of NetduinoPlus?

Posted by OZ8ET on 20 July 2012 - 06:31 AM in Beta Firmware and Drivers

Sorry to be a bit negative. My previous exitement for NetduinoPlus has slowly turned into a lot of frustrations. I may be stupid, but I based my project on Onewire, and maybe I am the only one left en the world using it. After asking around a lot in the forum, I found CW2's very nice implementation which I still use with Firmware version 4.1.1. 4.1 had other problems (OutOfMemoryExeption in Stremwriter) and I have been looking forward to version 4.2 in the hope that this problem was solved. I was promised that there would be a 'speciaol verion' of 4.2 with onewire support, but after the introduction of NetduinoGo, it looks like no one cares about NetduionoPlus anymore. I am about to give up on this forum. My requests are no more answered and it is not even possible to find them searching my own comments (sometime I can find them by searching specific text). It is not my intention to be destructive, but I think my life with NetduinoPlus is running into a deadend.



#32373 Is this the end of NetduinoPlus?

Posted by OZ8ET on 20 July 2012 - 05:03 PM in Beta Firmware and Drivers

I have no doubt about the good realization of CW2, nor in your bona-fide...the problem is exactly what you write: the impedance is not balanced, thus the "reliability" is just a statistical performance of your implementation.
Basically, you have just one (?) resistor as pull-up by the Netduino side (or the other).
First off, when the line is pulled down the impedance is almost zero Ohms, but when the line is left floating the actual impedance is 1.8k.
Secondly, probably your 5mt wiring is short enough to avoid reflections, otherwise an high-impedance (by the device side) would have a mirror-effect for the high frequencies. You know, any edgy wave is composed as very high frequencies.
Thirdly, I suppose your wiring is a shielded cable, or either your wires run along a noiseless environment. If not, your signal would be plenty of undesired noise, spikes, and whatever else.

It's just a clarification, because many users are asking that, but the long wiring is often an hard task to solve.
Cheers


Sorring - the correcte lenet is 50 meters (150ft). It was an erfor in writing



#33982 HttpListener does not respond

Posted by OZ8ET on 21 August 2012 - 05:08 AM in General Discussion

Hi
I use a socket-based server and get the same problem. It is very easy to reproduce. Just hit the F5 on the browser a couple of times and you get the Socket Exception.

With the socket-based server, it looks like it recovers after the exception - I have not tried it for a long perode of time yet.

This is what it looks like:
		public HttpSession(int Port = 80, WebRequest userRequester = null)
		{
			_userRequester = userRequester;
			_socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
			_socket.Bind(new IPEndPoint(IPAddress.Any, Port));
			new Thread(_Listen).Start();
		}

		private void _Listen()
		{
			_socket.Listen(10);
			while (true)
			{
				try
				{
					using (Socket client = _socket.Accept())
					{
						int _requestSize;
						byte[] _buffer;
						int _amountRead;
						Request _request;

						_requestSize = client.Available;
						_buffer = new byte[Settings.bufLen];
						_amountRead = client.Receive(_buffer, Settings.bufLen, SocketFlags.None);
						_request = new Request(client, _buffer);
						_buffer = null;
						if (_userRequester != null) _userRequester(_request); else _defaultRequester(_request);
						_request = null;
						Debug.GC(true);
					}
				}
				catch (Exception ex) { 
					Debug.Print(ex.Message);
					//PowerState.RebootDevice(false, 1000); 
				}
				Thread.Sleep(10);
			}
		}

The latest change I made was to move the statement "_socket.Listen(10);" from the sub HttpSession() to the sub _Listen().
For some unexplainable (for me!) reasoen, it made the thing recover after the exception rather than stopping the server.

This is with 4.1 - when (if!) 4.2 is relesed and when (if!) OneWire becomes available for 4.2, I look forward to see if this has been solved in 4.2.

Regards
Erik



#50735 how to "Factory reset" Netduino Plus (ver 1 & 2) ?

Posted by OZ8ET on 23 June 2013 - 11:35 AM in Netduino Plus 2 (and Netduino Plus 1)

I realy needs help on this!

I have two NetduinoPlus (version 1) with excatly the same firmware. Both with static IP (same settings)

Same program. Assembly and Deploy is ok on both devices.

One runs ok - the other does not.

In debug mode everything is normal on one board - the other stops with an Error: a3000000

Resolving.Link failure: some assembly references cannot be resolved!!Assembly: NewWeb (1.0.0.0) needs assembly 'SecretLabs.NETMF.Hardware.NetduinoPlus' (4.2.2.0)Error: a3000000Waiting for debug commands...The program '[2] Micro Framework application: Managed' has exited with code 0 (0x0).

What is worng?

 

[font="calibri;"]The problem seems to arise when the program reaches a certain size.[/font]




#50757 how to "Factory reset" Netduino Plus (ver 1 & 2) ?

Posted by OZ8ET on 24 June 2013 - 11:02 AM in Netduino Plus 2 (and Netduino Plus 1)

Additional Info:

Using MFDeploy->Plug-in->Debug->Show Device Info, I get different infor for the two boards:

The good board says:

AuAutoNegotiate completeDeviceInfo:  HAL build info: 4.2.0.0, Netduino Plus (v4.2.0.1) by Secret Labs LLC [CW2 mod]  OEM Product codes (vendor, model, SKU): 34, 177, 4097  Serial Numbers (module, system):    00000000000000000000000000000000    0000000000000000  Solution Build Info: 4.2.0.0, Netduino Plus (v4.2.0.1) by Secret Labs LLC [CW2 mod]  AppDomains:    default, id=1  Assemblies:    mscorlib,4.2.0.0    Microsoft.SPOT.Native,4.2.0.0    Microsoft.SPOT.Hardware,4.2.0.0    Microsoft.SPOT.Net,4.2.0.0    System,4.2.0.0    Microsoft.SPOT.Hardware.SerialPort,4.2.0.0    Microsoft.SPOT.IO,4.2.0.0    System.IO,4.2.0.0    Microsoft.SPOT.Hardware.PWM,4.2.0.1    Microsoft.SPOT.Hardware.OneWire,4.2.0.0    SecretLabs.NETMF.Diagnostics,4.2.0.0    Microsoft.SPOT.Graphics,4.2.0.0    Easyweb7,1.2013.624.1057    SecretLabs.NETMF.Hardware.Netduino,4.2.1.0    SecretLabs.NETMF.Hardware.NetduinoPlus,4.2.2.0

The bad board says:

AuAutoNegotiate completeDeviceInfo:  HAL build info: 4.2.0.0, Netduino Plus (v4.2.0.1) by Secret Labs LLC [CW2 mod]  OEM Product codes (vendor, model, SKU): 34, 177, 4097  Serial Numbers (module, system):    00000000000000000000000000000000    0000000000000000  Solution Build Info: 4.2.0.0, Netduino Plus (v4.2.0.1) by Secret Labs LLC [CW2 mod]  AppDomains:    default, id=1  Assemblies:    mscorlib,4.2.0.0    Microsoft.SPOT.Native,4.2.0.0    Microsoft.SPOT.Hardware,4.2.0.0    Microsoft.SPOT.Net,4.2.0.0    System,4.2.0.0    Microsoft.SPOT.Hardware.SerialPort,4.2.0.0    Microsoft.SPOT.IO,4.2.0.0    System.IO,4.2.0.0    Microsoft.SPOT.Hardware.PWM,4.2.0.1    Microsoft.SPOT.Hardware.OneWire,4.2.0.0    SecretLabs.NETMF.Diagnostics,4.2.0.0    Microsoft.SPOT.Graphics,4.2.0.0

The Secretlab assemblies does has not been loaded??

 

Another diff.:

When pressing hte Erase button in MFDeploy, the good board shows both "Deployment" and "File System". The bad board only shows "Deployment".

 

Erik




#50753 how to "Factory reset" Netduino Plus (ver 1 & 2) ?

Posted by OZ8ET on 24 June 2013 - 07:37 AM in Netduino Plus 2 (and Netduino Plus 1)

Thanks Chris

 

This is on NetduinoPlus (version 1).

As mentioned - I test with 2 identical units. One Works as expected - one fails.

The dll is available (Works with the other board).

After following your instructions (Erase, clean, build) the error changed.

There are no error en build - the error comes when running Debug in VS2012 (and VS2010).

The new Error indications is:

Cannot find any entrypoint!Done

Here comes first the full result of "ERASE" operation in MFDebug:

DM9161_DSCSR = 0xF3F0Link Update:          IP: 192.168.1.30         GW: 192.168.1.1Configuration version != versionDM9161_AutoNegotiateValid PHY Found: 31PHY: Vendor Number Model = 0xAPHY: Model Revision Number = 0x0AutoNegotiate completeDM9161_GetLinkSpeed passedLink detected 0x0Link Update:          IP: 192.168.1.30         GW: 192.168.1.1ip address from interface info: 192.168.1.30Created EE.Started Hardware.Create TS. Loading start at 154668, end 16cc40   Assembly: mscorlib (4.2.0.0)   Assembly: Microsoft.SPOT.Native (4.2.0.0)   Assembly: Microsoft.SPOT.Hardware (4.2.0.0)   Assembly: Microsoft.SPOT.Net (4.2.0.0)   Assembly: System (4.2.0.0)   Assembly: Microsoft.SPOT.Hardware.SerialPort (4.2.0.0)   Assembly: Microsoft.SPOT.IO (4.2.0.0)   Assembly: System.IO (4.2.0.0)   Assembly: Microsoft.SPOT.Hardware.PWM (4.2.0.1)   Assembly: Microsoft.SPOT.Hardware.OneWire (4.2.0.0)   Assembly: SecretLabs.NETMF.Diagnostics (4.2.0.0)Loading Deployment Assemblies.Resolving.Ready.Cannot find any entrypoint!Done.Waiting for debug commands...

Following the result of Build operation in VS2012:

Looking for a device on transport 'USB'Starting device deployment...Iteration 0Opening port ?usb#vid_22b1&pid_1001#7&374e48c&0&2#{a5dcbf10-6530-11d2-901f-00c04fb951ed}Attaching debugger engine...... debugger engine attached!Querying device assemblies...Found Assembly mscorlib 4.2.0.0Found Assembly Microsoft.SPOT.Native 4.2.0.0Found Assembly Microsoft.SPOT.Hardware 4.2.0.0Found Assembly Microsoft.SPOT.Net 4.2.0.0Found Assembly System 4.2.0.0Found Assembly Microsoft.SPOT.Hardware.SerialPort 4.2.0.0Found Assembly Microsoft.SPOT.IO 4.2.0.0Found Assembly System.IO 4.2.0.0Found Assembly Microsoft.SPOT.Hardware.PWM 4.2.0.1Found Assembly Microsoft.SPOT.Hardware.OneWire 4.2.0.0Found Assembly SecretLabs.NETMF.Diagnostics 4.2.0.0Adding pe file C:Program Files (x86)Secret LabsNetduino SDKAssembliesv4.2lesecretlabs.netmf.hardware.netduinoplus.pe to deployment bundleAdding pe file C:Program Files (x86)Secret LabsNetduino SDKAssembliesv4.2lesecretlabs.netmf.hardware.netduino.pe to deployment bundleAdding pe file C:UsersErikDropboxSoucesEasyweb7Easyweb7binReleaseleEasyweb7.pe to deployment bundleAdding pe file C:Program Files (x86)Microsoft .NET Micro Frameworkv4.2AssembliesleMicrosoft.SPOT.Graphics.pe to deployment bundleAdding pe file C:Program Files (x86)Secret LabsNetduino SDKAssembliesv4.2lesecretlabs.netmf.hardware.pe to deployment bundleAttempting deployment...Incrementally deploying assemblies to deviceDeploying assemblies for a total size of 63496 bytesAssemblies successfully deployed to device.

.Finally the result of running Debug in VS2012:

Found debugger!Create TS. Loading start at 154668, end 16cc40   Assembly: mscorlib (4.2.0.0)   Assembly: Microsoft.SPOT.Native (4.2.0.0)   Assembly: Microsoft.SPOT.Hardware (4.2.0.0)   Assembly: Microsoft.SPOT.Net (4.2.0.0)   Assembly: System (4.2.0.0)   Assembly: Microsoft.SPOT.Hardware.SerialPort (4.2.0.0)   Assembly: Microsoft.SPOT.IO (4.2.0.0)   Assembly: System.IO (4.2.0.0)   Assembly: Microsoft.SPOT.Hardware.PWM (4.2.0.1)   Assembly: Microsoft.SPOT.Hardware.OneWire (4.2.0.0)   Assembly: SecretLabs.NETMF.Diagnostics (4.2.0.0)Loading Deployment Assemblies.Attaching deployed file.   Assembly: SecretLabs.NETMF.Hardware.NetduinoPlus (4.2.2.0)Attaching deployed file.   Assembly: SecretLabs.NETMF.Hardware.Netduino (4.2.1.0)Resolving.The debugging target runtime is loading the application assemblies and starting execution.Ready.Cannot find any entrypoint!Done.Waiting for debug commands...'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:Program Files (x86)Microsoft .NET Micro Frameworkv4.2Assemblieslemscorlib.dll', Symbols loaded.'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:Program Files (x86)Microsoft .NET Micro Frameworkv4.2AssembliesleMicrosoft.SPOT.Native.dll', Symbols loaded.'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:Program Files (x86)Microsoft .NET Micro Frameworkv4.2AssembliesleMicrosoft.SPOT.Hardware.dll', Symbols loaded.'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:Program Files (x86)Microsoft .NET Micro Frameworkv4.2AssembliesleMicrosoft.SPOT.Net.dll', Symbols loaded.'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:Program Files (x86)Microsoft .NET Micro Frameworkv4.2AssembliesleSystem.dll', Symbols loaded.'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:Program Files (x86)Microsoft .NET Micro Frameworkv4.2AssembliesleMicrosoft.SPOT.Hardware.SerialPort.dll', Symbols loaded.'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:Program Files (x86)Microsoft .NET Micro Frameworkv4.2AssembliesleMicrosoft.SPOT.IO.dll', Symbols loaded.'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:Program Files (x86)Microsoft .NET Micro Frameworkv4.2AssembliesleSystem.IO.dll', Symbols loaded.'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:Program Files (x86)Microsoft .NET Micro Frameworkv4.2AssembliesleMicrosoft.SPOT.Hardware.PWM.dll', Symbols loaded.'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:Program Files (x86)Microsoft .NET Micro Frameworkv4.2AssembliesleMicrosoft.SPOT.Hardware.OneWire.dll', Symbols loaded.'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:Program Files (x86)Secret LabsNetduino SDKAssembliesv4.2leSecretLabs.NETMF.Diagnostics.dll', Symbols loaded.'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:Program Files (x86)Secret LabsNetduino SDKAssembliesv4.2leSecretLabs.NETMF.Hardware.Netduino.dll', Symbols loaded.'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:Program Files (x86)Secret LabsNetduino SDKAssembliesv4.2leSecretLabs.NETMF.Hardware.NetduinoPlus.dll', Symbols loaded.The program '[1] Micro Framework application: Managed' has exited with code 0 (0x0).

If you need any other information please ask.

Erik  




#50322 how to "Factory reset" Netduino Plus (ver 1 & 2) ?

Posted by OZ8ET on 06 June 2013 - 06:22 AM in Netduino Plus 2 (and Netduino Plus 1)

Tnx Bi Qin but this is what I did. 

For NP1 I am using TonyA's firmware here as I need OneWire. It worked for som units but not all.

I always use static IP - I set it in the program together with DNS and MAC.

Again - it works on some units - not all.




#50319 how to "Factory reset" Netduino Plus (ver 1 & 2) ?

Posted by OZ8ET on 06 June 2013 - 04:14 AM in Netduino Plus 2 (and Netduino Plus 1)

[font="calibri;"]This might be a stupid question, but I have been messing around with different versions of firmware on my devices and want to go back to start ("factory reset").[/font]

 

[font="calibri;"]The result is strange behavior: One NP1 will deploy a program, but ends all threads without doing anything when started.[/font]

[font="calibri;"]Both NP1 and NP2 will throw a socket exception whenever I try a DNS request for ex. “Microsoft.com”.[/font]

[font="calibri;"](This happens even with this as the only one codeline in the software:[/font]

	IPEndPoint ep = new IPEndPoint(Dns.GetHostEntry("microsoft.com").AddressList[0], 80);

[font="calibri;"] [/font]

Other devices - with the same IP-setting - performs well.

 

[font="calibri;"]Now I want to “factory reset” my devices and try all over with new firmware. I touched the blank spot and tried all the obvious ways but nothing helps. [/font]

 

[font="calibri;"]What can I do?[/font]

 

[font="calibri;"]The socket exception occurs with 4.2 as well as with 4.3 beta.[/font]

 

[font="calibri;"]Please advice![/font]

 

Erik

 





home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.