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.

sebswed's Content

There have been 45 items by sebswed (Search limited from 30-March 23)


By content type

See this member's


Sort by                Order  

#48547 Help! New Netduino Problem

Posted by sebswed on 19 April 2013 - 04:19 AM in Netduino Plus 2 (and Netduino Plus 1)

Hello Wayneio.

 

Maybe 250 mili second is just a little flash, to short to see?

If you change boths Thread.Sleep to Thread.Sleep(2000); (2 seconds on 2 seconds off)

 

Does it work than?




#48546 Setting up NP2 internet for global access?

Posted by sebswed on 19 April 2013 - 04:12 AM in Netduino Plus 2 (and Netduino Plus 1)

Hello Verdris

 

I use Dynamic DNS (DDNS) to have my Netduino +2 accessible over the internet. If you have a D-Link router/modem you are alowed to create one for free (for example MyName.dlinkddns.com). That you than also specify in your modem/router with port 80 forwarding to the ip address that your router assigned to your netduino. Than you can access your netduino from all over the world by going to MyName.dlinkddns.com




#48545 Experimental Webserver Problem

Posted by sebswed on 19 April 2013 - 03:58 AM in Netduino Plus 2 (and Netduino Plus 1)

Thanks :)




#48544 Web server up and running - not all html text showing

Posted by sebswed on 19 April 2013 - 03:56 AM in Netduino Plus 2 (and Netduino Plus 1)

Hi Martin.

 

I tried that yesterday evening after reading your message. Deleted the Fat16 partition and created a new Fat16 partition added some files. Same result. I than deleted the Fat16 and created a Fat32. Same result. :)

 

Don't worry about it. I will try to get it work by commenting out some code and see if it changes things. That will not be before Tuesday as I'm away for a couple of days :)

 

Kind regards,

Sebastiaan




#48528 Web server up and running - not all html text showing

Posted by sebswed on 18 April 2013 - 05:44 PM in Netduino Plus 2 (and Netduino Plus 1)

No, I have a 256mb SD card from Sandisk. I also have this problem with the updated version in the same post. Do you recall how you got the problem solved?




#48525 Web server up and running - not all html text showing

Posted by sebswed on 18 April 2013 - 03:18 PM in Netduino Plus 2 (and Netduino Plus 1)

Hi Martin.

 

As I used the exact same code as you posted on http://forums.netdui...server-problem/, I also have the exact same problem :)  (that I need to have it run from Visual Studio). I read on the above link that you found a solution for this with a new line of code "Thread.Sleep(20);".

 

Now that I read your post again, I see that this problem was related to the SD card? I'm not at home yet but I think I'm using a micro SDHC card with more than 2GB (8 or 16GB). As the storage on the netduino + 2 suports up to 2GB, this might be the problem (I was able to read the files on the Netduino). I will experiment with a regular SD card of max 2GB to see if it makes any difference :)

 

Kind regards,

Sebastiaan




#48490 Experimental Webserver Problem

Posted by sebswed on 17 April 2013 - 07:23 PM in Netduino Plus 2 (and Netduino Plus 1)

Hello Martin.

 

Short question. On which line should I insert the "Thread.Sleep(20);"?

 

Kind regards,

Sebastiaan




#48487 how can i implement netduino plus garage door opener project

Posted by sebswed on 17 April 2013 - 06:19 PM in Netduino Plus 2 (and Netduino Plus 1)

I forgot to ask. Did you forward the port (80) in your router/modem to your Netduino's ip address (192.168.1.6)

I will attach a screenshot of how it looks inside my modem (your configuration might look similar)port_forwarding.jpg




#48485 how can i implement netduino plus garage door opener project

Posted by sebswed on 17 April 2013 - 05:57 PM in Netduino Plus 2 (and Netduino Plus 1)

Hello shobana.

 

Maybe you have more luck with the webserver project from Martin http://forums.netdui...lem/#entry45239. His projects worked without any changes for me (you need an SD card with some files on it in your netduino). I even got it to work with DDNS so I can access the netduino from any computer over the internet. Its worth trying :)




#48484 DDNS how to?

Posted by sebswed on 17 April 2013 - 05:52 PM in General Discussion

I tried a different webserver project that worked like charm. I even got it to work with DDNS. I guess I must have had something strange in my previous code. Anyways, I thought I just let you guys know that the puzzle got solved (replaced)  :) 




#48483 Web server up and running - not all html text showing

Posted by sebswed on 17 April 2013 - 05:47 PM in Netduino Plus 2 (and Netduino Plus 1)

Hello Martin.

 

Just to let you know that I got it all working (no changes made). I must have entered the wrong ip address in my browser. I even got it to work with DDNS. So I'm really grateful.

 

Vielen Dank :)




#48480 DDNS how to?

Posted by sebswed on 17 April 2013 - 05:13 PM in General Discussion

I had no time to reply earlier. I tried port 8080, (specified port 8080 in my router, netduino and url), no result.

I experimented a little to get the IP address somehow static in the netduino, but got confused with the code :)

 

I have to experiment some more before I understand how to accomplish this. I downloaded some webserver projects so I can inspect the code they used to see if it makes sense to me. Its like solving a puzzle :)




#48479 how can i implement netduino plus garage door opener project

Posted by sebswed on 17 April 2013 - 05:00 PM in Netduino Plus 2 (and Netduino Plus 1)

Maybe you could change the code so it blinks a led (so you know the program is running on your netduino) or show a message in the debugging window? I wish I could advise you on this but my knowledge is not sufficient to understand the problem.




#48478 Web server up and running - not all html text showing

Posted by sebswed on 17 April 2013 - 04:54 PM in Netduino Plus 2 (and Netduino Plus 1)

Thanks Martin!

 

I'm grateful that you shared the code for other people to learn from it. I will experiment until I get it working.

 

Kind regards,

Sebastiaan




#48421 Network Settings

Posted by sebswed on 15 April 2013 - 09:30 PM in Netduino Plus 2 (and Netduino Plus 1)

I used the following tutorial to get my IP from my Netduino +2 http://wiki.netduino...duino-Plus.ashx Maybe you could try a different webserver application? I downloaded many examples and played a lot before I got it working (14 hours of reading, copy, pasting and testing). The webserver application that I have works for me but I don't know if it will work for you, it never hurts to try. It might feel like a slope learning curve but its like a puzzle. You have to find the right piece to make your project work.

 

My wife studies and lives in a different city and will be there for 2 years. I figured I could play Skyrim for 2 years (I love that game) or start learning programming, I chose programming ^_^




#48419 Web server up and running - not all html text showing

Posted by sebswed on 15 April 2013 - 08:58 PM in Netduino Plus 2 (and Netduino Plus 1)

Hi Martin.

 

I downloaded your code example (Webserver.zip) from http://forums.netdui...lem/#entry45239 I installed it on my Netduino +2. Unfortunately I'm not able to connect to it through my browser (main page does not load for me). I find your code very clean and it looks very interesting.

 

For example, I see a separate HtmlPage.cs and when I look at the code inside it (please correct me if I'm wrong) I think that makes the main html file run in a loop so you get live data on your webserver without the need to refresh the page right?

 

It looks very nice!




#48414 DDNS how to?

Posted by sebswed on 15 April 2013 - 07:27 PM in General Discussion

Hi there.

 

Could someone explain what to do? I thought I understood this concept but it doesn't work so I guess I missed something.

 

I have a D-Link modem/router (DSL-2740B) and with that you are allowed to create one free DDNS at https://www.dlinkddns.com/login so I created a host name, lets call it hostname.dlinkddns.com , used the IP address that was showing and saved the settings.

 

I specified this hostname.dlinkddns.com also in my router (ipoe_atm0/atm0) and added a port forward with,

 

Name: Netduino

Address: 192.168.1.2

External port: 80

Internal port: 80

Protocol: TCP

Wan Interface: atm0

 

If I type 192.168.1.2 in my browser I get the Netduino webserver (on my local network)

If I type hostname.dlinkddns.com I get to see my routers login page (on my local network)

 

Outside my local network I do not get a result on hostname.dlinkddns.com

 

I read on the D-Link forum that some firmware versions do not allow passwords longer than 10 digits (I used 9)

I even deleted the host, reset the modem to factory default and tried again. No result.

 

The funny thing is, it used to work with an Arduino, so  know its possible. I just cant remember how I did it the first time

 

Should I use a different port (8080) ?

 

In my code I use: socket.Bind(new IPEndPoint(IPAddress.Any, 80));

 

Is there something obvious missing?

Any advise is welcome.




#48413 how can i implement netduino plus garage door opener project

Posted by sebswed on 15 April 2013 - 06:55 PM in Netduino Plus 2 (and Netduino Plus 1)

Hi shobana.

 

I attach the zip file containing my current working web server which is far from perfect but it works. Feel free using it and to inform me about improvements so I can learn from it. Attached File  WebserverHelloWorld.zip   154.75KB   9 downloads




#48412 Web server up and running - not all html text showing

Posted by sebswed on 15 April 2013 - 06:48 PM in Netduino Plus 2 (and Netduino Plus 1)

Thanks Martin! Much appreciated.




#48401 ToggleButton sample

Posted by sebswed on 15 April 2013 - 05:55 AM in Project Showcase

Hi there.

 

I see in the code: "ONBOARD_SW1, false, Port.ResistorMode.Disabled",

Should that not be set to pull upp or down to debaunce the switch?




#48400 how can i implement netduino plus garage door opener project

Posted by sebswed on 15 April 2013 - 05:40 AM in Netduino Plus 2 (and Netduino Plus 1)

Hello shobana.

 

If you see "i get only response as TINY CLR" than that is correct. I'm not at home right now but from what I remember you click after that in the menu on statistic to see your IP (but I'm not home at the moment so I can not confirm this).

 

The code that I use for my webserver (not related to a garage opener) is not finished yet, but it works. I have it posted in: http://forums.netdui...l-text-showing/

 

To get it working you need to deactivate the 2 lines in the code. You need to do the Pinging again and check the 'Statistic' I think it was called to check the result of the pinging.

 

Take note of the line: using SecretLabs.NETMF.Hardware.NetduinoPlus;

When creating a standard netduino application in Visual express 2010 it does not add this by itself (instead you get the version without the 'Plus') so you will need to add that as a reference to your project (both this line of code and by right clicking on the folder called 'References' and choose add to reference after which you will scroll down the list untill you see the netduinoPlus).

 

Just make sure you have all the references in that folder that are also being used in the code (using xxxxx).

You need the ip address that your router assigns to your netduino by 'Pinging' otherwise you won't know the address to access your netduino in your webbrowser.

 

Hm.... I forgot that I had 2 .cs files in my application. I will post it tonight (local time).




#48393 Web server up and running - not all html text showing

Posted by sebswed on 14 April 2013 - 08:09 PM in Netduino Plus 2 (and Netduino Plus 1)

Hi Martin, I totally agree with "why would you declare the response as "Hello World" and later in your code overwrite it without any conditions... not very optimized" I removed it now :) (leftover from copy and pasting code)




#48392 Web server up and running - not all html text showing

Posted by sebswed on 14 April 2013 - 08:06 PM in Netduino Plus 2 (and Netduino Plus 1)

I disabled 2 lines in the code and now it works. The question is now... do I need this code for receiving url requests to control i/o ports?

The lines i Disabled are:

//string header = "HTTP/1.0 200 OKrnContent-Type: text; charset=utf-8rnContent-Length: " + response.Length.ToString() + "rnConnection: closernrn";//clientSocket.Send(Encoding.UTF8.GetBytes(header), header.Length, SocketFlags.None);



#48390 Web server up and running - not all html text showing

Posted by sebswed on 14 April 2013 - 07:52 PM in Netduino Plus 2 (and Netduino Plus 1)

Thanks for the example Baxter.

I going to look over my code and apply your example to improve my code




#48389 Web server up and running - not all html text showing

Posted by sebswed on 14 April 2013 - 07:49 PM in Netduino Plus 2 (and Netduino Plus 1)

Hello Martin.

 

Thank you for replying. I have tried the Thread.Sleep(200); and Thread.Sleep(300); at different places in the code but it does not seem to give any result. If you don't mind could you instruct me on which line I should insert this?

I have tried below line 25, line 30, line 38, line 39, line 44 and line 81.

 

I never heard of NetworkStreams  :)  If that is considered to be better than I will try to find some working examples so I can see the differences.

I was already happy I got this kind of working.





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.