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.

seascan's Content

There have been 31 items by seascan (Search limited from 05-June 23)


By content type

See this member's


Sort by                Order  

#55339 Versions! VS2012 with Netduino Plus 1

Posted by seascan on 13 January 2014 - 11:00 PM in Netduino 2 (and Netduino 1)

Hi All.  It has been a long time since I have been on the forum.  I really like the spec on the Plus 2 but, for now I am using my dusty old Plus 1.

 

I have recently migrated to a new laptop running windows 8.1.  I have installed VS2012.  For the last few days I have been trying to breathe life back into my Plus 1 and have gotten a lot accomplished EXCEPT I can't ping it (Ethernet not MFDeploy).

 

I have installed the .NET Microframework V4.3 and Secret Labs Netduino SDK V4.3.

 

I was able to change my IP Address (192.168.1.100) and my default gateway (192.168.0.1) but, I am unable to ping the device.  The two green and one amber leds on the Netduino are flashing like it is seeing network traffic.

 

Any ideas why I can't ping it?

 

Thank you!

Terry




#55341 Versions! VS2012 with Netduino Plus 1

Posted by seascan on 13 January 2014 - 11:22 PM in Netduino 2 (and Netduino 1)

I went ahead and changed it to 192.168.1.1 and had the same issue.

 

I ran ipconfig on my laptop and it showed the default gateway as 192.168.0.1 -- no custom setup.




#55344 Versions! VS2012 with Netduino Plus 1

Posted by seascan on 13 January 2014 - 11:37 PM in Netduino 2 (and Netduino 1)

My laptop is: 192.168.0.102




#55346 Versions! VS2012 with Netduino Plus 1

Posted by seascan on 13 January 2014 - 11:58 PM in Netduino 2 (and Netduino 1)

Whoo hoo -- Thanks for that!  It worked when I plugged it into my router.

 

If I plug directly to the PC do a I need a crossover cable?

 

Thanks!!




#55348 Versions! VS2012 with Netduino Plus 1

Posted by seascan on 14 January 2014 - 12:08 AM in Netduino 2 (and Netduino 1)

This is a bit off topic but, do you happen to know if I can make this wireless?  I was thinking of buying a small wireless access point and connecting this to the netduino ethernet port.  If I did this, do you think I would be able to then "see" my netduino on my network wirelessly?




#55350 Versions! VS2012 with Netduino Plus 1

Posted by seascan on 14 January 2014 - 12:41 AM in Netduino 2 (and Netduino 1)

Thank you for all the help.

 

I do have a wireless router for my house.  My laptop is wirelessly (is that a word?) connected to it.  I would like to be able to communicate with my netduino without it being wired to either the main router or my laptop.  My thought was to get a small, cheap travel router and connect it to the netduino then that router would communicate with my main router...  does that make sense?




#55451 ND Plus 1 & the internet

Posted by seascan on 17 January 2014 - 10:04 PM in Netduino Plus 2 (and Netduino Plus 1)

Hi.  I've got a strange problem and after a few days of struggling and searching I'm throwing it out to the community:

 

I set up a webserver on my Netduino Plus 1.  I connected it to my local network.  Finally, I set port fowarding on my home router to point to it.  Everything worked great for 10 minutes or so.  Then the ND would lock up.  Usually I could not even cycle it with the reset button. Seriously locked up.  It didn't appear to lock up while I was debugging -- just when it was stand-alone.

 

So, I eventually quit doing the port forwarding and only am operating from my local network.  So far things look great.  It's been stable for an hour or so which is a lot more that what I was getting for the past two days.

 

Any ideas why port forwarding and accessing my ND from the internet would cause a lock up??  If this stays stable for a day or two then my next step will be setting the external port to something weird (12345 or something) instead of port 80.

 

Thanks for any insights.

 

Terry




#55454 ND Plus 1 & the internet

Posted by seascan on 18 January 2014 - 01:20 AM in Netduino Plus 2 (and Netduino Plus 1)

Thanks, Wendo.  That makes sense.

 

I tried changing the port and the ND has been stable for 2 hours.  So far, so good.




#55485 XML Data

Posted by seascan on 19 January 2014 - 03:18 PM in Netduino Plus 2 (and Netduino Plus 1)

Are there any .Net experts in the audience?

 

I have a webserver running on a ND+1.  It works great.  I'm sending back a small bit of XML for testing.  When I load up the webpage in IE or chrome it looks perfect.  However, when I try to read this XML from a ASP.Net page I get "Additional information: The underlying connection was closed: The connection was closed unexpectedly."

 

Here's my huge ASP.Net webpage (i trimmed everything down to just the line throwing the error):

Imports System.XmlImports System.Net.SocketsPublic Class GetData    Inherits System.Web.UI.Page    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load        Dim xmlDoc = XDocument.Load(MyIpAddress)    End SubEnd Class

Here's my code for returning the XML:

 Private Sub Send(client As Socket, response As String)        client.Send(Encoding.UTF8.GetBytes(response), response.Length, SocketFlags.None)    End Sub    Private Sub SendXML(client As Socket)        Dim Mystring As String = ""        Mystring = "<?xml version=" & Convert.ToChar(34) & "1.0" & Convert.ToChar(34) & " encoding=" & Convert.ToChar(34) & "UTF-8" & Convert.ToChar(34) & "?>"        Mystring += "<DataTable>"        Mystring += "<Data>"        Mystring += "<Temp1_C>28.0</Temp1_C>"        Mystring += "</Data>"        Mystring += "</DataTable>"        Send(client, Mystring)End Sub

I have added this to my asp.net web.config:

  <system.net>    <settings>      <httpWebRequest useUnsafeHeaderParsing="true" />    </settings>  </system.net>

Any thoughts?  Thanks!




#55491 XML Data

Posted by seascan on 19 January 2014 - 06:45 PM in Netduino Plus 2 (and Netduino Plus 1)

Solved!

 

I added a header:

Send(client, "HTTP/1.0 200 OK" & vbCr & vbLf & "Content-Type: text/xml; charset=utf-8" & vbCr & vbLf & "Content-Length: " & Mystring.Length.ToString() & vbCr & vbLf & vbCr & vbLf)



#55884 Galileo

Posted by seascan on 05 February 2014 - 09:25 PM in General Discussion

Hi.  Does anyone know if Galileo is a competitor to Netduino or are the two different enough to not be "against" each other?

 

 




#55887 Galileo

Posted by seascan on 05 February 2014 - 10:20 PM in General Discussion

Thanks for the info, Chris.

 

What is AGENT?

 

(EDIT) Never Mind!  Very cool.




#55888 VB & AGENT

Posted by seascan on 05 February 2014 - 10:52 PM in Visual Basic Support

Is it possible to program an AGENT watch with VB?

 

 




#55921 ND+1 Connected to Router

Posted by seascan on 07 February 2014 - 06:15 PM in Netduino Plus 2 (and Netduino Plus 1)

Hi.  This one is difficult to explain.  I have been trying to figure it out on my own for days and have failed.    For a few weeks I have been building an application on an ND+1.  It works great.  Reading humidity, multiple temperatures, light levels, controlling relays, etc.  I connected the ND to a Netgear WNCE2001 (Ethernet Adapter) and set my ND to a static IP address.  Again, works great.  With port forwarding on my home router I am able to access all the sensor info from the internet.  Woo Hoo!   So, I went ahead a bought a nice box to house all my components and used external power supplies (not USB) for the ND and Netgear.  I noticed I couldn't 'talk' with the ND when I put in the static IP address.  Weird.  So, I unplugged the ND and plugged the USB cable to my PC for debugging.  Works great -- was able to access it via static IP with no problem!  Weird.  So, without unplugging the netgear I unplugged the ND USB and used the AC Power.  Now it works!  With both the ND and Netgear on external power I was able to access the ND via the IP Address.    So, now I recycle power on both the ND and Netgear and they don't work -- all the lights look happy (just like when plugged into to the USB port but, I can't access the ND via IP address).     For debugging I swapped out power supplies for the ND.  I tried staggering the boot so the netgear loads first, tried watch dog timer, tried cutting out all the code except for the webserver, tried polling the webserver, tried cycling the ethernet pin (CPU 50) -- tried so many things that I can't recall them all. Because I have lots of LED flashing debug points (flashes tell me where I am in the code) I can see that the ND is polling away waiting on the socket.     The only way to access the ND via IP address is if I run the ND in debug mode from the laptop.  Then I can unplug the ND and give it power from the AC power supply and it still works great.   I know I've done a poor job of explaining the issue and all my attempts of debugging....  just hoping someone may recognize this and can say "oh, that's easy just do ------ "   Thank you!




#55922 Netduino Plus Network Problem

Posted by seascan on 07 February 2014 - 06:59 PM in Netduino Plus 2 (and Netduino Plus 1)

Have any of you figured this one out?  I seem to be running into the same issue.




#55937 ND+1 Connected to Router

Posted by seascan on 08 February 2014 - 07:05 PM in Netduino Plus 2 (and Netduino Plus 1)

Hi Paul.  Thank you for the reply.

 

Yes, I am running 4.2.  I have alternated between 4.2.0.1 and a version of 4.2 that has OneWire and a Watchdog timer.  I've reflashed this ND many times to see if that is the issue.

 

What it comes down to is that it runs perfectly while connected by USB but, bizarrely when off external power.

 

To ensure I am truly cycling power, I rigged up a relay to an output pin.  The hot wire for my AC plug is wired into the normally closed portion of the relay.  When I set the relay high the power to the ND is reset (as well as the relay going back to the NC position). Works great!

 

In the Main portion of my code I read from the SD card.  If there is a file called rebootme then I reboot and delete the file (so that it doesn't reboot on the next go around).  

Take a look at this:

  Sub Main()        _onBoardLED = New OutputPort(Pins.ONBOARD_LED, False)        Dim Flash As Boolean        If System.IO.File.Exists("SDRebootMe.txt") Then            Do Until System.IO.File.Exists("SDRebootMe.txt") = False                System.IO.File.Delete("SDRebootMe.txt")            Loop            For x = 1 To 45                For i = 1 To 10                    _onBoardLED.Write(Flash)                    Thread.Sleep(100)                    Flash = Not Flash                Next            Next            _ResetRelay.Write(ONSTATE)            Exit Sub        Else            Do Until System.IO.File.Exists("SDRebootMe.txt") = True                Dim file As New System.IO.FileStream("SDRebootMe.txt", System.IO.FileMode.Create)                Dim SR As New System.IO.StreamWriter(file)                SR.WriteLine("FooBar")                SR.Flush()                SR.Close()                file.Close()            Loop        End IfEnd Sub

I have do loops to ensure that the file is deleted or written!  Bullet proof, right??  NOPE.  When I run off external power it just constantly reboots and re-runs the same portion.  When I run off of the USB in debug mode it is perfect every time.

 

I put the do loops in for deleting and creating the file just to be doubly sure that it is working.  Since the code gets past this and starts flashing the LED the I KNOW the file was deleted.  Still on the next reboot it "sees" the file and drops into the same portion of the code.

 

I re-formatted the 2GB SD card (tried both FAT and FAT32).  Still no workie.  

 
I am at the end of my rope on this thing and have no clue what to try next.



#55938 SD Card Reading with External Power

Posted by seascan on 08 February 2014 - 07:32 PM in Netduino Plus 2 (and Netduino Plus 1)

Hi.  I have a Very simple program that creates a file on an SD card at boot up.  If the File exists, it lights the LED and deletes the file (so the next boot up the LED is off).

 

This works perfectly while plugged into my computer via USB -- every other reboot the LED is on.  When the ND is being powered by an external power supply it does not work -- EVERY reboot the LED is on.

 

I have an ND+1 with 4.2 and a 2GB SD Card formatted to FAT32.

 

Any ideas?

Imports Microsoft.SPOTImports Microsoft.SPOT.HardwareImports SecretLabs.NETMF.HardwareImports SecretLabs.NETMF.Hardware.NetduinoPlusModule Module1    Public _onBoardLED As OutputPort    Sub Main()        _onBoardLED = New OutputPort(Pins.ONBOARD_LED, False)        If System.IO.File.Exists("SDRebootMe.txt") Then            Do Until System.IO.File.Exists("SDRebootMe.txt") = False                System.IO.File.Delete("SDRebootMe.txt")            Loop            _onBoardLED.Write(True)                   Else            Do Until System.IO.File.Exists("SDRebootMe.txt") = True                Dim file As New System.IO.FileStream("SDRebootMe.txt", System.IO.FileMode.Create)                Dim SR As New System.IO.StreamWriter(file)                SR.WriteLine("FooBar")                SR.Flush()                SR.Close()                file.Close()            Loop            _onBoardLED.Write(False)        End If    End SubEnd Module

Thank you!

Terry




#55941 ND+1 Connected to Router

Posted by seascan on 08 February 2014 - 07:39 PM in Netduino Plus 2 (and Netduino Plus 1)

Thanks again, Paul.

 

When it gets to the end it just quits.  When I rerun it on USB it works great.  On external power it doesn't work.

 

I am thinking it's an SD card issue and just created a new thread with an even more simplified example.

 

Perhaps I need to just throw in the towel and try an ND+2.  But, I am concerned that this will happen on it as well!  




#55942 SD Card Reading with External Power

Posted by seascan on 08 February 2014 - 07:42 PM in Netduino Plus 2 (and Netduino Plus 1)

Hi jrlyman3.  Very good advise.  I just checked and the board is getting 9.41V.  Right in the middle of the expected range.

 

 




#55945 ND+1 Connected to Router

Posted by seascan on 08 February 2014 - 08:09 PM in Netduino Plus 2 (and Netduino Plus 1)

Excellent ideas!  I may try to implement... but, for now I want/need to get an understanding of this strange behavior with the SD card.  




#55947 ND+1 Connected to Router

Posted by seascan on 08 February 2014 - 09:30 PM in Netduino Plus 2 (and Netduino Plus 1)

I will try that... but, first I need a new SD card.  Now, it's hanging in debug mode when I try to delete the file  :blink:

 

(EDIT) -- Never mind, I just had to reformat.




#55948 ND+1 Connected to Router

Posted by seascan on 08 February 2014 - 09:55 PM in Netduino Plus 2 (and Netduino Plus 1)

I am starting to narrow down the issue.

 

Whenever I attach my screw shield (shield that converts the header pins to screw terminals) the SD card needs to be re-formatted.  The file I create can not be deleted -- even with the PC!

 

Curiouser and Curiouser!

 

 




#55963 ND+1 Connected to Router

Posted by seascan on 09 February 2014 - 03:54 PM in Netduino Plus 2 (and Netduino Plus 1)

Hi Chris.  Yes, it has been quite a journey.  I discovered that the problem occured when I was powering the relay from the +5V on the ND.  I guess that with the Ethernet, writing to the SD and powering a few sensors must have been too much.  I was tired and didn't want to fiddle with it anymore.  It's been weeks of brain-strain.  I was about to give up --  actually, I did.  I put everything away and said to myself that "that's it. Enough is enough".  

 

20 minutes later it hit me:  instead of using a relay or any other crazy ideas, how about waiting  a minute and sending an ethernet request to itself on powerup.  If I don't get a response then cycle the power with powerstate.

 

It worked!  

 

So, now I just need to figure out why I lose ethernet connectivity after 30 minutes or so (while on USB I never had this issue).  

 

So, it continues....




#55967 ND+1 Connected to Router

Posted by seascan on 09 February 2014 - 04:40 PM in Netduino Plus 2 (and Netduino Plus 1)

Chris, I should have added that I did try multiple power supplies.  Also tried using a phone charger through the USB to power it and had the same issue.  

 

I really like your idea:

 

 

[color=rgb(40,40,40);font-family:helvetica, arial, sans-serif;]Finally...if all the above doesn't help, I would recommend using some of the free serial pins (D0/D1, D2/D3 on Netduino 1...or those and D7/D8, SDA/SCL on Netduino 2) on your Netduino mainboard and connecting those and GND via a USB TTL adapter to your PC. Then you can Debug.Print out the status of your program operation via a channel which acts consistently in all circumstances--and "see" what your code is doing remotely.[/color]



#56781 Sine wave

Posted by seascan on 13 March 2014 - 05:14 PM in Netduino Plus 2 (and Netduino Plus 1)

Hi.  I was wondering if anyone can enlighten me on how to go about creating a 26khz sine wave with a Netduino?  Also, is the ND's DAC fast enough to sample/measure a responding wave with this frequency?

 

Sorry if my question doesn't make sense.  My strengths are more with coding... I'm not 'tuned in' to the electronics as much.

 

Thanks!

Terry





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.