LanguidSmartass / mdb-arduino-cashless

MDB Cashless Device implementation based on Arduino Uno and GPRS Shield
81 stars 44 forks source link

hello, i have a question #23

Closed marevaloz closed 1 year ago

marevaloz commented 1 year ago

hi, i am very surprised by your work, congratulations... i have a doubt, when you connect the arduino to the vmc using the interface, you connect using the serial port (arduino usb), rx0/tx0, or the debug pins that you define using the softwareserial library? I see that you overwrote the UART port for 9bits but since there is no picture of how you did it, I am not sure where you send the signal to the vmc from. Thanks!

LanguidSmartass commented 1 year ago

Yeah, if you're utilizing an Uno or any other board that has only one hardware uart, there's no other way than to ditch the Serial class completely and use your own initialization. However, if you have a Mega with 3 free hw uarts, you can leave the uart0 for usb debugging purposes

On Sat, Nov 19, 2022, 11:43 marevaloz @.***> wrote:

hi, i am very surprised by your work, congratulations... i have a doubt, when you connect the arduino to the vmc using the interface, you connect using the serial port (arduino usb), rx0/tx0, or the debug pins that you define using the softwareserial library? I see that you overwrote the UART port for 9bits but since there is no picture of how you did it, I am not sure where you send the signal to the vmc from. Thanks!

— Reply to this email directly, view it on GitHub https://github.com/LanguidSmartass/mdb-arduino-cashless/issues/23, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEFVCCTOQUJT3VP66E6BECDWJCALHANCNFSM6AAAAAASFFY5CA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

marevaloz commented 1 year ago

OK thank you! mmmm...my doubt is due to the fact that I saw output messages to softwareserial , "texts" sent to this port and I thought "maybe I should use this port as a debugging monitor and rx0/rx0 to join it to the mdb interface", for example This line

Debug.print(F("Funds: ")); Debug.println(user_funds);

 Debug.println(F("Poll State: Begin Session"));
 CSH_SetUserFunds(user_funds);
 CSH_SetPollState(CSH_BEGIN_SESSION);

then, the library that manages the communication with the vmc (mdb.c) uses the other port (not softwareserial), and, in the debug pins I can debug...or should I comment out the debug lines...because I go through of this port

Thanks for helping me understand your code better!

marevaloz commented 1 year ago

now, remove the call to the serial library as you indicate, but in the case of the library for the mfrc522 reader, it tells me that it cannot send outputs by serial, should they still be commented or do you use a particular library?

I use this, version 1.4.9

https://github.com/miguelbalboa/rfid

and this is the error

C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp: In member function 'void MFRC522::PCD_DumpVersionToSerial()': C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1352:2: error: 'Serial' was not declared in this scope Serial.print(F("Firmware Version: 0x")); ^~ C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1352:2: note: suggested alternative: 'String' Serial.print(F("Firmware Version: 0x")); ^~ String C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1353:18: error: 'HEX' was not declared in this scope Serial.print(v, HEX); ^~~ C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522Extended.cpp: In member function 'MFRC522::StatusCode MFRC522Extended::TCL_Transceive(MFRC522Extended::PcbBlock, MFRC522Extended::PcbBlock)': C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522Extended.cpp:729:3: error: 'Serial' was not declared in this scope Serial.print("CRC is not taken care of by MFRC522: "); ^~ C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp: In member function 'void MFRC522::PICC_DumpToSerial(MFRC522::Uid)': C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1402:4: error: 'Serial' was not declared in this scope Serial.println(F("Dumping memory contents not implemented for that PICC type.")); ^~ C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1402:4: note: suggested alternative: 'String' Serial.println(F("Dumping memory contents not implemented for that PICC type.")); ^~ String C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522Extended.cpp:729:3: note: suggested alternative: 'String' Serial.print("CRC is not taken care of by MFRC522: "); ^~ String C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1411:2: error: 'Serial' was not declared in this scope Serial.println(); ^~ C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522Extended.cpp:730:29: error: 'HEX' was not declared in this scope Serial.println(rxModeReg, HEX); ^~~ C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1411:2: note: suggested alternative: 'String' Serial.println(); ^~ String C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp: In member function 'void MFRC522::PICC_DumpDetailsToSerial(MFRC522::Uid)': C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1421:2: error: 'Serial' was not declared in this scope Serial.print(F("Card UID:")); ^~ C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1421:2: note: suggested alternative: 'String' Serial.print(F("Card UID:")); ^~ String C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1427:33: error: 'HEX' was not declared in this scope Serial.print(uid->uidByte[i], HEX); ^~~ C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522Extended.cpp: In member function 'void MFRC522Extended::PICC_DumpToSerial(MFRC522Extended::TagInfo)': C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522Extended.cpp:1015:4: error: 'Serial' was not declared in this scope Serial.println(F("Dumping memory contents not implemented for that PICC type.")); ^~ C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1435:27: error: 'HEX' was not declared in this scope Serial.println(uid->sak, HEX); ^~~ C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp: In member function 'void MFRC522::PICC_DumpMifareClassicToSerial(MFRC522::Uid, MFRC522::PICC_Type, MFRC522::MIFARE_Key)': C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1474:3: error: 'Serial' was not declared in this scope Serial.println(F("Sector Block 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 AccessBits")); ^~ C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522Extended.cpp:1015:4: note: suggested alternative: 'String' Serial.println(F("Dumping memory contents not implemented for that PICC type.")); ^~ String C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522Extended.cpp:1029:2: error: 'Serial' was not declared in this scope Serial.println(); ^~ C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1474:3: note: suggested alternative: 'String' Serial.println(F("Sector Block 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 AccessBits")); ^~ String C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522Extended.cpp:1029:2: note: suggested alternative: 'String' Serial.println(); ^~ String C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp: In member function 'void MFRC522::PICC_DumpMifareClassicSectorToSerial(MFRC522::Uid, MFRC522::MIFARE_Key, byte)': C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1536:5: error: 'Serial' was not declared in this scope Serial.print(F(" ")); // Pad with spaces ^~ C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522Extended.cpp: In member function 'void MFRC522Extended::PICC_DumpDetailsToSerial(MFRC522Extended::TagInfo)': C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522Extended.cpp:1039:2: error: 'Serial' was not declared in this scope Serial.print(F("Card ATQA:")); ^~ C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522Extended.cpp:1039:2: note: suggested alternative: 'String' Serial.print(F("Card ATQA:")); ^~ String C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1536:5: note: suggested alternative: 'String' Serial.print(F(" ")); // Pad with spaces ^~ String C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1538:5: error: 'Serial' was not declared in this scope Serial.print(F(" ")); // Pad with spaces ^~ C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522Extended.cpp:1042:43: error: 'HEX' was not declared in this scope Serial.print((tag->atqa & 0xFF00u) >> 8, HEX); ^~~ C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522Extended.cpp: In member function 'void MFRC522Extended::PICC_DumpISO14443_4(MFRC522Extended::TagInfo)': C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522Extended.cpp:1079:3: error: 'Serial' was not declared in this scope Serial.print(F("Card ATS:")); ^~ C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1538:5: note: suggested alternative: 'String' Serial.print(F(" ")); // Pad with spaces ^~ String C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1539:4: error: 'Serial' was not declared in this scope Serial.print(sector); ^~ C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1539:4: note: suggested alternative: 'String' Serial.print(sector); ^~ String C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522Extended.cpp:1079:3: note: suggested alternative: 'String' Serial.print(F("Card ATS:")); ^~ String C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1543:4: error: 'Serial' was not declared in this scope Serial.print(F(" ")); ^~ C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522Extended.cpp:1085:40: error: 'HEX' was not declared in this scope Serial.print(tag->ats.data[offset], HEX); ^~~ C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1543:4: note: suggested alternative: 'String' Serial.print(F(" ")); ^~ String C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1547:4: error: 'Serial' was not declared in this scope Serial.print(F(" ")); // Pad with spaces ^~ C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1547:4: note: suggested alternative: 'String' Serial.print(F(" ")); // Pad with spaces ^~ String C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1550:5: error: 'Serial' was not declared in this scope Serial.print(F(" ")); // Pad with spaces ^~ C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1550:5: note: suggested alternative: 'String' Serial.print(F(" ")); // Pad with spaces ^~ String C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1552:5: error: 'Serial' was not declared in this scope Serial.print(F(" ")); // Pad with spaces ^~ C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1552:5: note: suggested alternative: 'String' Serial.print(F(" ")); // Pad with spaces ^~ String C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1554:3: error: 'Serial' was not declared in this scope Serial.print(blockAddr); ^~ C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1554:3: note: suggested alternative: 'String' Serial.print(blockAddr); ^~ String C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1579:32: error: 'HEX' was not declared in this scope Serial.print(buffer[index], HEX); ^~~ C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1613:38: error: 'DEC' was not declared in this scope Serial.print((g[group] >> 2) & 1, DEC); Serial.print(F(" ")); ^~~ C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1624:54: error: 'HEX' was not declared in this scope Serial.print(F(" Value=0x")); Serial.print(value, HEX); ^~~ C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp: In member function 'void MFRC522::PICC_DumpMifareUltralightToSerial()': C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1642:2: error: 'Serial' was not declared in this scope Serial.println(F("Page 0 1 2 3")); ^~ C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1642:2: note: suggested alternative: 'String' Serial.println(F("Page 0 1 2 3")); ^~ String C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1668:29: error: 'HEX' was not declared in this scope Serial.print(buffer[i], HEX); ^~~ C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp: In member function 'bool MFRC522::MIFARE_OpenUidBackdoor(bool)': C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1724:4: error: 'Serial' was not declared in this scope Serial.println(F("Card did not respond to 0x40 after HALT command. Are you sure it is a UID changeable one?")); ^~ C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1724:4: note: suggested alternative: 'String' Serial.println(F("Card did not respond to 0x40 after HALT command. Are you sure it is a UID changeable one?")); ^~ String C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1732:4: error: 'Serial' was not declared in this scope Serial.print(F("Got bad response on backdoor 0x40 command: ")); ^~ C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1732:4: note: suggested alternative: 'String' Serial.print(F("Got bad response on backdoor 0x40 command: ")); ^~ String C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1733:30: error: 'HEX' was not declared in this scope Serial.print(response[0], HEX); ^~~ C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1746:4: error: 'Serial' was not declared in this scope Serial.println(F("Error in communication at command 0x43, after successfully executing 0x40")); ^~ C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1746:4: note: suggested alternative: 'String' Serial.println(F("Error in communication at command 0x43, after successfully executing 0x40")); ^~ String C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1754:4: error: 'Serial' was not declared in this scope Serial.print(F("Got bad response on backdoor 0x43 command: ")); ^~ C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1754:4: note: suggested alternative: 'String' Serial.print(F("Got bad response on backdoor 0x43 command: ")); ^~ String C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1755:30: error: 'HEX' was not declared in this scope Serial.print(response[0], HEX); ^~~ C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp: In member function 'bool MFRC522::MIFARE_SetUid(byte, byte, bool)': C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1780:4: error: 'Serial' was not declared in this scope Serial.println(F("New UID buffer empty, size 0, or size > 15 given")); ^~ C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1780:4: note: suggested alternative: 'String' Serial.println(F("New UID buffer empty, size 0, or size > 15 given")); ^~ String C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1799:5: error: 'Serial' was not declared in this scope Serial.println(F("No card was previously selected, and none are available. Failed to set UID.")); ^~ C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1799:5: note: suggested alternative: 'String' Serial.println(F("No card was previously selected, and none are available. Failed to set UID.")); ^~ String C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1807:6: error: 'Serial' was not declared in this scope Serial.println(F("Failed to authenticate to card for reading, could not set UID: ")); ^~ C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1807:6: note: suggested alternative: 'String' Serial.println(F("Failed to authenticate to card for reading, could not set UID: ")); ^~ String C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1815:5: error: 'Serial' was not declared in this scope Serial.print(F("PCD_Authenticate() failed: ")); ^~ C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1815:5: note: suggested alternative: 'String' Serial.print(F("PCD_Authenticate() failed: ")); ^~ String C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1828:4: error: 'Serial' was not declared in this scope Serial.print(F("MIFARE_Read() failed: ")); ^~ C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1828:4: note: suggested alternative: 'String' Serial.print(F("MIFARE_Read() failed: ")); ^~ String C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1851:4: error: 'Serial' was not declared in this scope Serial.println(F("Activating the UID backdoor failed.")); ^~ C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1851:4: note: suggested alternative: 'String' Serial.println(F("Activating the UID backdoor failed.")); ^~ String C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1860:4: error: 'Serial' was not declared in this scope Serial.print(F("MIFARE_Write() failed: ")); ^~ C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1860:4: note: suggested alternative: 'String' Serial.print(F("MIFARE_Write() failed: ")); ^~ String C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp: In member function 'bool MFRC522::MIFARE_UnbrickUidSector(bool)': C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1886:4: error: 'Serial' was not declared in this scope Serial.print(F("MIFARE_Write() failed: ")); ^~ C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1886:4: note: suggested alternative: 'String' Serial.print(F("MIFARE_Write() failed: ")); ^~ String

exit status 1

Compilation error: exit status 1

LanguidSmartass commented 1 year ago

I don't know much about the intrinsics of stock arduino mfrc library, but maybe it has an option to disable serial output by some macro definition.

If not, you'd probably be better off with a custom mfrc lib that doesn't use Serial, or just go and comment it's usage out in the arduino library itself.

On Sun, Nov 20, 2022, 02:56 marevaloz @.***> wrote:

now, remove the call to the serial library as you indicate, but in the case of the library for the mfrc522 reader, it tells me that it cannot send outputs by serial, should they still be commented or do you use a particular library?

I use this, version 1.4.9

https://github.com/miguelbalboa/rfid

and this is the error

C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp: In member function 'void MFRC522::PCD_DumpVersionToSerial()': C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1352:2: error: 'Serial' was not declared in this scope Serial.print(F("Firmware Version: 0x")); ^~ C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1352:2: note: suggested alternative: 'String' Serial.print(F("Firmware Version: 0x")); ^~ String C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1353:18: error: 'HEX' was not declared in this scope Serial.print(v, HEX); ^~~ C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522Extended.cpp: In member function 'MFRC522::StatusCode MFRC522Extended::TCL_Transceive(MFRC522Extended::PcbBlock, MFRC522Extended::PcbBlock)': C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522Extended.cpp:729:3: error: 'Serial' was not declared in this scope Serial.print("CRC is not taken care of by MFRC522: "); ^~ C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp: In member function 'void MFRC522::PICC_DumpToSerial(MFRC522::Uid)': C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1402:4: error: 'Serial' was not declared in this scope Serial.println(F("Dumping memory contents not implemented for that PICC type.")); ^~ C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1402:4: note: suggested alternative: 'String' Serial.println(F("Dumping memory contents not implemented for that PICC type.")); ^~ String C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522Extended.cpp:729:3: note: suggested alternative: 'String' Serial.print("CRC is not taken care of by MFRC522: "); ^~ String C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1411:2: error: 'Serial' was not declared in this scope Serial.println(); ^~ C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522Extended.cpp:730:29: error: 'HEX' was not declared in this scope Serial.println(rxModeReg, HEX); ^~~ C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1411:2: note: suggested alternative: 'String' Serial.println(); ^~ String C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp: In member function 'void MFRC522::PICC_DumpDetailsToSerial(MFRC522::Uid)': C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1421:2: error: 'Serial' was not declared in this scope Serial.print(F("Card UID:")); ^~ C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1421:2: note: suggested alternative: 'String' Serial.print(F("Card UID:")); ^~ String C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1427:33: error: 'HEX' was not declared in this scope Serial.print(uid->uidByte[i], HEX); ^~~ C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522Extended.cpp: In member function 'void MFRC522Extended::PICC_DumpToSerial(MFRC522Extended::TagInfo)': C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522Extended.cpp:1015:4: error: 'Serial' was not declared in this scope Serial.println(F("Dumping memory contents not implemented for that PICC type.")); ^~ C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1435:27: error: 'HEX' was not declared in this scope Serial.println(uid->sak, HEX); ^~~ C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp: In member function 'void MFRC522::PICC_DumpMifareClassicToSerial(MFRC522::Uid, MFRC522::PICC_Type, MFRC522::MIFARE_Key)': C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1474:3: error: 'Serial' was not declared in this scope Serial.println(F("Sector Block 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 AccessBits")); ^~ C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522Extended.cpp:1015:4: note: suggested alternative: 'String' Serial.println(F("Dumping memory contents not implemented for that PICC type.")); ^~ String C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522Extended.cpp:1029:2: error: 'Serial' was not declared in this scope Serial.println(); ^~ C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1474:3: note: suggested alternative: 'String' Serial.println(F("Sector Block 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 AccessBits")); ^~ String C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522Extended.cpp:1029:2: note: suggested alternative: 'String' Serial.println(); ^~ String C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp: In member function 'void MFRC522::PICC_DumpMifareClassicSectorToSerial(MFRC522::Uid, MFRC522::MIFARE_Key, byte)': C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1536:5: error: 'Serial' was not declared in this scope Serial.print(F(" ")); // Pad with spaces ^~ C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522Extended.cpp: In member function 'void MFRC522Extended::PICC_DumpDetailsToSerial(MFRC522Extended::TagInfo)': C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522Extended.cpp:1039:2: error: 'Serial' was not declared in this scope Serial.print(F("Card ATQA:")); ^~ C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522Extended.cpp:1039:2: note: suggested alternative: 'String' Serial.print(F("Card ATQA:")); ^~ String C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1536:5: note: suggested alternative: 'String' Serial.print(F(" ")); // Pad with spaces ^~ String C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1538:5: error: 'Serial' was not declared in this scope Serial.print(F(" ")); // Pad with spaces ^~ C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522Extended.cpp:1042:43: error: 'HEX' was not declared in this scope Serial.print((tag->atqa & 0xFF00u) >> 8, HEX); ^~~ C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522Extended.cpp: In member function 'void MFRC522Extended::PICC_DumpISO14443_4(MFRC522Extended::TagInfo)': C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522Extended.cpp:1079:3: error: 'Serial' was not declared in this scope Serial.print(F("Card ATS:")); ^~ C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1538:5: note: suggested alternative: 'String' Serial.print(F(" ")); // Pad with spaces ^~ String C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1539:4: error: 'Serial' was not declared in this scope Serial.print(sector); ^~ C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1539:4: note: suggested alternative: 'String' Serial.print(sector); ^~ String C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522Extended.cpp:1079:3: note: suggested alternative: 'String' Serial.print(F("Card ATS:")); ^~ String C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1543:4: error: 'Serial' was not declared in this scope Serial.print(F(" ")); ^~ C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522Extended.cpp:1085:40: error: 'HEX' was not declared in this scope Serial.print(tag->ats.data[offset], HEX); ^~~ C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1543:4: note: suggested alternative: 'String' Serial.print(F(" ")); ^~ String C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1547:4: error: 'Serial' was not declared in this scope Serial.print(F(" ")); // Pad with spaces ^~ C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1547:4: note: suggested alternative: 'String' Serial.print(F(" ")); // Pad with spaces ^~ String C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1550:5: error: 'Serial' was not declared in this scope Serial.print(F(" ")); // Pad with spaces ^~ C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1550:5: note: suggested alternative: 'String' Serial.print(F(" ")); // Pad with spaces ^~ String C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1552:5: error: 'Serial' was not declared in this scope Serial.print(F(" ")); // Pad with spaces ^~ C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1552:5: note: suggested alternative: 'String' Serial.print(F(" ")); // Pad with spaces ^~ String C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1554:3: error: 'Serial' was not declared in this scope Serial.print(blockAddr); ^~ C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1554:3: note: suggested alternative: 'String' Serial.print(blockAddr); ^~ String C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1579:32: error: 'HEX' was not declared in this scope Serial.print(buffer[index], HEX); ^~~ C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1613:38: error: 'DEC' was not declared in this scope Serial.print((g[group] >> 2) & 1, DEC); Serial.print(F(" ")); ^~~ C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1624:54: error: 'HEX' was not declared in this scope Serial.print(F(" Value=0x")); Serial.print(value, HEX); ^~~ C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp: In member function 'void MFRC522::PICC_DumpMifareUltralightToSerial()': C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1642:2: error: 'Serial' was not declared in this scope Serial.println(F("Page 0 1 2 3")); ^~ C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1642:2: note: suggested alternative: 'String' Serial.println(F("Page 0 1 2 3")); ^~ String C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1668:29: error: 'HEX' was not declared in this scope Serial.print(buffer[i], HEX); ^~~ C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp: In member function 'bool MFRC522::MIFARE_OpenUidBackdoor(bool)': C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1724:4: error: 'Serial' was not declared in this scope Serial.println(F("Card did not respond to 0x40 after HALT command. Are you sure it is a UID changeable one?")); ^~ C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1724:4: note: suggested alternative: 'String' Serial.println(F("Card did not respond to 0x40 after HALT command. Are you sure it is a UID changeable one?")); ^~ String C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1732:4: error: 'Serial' was not declared in this scope Serial.print(F("Got bad response on backdoor 0x40 command: ")); ^~ C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1732:4: note: suggested alternative: 'String' Serial.print(F("Got bad response on backdoor 0x40 command: ")); ^~ String C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1733:30: error: 'HEX' was not declared in this scope Serial.print(response[0], HEX); ^~~ C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1746:4: error: 'Serial' was not declared in this scope Serial.println(F("Error in communication at command 0x43, after successfully executing 0x40")); ^~ C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1746:4: note: suggested alternative: 'String' Serial.println(F("Error in communication at command 0x43, after successfully executing 0x40")); ^~ String C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1754:4: error: 'Serial' was not declared in this scope Serial.print(F("Got bad response on backdoor 0x43 command: ")); ^~ C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1754:4: note: suggested alternative: 'String' Serial.print(F("Got bad response on backdoor 0x43 command: ")); ^~ String C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1755:30: error: 'HEX' was not declared in this scope Serial.print(response[0], HEX); ^~~ C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp: In member function 'bool MFRC522::MIFARE_SetUid(byte, byte, bool)': C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1780:4: error: 'Serial' was not declared in this scope Serial.println(F("New UID buffer empty, size 0, or size > 15 given")); ^~ C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1780:4: note: suggested alternative: 'String' Serial.println(F("New UID buffer empty, size 0, or size > 15 given")); ^~ String C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1799:5: error: 'Serial' was not declared in this scope Serial.println(F("No card was previously selected, and none are available. Failed to set UID.")); ^~ C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1799:5: note: suggested alternative: 'String' Serial.println(F("No card was previously selected, and none are available. Failed to set UID.")); ^~ String C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1807:6: error: 'Serial' was not declared in this scope Serial.println(F("Failed to authenticate to card for reading, could not set UID: ")); ^~ C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1807:6: note: suggested alternative: 'String' Serial.println(F("Failed to authenticate to card for reading, could not set UID: ")); ^~ String C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1815:5: error: 'Serial' was not declared in this scope Serial.print(F("PCD_Authenticate() failed: ")); ^~ C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1815:5: note: suggested alternative: 'String' Serial.print(F("PCD_Authenticate() failed: ")); ^~ String C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1828:4: error: 'Serial' was not declared in this scope Serial.print(F("MIFARE_Read() failed: ")); ^~ C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1828:4: note: suggested alternative: 'String' Serial.print(F("MIFARE_Read() failed: ")); ^~ String C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1851:4: error: 'Serial' was not declared in this scope Serial.println(F("Activating the UID backdoor failed.")); ^~ C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1851:4: note: suggested alternative: 'String' Serial.println(F("Activating the UID backdoor failed.")); ^~ String C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1860:4: error: 'Serial' was not declared in this scope Serial.print(F("MIFARE_Write() failed: ")); ^~ C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1860:4: note: suggested alternative: 'String' Serial.print(F("MIFARE_Write() failed: ")); ^~ String C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp: In member function 'bool MFRC522::MIFARE_UnbrickUidSector(bool)': C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1886:4: error: 'Serial' was not declared in this scope Serial.print(F("MIFARE_Write() failed: ")); ^~ C:\Users\user\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp:1886:4: note: suggested alternative: 'String' Serial.print(F("MIFARE_Write() failed: ")); ^~ String

exit status 1

Compilation error: exit status 1

— Reply to this email directly, view it on GitHub https://github.com/LanguidSmartass/mdb-arduino-cashless/issues/23#issuecomment-1320987021, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEFVCCUCSTIOZJFB3ISWKRTWJFLJFANCNFSM6AAAAAASFFY5CA . You are receiving this because you commented.Message ID: @.***>

marevaloz commented 1 year ago

Hello!!!, i have a super question, and maybe the last.., the connection of the cashless device, did you connect it directly to the communication port of the MDB or did you implement some electronic interface between the arduino device, do you have a diagram of how it should be connected correctly? Do you have a draft of how their connection should be? I use a wafer cable (http://www.waferstar.com/en/MDB2PC-PC2MDB.html), which I bought for my tests and it works very well with the biller and coiner, but these devices are connected via mdb cable powered at 24 volts, in the case of the arduino I don't use the power cables but I do use the communication cables, I think I just have to understand how it should be connected so that I can control it through the 10H or 60H port, can you help me with this?

LanguidSmartass commented 1 year ago

Hi.

I've built a simple schematic with two optocouplers (for rx/tx lines), 2 or 3 current limiting resistors and a DC-DC converter module to switch from 24 to 5V. The connection was done as it is described in the standard, I don't remember the page but it's somewhere at the end of the protocol section.

On Tue, Dec 20, 2022, 02:46 marevaloz @.***> wrote:

Hello!!, so long!, check, the connection of the cashless device, did you connect it directly to the communication port of the MDB or did you implement some electronic interface between the arduino device, do you have a diagram of how it should be connected correctly? Do you have a draft of how their connection should be? I use a wafer cable (http://www.waferstar.com/en/MDB2PC-PC2MDB.html), which I bought for my tests and it works very well with the biller and coiner, but these devices are connected via mdb cable powered at 24 volts, in the case of the arduino I don't use the power cables but I do use the communication cables, I think I just have to understand how it should be connected so that I can control it through the 10H or 60H port, can you help me with this?

— Reply to this email directly, view it on GitHub https://github.com/LanguidSmartass/mdb-arduino-cashless/issues/23#issuecomment-1358514307, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEFVCCVBNYRSKMKXETKD7PTWODQV3ANCNFSM6AAAAAASFFY5CA . You are receiving this because you commented.Message ID: @.***>

marevaloz commented 1 year ago

hey so fast! how cool you are! Did you invert the signals with the rx/tx octacouplers? what octacoupler did you use? I am using the 4n35 that can be connected in an inverted or direct way, personally I have used it directly

LanguidSmartass commented 1 year ago

I think I just used the old toshiba pc817 ones in DIP4 package, the whole thing was assembled on a through -hole breadboard.

Don't remember much about inversion though – again, the schematic in the standard will help you more than I right now.

On Tue, Dec 20, 2022, 03:08 marevaloz @.***> wrote:

hey so fast! how cool you are! Did you invert the signals with the rx/tx octacouplers? what octacoupler did you use? I am using the 4n35 that can be connected in an inverted or direct way, personally I have used it directly

— Reply to this email directly, view it on GitHub https://github.com/LanguidSmartass/mdb-arduino-cashless/issues/23#issuecomment-1358540892, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEFVCCRZHSSZUCXXOMZX4W3WODTGFANCNFSM6AAAAAASFFY5CA . You are receiving this because you commented.Message ID: @.***>

amsfec32 commented 1 year ago

Hello marevaloz, i hope you are doing well. You will need to invert the signal wire which is directed towards slave device.