Hi Grumpy_Mike,
I too am stuck around a similar issue though I have been trying to use two different SS pins. It seems that you are a god of SPI so I thought I'd ask for your help.
Basically I have the 522 RFID card and I've set the SS pin to 6. I have the adafruit Wave shield which by default is using SS pin 10. With two separate sketches (the library examples slightly modified) they work fine. But when put together they don't.
I'm trying to make an rfid tag based music player for my 3 year old but failing so far 
I believe I have done the correct thing by by first setting the SS pin 10 to LOW and SS pin 6 to HIGH to play the initial startup chime. This works. The then I reverse this to pin 6 is HIGH and initialise the RFID card and wait for a card to be read. It reads it ok and matches to a particular WAV file. Then SS pin 6 set HIGH again and pin 10 LOW and tried to play but fails at this point with Couldn't open file error.
I appreciate this thread has talked about other methods to separate these cards from running at the same time on SPI, but if possible I want to get this working as intended, as two different SPI devices using 2 different SS pins. Any help would be appreciated.
/*
Combined RFID and WAV player sketch
*/
#include <SdReader.h>
#include "WaveUtil.h"
#include "WaveHC.h"
// Using SPI hardware serial. I need to use 2 different SS channels
// and set one to Low and others to high when using a selected channel.
// I need to use two different SS pins
#include <SPI.h>
#include <MFRC522.h>
#define SS_PIN 10
#define RST_PIN 9
#define SS_PIN_RFID 6
#define RFIDResetPin 9 // same reset pin I think is ok
byte readCard[4];
boolean debug = true;
// define tag id list and tracks to play
#define NUMTAGS 2
byte tagid[2][4] = {{0xE0, 0x45, 0xA1, 0x7C},
{0x2E, 0xDC, 0xE4, 0x5E}
};
// no longer than 8 char file name plus ext
String track[NUMTAGS] = {"TRACK001.wav",
"TRACK002.wav"
};
// audio settings
boolean PlayComplete = true;
long playnext_prevmillis = 0;
long playanother_time = 3000;
// sdcard settings
SdReader card;
FatVolume vol;
FatReader root;
FatReader f;
WaveHC wave;
// Set up mfrc522 object instance
MFRC522 mfrc522(SS_PIN_RFID, RST_PIN);
void setup() {
Serial.begin(9600);
// set output pins for DAC control for Wav player
pinMode(2, OUTPUT);
pinMode(3, OUTPUT);
pinMode(4, OUTPUT);
pinMode(5, OUTPUT);
pinMode(SS_PIN, OUTPUT); //WAV SS pin
pinMode(SS_PIN_RFID, OUTPUT); //new RFID SS pin
// set Wave player SS active
digitalWrite(SS_PIN_RFID, HIGH);
digitalWrite(SS_PIN, LOW);
// pin13 LED
pinMode(13, OUTPUT);
if (!card.init()) {
putstring_nl("Card init. failed!");
sdErrorCheck();
while (1);
}
// enable optimize read
card.partialBlockRead(true);
// fat partition?
uint8_t part;
for (part = 0; part < 5; part++) {
if (vol.init(card, part))
break;
}
if (part == 5) {
putstring_nl("No valid FAT partition!");
sdErrorCheck();
while (1);
}
// show infos
putstring("Using partition ");
Serial.print(part, DEC);
putstring(", type is FAT");
Serial.println(vol.fatType(), DEC);
// Try to open the root directory
if (!root.openRoot(vol)) {
putstring_nl("Can't open root dir!");
while (1);
}
// Whew! We got past the tough parts.
putstring_nl("Files found (* = fragmented):");
// Print out all of the files in all the directories - just for debugging
root.ls(LS_R | LS_FLAG_FRAGMENTED);
SPI.begin(); // Init SPI bus
// play startup chime
delay(500); // avoid loudspeaker click noise
playcomplete("CHIME.WAV");
// set RFID SS active
digitalWrite(SS_PIN_RFID, LOW);
digitalWrite(SS_PIN, HIGH);
mfrc522.PCD_Init(); // Init MFRC522
putstring_nl("> rfid ready");
}
void loop() {
// set RFID SS active ready to read tags
digitalWrite(SS_PIN_RFID, LOW);
digitalWrite(SS_PIN, HIGH);
ReadTAG();
}
// Read tag and output the ID in the serial monitor.
void ReadTAG() {
if (mfrc522.PICC_IsNewCardPresent() && mfrc522.PICC_ReadCardSerial()) {
for (int i = 0; i < 4; i++) {
readCard[i] = mfrc522.uid.uidByte[i];
}
// check tag and play track if tag id found
checkTag(readCard, 4);
// If the TAG was read then the reading stops as it continues many times otherwise.
mfrc522.PICC_HaltA();
}
}
void checkTag(byte tag[], int sizeT) {
if (strlen(tag) == 0) return;
if (debug) {
// print out all elements to check they came through
Serial.print("rfid: ");
for (int d = 0; d < sizeT; d++) {
Serial.print(tag[d], HEX);
}
}
boolean matching = true;
// read each array row and compare tag id byte by byte
for (int a = 0; a < 2; a++) {
matching = true;
// loop through each byte of the RFID until one doesn't match, then jump out and read next record
for (int c = 0; c < sizeT; c++) {
if (tag[c] != tagid[a][c]) {
matching = false;
break;
}
}
// in case of a match play the track
if (matching) {
// set Wave player SS active ready to play
digitalWrite(SS_PIN_RFID, HIGH);
digitalWrite(SS_PIN, LOW);
Serial.print(" now playing: "); Serial.println(track[a]);
delay(500); // avoid loudspeaker click noise
if (PlayComplete) {
digitalWrite(RFIDResetPin, LOW);
// playcomplete(track[a]);
playcomplete("Track001.wav"); //hardcoded track as above errors coverting string to char*
} else {
unsigned long playnext_currentmillis = millis();
// wait with playing another audio track
if (playnext_currentmillis - playnext_prevmillis > playanother_time) {
// playfile(track[a]);
playfile("Track001.wav"); //hardcoded track as above errors coverting string to char*
playnext_prevmillis = playnext_currentmillis;
}
}
break;
}
}
}
void playcomplete(char *name) {
playfile(name);
while (wave.isplaying) {
// playing
}
}
void playfile(char *name) {
if (wave.isplaying) {
wave.stop();
}
if (!f.open(root, name)) {
putstring("Couldn't open file "); Serial.println(name); return;
}
if (!wave.create(f)) {
putstring_nl("Not a valid WAV"); return;
}
wave.play();
}
void sdErrorCheck(void) {
if (!card.errorCode()) return;
putstring("\n\rSD I/O error: ");
Serial.print(card.errorCode(), HEX);
putstring(", ");
Serial.println(card.errorData(), HEX);
while (1);
}