Wernfried'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.

Wernfried's Content

There have been 25 items by Wernfried (Search limited from 29-March 23)


By content type

See this member's

Sort by                Order  

#62994 Netduino 3 Wifi - Hello World Success!

Posted by Wernfried on 01 June 2015 - 01:02 PM in Netduino 3

I have adopted another WebServer for N2P, which should run on N3 too.

 

It serves pages from SD card and is able to handle Multipart request. Thus allows olso file uploads to SD card which I use fur CSS and HTML file update during developement instead of removing and inserting the SD card everytime. It uses streams, which is essential for Multipart messages. Unfortunately blocks are very small (128 Byte) otherwise N2P runs out of memory. 96K is not so much.

 

And I use a reduced jquery (about 9K), the full version is 90K, which is too large.

 

Only one unsolved problem I still have is with WebRequest send from Windows 8 or Windows Phone applications. IE, FF and Chrome works well.

 

PM me if you are interested. I will not publish the code untill the W8 problem is fixed.




#63012 Netduino 3 Wifi - Hello World Success!

Posted by Wernfried on 02 June 2015 - 10:45 AM in Netduino 3

Thanks for that hint, very usefull.

 

But for my WebServer it doesn't make any difference to execute the requests in parallel or in sequeal. The requesting site has to wait anyhow until all requests are proceeded. If I define mutiple threads then all of them assign memory, which is very small. In case of one thread only that one consumes the memory and can release it when finished.

 

And as I understood the blog corrcectly, multiple threads do not give any advantage according response time. It could even take longer because of thread switching.




#63009 Netduino 3 Wifi - Hello World Success!

Posted by Wernfried on 02 June 2015 - 07:38 AM in Netduino 3

My implementation of the WebServer is threaded, but I'm afraid it fullfills your requirements running 4 requests. This is because auf the limited amount of RAM. I turned it currently to only use one thread and running very often in memory problems.

 

On the other hand it seems that NetMF doesn't execute multiple threads in parallel. It has only one core. Thus you can have multiple threads, but they are executed one after the other. And in executing on web request there is usually no gap for a second thread. The rqeusts in my WebServer are queued, but executed serial

 

The rest of the requirements it can fullfill.I provide a simple static (even in responsive design) site with javascript and css and AJAX requests. It provides a simple status site with some statistics (running up time, sites supported). JSON is not implemented, I decided to implement only Multipart messages which also can have parameter/value pairs. This decision I made because of the limited ROM.




#64018 Problem reactivating my N2P

Posted by Wernfried on 01 September 2015 - 04:18 PM in Netduino Plus 2 (and Netduino Plus 1)

Here is the next part of the story.

 

Coming home from work I was trying if my N2P is still working and hurra, it did. I coded some lines and tested it. I was happy able to continue after dinner.

 

While sitting at the table and eating something, I heared the the sound as disconnecting from USB. I didn't touch the PC and N2P at that time. And what should I tell, the error is back.

 

Now my question is. I have considered having a bad internet connection (I'm in a hotel with very bad wlan). And in the evening the connection is very often broken. Can this correlate with my problem?




#64010 Problem reactivating my N2P

Posted by Wernfried on 31 August 2015 - 06:52 PM in Netduino Plus 2 (and Netduino Plus 1)

Yesterady, after a long time and updating my laptop to W10, I decided to play again a bit with my N2P. I've got a new shield I would try to include in my app. And yesterday evening I could easily deplay a clean new project (no functionality at all) and I was happy that all worked fine with W10.

 

But today I couldn't deploy it anymore, deployment windows always display "Iteration xx".

Then I tryed MFDeploy, which couldn't find my N2P. So I decided to reinstall firmware 4.3.2. The update tool did it's work, no errors. But MFDeploy still doesn't find the device.

 

The DfuSe Demo can see the device.

 

Any suggestions I can try more to get my N2P to work?




#64016 Problem reactivating my N2P

Posted by Wernfried on 01 September 2015 - 07:26 AM in Netduino Plus 2 (and Netduino Plus 1)

My above post started with "Yesterday"

 

And today I also would start with "yesterday" beacuse yesterday I've had his problem. Today morning I decided to give the problem a new try. And today it works, wihtout any changes since yesterday. The same way it didn't work yesterday it works today.

 

One thing I recognized, may be it gives someone a hint.
When I plug in the USB to the computer, there is a sound when it plugs in and out. This sound I heared today. Yesterday, when I've had the problem, this sound wasn't there. But it happened occationly while the N2P was plugged in. I mean the plug in and out was played randomly and not only once. If someone thinks I should reboot the computer, I did this yesterday felt 100 times.




#64038 Problem reactivating my N2P

Posted by Wernfried on 05 September 2015 - 06:38 AM in Netduino Plus 2 (and Netduino Plus 1)

I still havng the problem getting the N2P to work, can anyone help me?

 

What I considered during the last days is, that there is no Netduino driver in the USB folder of the device manager. I deinstalled and reinstalled the Netduino SDK (version from May 2015). The most mysterium for is, why it works for a small time and then it doesn't. I can now reproduce the following. The longer I do not connect the N2P to my laptop, the longer it works. Plugging in the N2P in the morning I get it working for about 10-15 minutes. During this time there is also the Netduino driver shown in the device manager. But when it is disconneceted, and I try it emmidiatly, it doesn't connect again. Only if I wait between to connection for abaout 10-15 minutes, I get a signal, that the N2P is connected, but disconnects emmidiatly.The longer I wait between the tries, the longer it takes until it disconnects. It doesn't matter to rebbot the computer.

 

I assume now, there is a problem with the driver. I uninstalled the driver during the small window it was shown in the devce manager and reinstalled the SDK. Same behaviour as before. Is there a chance to install the driver separately?




#64569 Problem reactivating my N2P

Posted by Wernfried on 26 November 2015 - 11:49 AM in Netduino Plus 2 (and Netduino Plus 1)

Is there any chance to get help?

 

If not, then I cannot use the Netduino anymore and because I'm afraid the same behaviour with Netduino 3 I have to search for alternatives.




#64076 Problem reactivating my N2P

Posted by Wernfried on 10 September 2015 - 09:17 AM in Netduino Plus 2 (and Netduino Plus 1)

I have tested with several MicroUSB cables, since I use several of them, at least 5. All of them work properly with other devices (smart phone, raspberry pi 2).

 

And yes, when I have enough time to deploy to zhe N2P, then the program runs properly, even if I cannot establish a connecion. I have a tested it with a program sennding messages to a REST server and the messages are received there.

 

I assume stil, that the driver does not work properly in W10, because when it doesn't work, it also isn't shown in the drivers list, but it is, when it works.




#64078 Problem reactivating my N2P

Posted by Wernfried on 10 September 2015 - 09:44 AM in Netduino Plus 2 (and Netduino Plus 1)

I'm runing W10 on a Lenovo Yoga Pro, unfortunatly I have no time in the next weeks to test it on a desktop pc with W10.




#64544 Problem reactivating my N2P

Posted by Wernfried on 21 November 2015 - 12:55 PM in Netduino Plus 2 (and Netduino Plus 1)

After a very long time today I've has enough time to play with Windows 10 and the Netduino.

I installed a new W10 on my dektop, installed Visual Studo 2015, the MicroFrameWork SDK and the Netduino SDK.

 

And now I can report, thet the behaviour on my Desktop computer is the same as on the Laptop. The USB driver for Netduino permanently connects and disconnects, I can hear it playing the sound. Since the desktop has totally different hardware and all other USB devises work well with both computers, I now assume it must be something wrong with the driver.

 

Does anyone else here use the Netduino with W10?




#61222 SD card?

Posted by Wernfried on 12 January 2015 - 09:44 AM in Netduino Plus 2 (and Netduino Plus 1)

I've tried to figure out, what SD cards are supported by N+2.

 

Most answers suggest a 2MB MicroSD. My problem is to purchase such one. Most stores do not have MicroSD anymore.

 

Is 2MB MicroSD the limitation for N+P?

Somewhere I've read that exists a 4.1beta which supports also SDHC. But I didn't find any hint, if this beta is included in 4.3 I'm currently using.

 

Questions

What is the most large SD card I can use on N+P (4.3)?

How must it be formatted (FAT)?




#61641 set brightness for Room light

Posted by Wernfried on 17 February 2015 - 11:32 AM in Netduino Plus 2 (and Netduino Plus 1)

I'd use a dimmable RF switch therefor. This is main voltages secure and with my library (ask me for the code) light can be dimmed very easy. The RF switches you get here in Germany in any DIY store or the internet.




#62986 Silly problem with power over USB

Posted by Wernfried on 31 May 2015 - 04:55 PM in Netduino Plus 2 (and Netduino Plus 1)

I will reopen this thread.

 

I beleaved, the given answer was correct, that my TP-Link router will not provide enough power to run the N2P.

 

Yesterday I've got a Raspberry PI 2 and I've been installing Windows 10 IoT on it and could get it to run. Then I prepared the PI2 to work with the TP-Link router. Then I've powerd it up with the USB of the router trying if it can support the PI2 and suprisingly it did.

 

 I thought the PI2 needs much more power then the NP2. Spec says that the PI2 consumes 420mA in idle state, which is 5 times of hat N2P.

 

Can someone explain me, where my fault is or if the N2P has a problem.




#61452 SPI usage

Posted by Wernfried on 02 February 2015 - 02:43 PM in Netduino Plus 2 (and Netduino Plus 1)

Thanks, this is what I figured out from another post in this forum.

 

I could workaround with sending not only 12 bits, but let's say 120 bits, where 10 bits have the state of the one. It acts as a zoom of the 12 bits to 120 bits. Thus I can run with the original MCU speed.




#61151 SPI usage

Posted by Wernfried on 04 January 2015 - 09:12 PM in Netduino Plus 2 (and Netduino Plus 1)

I'm new using SPI, may be I'm doing it totally wrong.

 

I Need to switch an RF device and I figured out how the code Looks like. One short pulse has to be 250µs. Sending the code using a parallel port togehter woth a Delay functions works well.

 

Since the Delay Loop in .Net can be interrupted I had the idea using the MOSI of the SPI to generate the code. Thus I implemented a short test, but is seems the code is sent to fast. Thats why I made the following test:

 

The SPI config is the following:

            SPI.Configuration rcConfig = new SPI.Configuration(
                Pins.GPIO_PIN_D8,
                true,
                0,
                0,
                false,
                false,
                4,
                SPI.SPI_module.SPI1
            );

I declared a clock rate of 4KHz, which is a 250µs cycle. Then I send 1000 byte

            byte[] xxx = new byte[1000];
            for (int i = 0; i < 1000; i++) xxx[i] = 0xaa;
            spi.Write(xxx);

On the MOSI port (11) I expect a signal for about 2 seconds (1000 Byte x 8 bit x 250µs), but it is much lesser then a second.

 

Where is my fault? Does 4KHz mean, one Byte is sent within 250µs and not one Bit as I expected?

How can I send a code with a duration of 250µs for one bit?

 

 




#61233 N+2: Remote debugging over TCP/IP?

Posted by Wernfried on 13 January 2015 - 07:49 AM in Netduino Plus 2 (and Netduino Plus 1)

VS does support in my opinion.

 

On selecting the properties of the project in ".NET Micro Framework" tab you can select on Transport combobox "TCP/IP".

But Netduino doesn't support.




#61264 RF switches with Netduino

Posted by Wernfried on 14 January 2015 - 01:36 PM in Netduino Plus 2 (and Netduino Plus 1)

This is my first contribution to this forum.

 

I managed to control RF switches with the N+2. There have been only samples available for Arduino, that's why I ported them to C#. The main problem was, that the RC switches are expecing pulses with a length of 250µs, which cannot be done with Thread.Sleep in NetMF.

 

Therefore I wrote a loop using the ticks of the prcessor and running in a hih priorized thread. This works well, but blocks the processor. To acheave this, I also found a way using SPI to produce the necessary pulses.

 

Currently I only have tested it with RF switches from InterTechno using the EasyHome codes. Several other codes are only adopted from the Arduino library but not yet tested with real RF switches.

 

The EasyHome codes are allowing not only switching but also dimming. Since I do not have dimmable switches, I didn't implement these codes yet.

 

If someone is interested in this library, please contact me in a private mail. I will give you the sources with the wish of any feedback. Until it s not stable tested I will not publish this library somewhere else.




#64082 Windows 10 IoT Core on Netduino Plus 2

Posted by Wernfried on 10 September 2015 - 12:28 PM in Netduino Plus 2 (and Netduino Plus 1)

Windows 10 IoT is an operating system, where .Net-based applications may run on. This has nothing to do with NetMF, on which Netduino is based on. NetMF is a reduced .Net framework while on W10 IoT the full .Net framework is available,

 

Windows Remote Arduino gives only a possibility to control the Arduino I/O from a Windows application.

 

So you cannot use W10 IoT on Netduino. Install W10 IoT on a Raspberry and you have a more powerfull MC then Netduino, but both solutions are not comparable, also Netduino has some advantages. In W10 IoT the applications are embedded in the W10 OS, in Netduino the NetMF is the OS, Apps are started emmediatly.




#61450 RF switches with Netduino

Posted by Wernfried on 02 February 2015 - 02:32 PM in Netduino Plus 2 (and Netduino Plus 1)

As I wrote, I can share my library. But since it is only tested with one type of devices (code is implemented for a bunch) I will not publish the sources. In the past I've got a lot of negative responces in such cases.

 

If someone is interested in the sources, pm me.




#61647 Netduino Plus 2 Firmware Upgrade in Windows 7 64 bit edition

Posted by Wernfried on 18 February 2015 - 08:44 AM in Netduino Plus 2 (and Netduino Plus 1)

I had a similar problem, not with W7 but with W8.1. Unfortunately I posted my question in the wrong topic.

 

http://forums.netdui...-recognize-n2p/

 

I figured out, that the USB driver was not installed together with SDK 4.3 for some reason. Chris told me, the drivers should be installed, but they weren't. I had success with manualy installing the drivers from a 4.2 installation.

 

Here is the whole process I'd run into this problem.

First the 4.2 was installed, all worked well

After switching to Visual Studio 2013 I installed the 4.3 beta and it worked also well

The I read, Mcrosoft released the 4.3 RTM and I installed it. With this installation it seemed the previuos Netduino 4.3 SDK was gone, I couldn't compile my projects anymore, missing assemblies.

Then I reinstalled the Netduino SDK but the driver for USB was missing. Plugging in the N+2, Windows tried to install the USB driver, but ended up with an error.

 

Chris mentioned, that the USB driver shall be in the folder "C:\Program Files\Secret Labs\Netduino SDK\Drivers" for 64bit-Systems. But there wasn't. I have had a second installation on another laptop (not the 4.3 RTM) and so I could copy the USB driver. Now installing the USB driver manually and all worked as a glance.

 

May be there is a missing step during installation of the Netduino SDK when there exists an other version. Publishing the USB driver here in the forum separately from the SDK could help others I think.




#61183 SPI usage

Posted by Wernfried on 07 January 2015 - 10:55 AM in Netduino Plus 2 (and Netduino Plus 1)

I found another topic which explains my problems.

 

http://forums.netdui...ossible-speeds/

 

According this explanation I think my fault was to assume the clock rate is 4KHz. The lowest available clock rate is 164 KHz on APB1 and 328 KHz on APB2.

 

In that topic I could figure out the available frequncies for SPI1, SPI2 and SPI3.

Since APB1 allows a lower clock rate I would use either SPI2 or SPI3.

 

Now my question ist, on what port can I access MOSI of SPI2 or SPI3? For SPI1 it is somewhere explaned (Port 11). But I cannot find any hints where MOSI for SPI2 or SPI3 is available. Is this avalable at all?




#61624 MFDeploy does not recognize N2P

Posted by Wernfried on 15 February 2015 - 09:07 PM in Netduino 2 (and Netduino 1)

How can I get my Netduino to communicare again with my PC?

 

I do not know what happened. On my Laptop I can work with the Netduino without any problems.

 

MFDeploy doesn't recognize it on my PC. I have removed USB Driver. After reconnection the Netduino it tries to install the USB, but it is marked with an errror. Status says "The Driver wasn't installed (Code 28). There are no compatible Drivers"

 

Where do I get a compatible USB Driver?

 

Edit:

 

I found a solution: For some reason "c:\Program Files (x86)\Secret Labs\Netduino SDK\Drivers" was not located on my PC, where the Drivers should occour. I copied it from my Laptop and now could update the Driver and it works.

 

How the drivers are deploeyed? Are they included the 4.3 SDK or only in the 4.2 (which I have had installed on my Laptop bot not on the pc)?




#61152 SPI usage

Posted by Wernfried on 04 January 2015 - 09:14 PM in Netduino Plus 2 (and Netduino Plus 1)

I'm new using SPI, may be I'm doing it totally wrong.

 

I need to switch an RF device and I figured out how the code looks like. One short pulse has to be 250µs. Sending the code using a parallel port together woth a Delay functions works well.

 

Since the Delay Loop in .Net can be interrupted I had the idea using the MOSI of the SPI to generate the code. Thus I implemented a short test, but is seems the code is sent to fast. Thats why I made the following test:

 

The SPI config is the following:

            SPI.Configuration rcConfig = new SPI.Configuration(
                Pins.GPIO_PIN_D8,
                true,
                0,
                0,
                false,
                false,
                4,
                SPI.SPI_module.SPI1
            );

I declared a clock rate of 4KHz, which is a 250µs cycle. Then I send 1000 byte

            byte[] xxx = new byte[1000];
            for (int i = 0; i < 1000; i++) xxx[i] = 0xaa;
            spi.Write(xxx);

On the MOSI port (11) I expect a signal for about 2 seconds (1000 Byte x 8 bit x 250µs), but it is much lesser then a second.

 

Where is my fault? Does 4KHz mean, one Byte is sent within 250µs and not one Bit as I expected?

How can I send a code with a duration of 250µs for one bit?

 

 




#61384 TCP/IP stack issue?

Posted by Wernfried on 27 January 2015 - 02:19 PM in Netduino Plus 2 (and Netduino Plus 1)

I use the embeddedwebserver from http://embeddedwebserver.codeplex.com/

 

There is some simple code

           // Get request
            int bytesReceived = pRequestSocket.Available;

            // Get read buffer
            byte[] readBuffer = new byte[_maxBufferedRequestLength];
            int readBufferLength = pRequestSocket.Receive(readBuffer, readBuffer.Length, SocketFlags.None);


I assume, hat bytesReceived and readBufferLength should be the same. And this is the case for all GET requests.

 

If I execute a Ajax POST request, this is also the case if I use Firefox or Chrome, but not for IE10, IE11 and IE for Windows Mobile. For the later ones, readBufferLength includes only the Http-Header, not the data itself, while bytesReceived is correct for the whole request. Executing a second Receive call reads the missing data.

 

Is there a know reason, why POST requests from IE behave like this? With Fiddler I coudn't see any differences in the requests (except the header)

 





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.