LanguidSmartass / mdb-arduino-cashless

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

How to charge money on card? #9

Closed pistoletov1974 closed 8 years ago

pistoletov1974 commented 8 years ago

Hi i just try on same priject - vending with rfid. I suppouse (IMHO) that using socket server have more advantages for this project. How users put money on cards?

LanguidSmartass commented 8 years ago

Hello. SIM900 has built-in HTTP handling functions, so it was much easier to read server responses. I only needed the HTTP Code and a string representing available user funds. Yes, you can also use standard TCP/IP socket connection and make a request, but you're gonna have to parse the entire TCP response, which includes a lot of headers in HTML syntax, such as ..., and it requires a bigger buffer ==> less available SRAM. SIM900 can do all of this by itself. The idea initially was not to store funds on RFID cards, but on the remote server (that's another task to complete). The card is just an ID holder. I had some thoughts of implementing account refilling via coin acceptor and/or bill validator of the VMC itself, but haven't done it yet. Didn't find anything similar in MDB 4.2 Specification either.

pistoletov1974 commented 8 years ago

I think a lot about using rfid and where store funds on server or on card.Server is good idea - but if we have problems with connection? Another way is to use NFC cards. What do you think about it? We can store funds on card. I think to put change on card on the vmc. IMHO pure socket connection is lightweight than http - this is pure our data without any headers. We need to write our own socket server but this is really simple using java sockets. GPS trackers use pure socket connections. Http produce lot unnecessary trafic.

LanguidSmartass commented 8 years ago

If we really have connection problems -- than do nothing. Having funds on the card can lead to a lot of issues described in this article http://cybergibbons.com/uncategorized/cashless-vending-fail-analysis-of-a-rfid-payment-system/ You didn't get it about http -- you don't have to implement anything except for simple AT commands wrapper when working with SIM900. I use Arduino (Atmega328P) and GPRS Shield (SIM900). I didn't write any socket.c/h libraries, all this functionality is built-in in SIM900. I'm only sending and receiving bytes via SoftwareSerial, that's all, SIM900 does all the job. Though if you use Ethernet shield (Wiznet W5100 chip) or some WiFi interface then yes -- sockets are the right way.

LanguidSmartass commented 8 years ago

Issue closed as more than 1 month passed after the last post.

Kirson75 commented 4 years ago

Hi, I am using part of your code and it works successfully on an old coffee machine. G-snack in the machine (it is also MDB protocol) all blocks the keyboard on the coffee machine.

LanguidSmartass commented 4 years ago

Can you please rephrase the last sentence? I don't quite get what you're trying to say.

Kirson75 commented 4 years ago

Thank

I overcame a lot of problems, and on one coffee shop he still works full.

But G-snack Coffe machine blocked. Arduino's blocks even the keyboard to the device.

I Find reason: String: file MDB.c case VMC_RESET: / PORTC ^ = (1 << 0); / MDB_ResetHandler (); перерыв;

Frequencies: Reset ();

What can be the problem?

On Tue, Sep 22, 2020 at 2:07 AM Ivan Novoselov notifications@github.com wrote:

Can you please rephrase the last sentence? I don't quite get what you're trying to say.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/LanguidSmartass/mdb-arduino-cashless/issues/9#issuecomment-696404233, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJEVTQVHIPFT5AWJV5EPCITSG7FDDANCNFSM4CAWNE4Q .

mkrasselt1 commented 4 years ago

arduino blocking sounds like an loop going cracy, did you change anything on the hardware ? some transmission wires bad ? or did you change the software ? i skiped using this project and implemented everthing new - but you error sounds like something i had in the early stages... length counter = -1 => Sending Overflow and stuff like that. Start by Outputing all the recieved and send data to the console to spot the mistakes

LanguidSmartass commented 4 years ago

Dude, this project is pretty much abandoned and serves as an example of a simplest state machine for level 1 mdb cashless devices.

It was debugged on a single MDB master available to me at the time, thus any "standard compliance" issues are to be expected.

I don't have neither the energy nor the desire to continue developing it.

However, you can always branch/fork it and continue the work that is left behind if you so desire.

On Mon, Sep 28, 2020, 22:07 mkrasselt1 notifications@github.com wrote:

arduino blocking sounds like an loop going cracy, did you change anything on the hardware ? some transmission wires bad ? or did you change the software ? i skiped using this project and implemented everthing new - but you error sounds like something i had in the early stages... length counter = -1 => Sending Overflow and stuff like that. Start by Outputing all the recieved and send data to the console to spot the mistakes

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/LanguidSmartass/mdb-arduino-cashless/issues/9#issuecomment-700225226, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEFVCCRLKSNFTAWNQVCXRBTSIDNIVANCNFSM4CAWNE4Q .