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.

louyo's Content

There have been 18 items by louyo (Search limited from 17-April 23)


By content type

See this member's

Sort by                Order  

#50902 Dallas 1-wire support library

Posted by louyo on 28 June 2013 - 05:22 PM in Netduino Plus 2 (and Netduino Plus 1)

Dumb question I guess. I am running the 4.2 SDK and get the following error when I build:

OneWire' does not exist in the namespace 'Microsoft.SPOT.Hardware'

I do have the using Microsof.SPOT.Hardware statement included and the assembly shows up in References. 

Could you please point me to the error of my ways? Is there another version of the dll somewhere?

Thanks much,

Lou

oops, the dummy just found the Hardware.OneWire reference. 

Apologies.

 

Louyo




#50896 Dallas 1-wire support library

Posted by louyo on 28 June 2013 - 02:23 PM in Netduino Plus 2 (and Netduino Plus 1)

Dumb question I guess. I am running the 4.2 SDK and get the following error when I build:

OneWire' does not exist in the namespace 'Microsoft.SPOT.Hardware'

I do have the using Microsof.SPOT.Hardware statement included and the assembly shows up in References. 

Could you please point me to the error of my ways? Is there another version of the dll somewhere?

Thanks much,

Lou




#50324 Com ports on Plus 2 changed?

Posted by louyo on 06 June 2013 - 01:09 PM in Netduino Plus 2 (and Netduino Plus 1)

Hmm, that is really bizarre. It should just be pulling in one byte for you. If there's a way for us to repro this here (i.e. feed it data via HyperTerminal instead of via a physical device), we'd be happy to try to repro. Chris

OK, another update. I put a  debug print statement in the routine that gets data from the camera and writes it to the file. I wanted to see how much it read before it crashed. It read the whole thing! The file it wrote, however, was corrupt, not a valid jpeg. That routine gets 120 bytes from the com port and then opens the file, writes the 120 bytes and closes the file (maybe).

SWAG:

It seems to be an: async, reentrant or plain old timing problem and part of the problem is the streamwriter closing thingie, see that thread. This is brought  on by the faster processor. So, for a workaround, one is going to have to find all the asynchrous stuff (or renentrant) and make sure to block until it finishes.

Just my SWAG.

My current "fix" is to press on with my N+ and leave the N+2 for another set of SDK/firmware.

Thanks for taking the time to help those of us mired in the slow group. :)

 

Louyo




#50316 Com ports on Plus 2 changed?

Posted by louyo on 06 June 2013 - 01:07 AM in Netduino Plus 2 (and Netduino Plus 1)

Hmm, that is really bizarre. It should just be pulling in one byte for you. If there's a way for us to repro this here (i.e. feed it data via HyperTerminal instead of via a physical device), we'd be happy to try to repro. Chris

10-4, thanks for the offer. I will muddle along as I have time, I have moved back to NP as it works there. I didn't get the storage improvement that I hoped for on NP2 anyway. The speed improvement is nice though. I need to go back in and trim more of the code I don't need. 

Thanks again,

Lou




#50314 Com ports on Plus 2 changed?

Posted by louyo on 06 June 2013 - 12:48 AM in Netduino Plus 2 (and Netduino Plus 1)

Hi Lou, When you get the exception, how many bytes long is _response? What are the values of _responseIndex and expectedResponseLength? Chris

Response index is 4, expectedResponseLength is 1

_response is 21 bytes long 

 

Louyo




#50311 Committing File to SD Card

Posted by louyo on 06 June 2013 - 12:23 AM in Netduino Plus 2 (and Netduino Plus 1)

I try this little program:

 

 byte[] readdata = Encoding.UTF8.GetBytes("this is a test");
            using (var picFile = new FileStream(@"SDtest.txt", FileMode.Create, FileAccess.Write))
            {
                try
                {              
                    picFile.Write(readdata, 0, readdata.Length);                 
                }
            finally
            {
                picFile.Flush();
                picFile.Close();
            }
             
            }
            return;

The file is not on the SD card when I plug it into my host. Workarounds: 

1. Set a breakpoint on the return statement, it is there.

2. run the program in non debug mode and it is there.

3. Add  Debug.Print("Writing complete"); before the return statement and it is there.

 

Workarounds, not fixes. :)




#50309 Com ports on Plus 2 changed?

Posted by louyo on 05 June 2013 - 10:39 PM in Netduino Plus 2 (and Netduino Plus 1)

Hi louyo, What configuration settings are you using for your SerialPort object? The SAM7X did support a few more combinations of data bits and parity. Most Netduino gen1 projects using SerialPort should function the same on Netduino gen2. Chris

Parity:None, 8 bits, one stop bit, various baud rates, both ports (com1 and 2).

It is failing in the ReadResponse function, with an Unsuported length exception. It reads the framelength and then goes through about 2 more readresponse operations and then throws an exception on this line of code:

var bytesRead = _comPort.Read(_response, _responseIndex, expectedResponseLength);

 

Debugging is slow because:

1. I copied the code from AdaFruit (I think) and am figuring it out as I go.

2. Putting debug stuff in there sometimes causes timeouts.

3. I am in the slow group.

 

It seems to me that the error is from calling the _comport.Read routine with different values for the responseIndex and expectedResponseLength, but am still pursuing. 

 

It seems like it is not a configuration problem but I am unsure of anything at the moment. 

I was hoping someone was using this camera on a +2. 

Thanks again,

Lou




#50288 Com ports on Plus 2 changed?

Posted by louyo on 05 June 2013 - 03:04 AM in Netduino Plus 2 (and Netduino Plus 1)

Hi louyo, What configuration settings are you using for your SerialPort object? The SAM7X did support a few more combinations of data bits and parity. Most Netduino gen1 projects using SerialPort should function the same on Netduino gen2. Chris

Thanks, I will have to get back here when I can take a look. Day job is in the way, and the device is not here.

 

Louyo




#50231 Com ports on Plus 2 changed?

Posted by louyo on 03 June 2013 - 11:48 PM in Netduino Plus 2 (and Netduino Plus 1)

I'm curious to know more about the nature of your problem, especially if its a sporadic issue at runtime.

It works fine on an NPlus but failed solid on Plus 2. Will have to debug. It goes through the speed check and then gets an unhandled exception. Will have to find where and catch it. Camera application. 

Thanks for the reply.

Louyo




#50226 Com ports on Plus 2 changed?

Posted by louyo on 03 June 2013 - 08:40 PM in Netduino Plus 2 (and Netduino Plus 1)

Lazy man's question: Did something change with the com ports between Netduino Plus and Netduino Plus 2? I moved a working application from the Plus to the Plus2 and it fails in the com port routine. Tried both 1 and 2. If there is no known problem, I will carry on debugging.

 

Louyo




#32584 Deploy failed

Posted by louyo on 24 July 2012 - 12:19 AM in Netduino Plus 2 (and Netduino Plus 1)

That's odd. It's very difficult to really brick a netduino, believe me, I tried!
You could always reflash it's firmware. Instructions are on the wiki :)

Thanks, I did that as well..

Lou



#32559 Deploy failed

Posted by louyo on 23 July 2012 - 06:39 PM in Netduino Plus 2 (and Netduino Plus 1)

That's why it's not working;

From http://www.netduino....plus/specs.htm:

Your code is 102,5kB big.
If you have included -all- code from the netduino helpers, I'd suggest just include the .cs files you'll need.


They normally are very relyable. I suggest to erase code memory completely for now, with this tool: "C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.2\Tools\MFDeploy.exe"

10-4 thanks, dumb me, I should have seen that.
I had erased it all but it still won't run even the simplest program. I have a new one arriving tomorrow. In the meantime, the day job is calling. :)
Thanks again.

Lou



#32481 Deploy failed

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

I get this from rebuild: ---------------------------------------------------------- ------ Rebuild All started: Project: netduino.helpers, Configuration: Debug Any CPU ------ E:\netduino\netduinohelpers_249dd927c92e\Hardware\AdaFruitILI932x.cs(77,28): warning CS0108: 'netduino.helpers.Hardware.AdaFruitILI932x.Orientation' hides inherited member 'netduino.helpers.Hardware.LCD.Orientation'. Use the new keyword if hiding was intended. E:\netduino\netduinohelpers_249dd927c92e\Hardware\LCD.cs(21,21): (Related location) Compile complete -- 0 errors, 1 warnings E:\netduino\netduinohelpers_249dd927c92e\Hardware\AdaFruitST7735.cs(522,13,522,39): warning MMP0000: opcode 'conv.ovf.i' -- overflow will not throw exception E:\netduino\netduinohelpers_249dd927c92e\Helpers\VirtualMemory.cs(14,13,14,59): warning MMP0000: opcode 'conv.ovf.i' -- overflow will not throw exception E:\netduino\netduinohelpers_249dd927c92e\Hardware\AdaFruitST7735.cs(522,13,522,39): warning MMP0000: opcode 'conv.ovf.i' -- overflow will not throw exception E:\netduino\netduinohelpers_249dd927c92e\Helpers\VirtualMemory.cs(14,13,14,59): warning MMP0000: opcode 'conv.ovf.i' -- overflow will not throw exception netduino.helpers -> E:\netduino\netduinohelpers_249dd927c92e\bin\Debug\netduino.helpers.dll ------ Rebuild All started: Project: AdaFruitVC0706Test, Configuration: Debug Any CPU ------ AdaFruitVC0706Test -> E:\netduino\netduinohelpers_249dd927c92e\Samples\AdaFruitVC0706Test\AdaFruitVC0706Test\bin\Debug\AdaFruitVC0706Test.exe ========== Rebuild All: 2 succeeded, 0 failed, 0 skipped ========== ----------------------------------------------------------------------------------------------------- When I do debug, I get the dialog "There were deployment errors, continue?" The deployment output is: ------------------------------------------------------------------------------------ Incrementally deploying assemblies to device Deploying assemblies for a total size of 104964 bytes Assemblies not successfully deployed to device. Deployment to the device was not successful. -------------------------------------------------------------------------------------- Build output is still: ------------------------------------------------ ------ Skipped Deploy: Project: netduino.helpers, Configuration: Debug Any CPU ------ Project not selected to build for this solution configuration ------ Deploy started: Project: AdaFruitVC0706Test, Configuration: Debug Any CPU ------ ------ Deploy started: Project: AdaFruitVC0706Test, Configuration: Debug Any CPU ------ An error has occurred. Please check your hardware========== Deploy: 0 succeeded, 1 failed, 1 skipped ========== -------------------------------------------------------------------------------- Since I have not used these netduino.helpers before, I am wondering if it is something I am botching up? Lou EDIT: Never mind for now, I can no longer run the simple LED blinking test. It thinks it ran but it doesn't. I am thinking that it is a hardware issue. Are these N+'s usually reliable? This has done nothing but run some simple LED and ethernet test programs.



#32479 Deploy failed

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

Trying to test a camera with the AdaFruit VC0706 test sample. I can run a small program that tests the SD card and some simple stuff, although sometimes I have to hit the reset button on the N+.
When I run that sample program, I get:
-----------------------------------------------------------------------------------------
------ Build started: Project: AdaFruitVC0706Test, Configuration: Debug Any CPU ------
AdaFruitVC0706Test -> E:\netduino\netduinohelpers_249dd927c92e\Samples\AdaFruitVC0706Test\AdaFruitVC0706Test\bin\Debug\AdaFruitVC0706Test.exe
------ Skipped Deploy: Project: netduino.helpers, Configuration: Debug Any CPU ------
Project not selected to build for this solution configuration
------ Deploy started: Project: AdaFruitVC0706Test, Configuration: Debug Any CPU ------
An error has occurred. Please check your hardware========== Build: 1 succeeded, 0 failed, 1 up-to-date, 0 skipped ==========
========== Deploy: 0 succeeded, 1 failed, 1 skipped ==========
---------------------------------------------------------------------------------------------------

Does this point to hardware problem or short circuit between the headphones?

Lou



#31739 No debug

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

Hi Lou,

To confirm: you can debug alright--but only if you press the reset button on your Netduino after the program is deployed?

True (it doesn't seem to me that it did this when it was new?)

so it may make the most sense to just press the reset button for now...and then update to the new drivers once they're posted.

10-4, at least that is within my technical abilities.. :)

Thank You
Lou



#31729 No debug

Posted by louyo on 08 July 2012 - 05:31 PM in Netduino Plus 2 (and Netduino Plus 1)

Results of reloading firmware, anyone seen this?
-----------------------------------------------------------------
Chk signature
Signature PASS
Chk signature
Signature PASS
No debugger!
Create TS.
Loading start at 14d324, end 162e8c
Attaching file.
Assembly: mscorlib (4.1.2821.0) (3880 RAM - 33236 ROM - 19134 METADATA)
Attaching file.
Assembly: Microsoft.SPOT.Native (4.1.2821.0) (1144 RAM - 6516 ROM - 4479 METADATA)
Attaching file.
Assembly: Microsoft.SPOT.Hardware (4.1.2821.0) (1752 RAM - 11440 ROM - 7371 METADATA)
Attaching file.
Assembly: Microsoft.SPOT.Net (4.1.2821.0) (704 RAM - 5060 ROM - 2452 METADATA)
Attaching file.
Assembly: System (4.1.2821.0) (872 RAM - 5992 ROM - 3206 METADATA)
Attaching file.
Assembly: Microsoft.SPOT.IO (4.1.2821.0) (740 RAM - 4620 ROM - 2522 METADATA)
Attaching file.
Assembly: System.IO (4.1.2821.0) (1548 RAM - 13292 ROM - 5862 METADATA)
Attaching file.
Assembly: Microsoft.SPOT.Hardware.SerialPort (4.1.2821.0) (512 RAM - 3488 ROM - 1543 METADATA
Attaching file.
Assembly: SecretLabs.NETMF.Hardware (4.1.0.0) (256 RAM - 1108 ROM - 491 METADATA)
Attaching file.
Assembly: SecretLabs.NETMF.Diagnostics (4.1.0.0) (180 RAM - 440 ROM - 166 METADATA)
Loading Deployment Assemblies.
Resolving.
Total: (10500 RAM - 88932 ROM - 49070 METADATA)
Total: (10500 RAM - 88932 ROM - 49070 METADATA)

Ready.
Cannot find any entrypoint!
Done.
Waiting for debug commands...
--------------------------------------------------------------------------------------------

(waits forever)

When I ran the reload a second time, with the Netduino reset, I got:
Chk signature
Signature PASS
Chk signature
Signature PASS
-------------------------------------------

Running a program without debugging: runs OK from a reset state. If it is not reset first, Output says Device not found or cannot be opened, etc. Hit the reset button and it starts the program.

Now, if I select debug, after the deploy the status line says
"The debugging target is not in an initialized state; rebooting....
The output window says: "Rebooting... Done." (but, apparently, it didn't)
If I hit the reset button on the Netuino, it reboots and then debugging continues OK.
So, I think reloading the firmware helped but didn't fix. It seems like it can't be rebooted via software command?

I have tried running from both 32 and 64 bit versions of Win7 (both real and virtual machines) with same results.
The little blinky program that I downloaded just does:

public static void Main()
        {
            OutputPort led = new OutputPort(Pins.ONBOARD_LED, false);
            while (true)
            {
                led.Write(true);
                Thread.Sleep(250);
                led.Write(false);
                Thread.Sleep(250);
            }
        }

Any help gratefully appreciated.

Lou



#31720 No debug

Posted by louyo on 08 July 2012 - 03:27 AM in Netduino Plus 2 (and Netduino Plus 1)

It is the simple little blinky program in the downloads section here. Turns the LED off and on 250 milliseconds at a time. I am not trying to reload firmware, having a problem finding a system to load the SAM-BA drivers, they install but say device can't start. Suspect I need to find a 32 bit XP machine to use. Thanks for reply. Lou Edit: oops, I AM trying to reload firmware now.



#31710 No debug

Posted by louyo on 07 July 2012 - 06:45 PM in Netduino Plus 2 (and Netduino Plus 1)

I am newbie. Firmware is 4.1.0.6, SDK is 4.1 I can load and run the blinky program if I select run without debugging. If I select F5 (debug), I get 2 lines saying "Deploy started: Project Blinky, Configuration: Debug Any CPU" After some time, I get "rebooting.... Done" in the output window but the program does not run properly. If I set a breakpoint in the Main loop, and then hover over that BP, it says "The breakpoint will not currently be hit. The specified module has not been loaded. If I run without debugging, the program will load and run but any rebuild requires the reset button to be pressed before it will load and run again. I am sure that this worked OK at one time but it has been several weeks since I used it. Thanks for any help and apologies if I missed this in a search. Lou




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.