Monday, November 24, 2014

Solution to “Unable to communicate with device USB:Netduino”

I was getting this error when deploying to Netduino Plus 2 from VS2013.


Unable to communicate with device USB:Netduino


It turns out that that particular Netduino had an old firmware version. Use the instructions here to make sure you have the latest firmware installed.

Monday, November 17, 2014

Solution to Windows Explorer hanging when installing the Intel Edison Drivers

This Intel page tells you to download the FTDI drivers and run as Admin.  I appears that you first need to install the “Windows Driver setup 1.0.0” from this page.


1. Install Windows Driver Setup 1.0.0: https://communities.intel.com/docs/DOC-23242 (bottom of page)

2. Install the FTDI drivers: https://communities.intel.com/docs/DOC-23147

Sunday, November 16, 2014

How to get setup with Netduino and Visual Studio 2013

It took me a few mins to get all the right firmware and sdks going for Netduino Plus 2 and Visual Studio 2013. Hope this post saves you some time.


Here’s a good place to get started, but read my notes below first. http://forums.netduino.com/index.php?/topic/10479-netduino-plus-2-firmware-v431/?p=56353


1. You need to create an account and signin to the netduino.com site in order to download the 4.3.1.0 firmware update referenced in the post above.

2. MS has released official support for MF 2013. Install MF from here instead: https://netmf.codeplex.com/releases/view/133285

3. Use this experimental version of the netduino sdk http://www.netduino.com/downloads/forums/netduinosdk_vs2013_experimental.exe


Jon

Friday, November 14, 2014

Solution to “System.Security.SecurityException: The source was not found, but some or all event logs could not be searched. Inaccessible logs: Security.”

I was running the following post-build scripts in VS2013…

$(FrameworkDir)\installutil.exe /u "$(TargetPath)"

$(FrameworkDir)\installutil.exe "$(TargetPath)"


and was getting this error…

“System.Security.SecurityException: The source was not found, but some or all event logs could not be searched.  Inaccessible logs: Security.”


Turns out I just needed to open VS as admin. Easy solution that took too long to figure out. Hope this helps.

Tuesday, November 11, 2014

How to connect a PN532 NFC Shield to a RaspberryPi via libnfc

imageI’m working on an NFC project and to test things out I got a PN532 NFC shield working with a RaspberryPi via libnfc.

Adafruit has a good step-by-step tutorial, but it’s not up-to-date and it’s for the PN532 breakout board not the PN532 shield. They also have this one for Arduino – it’s not RaspberryPi, but still helpful for understanding the concepts.

Here’s how I got it going – hope this saves you some time.

1. Get Occidentalis v0.2

https://learn.adafruit.com/adafruit-raspberry-pi-educational-linux-distro/occidentalis-v0-dot-2

2. Make Occidentalis SD card

https://learn.adafruit.com/adafruit-raspberry-pi-lesson-1-preparing-and-sd-card-for-your-raspberry-pi/making-an-sd-card-using-a-windows-vista-slash-7

3. Run first time config

https://learn.adafruit.com/adafruits-raspberry-pi-lesson-2-first-time-configuration

4. Free UART on the Pi

https://learn.adafruit.com/adafruit-nfc-rfid-on-raspberry-pi/freeing-uart-on-the-pi

5. Get and Build libnfc

https://learn.adafruit.com/adafruit-nfc-rfid-on-raspberry-pi/building-libnfc

6. Prepare the PN532

When I was going through this I was going under the assumption that libnfc only worked in UART mode (because that is what I found on from many sources), but I later found that it does support I2C and SPI. To get PN532 in UART mode you need to solder SEL0 on the board (make sure you are soldering SEL closest to MOSI on the board. In v.1 of PN532 SEL0 and SEL1 labels were reversed.

image

I found that info here: http://www.mobilefish.com/developer/libnfc/libnfc_quickguide_adafruit.html


7. Wire up the PN532 to the breadboard and the RaspberryPi

  • Connect 5v power and GND from RaspberryPi to breadboard
  • Connect 5v power and GND from PN532 to breadboard


The PN532 outputs 5V, but the RaspberryPi TXD and RXD pins are rated for 3.3V so we need to put a 220ohm resistor between them. http://jamesreubenknowles.com/level-shifting-stragety-experments-1741

  • Connect PN532 SCL to RaspberryPi TXD with a 220ohm resistor between them
  • Connect PN532 SDA to RaspberryPi RXD with a 220ohm resistor between them

image

8. Test it out

https://learn.adafruit.com/adafruit-nfc-rfid-on-raspberry-pi/testing-it-out

After running nfc-poll and swiping a card you should see your UID – which means it is working!

image


Let me know if you run into any issues.

Jon