MateDealer | MateDealer , a open source MDB cashless device implementation | Mobile library
kandi X-RAY | MateDealer Summary
kandi X-RAY | MateDealer Summary
MateDealer, a open source MDB cashless device implementation
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of MateDealer
MateDealer Key Features
MateDealer Examples and Code Snippets
Community Discussions
Trending Discussions on MateDealer
QUESTION
I am trying to communicate with a Vending machine using MDB Protocol with the help of Arduino Mega and I am partially successful in doing so.
The circuit that I am using is attached here
While the circuit diagram is shown below
The Arduino Mega is communicating with laptop via Serial 1 and the vending machine communication is done via Serial 2 of Arduino Mega.
USART is being use for communication.
The strange issue that I am facing is, the communication with the vending machine starts sending data only when brown colored wires A and B are initially not connected(which are connecting Arduino TX to Vending Machine RX). Once I see the data coming from Vending Machine, I short wires A and B and Arduino Starts sending data to the vending machine too.
But if Wires A and B are connected on the start of a vending machine, the vending machine doesn't send any data to Arduino and hence no communication takes place. I want to make it work without manually connecting wire A and B every time.
I have tried replacing Optocoupler PC817C with
- PC814
- 4N35
- 6N137 High Speed Optocoupler
I tried replacing Hex Inverter with
- 74HC04AP
I tried putting a mechanical and then solid-state relay between wires A and B and tried connecting them via external input but nothing happens
I tired adding an optocoupler as a switch between wires A and B and tried controlling it via firmware.
I even tried replacing the hex inverter with hex buffer HCF4050BE and a NOT Gate but regardless of any combination of mentioned components the issue remains the same, it only works if Wires A and B are initially not connected and then shorted once data starts coming from the vending machine.
I am using MateDealer's code.
I want to automate this manual process and need a simple solution for that.
ANSWER
Answered 2020-Jan-29 at 05:40Resolved
The issue was due to a missed state machine element. My Device is a LEVEL-1 MDB Device and the vending machine that I am using requires the slave devices(whether they are at LEVEL-1 or LEVEL-2) to even respond to LEVEL-2 SETUP poll which is not a standard case in MDB Specifications Document.
Why it was working when TX wire was de-attached?
My logic analyzer was displaying some random hex values when TX line was removed and that random stuff caused the device to work.
By responding to the extra setup configuration poll of my vending machine I was able to make it work smoothly.
Below is the picture showing the configuration data sent by VMC which was discarded by my device making it behave strangely.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install MateDealer
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page