Comments (13)
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.
I tried with the misc options set to 0x01 and scale factor 0x01, haven't tried feature level 0x02 yet,
This is my reset:
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.
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.
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.
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.
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.
Could you please provide your complete code somehow?
from mdb-arduino-cashless.
I just uploaded the current code to https://hub.dh274.com/s/ToDrppzJjPWWaXL (same link as above)
from mdb-arduino-cashless.
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.
hi friend can you share schematic that you use in this work. Thanks before.
from mdb-arduino-cashless.
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.
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.
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)
- Use on Arduino Mega HOT 3
- Is it posss
- Is it possible to get schematics ? HOT 1
- Please Help Me HOT 1
- Cannot compile HOT 6
- File Location HOT 12
- Credit show on display HOT 2
- undeclared vars HOT 3
- What version of VMC MDB protocol is implemented in this code HOT 1
- Webserver code HOT 3
- Arduino pin RX TX to MDB HOT 1
- Vmc_commands HOT 3
- Schematic HOT 14
- hello, i have a question HOT 9
- Command disorder HOT 5
- Is this example master or slave implementation of mdb HOT 1
- Wiring Arduino Uno to MDB Connector Molex HOT 3
- How to charge money on card? HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mdb-arduino-cashless.