arduino internet shield + PN532

i use arduino uno with ethernet shield like this

and i use PN532 SPI mode for read some p2p ndef message

when i use it one by one. it doesn’t have a problem

but when i use ethernet and PN532 together. PN532 can’t read ndef message

i don’t know why

this my code

what should i do

#include "SPI.h"
#include "PN532_SPI.h"
#include "snep.h"
#include "NdefMessage.h"
#include "Wire.h"

PN532_SPI pn532spi(SPI, 10);
SNEP nfc(pn532spi);
uint8_t ndefBuf[128];

void setup() {
    Serial.begin(9600);

    Serial.println("NFC Peer to Peer Example - Receive Message");
}

void loop() {
    Serial.println("Waiting for message from a peer");
    int msgSize = nfc.read(ndefBuf, sizeof(ndefBuf));
    if (msgSize > 0) {
        NdefMessage msg  = NdefMessage(ndefBuf, msgSize);
        //msg.print();
            
        NdefRecord record = msg.getRecord(0);

        int payloadLength = record.getPayloadLength();
        byte payload[payloadLength];
        record.getPayload(payload);        
        
        int startChar = 0;        
        if (record.getTnf() == TNF_WELL_KNOWN && record.getType() == "T") { // text message
          // skip the language code
          startChar = payload[0] + 1;
        } else if (record.getTnf() == TNF_WELL_KNOWN && record.getType() == "U") { // URI
          startChar = 1;
        }
                         
        String payloadAsString = "";
        for (int c = startChar; c < payloadLength; c++) {
          payloadAsString += (char)payload[c];
        }

        Serial.print(payloadAsString);
        
        Serial.println("\nSuccess");
    } else {
        Serial.println("Failed");
    }
    delay(3000);
}

Does the Ethernet shield us pin 10 for it's SS signal AND the PN532 seems to be also using the same pin for SS.

Riva: Does the Ethernet shield us pin 10 for it's SS signal AND the PN532 seems to be also using the same pin for SS.

omg!

thank you

i change

PN532_SPI pn532spi(SPI, 10);

to

PN532_SPI pn532spi(SPI, 9);

it's work!