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.
Photo

Adafruit NFC shield


  • Please log in to reply
95 replies to this topic

#61 gomore11

gomore11

    Advanced Member

  • Members
  • PipPipPip
  • 87 posts

Posted 06 May 2013 - 10:52 AM

Hi again.

 

I tried the code of 2Element in a Netduino 2 with the 4.2.2. firmware, but it gives me that the Netduino could not write to the PN532.........Ill try to get the logic analyzers results and post them.



#62 gomore11

gomore11

    Advanced Member

  • Members
  • PipPipPip
  • 87 posts

Posted 06 May 2013 - 01:49 PM

This is what I have with the logic analyzer:

 

Attached Files



#63 2Elemental

2Elemental

    Member

  • Members
  • PipPip
  • 29 posts

Posted 06 May 2013 - 05:57 PM

Attached is my output with the logic analyzer, I included the settings. 500Khz is enough for I2C, and you should trigger on a Falling Edge (the signal goes low) on the SDA channel. Simply upload the code to the netduino, hit the start button in Scanastudio and keep pressing the onboard button on the netduino to make it restart, after which Scanastudio will sample...

 

The only thing different between your setup and mine is that you use a netduino 2 and I use a netduino plus. MarkNic also can't use my code and he runs a netduino plus 2. I strongly believe this might be an I2C issue with netduino 2 and netduino plus 2. I can guarantee that it works perfectly with a netduino plus....

Attached Files



#64 2Elemental

2Elemental

    Member

  • Members
  • PipPip
  • 29 posts

Posted 06 May 2013 - 07:57 PM

I have completed the read of Mifare Classic RFID tags. The attached code reads all the Mifare Classic cards, tags, stickers and keyfobs that I have. Mifare Ultralight tags aren't supported by the code yet, as I don't have one to test with. 

 

For the people that follow this thread and have a Netduino (Plus) 2, I sincerely hope that one of the Staff members looks into this, as the PN532 is a too fun board to not be able to play around with...

 

 

Attached Files



#65 gomore11

gomore11

    Advanced Member

  • Members
  • PipPipPip
  • 87 posts

Posted 07 May 2013 - 07:02 AM

Hi 2Elemental.

 

You are Wright!!! I try your code on a Netduino(1) and it Works!!!!! It has to be a Netduino 2 and Netduino plus 2 I2C issue. Maybe Chris Walker or any other menber could give some clue about witch could be the problem........



#66 2Elemental

2Elemental

    Member

  • Members
  • PipPip
  • 29 posts

Posted 07 May 2013 - 10:11 AM

Hi gomore11,

 

Good to hear you got it working :)

 

I already posted a private message to Chris Walker but no response so far...

I think I'll post a message on twitter as well, hoping to get attention to this thread...

 

Regards,

Andy



#67 gomore11

gomore11

    Advanced Member

  • Members
  • PipPipPip
  • 87 posts

Posted 07 May 2013 - 10:32 AM

Hi again.

 

Anyway, my real target when I started with this shield, was to be able to make a Peer to Peer connection betwen the Netduino+Nfc Shiel and a Windows Phone. As I wasnt abble to comuncate the Netduino with the PN532, I worked with Arduino and a Windows Phone.

 

In this moment, I have code written to try a comunication between them but the Windows Phone doesnt recognize the Arduino(now would be posible to do it with Netduino)+NFC shield device. In the other hand, the device does recognize the phone........

 

I think that the problem is that the initial connection link with a Windows Phone has to be done meeting the NFC Frums LLCP protocol, but Im not sure........I think that the Device recognize event in Windows pone is not launched until other device meets with the protocol......Ive been asking in MSDN frums but nobody answers this issue, and I cant confirm it. Do you know something about it by chance????



#68 2Elemental

2Elemental

    Member

  • Members
  • PipPip
  • 29 posts

Posted 07 May 2013 - 11:14 AM

Hm no not really. Are you using Windows Phone 7.x or 8? I only have a 7.8 device to test with...



#69 gomore11

gomore11

    Advanced Member

  • Members
  • PipPipPip
  • 87 posts

Posted 07 May 2013 - 11:19 AM

I have a Windows Phone 8 Device...................Ill try to go on with this step by step, becouse it requires patience...... :wacko:  :D



#70 2Elemental

2Elemental

    Member

  • Members
  • PipPip
  • 29 posts

Posted 07 May 2013 - 01:57 PM

Lol ok, good luck on that one :)



#71 MarkNic

MarkNic

    Member

  • Members
  • PipPip
  • 22 posts

Posted 07 May 2013 - 05:12 PM

gomore11,

 

If I can get the N+2 board and the NFC card working I may be able to help.  I have a WP8 (Nokia) so I also want the recognition and data transfer to work.

 

Mark



#72 tim c

tim c

    Advanced Member

  • Members
  • PipPipPip
  • 31 posts

Posted 07 May 2013 - 08:46 PM

gomore11,

 

If I can get the N+2 board and the NFC card working I may be able to help.  I have a WP8 (Nokia) so I also want the recognition and data transfer to work.

 

Mark

If you are using a N+2 board and a shield designed for a arduino or Netduino don't you have to jumper the I2C pins from the N+2 dedicated pins to the ones used by the shield (analog pins 4-5: I2C SDA, SCL)?



#73 MarkNic

MarkNic

    Member

  • Members
  • PipPip
  • 22 posts

Posted 08 May 2013 - 03:49 AM

If you are using a N+2 board and a shield designed for a arduino or Netduino don't you have to jumper the I2C pins from the N+2 dedicated pins to the ones used by the shield (analog pins 4-5: I2C SDA, SCL)?

 

I may be wrong but I've looked at the NFC board and the dedicated SDA/SCL pins have leads that run to the "MOSI" and "SS" connections which in turn go on to the other side of the board to pins A4 & A5. The jumpering seems to be there already.

 

Mark



#74 2Elemental

2Elemental

    Member

  • Members
  • PipPip
  • 29 posts

Posted 08 May 2013 - 05:33 AM

I decided to buy a Nokia Lumia 620 today, so I can also help with the NFC part and get everything out of the board that's in it :)

I also think that jumpering isn't necessary, but since I don't have the N+2, I can't really confirm...



#75 gomore11

gomore11

    Advanced Member

  • Members
  • PipPipPip
  • 87 posts

Posted 08 May 2013 - 08:28 AM

Ok 2element!!!!

 

So, I see that there is more peopple interested in this 2Element, MarkNic............together I think we will have it working soon :) .I have a Nokia to test also, but I could test it in an HTC X8 also......

 

I added some basic methods for configuring PN532 to make P2P comunications. I couldnt test them yet, this is the first step.........after this comes the battle with the LLCP protocol............Ill keep posting.



#76 gomore11

gomore11

    Advanced Member

  • Members
  • PipPipPip
  • 87 posts

Posted 09 May 2013 - 11:01 AM

Hi 2Elemental.

 

I am cheking my adds to your code an d I have some problems............I only added some methods to PN532.cs and Im testing the ConfigurePeerAsInitiator, and I have wrong answers..........I dont konw witch could be the problem.....maybe a time problem??? I attach the code......

Attached Files

  • Attached File  Pn532.cs   17.97KB   7 downloads


#77 MarkNic

MarkNic

    Member

  • Members
  • PipPip
  • 22 posts

Posted 09 May 2013 - 01:57 PM

Just as an FYI...

 

I sent Chris Walker a direct message a couple days ago around the N+ board working and the N+2 board not working (with the Adafruit NFC board using I2C) but haven't heard anything back.  In fact the UI indicates that he hasn't read it yet.  The message I sent requested that he look more closely at this thread since it looks like we've got some good data for investigating why the N+2 board can't read/write to the NFC board. 

 

Hopefully soon,

 

Mark



#78 2Elemental

2Elemental

    Member

  • Members
  • PipPip
  • 29 posts

Posted 09 May 2013 - 09:25 PM

Hi Mark, I did the same on May 6 and haven't had a response yet either. The message interface shows that he hasn't read mine neither.... Maybe we should try contacting Stefan Thoolen as well, he is a Moderator on this forum and might have a more direct line to the staff members? @gomore11: I probably won't have time to look at this before Saturday, but I definitely will. I'll keep you posted... Regards, Andy

#79 2Elemental

2Elemental

    Member

  • Members
  • PipPip
  • 29 posts

Posted 09 May 2013 - 09:37 PM

Hi gomore11, Just had a quick read through your code and have following remarks/questions: 1) I don't think that a ReadData(100) will ever give you expected results as PacketBuffer is (only) 64 in length 2) After the call to ReadData, when checking the data in _readBuffer, are you taking into account that the first one or two bytes (depending on the reponse type) are acknowledge bytes and that your index (7 or 8) might become 1 or 2 indexes later? On Saturday I plan to hook the board back up to my arduino and use the logic analyzer to track the data that is produced by the standard Adafruit library code so we can match this up against our netduino code... Regards, Andy

#80 gomore11

gomore11

    Advanced Member

  • Members
  • PipPipPip
  • 87 posts

Posted 10 May 2013 - 07:24 AM

Hi Andy!!

 

Dont worry, there is no harry at all, only take a look when you can ^_^ .

 

About the ReadData call, I call it asking for 25 bytes......ReadData(25), that its the number of bytes expected in the response of the PN532 to an InJumpForDEP command, excluding the header and the checsum..........I was thinking that in your code this bytes are excluded to give only data in  _readBuffer. Ill check it........... 

 

PD: As response to InJumpForDEP I have 25 bytes, the first has an 0x00 and the other 24 are 0x80. So I think that I have a response but Im getting it wrong for a reason..............






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

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.