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

kiwi65's Content

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


By content type

See this member's

Sort by                Order  

#63579 NetMF 4.2 and PKI

Posted by kiwi65 on 19 July 2015 - 09:20 PM in Netduino Mini

Chris/Anyone, does the Mini support PKCS#11?

 

Because we're having no luck creating Sessions, or enumerating Slots. We get 'NotSupported' exceptions.

 

All we really want to do is encrypt (RSA) from a public key that's within a X.509 certificate.




#63578 NetMF 4.2 and PKI

Posted by kiwi65 on 19 July 2015 - 08:07 AM in Netduino Mini

Has anyone had experience/success getting PKI encryption working on a Mini? 

 

It seems like the Mini's version of NetMF has classes like 'System.Security.Cryptography.X509Certificates.X509Certificate2' and 'Microsoft.SPOT.Cryptoki.Session' pretty much stubbed out.

 

Any time these are invoked they generate:

 

An unhandled exception of type 'System.NotSupportedException' occurred in Microsoft.SPOT.Security.PKCS11.dll

 

Any takes? Any example code?

 

Thanks in advance :)




#63165 Trying to communicate with a 24LC256

Posted by kiwi65 on 16 June 2015 - 05:29 AM in Netduino 2 (and Netduino 1)

Hi Chris, Using the standard NetMF code:

    public class Ic24LC256
    {
        private readonly int _clockKhz;
        private readonly int _timeoutMilliseconds;

        /// <summary>
        ///     Contains the IC's address
        /// </summary>
        private readonly ushort _Address;

        /// <summary>
        ///     Reference to the IC on the I2C bus
        /// </summary>
        private I2CDevice _IcDevice;

        /// <summary>
        ///     Defines a 24LC256 EEPROM IC
        /// </summary>
        /// <param name="Address">The IC's address</param>
        public Ic24LC256(byte Address)
        {
            _Address = Address;
            _Init();
        }

        /// <summary>
        ///     Defines a 24LC256 IC
        /// </summary>
        /// <param name="A0">Address pin 0 state (False = Low/Gnd, True = High/Vcc)</param>
        /// <param name="A1">Address pin 1 state (False = Low/Gnd, True = High/Vcc)</param>
        /// <param name="A2">Address pin 2 state (False = Low/Gnd, True = High/Vcc)</param>
        public Ic24LC256(bool A0, bool A1, bool A2, int clockKhz, int timeoutMilliseconds)
        {
            _Address = (byte) (0x50 + (A0 ? 1 : 0) + (A1 ? 2 : 0) + (A2 ? 4 : 0));
            _clockKhz = clockKhz;
            _timeoutMilliseconds = timeoutMilliseconds;
            _Init();
        }

        public int Read(UInt16 Address, byte[] ReadBuffer)
        {
            // Splits the address in two bytes
            byte[] AddressBytes =
            {
                (byte) (Address >> 8), // most significant address byte
                (byte) (Address & 0xff) // least significant address byte
            };

            // Queues the transaction (first write the address, then read the response)
            I2CDevice.I2CTransaction[] ReadTransaction =
            {
                I2CDevice.CreateWriteTransaction(AddressBytes),
                I2CDevice.CreateReadTransaction(ReadBuffer)
            };

            // Executes the transaction
            return (_IcDevice.Execute(ReadTransaction, _timeoutMilliseconds));
        }

        public int Write(UInt16 Address, byte[] WriteBuffer)
        {
            // Splits the address in two bytes
            byte[] AddressBytes =
            {
                (byte) (Address >> 8), // most significant address byte
                (byte) (Address & 0xff) // least significant address byte
            };

            // Queues the transaction (first write the address, then write the data)
            I2CDevice.I2CTransaction[] WriteTransaction =
            {
                I2CDevice.CreateWriteTransaction(AddressBytes),
                I2CDevice.CreateWriteTransaction(WriteBuffer)
            };

            // Executes the transaction
            return (_IcDevice.Execute(WriteTransaction, _timeoutMilliseconds));
        }

        /// <summary>
        ///     Initiates the I2C-bus
        /// </summary>
        private void _Init()
        {
            var IcConfig = new I2CDevice.Configuration(_Address, _clockKhz);
            _IcDevice = new I2CDevice(IcConfig);
        }
    }

I've played with I2C InternalAddress (repeated start bit) support, but to no avail. It was about then I discovered that removing the eeprom from my breadboard made no difference to the program output.... leading me to think I2C just isn't working at all.

 

Appreciate your help .. this problem is driving me nuts. Well... more nuts than my colleagues already take me for :)




#63144 .NET MF 4.3 or > and Visual Studio

Posted by kiwi65 on 14 June 2015 - 07:46 PM in Netduino Mini

Chris, I'm keen to understand the relationship between NetMF version, SDK version and hardware.

 

I see above that we can use the Netduino 4.3.1 SDK with a Mini. I'm wanting to update my Mini project with the most stable versions of NetMF and SDK.. and note there's a newish 4.3.2 SDK. Should I install that? 

 

Have been struggling to get my Mini talking I2C to a common eeprom.. and have pretty much removed software and hardware from the problem domain ... so hoping it's something to do with SDK versions.




#63140 Retain Data While Powered Off

Posted by kiwi65 on 14 June 2015 - 05:54 AM in Netduino Mini

Hi Mark, Thanks for coming back to me. It's been a lonely couple of days! Yes, I have 4k7 pullups, one on each of the SCL and SDA lines. 




#63137 Retain Data While Powered Off

Posted by kiwi65 on 14 June 2015 - 05:22 AM in Netduino Mini

HI Dave,

 

Looks like you've had some success getting your Mini to talk I2C. I'm frustrated at my inability to do likewise, and wonder if I could trouble you for a little help....

 

In a nutshell, I've been trying (unsuccessfully) to get my Mini hooked up to a 24LC256 eeprom. After several days I've concluded that

 

a) My Mini and eeprom hardware setup correctly. I've checked and aligned with 5 or more comments/posts/photos, and confirmed against the datasheet

 

B) My program is correct. The last version I coded by hand turned out to be practically identical to Stefan's, so I binned mine and I'm now using his!

 

c) There is a pesky question floating around in my mind about I2C bugs in the 4.2 firmware. Here's what I'm running:

 

 

.NetMF v4.2.0.0

NetduinoMini, Build Date:        Sep 19 2012 19:40:47
ARM Compiler version 410894
 
TinyCLR (Build 4.2.0.0)
 
Starting...
Created EE.
Started Hardware.
Create TS.
Loading start at 13ed64, end 154648
Assembly: mscorlib (4.2.0.0)
Assembly: Microsoft.SPOT.Native (4.2.0.0)
Assembly: Microsoft.SPOT.Hardware (4.2.0.0)
Assembly: Microsoft.SPOT.Hardware.SerialPort (4.2.0.0)
Assembly: Microsoft.SPOT.IO (4.2.0.0)
Assembly: System.IO (4.2.0.0)
Assembly: Microsoft.SPOT.Hardware.PWM (4.2.0.1)
Assembly: SecretLabs.NETMF.Diagnostics (4.2.0.0)
Assembly: SecretLabs.NETMF.IO (4.2.0.0)
Loading Deployment Assemblies.
Attaching deployed file.Assembly: Microsoft.SPOT.Graphics (4.2.0.0) 
Attaching deployed file.Assembly: Microsoft.SPOT.Net.Security (4.2.0.0)
Attaching deployed file.Assembly: SecretLabs.NETMF.Hardware.NetduinoMini (4.2.0.1)
Attaching deployed file.Assembly: System.Http (4.2.0.0)
Attaching deployed file.Assembly: System (4.2.0.0)
Attaching deployed file.Assembly: System.Net.Security (4.2.0.0)
Attaching deployed file.Assembly: Json.NetMF (1.3.0.0)
Attaching deployed file.Assembly: Roam.Scout (1.0.0.0)
Attaching deployed file.Assembly: Microsoft.SPOT.Net (4.2.0.0)
Attaching deployed file.Assembly: SecretLabs.NETMF.Hardware (4.2.0.0)

 

Dave, is there anything you'd suggest I try to get my I2C eeprom working? I've run out of investigative energy... and Google now turns up pages of purple links... ie I've been to all of those pages already!

 

Thanks in advance.

 

Andrew




#63133 Trying to communicate with a 24LC256

Posted by kiwi65 on 14 June 2015 - 01:10 AM in Netduino 2 (and Netduino 1)

Hi Guys, this is a really really old thread I know.... but after several days struggling to get my 24LC256 eeprom working I'm stuck. 

 

Here's the setup .....

 

Hardware: It's wired with (A0, A1 and A2) to Gnd giving an I2C bus address of 0x50. WP and Vcc are wired to Gnd enabling write operations. SCL and SDA connected to my Mini, and I've used two 4k7 pullups. Both the Mini and the 24LC256 are powered with 5v.

 

Software: Have tried lots of variants on the same theme, but have now implemented/copied Stefan code above with a variation to return the byte count returned by i2c.Execute(..), and to accept CLockRate and bus timeouts as constructor parameters.

        private static void Test24LC256()
        {
            OutputPort sda = new OutputPort(Pins.GPIO_PIN_9, Hardware.Helpers.High);
            Thread.Sleep(200);
            sda.Write(Hardware.Helpers.Low);
            sda.Dispose();

            const byte ff = 0xff;
            const int Address = 0x00;
            const int ClockSpeed = 100;
            const int TimeoutMilliseconds = 500;
            byte[] buffer = new[] {ff,ff,ff,ff,ff,ff,ff,ff,ff,ff};

            Ic24LC256 storage = new Ic24LC256(false, false, false, ClockSpeed, TimeoutMilliseconds);
            Debug.Print("Write> " + storage.Write(Address, (new byte[] {0, 46, 125, 0, 0, 224, 183})));
            Debug.Print("Read> " + storage.Read(Address, buffer));
        }

The output is:

Write> 9

Read> 2

 

and buffer contains a full set of 0xff's

 

The Write count of 9 looked good.. until I tried removing the power from the eeprom... and the code returned the same result..!!

The Read count never looked good. The number returned here is the length of the byte buffer used in CreateWriteTransaction used to set the read address. If I make that buffer [n] long, then the Read count shows [n]. In all cases the read buffer is untouched - it contains the same contents it was initialised with, in the code above 0xff's

 

Suggestions anyone?  Stefan... you wouldn't happen to still have your hardware diagram?

 

Update: Just discovered that I can remove the 24LC256 from my breadboard and the software works identically to when the chip is inserted. Look to me the the Mini isn't talking I2C at all. Very odd.




#63132 VB Libraries - 24LCXX, MCP230XX, MicroLiquidCrystal, MFToolkit XBee

Posted by kiwi65 on 13 June 2015 - 11:56 PM in Visual Basic Support

Hi GDSever, I've been looking for a C# library to drive my 24LC256. Can't find one. Did you port from C#?




#62161 Netduino Mini not playing nicely with SAM-BA 2.15

Posted by kiwi65 on 17 April 2015 - 04:40 AM in Netduino Mini

Ok, some progress but still nowhere near having the Mini successfully flashed to 4.2.0.1

 

I've learned that using SAM-BA to load the 4.2.0.1 (RS232) TinyBootloaderDecompressor.bin leaves the Mini unresponsive to MFDeploy (I'me using 4.2 now... to cut down the number of diagnostic permutations)

 

So I SAM-BA'ed the 4.2.0.1 TTL version, wired up my USB->Serial(TTL) cable and fired up MFDeploy, pinged and HOLY COW I got a response. Once the weeping for joy subsided I pinged again and, alas, that sinking feeling returned. Back to the drawing board. 

 

Can anyone make sense of the MFDeploy log below?

 

Test 1; Immediate ping

Setup: USB->TTL Pins TX 11,RX 12, and GND to 23, +5v to 21

Method: Plug in USB-TTL (powers up Mini), Switch on Timestamping, Select COM4, hit ping immediately and then keep hitting ping

[12:31:06 p.m. 17/04/2015] Pinging... Error: No response from device

[12:31:11 p.m. 17/04/2015] Pinging... Error: No response from device

[12:31:15 p.m. 17/04/2015] Pinging... Error: No response from device

[12:31:18 p.m. 17/04/2015] Pinging... TinyBooter

[12:31:20 p.m. 17/04/2015] Bootloader build info: Netduino Mini (v4.2.0.1) by Secret Labs LLC

[12:31:23 p.m. 17/04/2015] Pinging... Error: No response from device

[12:31:26 p.m. 17/04/2015] Pinging... Error: No response from device

[12:31:29 p.m. 17/04/2015] Pinging... Error: No response from device

[12:31:31 p.m. 17/04/2015] Pinging... Error: No response from device

[12:31:36 p.m. 17/04/2015] Pinging... Error: No response from device

[12:31:39 p.m. 17/04/2015] Pinging... Error: No response from device

[12:31:42 p.m. 17/04/2015] Pinging... Error: No response from device

 

 

I consistently get this response sequence. Delaying the first ping until 10 seconds after power up results in never getting a TinyBooter message, ie 100% 'Error: No response from device'.

 

Attempting to deploy the ER_FLASH file (immediately after the successful TinyBooter log entry show up) returns 'Error: No response from device' in 100% of cases. 

 

Can anyone (Chris....?!?) shed some light on this? Or alternatively  just sell me a bunch of already-upgraded Netduino Mini's :)




#62159 Current flash instructions

Posted by kiwi65 on 17 April 2015 - 04:14 AM in Netduino Mini

Hey Eric, Here's the stuff I purchased... once I gave up on the USB->FTDI (RS232 Level) breakout that I'd purchased

 

1. USB -> RS232 DB9 cable

2. Female DB9 PCB connector

3. Breakout board




#62126 Netduino Mini Firmware v4.2.0 (Update 1)

Posted by kiwi65 on 16 April 2015 - 02:51 AM in Netduino Mini

 

 

I'm trying to upgrade to 4.20.  I've managed to upgrade the TinyBooterDemopressor using SAM-BA but that's as far as I can get.  I can't use MFDeploy (4.3.1.0) to ping or deploy the new RS232 Firmware

 

beerygaz, I'm struggling with the same problem... new TinyBootCompressor.bin installed ok (I tried 4.2.0.0 and 4.2.0.1). Then, despite all the obvious success other have from there.... my Win8.1 MFDeploy can't see the Mini, and I tried MFDeploy.exe from 4.2, 4.3.1 and also the special version Chris linked to. Frustrating.

 

Did you manage to get your Mini running 4.2? 




#62117 Current flash instructions

Posted by kiwi65 on 15 April 2015 - 04:41 AM in Netduino Mini

eschneider,

I'm on the same mission.... taking my out-of-the-box Mini and getting it updated to 4.2. This upgrade definitely requires a new bootloader (instructions here), and then flashing 4.2 (instructions here). I'm also having problems as outlined here, where I've linked to some of the important files. I wish there was one place to find these. Like you said, important bit of the puzzle are scattered.

 

I've learned a few things that may be of help.

1. Updating the bootloader definitely required RS232. TTL won't work.

2. My USB->TFDI (RS232) breakout didn't work. When I used a USB->Serial (DB9) cable+breakout I was able to sucessfully (or so it would seem) load the new bootloader using SAM-BA 2.15

3. Make sure you power the Mini down, and then back when the wiki articles say it's required.

4. Late nights and lots of coffee have helped so far.

 

Good luck. I'm still stuck getting MFDeploy to 'see' the newly flashed Mini. Would be interested to hear if you get past that step - it's towards the end of the wiki article on updating the Mini's bootloader.




#62099 Netduino Mini not playing nicely with SAM-BA 2.15

Posted by kiwi65 on 14 April 2015 - 12:40 AM in Netduino Mini

Yes, I prefer TTL and configured the Mini this way when I first opened the box and powered up. To get 4.2 flashed I needed RS232, so I purchased a USB->DB9 cable+adapter+breakout and have successfully used this to get the TinyBootloaderDecompressor.bin file loaded.

 

Question on that.... I used the TinyBootloaderDecompressor.bin file from Chris's post/attachment here. Is that the same one you used?

 

I have been using version 4.3.1 of the deployment tool. You were right to ask if I was using the correct version.... so I went looking for MFDeploy 4.2.x. I no longer had NetMF 4.2 loaded, so re-installed that (and re-installed VS2010 first because it was asked for!) and use MFDeploy 4.2.0.0 for the steps in the wiki. I selected COM7 (the one used for SAM-BA). Result is below.

 

 
Connecting to COM7...Connected
Pinging... NoConnection

 

Edit: I also tried disconnecting my RS232, and used my USB->TTL adapter (on pins 11 and 12). I ran both versions of MSDeploy and had the same ping response as above (on COM4).

 

I'm really burning on this. Lots of careful diagnostic steps trying to work out what's wrong ... and I'm still stuck. Starting to think that I really am an idiot (ie my 'friends' have been right all along...)

 

Thanks in advance for your help!




#62091 Netduino Mini not playing nicely with SAM-BA 2.15

Posted by kiwi65 on 13 April 2015 - 01:14 AM in Netduino Mini

Ok, some progress. The cable+db9+breakout seems has worked. I've carefully, and successfully followed  the TinyBootloaderDecompressor installation steps, right down to:

 

 

 

"After that we can close the SAM-BA tool and test if it's actually done."

 

So I close SAM-BA, disconnect the USB->DB9 cable from my laptop, power down the Mini, wait 5 seconds, power up the Mini, re-connect the USB cable->DB9 cable and run MSDeploy (4.3.1.0). I then select Device to 'USB' and expect "Netduino_Netduino" to be found and displayed as per the Wiki steps... but the Device name field remains empty, and Ping returns nothing. 

 

I've tried variations on this, not power cycling the Mini, changing the order of the power/connect steps etc... but have concluded that either the TineBootloaderDecompressor installation failed, or I installed the wrong TinyBootloaderDecompressor.bin file (I used this one: attachment)

 

Appreciate any further help.




#62090 Netduino Mini not playing nicely with SAM-BA 2.15

Posted by kiwi65 on 12 April 2015 - 10:35 PM in Netduino Mini

Dr Who, thanks for your suggestions. And good to know someone else has had (and solved!) the same problem.

 

I did spend some time finding a USB serial that claimed to be RS232 rather than TTL. If I wasn't an amateur I'd get a scope [which I don't have] and test it [which I don't know how to do]  :D

 

I've just received a new Sparkfun cable (https://nicegear.co....s232-converter/) and a DB9 connector + breakout board. Will build those up today and give it another go.




#62068 Netduino Mini not playing nicely with SAM-BA 2.15

Posted by kiwi65 on 09 April 2015 - 07:54 AM in Netduino Mini

I’ve run into a wall attempting to upgrade my Netduino Mini from NetMF 4.1 to 4.2.

 

I've learned that the bootloader will need to be updated before upgrading from NetMF 4.1. I learned I’ll need to use SAM-BA to install the bootloader, and I can only flash the Mini over its RS232 serial interface (not its TTL interface)

 

The theory’s great, but things seem to come unstuck for me when I try to use SAM-BA.

 

I followed these setup steps:

  1. Completely reset the Mini with 5v to the tiny reset pad for ~1 second. 
     
  2. My laptop does not have native serial RS232 so I’ve set up for the bootloader flash with a USB->RS232 FTDI breakout board. Board RX connected to Mini TX. Board TX connected to Mini RX. Board Gnd connected to Mini Gnd. My setup looks pin perfect to Frode’s.
     
  3. Powered up the Mini with 9v to pin24 and Gnd to pin23. The obligatory breadboard LED glows to confirm that I had indeed provided power to the device
     
  4. Checked all the COM settings were good, 115200 8 N 1
     
  5. Run SAM-BA 2.15, selected the FTDI-presented COM port (the only COM port listed), selected AT91SAM7X512-EK, and hit Connect

There’s a flurry of TX/RX traffic on the FTDI LEDs and then SAM-BA returns a dialog titled “Invalid Chip ID”. I get the same dialog when any AT91 device is selected in step 5.

 

Thinking that my Mini could be dead, I lifted it from the ZIF socket and tried again – checking the RX/TX LEDs. This time there was no RX traffic, which I’ve interpreted as meaning the Mini is alive and can respond to SAM-BA when I click the Connect button.

 

I’ve googled until Chrome shows every  relevant link in purple (been there, read that!).. so now I’m kinda stuck.

 

I’d be stoked to hear anyone’s wisdom on this topic. Thanks in advance!




#62066 Netduino Mini 2 being designed?

Posted by kiwi65 on 09 April 2015 - 05:27 AM in Netduino Mini

 

 

... we do have something cooking in the lab

 

SecretLabs indeed. Looking forward to news when news is newsworthy  :rolleyes: 

O/T, I've been lurking here for a while and I'm amazed at how enthusiastically you support this community. Thanks Chris - it's appreciated 




#62064 Netduino Mini 2 being designed?

Posted by kiwi65 on 09 April 2015 - 02:52 AM in Netduino Mini

We've developed NetMF application using the Netduino Plus 2 board, but want to deploy production kit using the Mini - better form factor, lower power consumption etc. 

 

I'd give my back teeth for a Netduino Mini 2. Any news? A bit more storage would be useful, and micro-USB essential. 




#61926 Flashing 4.2 failed

Posted by kiwi65 on 22 March 2015 - 03:36 AM in Netduino Mini

Very helpful. Thank you Chris.




#60784 Need for a good GSM/SMS/GPRS Library

Posted by kiwi65 on 23 November 2014 - 07:38 PM in General Discussion

dave, this is a really really helpful post. Thank you




#60586 MFUpdate supported on 4.3?

Posted by kiwi65 on 31 October 2014 - 01:38 AM in Beta Firmware and Drivers

Are the MFUpdate and Microsoft.SPOT.Update assemblies supported ?

As soon as I add a reference to them, my N+2 hangs badly when VS loads the assemblies. I have to resort to the DFU utilities from ST to erase everything and reburn the 4.3 firmware... (erasing from MFDeploy does not work, as it becomes impossible to connect to the N+2).

 

I have exactly  the same issue. Pretty keen to solve it as I'm really not keen to build a bespoke remote deployment solution from scratch - either at the firmware level, or in an application assembly. The MFUpdate work by Mark Munte & Oberon looks tantalizingly good ... but - as you say - the N+2 hangs. 

 

Anyone else figured out a way forward ... one that doesn't involve re-writing bootloaders etc?




#60514 Bizarre 'error' when loading assemblies from SD

Posted by kiwi65 on 23 October 2014 - 04:04 AM in Netduino Plus 2 (and Netduino Plus 1)

I'm getting this too. The 'Hello World' assembly loaded from my SD is tiny (<1k) with no static's. Tried Release vs Debug builds, but the error persists. Anyone cracked this?




#60063 Netduino 2 and Dfrobot GSM/GPS Shield

Posted by kiwi65 on 11 September 2014 - 02:59 AM in Netduino 2 (and Netduino 1)

Greetings! This is my first post here, and as a Netduino newbie I'm looking forward to learning and sharing.

I'm working on a Netduino project which includes a Dfrobot GSM/GPS shield. I've completed the obligatory 'blinky' application and can edit and deploy code successfully from Visual Studio across the USB cable to my Netduino 2.

 

I've now added the the GSM/GPS shield, and have hit a wall. Specifically, I'd like to use a Windows 8 terminal program to send AT commands to the GSM/GPS shield via the Netduino 2, but there are no COM ports (physical or virtual) showing in Windows Device Manager, so none of the terminal programs work.

 

Can the PC->Netduino USB connection be used for serial comms to the shield, or do I need a FTDI Serial 232 USB Cable to wire directly onto the shield? Is there a better way to accomplish this?

 

Of course, in time the Netduino application will be sending the AT commands to the dfrobot shield, but for now I'd like to 'play' a bit using a terminal program

 

Any help/suggestions gratefully received.

 

Netduino2.JPG





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.