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.

mohammad's Content

There have been 53 items by mohammad (Search limited from 16-June 23)


By content type

See this member's


Sort by                Order  

#49132 Netduino Plus Network dies

Posted by mohammad on 07 May 2013 - 02:49 AM in Netduino Plus 2 (and Netduino Plus 1)

Hi there,

 

I am going to use software Watchdog to reboot my Netduino after a constant time. I know it is a simple question, but may I ask your help to do it?

The code that I developed is like that, but it doesn't work:

using System;using System.Net;using System.Net.Sockets;using System.Threading;using Microsoft.SPOT;using Microsoft.SPOT.Hardware;using SecretLabs.NETMF.Hardware;using SecretLabs.NETMF.Hardware.NetduinoPlus;namespace NetduinoPlusApplication1{    public class Program    {        public static void Main()        {            bool error = true;            Watchdog.Timeout = new TimeSpan(0, 1, 0);       //Timeout = 1 minute.            Watchdog.Enabled = true;            Debug.Print(Watchdog.Timeout.ToString());            while (error)            {                Debug.Print("There is a systematic error, so the system needs to reboot");                Thread.Sleep(2000);            }        }    }}

and the  Debug.Print(Watchdog.Timeout.ToString()); prints "00:00:00".

 

Thanks in advance,

Mohammad




#49201 Netduino Plus Network dies

Posted by mohammad on 08 May 2013 - 12:41 AM in Netduino Plus 2 (and Netduino Plus 1)

First of all, the watchdog functionality is not there in the stock firmware. All the interfaces are there, but no functionality.

 

If you would want to use the firmware I built, look at this message, it has a code sample: http://forums.netdui...ge-2#entry47334

 

Hi ToniA,

 

Thanks for your reply. It is a bit rediculous that the interfaces and methods are available, but they are fake :D

Anyway, I gave up to use watchdog for now, but I will surely use your firmware someday.




#49738 Netduino Plus Network dies

Posted by mohammad on 22 May 2013 - 12:08 AM in Netduino Plus 2 (and Netduino Plus 1)

Hi all,

 

My "network die problem" was solved after spending 2 months on it :) Now, I am so happy. The solution I used was software watchdog developed by my own. If you are interested in the solution, take a look at this link: http://forums.netdui...lus/#entry49735

I will later publish a post to elaborate the whole procedures and solutions that were useless except the software watchdog.

 

Good luck :)




#31664 Netduino Plus maximum input voltage

Posted by mohammad on 06 July 2012 - 08:22 PM in Netduino Plus 2 (and Netduino Plus 1)

Hi Chris, Thanks for your useful reply. Cheers, Mohammad



#31656 Netduino Plus maximum input voltage

Posted by mohammad on 06 July 2012 - 06:12 PM in Netduino Plus 2 (and Netduino Plus 1)

Hi all, Is there any way for Netduino to understand its input voltage value? Cheers, Mohammad



#49202 Netduino Plus 1 Firmware v4.2.0 (update 1)

Posted by mohammad on 08 May 2013 - 12:47 AM in Netduino Plus 2 (and Netduino Plus 1)

Hi Chris,

 

Thank you so much for your reply and your attention.

The line I get those exceptions is this one:

mem = new FileStream(path, FileMode.Append, FileAccess.Write, FileShare.None, 512);

In addition, I didn't try it with any lower-capacity card.

 

Cheers,

Mohammad

 

 

Hi all,

 

The problem was solved by Micro SD 2GB. It seems the Firmware 4.2.0.X doesn't know the Mirco SD 4GB and up.




#47152 Netduino Plus 1 Firmware v4.2.0 (update 1)

Posted by mohammad on 13 March 2013 - 03:57 PM in Netduino Plus 2 (and Netduino Plus 1)

Hi Chris,

 

Thank you so much for your reply and your attention.

The line I get those exceptions is this one:

mem = new FileStream(path, FileMode.Append, FileAccess.Write, FileShare.None, 512);

In addition, I didn't try it with any lower-capacity card.

 

Cheers,

Mohammad

 




#47091 Netduino Plus 1 Firmware v4.2.0 (update 1)

Posted by mohammad on 12 March 2013 - 05:18 PM in Netduino Plus 2 (and Netduino Plus 1)

Hi all,

 

I upgraded the firmware of my Netduino Plus from 4.1.0.6 to the new firmware introduced in this thread.

Now, I am writing something on a 4GB MicroSD, but I faced with the following errors. Would you please help me solve this problem?

 

My Code:

using System;using System.IO;using Microsoft.SPOT.IO;using System.Net;using System.Net.Sockets;using System.Threading;using Microsoft.SPOT;using Microsoft.SPOT.Hardware;using SecretLabs.NETMF.Hardware;using SecretLabs.NETMF.Hardware.NetduinoPlus;namespace NetduinoPlusApplication1{    public class Program    {        static string path = "SDSWEIoT.log";        public static FileStream mem;        public static void Main()        {            try            {                mem = new FileStream(path, FileMode.Append, FileAccess.Write, FileShare.None, 512);            }            catch (Exception e)            {                Debug.Print(e.ToString());            }        }    }}

 

The received exceptions:

A first chance exception of type 'System.NotSupportedException' occurred in Microsoft.SPOT.IO.dllA first chance exception of type 'System.NotSupportedException' occurred in System.IO.dllSystem.NotSupportedException

 

Thanks in advance,

Mohammad




#38255 Netduino Firmware v4.2.0 RC5 (Netduino + Netduino Plus)

Posted by mohammad on 30 October 2012 - 06:05 PM in Beta Firmware and Drivers

Hi all,

No updates yet for Netduino Plus firmware to support Micro SD 4GB?

I developed a program for Netduino Plus to work (read/write) with Micro SD 4GB.
This program worked perfect with firmware v4.1.1 betta, but after upgrading to firmware v4.2.0 RC4, I got these errors:

A first chance exception of type 'System.NotSupportedException' occurred in Microsoft.SPOT.IO.dll
A first chance exception of type 'System.NotSupportedException' occurred in System.IO.dll
System.NotSupportedException
Would you please help me solve this problem?


Special Thanks,
Mohammad



#32957 Netduino Firmware v4.2.0 RC5 (Netduino + Netduino Plus)

Posted by mohammad on 31 July 2012 - 10:58 PM in Beta Firmware and Drivers

If you experience bugs with the .NET MF 4.2 RC5 firmware, please post about it in this thread.

Hi all,

I developed a program for Netduino Plus to work (read/write) with Micro SD 4GB.
This program worked perfect with firmware v4.1.1 betta, but after upgrading to firmware v4.2.0 RC4, I got these errors:
A first chance exception of type 'System.NotSupportedException' occurred in Microsoft.SPOT.IO.dll
A first chance exception of type 'System.NotSupportedException' occurred in System.IO.dll
System.NotSupportedException
Would you please help me solve this problem?

Special Thanks,
Mohammad



#30199 Large TCP/IP Packets

Posted by mohammad on 04 June 2012 - 08:28 PM in Netduino Plus 2 (and Netduino Plus 1)

Hi all, My Netduino Plus is a Web server. When it receives any packet, it reads the the packet length from its header. Then, Netduino drops it. My question is how Netduino can receive the packets with length larger than its RAM capacity (28KB). I could send packets larger than 80KB and Netduino could read their headers. Any reply is appreciated. Thanks, Mohammad



#30249 Large TCP/IP Packets

Posted by mohammad on 05 June 2012 - 07:20 PM in Netduino Plus 2 (and Netduino Plus 1)

Hi Chris,

Thanks for your reply.
I sent chunks of data around 80KB. My assumption: chunks of data = TCP/IP packets. Am I wrong?
I know that MTU for Ethernet only allows 1.5KB of data to transfer. So, the TCP packets should be fragmented on router, then send to Netduino.

And the rest of the data should be "held back" until your Netduino Plus has enough room in its buffers to receive it.

My understanding from your reply is in this way:
- 80KB data are sent to Netduino. Netduino can read the header, but it cannot read the whole content. When it empties its memory, the pending contents can be loaded in Netduino. Yes?

Thanks again,
Mohammad



#49749 How to reboot netduino + from code on a socket exception?

Posted by mohammad on 22 May 2013 - 03:16 AM in Netduino Plus 2 (and Netduino Plus 1)

This link might be useful to reboot the Netduino Plus by software http://forums.netdui...lus/#entry49735

 

Good Luck,

Mohammad




#47196 how do you read analog signal to digital

Posted by mohammad on 14 March 2013 - 06:02 PM in Netduino Plus 2 (and Netduino Plus 1)

Hello Dave,

 

I really appreciate you. I read some threads, but none of them couldn't solve my problem.

 

Cheers,

Mohammad




#48675 how do you read analog signal to digital

Posted by mohammad on 23 April 2013 - 10:58 PM in Netduino Plus 2 (and Netduino Plus 1)

Could you show us your code and circuit so we can diagnose the issue?

 

Hi Verdis,

 

Here is my code which is now working properly:

using System;using Microsoft.SPOT;using Microsoft.SPOT.Hardware;using SecretLabs.NETMF.Hardware;using SecretLabs.NETMF.Hardware.NetduinoPlus;namespace SWEIoT{    public class Sensor:Constants    {        AnalogInput voltagePort;        OutputPort lowPort, highPort;        public Sensor()        {            //Temperature senso           voltagePort = new AnalogInput(AnalogChannels.ANALOG_PIN_A1);           lowPort = new OutputPort(Pins.GPIO_PIN_A0, false);           highPort = new OutputPort(Pins.GPIO_PIN_A2, true);        }        public double read()        {            double rawValue = voltagePort.ReadRaw();            double value = (rawValue * maxVoltage) / maxAdcValue;            double result = (((value - 0.5) * 1000) / 10) - 4;            return result;        }    }}

 

Thanks for your concern,

Mohammad




#49734 Hardware watchdog on Netduino Plus

Posted by mohammad on 21 May 2013 - 11:46 PM in Netduino Plus 2 (and Netduino Plus 1)

 

This might be useful for your watchdog prodecures: http://forums.netdui...-netduino-plus/ (although it is a software reboot).




#49443 Hardware watchdog on Netduino Plus

Posted by mohammad on 14 May 2013 - 07:47 PM in Netduino Plus 2 (and Netduino Plus 1)

Latest version is much more stable, thanks ToniA!

 

Unfortunately my SD Card that worked fine in 4.1, doesn't work in 4.2 :(

Throws the Unsupported Exception in System.IO

 

Is your SD card more than 2GB? The firmware 4.2 only knows the SD cards 2GB and 1GB.




#49855 Hardware watchdog on Netduino Plus

Posted by mohammad on 23 May 2013 - 07:39 PM in Netduino Plus 2 (and Netduino Plus 1)

That's not a watchdog, it's a scheduled reboot.

 You are right, so I should not consider them interchangeably.

 

have you tried out my firmware build?

No, since the firmware of your library was different from mine.

 

 

What are the problems you mention in the other thread ('I had a problem for 1 month to use a Watchdog mechanism in Netduino Plus') ?

The watchdog problem :) to reboot the Netduino Plus after a specific time.




#50064 Electrit Microphone Sensor

Posted by mohammad on 28 May 2013 - 07:05 PM in General Discussion

According to the comments on the Sparkfun page https://www.sparkfun.com/products/9964, [color=#008000;]I could solve the problem[/color]. Somebody recommended to write a tight loop (e.g. 100ms) to get the min and max values. The difference between the two will give us the volume (sound pressure) during that time.




#50032 Electrit Microphone Sensor

Posted by mohammad on 27 May 2013 - 06:03 PM in General Discussion

Hi,

 

Is there anyone who has already worked with Electret Micrphone Sensor? I need to detect the noise in my room, so I wired the sensor simply to my Netduino Plus (5v, GND, Analog Pin 0), and I am getting random values (70 to 130) which are independent to the existing noise.

 

-My code:

    public class Program    {        public static void Main()        {            SecretLabs.NETMF.Hardware.AnalogInput inp = new SecretLabs.NETMF.Hardware.AnalogInput(Pins.GPIO_PIN_A0);                        while(true)            {                Debug.Print(inp.Read().ToString());                Thread.Sleep(100);            }            }    }



#31630 COM Port Problem

Posted by mohammad on 05 July 2012 - 07:32 PM in Netduino Plus 2 (and Netduino Plus 1)

The best blog to solve the problem: http://mohammad.geoc...ebsite/blog.php



#31632 BlueSMiRF Silver (Bluetooth)

Posted by mohammad on 05 July 2012 - 07:33 PM in Netduino Plus 2 (and Netduino Plus 1)

The best solution to solve the problem: http://mohammad.geoc...ebsite/blog.php



#49269 AnalogInput: Sometimes works, sometimes doesn't

Posted by mohammad on 08 May 2013 - 10:29 PM in Netduino Plus 2 (and Netduino Plus 1)

Hi Chris,

 

Thank you so much for your quick reply, but I didn't understand what I should dispose.

For your information, I deleted that project, and copied and created a new one. The new code worked properly once :) For the second time, it threw the exception. It seems it restores a file or attribute in the project folder.

 

Cheers,

Mohammad




#49266 AnalogInput: Sometimes works, sometimes doesn't

Posted by mohammad on 08 May 2013 - 09:54 PM in Netduino Plus 2 (and Netduino Plus 1)

Hi All,   I developed a code to get the temperature readings from TMP36 sensor. My Netduino was working properly. After 5 hours, I started debugging again, but it throwed exceptions (on the line voltagePort = new SecretLabs.NETMF.Hardware.AnalogInput(Pins.GPIO_PIN_A1)):

A first chance exception of type 'System.ArgumentException' occurred in Microsoft.SPOT.Hardware.dllAn unhandled exception of type 'System.ArgumentException' occurred in Microsoft.SPOT.Hardware.dll

The code of mine is here:

using System;using Microsoft.SPOT;using Microsoft.SPOT.Hardware;using SecretLabs.NETMF.Hardware;using SecretLabs.NETMF.Hardware.NetduinoPlus;namespace TMPSensor{    public class Sensor:Constants    {        //Microsoft.SPOT.Hardware.AnalogInput voltagePort;        SecretLabs.NETMF.Hardware.AnalogInput voltagePort;        OutputPort lowPort, highPort;        public Sensor()        {            //Temperature sensor           //voltagePort = new AnalogInput(AnalogChannels.ANALOG_PIN_A1);           voltagePort = new SecretLabs.NETMF.Hardware.AnalogInput(Pins.GPIO_PIN_A1);           lowPort = new OutputPort(Pins.GPIO_PIN_A0, false);           highPort = new OutputPort(Pins.GPIO_PIN_A2, true);        }        public double read()        {            double rawValue = voltagePort.Read();            double value = (rawValue * maxVoltage) / maxAdcValue;            double result = (((value - 0.5) * 1000) / 10) - 4;            return result;        }    }}

The firmware of my Netduino Plus is 4.2.0.0 (RC5), and the SDK is MicroFrameworkSDK_NETMF42_QFE2. Any help or comment is highly appreciated.   Mohammad




#49270 AnalogInput: Sometimes works, sometimes doesn't

Posted by mohammad on 08 May 2013 - 10:34 PM in Netduino Plus 2 (and Netduino Plus 1)

FYI. I copy and paste the code from my notebook to PC. The only diff between my notebook and PC is about the SDK version (I am not sure whether it matters). As long as the code hasn't been changed (e.g. type a character which needs a new software build), the code works properly. Whenever I change the code and build it again, the errors appear.





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.