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.

marksmanaz

Member Since 27 May 2012
Offline Last Active Sep 24 2013 03:30 PM
-----

Posts I've Made

In Topic: Socket server stops accepting after 5 connections

12 September 2013 - 04:01 AM

OK I finally found my problem. I got rid of the "Implements IDisposable" and the region and sub that went with it that I did not include in the code clip above. Then I added a close command and made the socket = nothing in the response sub that also did not include above. I now can send a post or get a thousand times without it shutting down :)


In Topic: HttpWebRequest GetResponse Error

27 May 2013 - 05:47 PM

I found the answer here:

http://forums.netdui...+iis#entry49398

 

You cannot prefix the address with "http://"

 

 

Thanks NakChak I didn't see your post until after I posted but thank you very much for the reply.

 

In Topic: Understanding InterruptPort Handling

27 May 2013 - 05:21 AM

I figured it out:

    Dim span As TimeSpan = New TimeSpan()    Dim duration As TimeSpan = span.Duration()    Dim StartTime As Date    Dim DoorTimer As New Timer(New TimerCallback(AddressOf lightOff), Nothing, duration, TimeSpan.Zero)    Dim led As New OutputPort(Pins.GPIO_PIN_D8, False)    Dim PIR As New InterruptPort(Pins.GPIO_PIN_D0, True, Port.ResistorMode.Disabled, Port.InterruptMode.InterruptEdgeHigh)    Public Sub PIR_OnInterrupt(data1 As UInteger, data2 As UInteger, time As Date)        If StartTime = Nothing Then            led.Write(True)            StartTime = time            DoorTimer.Change(600000, Timeout.Infinite)        ElseIf StartTime <> Nothing Then            DoorTimer.Change(600000, Timeout.Infinite)            StartTime = time        End If    End Sub    Public Function MinutesDifference(startTime As DateTime) As Double        Return (DateTime.Now.Subtract(startTime).Ticks / TimeSpan.TicksPerMinute)    End Function    Sub lightOff()        led.Write(False)        StartTime = Nothing        DoorTimer.Dispose()    End Sub

In Topic: HttpWebRequest GetResponse Error

27 May 2013 - 05:16 AM

Stefan,

  I could use your help. I have been trying to use your HttpClient

 all day and can't get it to post to my IIS server and get a response. If you leave your test server in on port 80 it works fine but any other server it does nothing and eventualy I get this error:

 

"A first chance exception of type 'System.Net.Sockets.SocketException' occurred in Microsoft.SPOT.Net.dll"

 

When I check the logs on the IIS server it shows no requests being made by the Netduino. I can access the page from any browser with no problem.

Any help is appreciated.

 

Thank,

 

Mark

   Public Sub PostSmsMsg()        Try            ' Creates a new web session            Dim WebSession As HTTP_Client = New HTTP_Client(New IntegratedSocket("http://XXXXXXXX.no-ip.biz/Twilio/WebSite/smsresponse.aspx", 10343))            ' Requests the latest source            Dim Response As HTTP_Client.HTTP_Response = WebSession.Post("")            ' Did we get the expected response? (a "200 OK")            If Response.ResponseCode <> 200 Then                Throw New ApplicationException("Unexpected HTTP response code: " + Response.ResponseCode.ToString())            End If            ' Fetches a response header            Debug.Print("Current date according to www.netmftoolbox.com: " + Response.ResponseHeader("date"))            ' Gets the response as a string            Debug.Print(Response.ToString())        Catch ex As Exception            Debug.Print(ex.ToString)        End Try    End Sub

In Topic: HttpWebRequest GetResponse Error

27 May 2013 - 05:07 AM

oops


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.