Raspberry Pi RASPIVEND Quick Reference

Vending solution
Table of Contents

Advertisement

Quick Links

Raspberry PI
vending solution
(RASPIVEND)
v.28.11.2016
Quick Reference
© 2016 – AUTOMATROM SRL – www.vendingtools.ro

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the RASPIVEND and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Summary of Contents for Raspberry Pi RASPIVEND

  • Page 1 Raspberry PI vending solution (RASPIVEND) v.28.11.2016 Quick Reference © 2016 – AUTOMATROM SRL – www.vendingtools.ro...
  • Page 2: Table Of Contents

    Table of Contents I. General informations......................5 1. Terms..........................5 2. Working modes......................5 A. Low level mode......................5 B. High level mode......................6 2. Communication parameters...................7 II. Hardware overview......................8 1. Power supply requirements...................8 2. Connector description....................8 III. Low level mode.......................10 1. Multiplexer GPIO truth table..................10 2.
  • Page 3 10. MDBSetMaxCredit.....................27 11. MDBSetMaxCreditOK....................27 12. MDBSetCurrentCredit....................28 13. MDBSetCurrentCreditOK...................28 14. MDBSetChange......................29 15. MDBSetChangeOK....................29 16. MDBCreditReset......................29 17. MDBPoll........................30 18. MDBResetStatus.......................30 19. MDBCashlessInit.......................31 20. MDBCashlessEnable....................31 21. MDBCashlessDisable....................31 22. MDBCashlessSettings....................32 23. MDBCashlessVendRequest..................32 24. MDBCashlessVendRequestOK.................33 25. MDBCashlessVendSuccess..................33 26. MDBCashlessVendFailed..................33 27. MDBCashlessRevalue....................34 28. MDBCashlessEndSession..................34 29. KBSet + KBSetOK.....................35 30.
  • Page 4 27. MDBCashlessRevalue....................48 28. MDBCashlessEndSession..................48 29. SetMUXChannel......................48 30. CCTHopperInit......................49 31. CCTHopperDispense....................49 32. CCTHopperCheckDispense..................50 33. CCTHopperDispenseCipher..................50 © 2016 – AUTOMATROM SRL – www.vendingtools.ro...
  • Page 5: General Informations

    MDB checksum since this is automatically calculated by the RASPIVEND and correctly sent to the MDB peripheral. When the RASPIVEND will receive a low level command, it automatically turn low level mode ON and begin to continuously poll the MDB PERIPHERALS.
  • Page 6: High Level Mode

    VTLCOMBUS Wurlitzer keyboard Only with xinetd Only with xinetd RTC set/get Only with xinetd Only with xinetd Raspberry PI GPIO future development POWER GOOD signal for autoshutdown future development future development Direct peripheral selection and communication Table 1: Level modes comparison...
  • Page 7: Communication Parameters

    Table 2: Low level message format - <HEADER> – Is always a byte with a value of 0xFE. - <CMD> - Defines the command group sent to the RASPIVend. - <SUBCMD> - Defines the specific subcommand of the command group.
  • Page 8: Hardware Overview

    CCTALK PERIPHERALS are protected, but will not work. The board also supplies the 5V/2A for Raspberry PI (or compatible). The system eliminates the separate 5V microUSB power supply for Raspberry PI. You will only need one power supply for the entire system.
  • Page 9 POWER, GPIO and serial port. This connector, also supplies the power for Raspberry PI. Used pins and functions can be find in the table below. Pins marked by green background are available for user applications and alos, the power and GND pins.
  • Page 10: Low Level Mode

    III. Low level mode To use this mode, your application must handle the following: a. GPIO pins of the Raspberry PI, needed to switch the multiplexers to the correct communication channel (to select the peripheral). b. Serial port of the Raspberry PI (/dev/ttyAMA0).
  • Page 11: Mdb Bill Disable

    <PARAMETERS> <CRC> 0xFE 0x42 0x03 [none] 0xBF RASPIVEND answer 0xFE 0x42 0x03 0xFB – command execution failed 0xFC – command successfully executed 0xFD – command CRC error This command will disable the bill validator that will no longer accept any banknote.
  • Page 12: Coin Acceptor Disable

    <SUBCMD> <PARAMETERS> <CRC> 0xFE 0x43 0x03 [none] 0xBE RASPIVEND answer 0xFE 0x43 0x03 0xFB – command execution failed 0xFC – command successfully executed 0xFD – command CRC error This command will deactivate the coin acceptor/changer. 9. Coin acceptor read setup vectors <HEADER>...
  • Page 13: Reset The Current Credit

    0xFC – command successfully executed 0xFD – command CRC error This command will sest the current credit on the RASPIVEND. It is indicated to use this command after every cash transaction finished with a successful vend. © 2016 – AUTOMATROM SRL – www.vendingtools.ro...
  • Page 14: Poll Credit And Devices Status

    <PARAMETERS> <CRC> 0xFE 0x50 0x01 [none] 0xAF RASPIVEND answer 0xFE 0x50 0x01 - <CURRENT CREDIT CASH> - 4 bytes MSB (for example, 0x00 0x00 0x04 0xE2 representing 1250 cents or 12.50EUR/12.50USD) - <CURRENT CREDIT CASHLESS> - 4 bytes MSB (for example, 0x00 0x00 0x04 0xE2 representing 1250 cents or 12.50EUR/12.50USD)
  • Page 15 Value Description 0x00 Idle 0x01 Defective Motor - One of the motors has failed to perform its expected assignment. 0x02 Sensor Problem - One of the sensors has failed to provide its response. 0x03 Validator Busy - The validator is busy and can not answer a detailed command right now.
  • Page 16 Value Description 0x00 Idle 0x01 Escrow request - An escrow lever activation has been detected. 0x02 Changer Payout Busy - The changer is busy activating payout devices. 0x03 No Credit - A coin was validated but did not get to the place in the system when credit is given.
  • Page 17: Reset All Devices' Status

    0xFD – command CRC error This command will set to 0x00 all devices' status. It is used to clear status and let the RASPIVEND to update it in accordance with the new devices' status. It will not reset credits 16. Cashless INIT <HEADER>...
  • Page 18: Cashless Enable

    <PARAMETERS> <CRC> 0xFE 0x53 0x02 <CASHLESS NUMBER> (0x01 = cashless #1, 0x02 = cashless #2) RASPIVEND answer 0xFE 0x53 0x02 0xFB – command execution failed 0xFC – command successfully executed 0xFD – command CRC error This command will enable the cashless device with the corresponding number 18.
  • Page 19: Cashless Vend Request

    This command must be sent after a successful vend using cashless. Following this command, the RASPIVEND will substract the product value from the cashless credit, and the cashless device will be instructed to substract th same amount from the customer's credit.
  • Page 20: Cashless Revalue

    <PARAMETERS> <CRC> 0xFE 0x53 0x08 <CASHLESS NUMBER> (0x01 = cashless #1, 0x02 = cashless #2) RASPIVEND answer 0xFE 0x53 0x08 0xFB – command execution failed 0xFC – command successfully executed 0xFD – command CRC error This command will transform the remaining cash credit into cashless credit and will refund this amount on customer's account.
  • Page 21: Rtc Set

    - hour (00 -> 23) - Day of week (1 -> 7) - Day of month (1 -> 31) - Month (1 -> 12) - Year (00 ->99) RASPIVEND answer 0xFE 0x50 0x03 0xFB – command execution failed 0xFC – command successfully executed 0xFD –...
  • Page 22 © 2016 – AUTOMATROM SRL – www.vendingtools.ro...
  • Page 23: High Level Mode With Xinetd

    It is a good idea for your application to retry sending the command few times if you get an “failed” answer. This answer can be returned in the event of Raspberry PI to RASPIVEND board communication failure. Also it can be returned if you try to address a not connected device.
  • Page 24: Mdbbilldisable

    4. MDBBillDisable GUI command Command Parameters/Comments MDBBillDisable [none] RASPIVEND daemon answer Answer Parameters/Comments {"MDBBillDisable":"success"} This command will deactivate the attached MDB bill validator. {"MDBBillDisable":"failed"} 5. MDBCoinInit GUI command Command Parameters/Comments MDBCoinInit [none] RASPIVEND daemon answer Answer Parameters/Comments {"MDBCoinInit":"success"} This command...
  • Page 25: Mdbcoindisable

    Most of those are low level informations and you do not need to "EscrowAvailable":"true", use them in you application, since all MDB protocol will be "BillValues":[ handled by the RASPIVEND board. {"BillValue":"1"}, {"BillValue":"5"}, You can use, for example, the serial number and model to keep {"BillValue":"10"},...
  • Page 26: Mdbcoinsettings

    {"CoinValue":"5"}, {"CoinValue":"0"}, Most of those are low level informations and you do not need to {"CoinValue":"0"}, use them in you application, since all MDB protocol will be {"CoinValue":"0"}, handled by the RASPIVEND board. {"CoinValue":"0"}, {"CoinValue":"0"}, {"CoinValue":"0"}, {"CoinValue":"0"}, {"CoinValue":"0"}, {"CoinValue":"0"}, {"CoinValue":"0"},...
  • Page 27: Mdbsetmaxcredit

    11. MDBSetMaxCreditOK GUI command Command Parameters/Comments MDBSetMaxCreditOK [none] RASPIVEND daemon answer Answer Parameters/Comments {"MDBSetMaxCreditOK":"success"} This command will commit the change of the MaxCredit variable on the RASPIVEND board. {"MDBSetMaxCreditOK":"failed"} © 2016 – AUTOMATROM SRL – www.vendingtools.ro...
  • Page 28: Mdbsetcurrentcredit

    This value must be set after each succesful vend and before issuing the “MDBCashlessRevalue” command. This is the value that the RASPIVEND board will try to use for revalue. The value is multiplied by the 100 scaling factor (for example, for 1EUR you have to set this value to 100).
  • Page 29: Mdbsetchange

    - 32 bit positive value This value must be set before any change return action The value is multiplied by the 100 scaling factor (for example, for 1EUR you have to set this value to 100). RASPIVEND daemon answer Answer Parameters/Comments {"MDBSetChange":"NNNN"} This command will return the value you have sent.
  • Page 30: Mdbpoll

    17. MDBPoll GUI command Command Parameters/Comments MDBPoll [none] RASPIVEND daemon answer Answer Parameters/Comments This command will return the current MDB module's information. "Type":"Poll", It is recommended to issue this command at least twice a "CurrentCreditCash":"0", second while the transaction is opened (when the payment "CurrentCreditCashless":"0",...
  • Page 31: Mdbcashlessinit

    Parameters/Comments MDBCashlessInit(N) “N” is the address of the cashless to be initialized (1 for the first cashless device and 2 for the second cashless device) RASPIVEND daemon answer Answer Parameters/Comments {"MDBCashlessInit":"success"} This command will perform all initialization tasks for the attached MDB cashless system.
  • Page 32: Mdbcashlesssettings

    Parameters/Comments MDBCashlessSettings(N) “N” is the address of the cashless to be readed (1 for the first cashless device and 2 for the second cashless device) RASPIVEND daemon answer Answer Parameters/Comments This command will return the specified cashless device low level "Type":"Cashless",...
  • Page 33: Mdbcashlessvendrequestok

    Command Parameters/Comments MDBCashlessVendRequestOK(N) “N” is the address of the cashless to request vend permission(1 for the first cashless device and 2 for the second cashless device) RASPIVEND daemon answer Answer Parameters/Comments {"MDBCashlessVendRequestOK":"success"} This command will commit the MDBCashlessVendRequest command. {"MDBCashlessVendRequestOK":"failed"}...
  • Page 34: Mdbcashlessrevalue

    Parameters/Comments MDBCashlessRevalue(N) “N” is the address of the cashless to revalue (1 for the first cashless device and 2 for the second cashless device) RASPIVEND daemon answer Answer Parameters/Comments {"MDBCashlessRevalue":"success"} This command will send load the CurentCreditCash value to the cashless.
  • Page 35: Kbset + Kbsetok

    This command will send the appropriate keystroke to deliver the product. When you receive the correct combination as a response, then you have to commit the command with the command KBSetOK RASPIVEND daemon answer Answer Parameters/Comments {"KeyboardSet":"ABCD"} This command will simulate a keyboard press to deliver one product to the customer.
  • Page 36: Rtcset

    This command will read the date and time informations from the non-volatile RTC on the RASPIVEND board. This command is useful to help you set the date and time on Raspberry PI if it is not connected to the Internet.
  • Page 37: High Level Mode With Python 3 Service Daemon

    It is a good idea for your application to retry sending the command few times if you get an “failed” answer. This answer can be returned in the event of Raspberry PI to RASPIVEND board communication failure. Also it can be returned if you try to address a not connected device.
  • Page 38: Mdbbilldisable

    4. MDBBillDisable GUI command Command Parameters/Comments MDBBillDisable [none] RASPIVEND daemon answer Answer Parameters/Comments {"MDBBillDisable":"success"} This command will deactivate the attached MDB bill validator. {"MDBBillDisable":"failed"} 5. MDBCoinInit GUI command Command Parameters/Comments MDBCoinInit [none] RASPIVEND daemon answer Answer Parameters/Comments {"MDBCoinInit":"success"} This command...
  • Page 39: Mdbcoindisable

    Most of those are low level informations and you do not need to "EscrowAvailable":"true", use them in you application, since all MDB protocol will be "BillValues":[ handled by the RASPIVEND board. {"BillValue":"1"}, {"BillValue":"5"}, You can use, for example, the serial number and model to keep {"BillValue":"10"},...
  • Page 40: Mdbcoinsettings

    {"CoinValue":"5"}, {"CoinValue":"0"}, Most of those are low level informations and you do not need to {"CoinValue":"0"}, use them in you application, since all MDB protocol will be {"CoinValue":"0"}, handled by the RASPIVEND board. {"CoinValue":"0"}, {"CoinValue":"0"}, {"CoinValue":"0"}, {"CoinValue":"0"}, {"CoinValue":"0"}, {"CoinValue":"0"}, {"CoinValue":"0"},...
  • Page 41: Mdbsetmaxcredit

    11. MDBSetMaxCreditOK GUI command Command Parameters/Comments MDBSetMaxCreditOK [none] RASPIVEND daemon answer Answer Parameters/Comments {"MDBSetMaxCreditOK":"success"} This command will commit the change of the MaxCredit variable on the RASPIVEND board. {"MDBSetMaxCreditOK":"failed"} © 2016 – AUTOMATROM SRL – www.vendingtools.ro...
  • Page 42: Mdbsetcurrentcredit

    This value must be set after each succesful vend and before issuing the “MDBCashlessRevalue” command. This is the value that the RASPIVEND board will try to use for revalue. The value is multiplied by the 100 scaling factor (for example, for 1EUR you have to set this value to 100).
  • Page 43: Mdbsetchange

    - 32 bit positive value This value must be set before any change return action The value is multiplied by the 100 scaling factor (for example, for 1EUR you have to set this value to 100). RASPIVEND daemon answer Answer Parameters/Comments {"MDBSetChange":"NNNN"} This command will return the value you have sent.
  • Page 44: Mdbpoll

    17. MDBPoll GUI command Command Parameters/Comments MDBPoll [none] RASPIVEND daemon answer Answer Parameters/Comments This command will return the current MDB module's information. "Type":"Poll", It is recommended to issue this command at least twice a "CurrentCreditCash":"0", second while the transaction is opened (when the payment "CurrentCreditCashless":"0",...
  • Page 45: Mdbcashlessinit

    Parameters/Comments MDBCashlessInit(N) “N” is the address of the cashless to be initialized (1 for the first cashless device and 2 for the second cashless device) RASPIVEND daemon answer Answer Parameters/Comments {"MDBCashlessInit":"success"} This command will perform all initialization tasks for the attached MDB cashless system.
  • Page 46: Mdbcashlesssettings

    Parameters/Comments MDBCashlessSettings(N) “N” is the address of the cashless to be readed (1 for the first cashless device and 2 for the second cashless device) RASPIVEND daemon answer Answer Parameters/Comments This command will return the specified cashless device low level "Type":"Cashless",...
  • Page 47: Mdbcashlessvendrequestok

    Command Parameters/Comments MDBCashlessVendRequestOK(N) “N” is the address of the cashless to request vend permission(1 for the first cashless device and 2 for the second cashless device) RASPIVEND daemon answer Answer Parameters/Comments {"MDBCashlessVendRequestOK":"success"} This command will commit the MDBCashlessVendRequest command. {"MDBCashlessVendRequestOK":"failed"}...
  • Page 48: Mdbcashlessrevalue

    Parameters/Comments MDBCashlessRevalue(N) “N” is the address of the cashless to revalue (1 for the first cashless device and 2 for the second cashless device) RASPIVEND daemon answer Answer Parameters/Comments {"MDBCashlessRevalue":"success"} This command will send load the CurentCreditCash value to the cashless.
  • Page 49: Ccthopperinit

    Parameters/Comments CCTHopperInit(N) “N” is the address of the hopper you need to perform initialization. The address depends on the hoper settings. RASPIVEND daemon answer Answer Parameters/Comments { "HopperInitAddress" : "3" , This command will perform a full init of the hopper with provided "Reset"...
  • Page 50: Ccthoppercheckdispense

    32. CCTHopperCheckDispense GUI command Command Parameters/Comments CCTHopperCheckDispense(N) “N” is the hopper address. RASPIVEND daemon answer Answer Parameters/Comments Ex. 1 – success This command will return a message regarding the last known { "EventCounter" : "1" , hopper status. "ToDispense" : "0" , After issuing CCTHopperDispense or "Dispensed"...
  • Page 51 NOTES: © 2016 – AUTOMATROM SRL – www.vendingtools.ro...

Table of Contents