Thank you
This is code that i stuck… because byte(port.ReadByte()); is for C# (not in netMF).
(I would like to send whole code but is little bit long ???
private bool get_response(out byte[] MyBuffer, out byte Count)
{
MyBuffer = new byte[24];
int i;
Count = 0;
//Get First 4 byte from the device, this includes command and length information of data.
for (i = 0; i < 4; i++)
{
try
{
MyBuffer[i] = (byte)port.ReadByte();
}
catch (Exception) //catch (Exception ee)
{
return false;
} // //Exception_Text = ee.ToString();
}
if (MyBuffer[2] > 20) //Mybuffer[2] represents length of data+checksum. This can not be greater than 20.
return false;
//Get Remaining data
for (i = 0; i < MyBuffer[2]; i++)
{
try
{
MyBuffer[i + 4] = (byte)port.ReadByte();
}
catch (Exception) //catch (Exception ee)
{
return false;
}
}
Count = MyBuffer[2];
Count += 4;
return true;
}
Hi realiser and all friends,
i have panda ii, fez touch, fez connect shield, rs232 shield and smx1300 mirfare oem module. i am new on mf. i wanted to use rs232 shield because it is easy way (i think). the mifare oem module uses 9-12 volt. this was problem for me, because of that i decided to use rs232 shield… i agree with you that i can connect directly to panda ii (i read some article) but i don’t know how :’(. if you have any suggest i will follow.
i made new rs232 cable. it didn’t work. rs232 sends data (tx led blinked) but mifare didn’t answer (rs232 rx led stay off).
First try doing a loop back on the RS323 shield. Wire Rx to Tx. Write a small program to send and receive data. This will allow you to verify the operation of the shield.
If the loopback does not work, post the small program you used.
If it works, then you have a problem with the cabling or your program.
Hi Mike,
Thank you for your help. i found the problem; is cable. i did loop back and i got response. so i have to check my cable and pinout of rs232 cable.
i have a question: if i replace only pins tx and rx on rs232 cable, may it work?
or should i search for another solution?
judasis
Ps. both rs232 shield and smx1300 mifare oem module have female connector! can you map the pinout?
Finally i found the problem.
i connected mifare reader to panda ii directly. it didn’t work again. i decided to use 9 volt for panda ii. and it worked!. the problem was voltage between mifare reader and panda ii (mifare uses 5 volt and works COM1). Finally, Fez Panda II is perfect!
this problem is solved…