Giter Club home page Giter Club logo

Comments (13)

Tchoum avatar Tchoum commented on August 19, 2024

Hello,

The 162 / 62 is the poll for the cashless device 2.
It seems like the VMC doesn't care about your response, or your response is incorrectly configured.

The VMC acknowledges and polls the next device (62 polls cashless device 2).
The VMC acknowledgment means the response is received and the checksum byte is correct; it doesn't indicate whether the configuration is correct or accepted.

The response should be within 5 ms, but I think it works because you received the config command.
Can you confirm if the reset command works fine?

Maybe the response is incorrect. You configured the country code for the euro. I think the scale factor should be something like 0x01 (for 1 cent €).
The MISC options are set to 9 (1001).
Test with the MISC options set to 0x01 or 0b00000001 and another test with the feature level set to 0x02.

from mdb-arduino-cashless.

DragonHunter274 avatar DragonHunter274 commented on August 19, 2024

I tried with the misc options set to 0x01 and scale factor 0x01, haven't tried feature level 0x02 yet,
This is my reset:
Screenshot from 2024-05-18 17-16-35

I can upload the whole capture but it can only be opened by Digilent Waveforms and it is a pretty big file

from mdb-arduino-cashless.

DragonHunter274 avatar DragonHunter274 commented on August 19, 2024

Here is the whole thing including installers for Waveforms for all major platforms and the code I'm currently running: https://hub.dh274.com/s/ToDrppzJjPWWaXL

from mdb-arduino-cashless.

Tchoum avatar Tchoum commented on August 19, 2024

it appears you aren't reading the checksum byte from the reset. I think you need to read h110 and h010, and only after that, respond with an ACK (h100).
I can't install waveforms for now, but lets try this:

...(Corrected in EDIT)...

EDIT:
ok, I can read your waveforms, i see the same problem with de pool command for "justReset".
in the "void JustReset(void)" function, before the line "MDB_Send(CSH_JUST_RESET);"
add this :
uint16_t readCmd; while (1) if (MDB_DataCount() > 0) break; MDB_Read(&readCmd);

from mdb-arduino-cashless.

Tchoum avatar Tchoum commented on August 19, 2024

With your WaveForms log, I noticed something:
you have an extra delay when responding to command h111, around 19 ms~, while the manual says the maximum response time is 5 ms.
Move, after all the MDB_send command, the Debug.println("reader config") line 780. is consuming time. At 9600 baud, 14*1.145ms = 16ms~.
increase speed of debug.begin if possible.
or disable debug with #define SOFTWARESERIAL_DEBUG_ENABLED 0

from mdb-arduino-cashless.

DragonHunter274 avatar DragonHunter274 commented on August 19, 2024

adding uint16_t readCmd; while (1) if (MDB_DataCount() > 0) break; MDB_Read(&readCmd);doesnt change anything, it still sends just reset at the same time as before

EDIT: Reset() never calls JustReset(), it just ACKs the Reset message
Adding the above line fixes the reset sequence
It still doesn't work though

from mdb-arduino-cashless.

mkrasselt1 avatar mkrasselt1 commented on August 19, 2024

Could you please provide your complete code somehow?

from mdb-arduino-cashless.

DragonHunter274 avatar DragonHunter274 commented on August 19, 2024

I just uploaded the current code to https://hub.dh274.com/s/ToDrppzJjPWWaXL (same link as above)

from mdb-arduino-cashless.

mkrasselt1 avatar mkrasselt1 commented on August 19, 2024

i noticed in the beginning you send feature level 1 - some machines wont support this, you better bump that to feature level two in setup config data (0x11) and it might help to increase Z7 - maximum response time - to maximum or a suitable middle value for now, to make shure its not the source

from mdb-arduino-cashless.

tomeroto avatar tomeroto commented on August 19, 2024

hi friend can you share schematic that you use in this work. Thanks before.

from mdb-arduino-cashless.

DragonHunter274 avatar DragonHunter274 commented on August 19, 2024

Screenshot from 2024-05-23 20-30-57
I just noticed it responds to poll with CSH_ACK but I think it should respond with CSH_JUST_RESET
I don't know where the break before that is coming from either

from mdb-arduino-cashless.

Tchoum avatar Tchoum commented on August 19, 2024

Hi, I see a little conflict in the Reset() function and the JustReset() function in response to a VMC reset command or VMC poll command.

Try this:

  • in JustReset() uncomment line 772 (uint16_t readCmd; while (1) if (MDB_DataCount() > 0) break; MDB_Read(&readCmd);)
  • in Reset() comment/delete line 763 uint16_t readCmd; while (1) if (MDB_DataCount() > 0) break; MDB_Read(&readCmd);.
  • add this line in MDB_ResetHandler(void) befor Reset(); line 538.

try that and update the file log in your nextcloud storage.

and yes, like mkrasselt1say, try featureLevel 2, but i think you schould wirte 0x02.

from mdb-arduino-cashless.

DragonHunter274 avatar DragonHunter274 commented on August 19, 2024

Now it doesn't respond to reset at all

I will upload my code to github I think thats easier
https://github.com/DragonHunter274/mdb-cashless
Feature level is already at 0x02

from mdb-arduino-cashless.

Related Issues (19)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.