1 2 Previous Next 20 Replies Latest reply on Jun 10, 2017 11:39 AM by techt

    Opening a cash drawer with OS X

    techt

      I'm looking for a method, preferably FMP only, that allows at script to open a cash drawer on a Mac running OS X 10.9. I've picked up a USB cash drawer (HP) that the OS does see, there just doesn't seem to be any way to control it and the manufacturer for the drawer doesn't provide a SDK.

       

      Does anyone have any suggestions, perhaps through AppleScript, that would allow FMP to trigger the drawer to open? If you have a solution that requires specific hardware, I would certainly consider that route.

       

      Thanks in advance,

       

      Tim

        • 1. Re: Opening a cash drawer with OS X
          bigtom

          If there is no info or OSX driver/software from HP, this might be a tough thing to do if OSX only sees a USB device.

           

          This really depends on the device itself. Some of the HP drawers work through the receipt printer and that may be a start.

           

          If you need to have a cash drawer and you are not attached to the HP unit there are companies offering devices with OSX drivers and software that you should be able to manage with AppleScript. Macpos looks like they havesomething that might work for $300 or so for the drawer and the software.

          • 2. Re: Opening a cash drawer with OS X
            taylorsharpe

            There are actual vertical solutions that you can buy already set up with the whole Point of Sales, cash register and credit cards, etc. 

             

            But if you want to do a lot of it yourself, you have to make FileMaker talk to the cash register and this is done through a serial port.  The TROI Serial plugin can do this for you.  More info at:  http://www.troi.com/software/cashdrawer.html

            • 3. Re: Opening a cash drawer with OS X
              bigtom

              I agree with Taylor. Just buy somehting that works already and has support.

               

              I suppose if you really want to do this on your own with the drawer you have you could address this on a hardware level as well if it is a custom soltuion since all you need is for a drawer to open. If you find any OSX device that you can control or have an SDK for that can drive the unlock/open solenoid in the drawer you could replace the hardware in the drawer.  Could be any serial device and use the TROI plugin as suggested. You may be able to stash the serial to USB converter in the drawer to give the apperance of a true USB drawer.

              • 4. Re: Opening a cash drawer with OS X
                techt

                I don't care to recreate the wheel, but the business I'm working with requires a complete custom solution and none or the existing POS systems will suffice - I wish they did.

                 

                I did look at the Troi plugin, but it's preFMP7 and iMacs don't have a serial port. I was able to find a USB cash drawer, but talking through it is proving a challenge.

                • 5. Re: Opening a cash drawer with OS X
                  techt

                  Unfortunately, existing solutions won't work for my client. Now, replacing the solenoid in the drawer is an interesting idea.

                  • 6. Re: Opening a cash drawer with OS X
                    taylorsharpe

                    TROI is a serial port controller and it works just fine on USB which is also a serial port.  I do it all the time with phone systems.  And it may have been created before FileMaker 7, but it runs just fine on FileMaker 13.  I'm using it now on many different computers. 

                     

                    PS:  The "S" in USB means "Serial"  <grin>

                    • 7. Re: Opening a cash drawer with OS X
                      bigtom

                      If you use a USB to serial dongle and the Troi plugin it should work just fine. Just because the plugin is pre fmp7 does not mean it will not work now.

                       

                      Hardware modification seems to get overlooked by most software people. It is often the easiest way to solve a problem like this. With a 3D printer you can produce mounting adapters for different electronics inside the box and do a real clean job of it.

                       

                      There are a number of USB to Relay devices out here but they run off of RS232 commands usually anyway.

                      • 8. Re: Opening a cash drawer with OS X

                        Hi Techt,

                         

                        I purchased a Star thermal printer and it had the ability to open an off-the-shelf cash drawer after printing the receipt.

                         

                        I hope that helps,

                         

                        John

                        • 9. Re: Opening a cash drawer with OS X
                          Erik

                          I have been running solutions for a number of years now based on no-name brand cash drawers and usb kickers. It took a bit of hunting but I was able to locate a mac driver for the kicker on the Chinese manufacturer's website. The name escapes me at the moment, but the manufacturer makes the majority of the chips used in the POS interfaces. From there it was simple to get FMP to open the drawer via a shellscript. The script sends a single character (any will do) to open the drawer. The solution is simple and cheap with no extraneous hardware. The big problem is the dearth of information in a PC-centric world to find the driver/kicker combination that works.

                           

                           

                          Because your OS is already seeing the HP drawer, however,  a shell script alone should  be sufficient to trigger the drawer.

                          • 10. Re: Opening a cash drawer with OS X
                            odubov

                            Tim,

                             

                            How Mac OS X does see your drawer, like usual USB device ?

                            Or you have some driver from manufacturer ?

                            Im agree with Erik, drawer could be opened just via shellscript command.

                            Even if drawer behave like serial device via internal usb to serial converter, it could be controlled via TROI plugin or even shellscript only.

                            I have experience with connection of serial fiscal printer to FileMaker under Mac OS X, using USB to Serial converter and Perl script.

                            It works perfectly, sends commands and receiving answer back to FileMaker.

                            In your case looks like you should just send one command, only problem is how to find the needed command.

                            If drawer is behave like serial, you could try to send in course from 0x00 to 0xFF, it might work.

                            • 11. Re: Opening a cash drawer with OS X
                              techt

                              It sees the drawer like a USB device, but there is no driver for OS X (though one was supposed to be available).

                               

                              I'll download the Troi plugin and see if that is able to trigger it.

                               

                              Alternatively, could you provide a little more feedback on what the shellscript command would look like? Any details would be greatly appreciated.


                              Thanks in advance,


                              Tim

                              • 12. Re: Opening a cash drawer with OS X
                                techt

                                Thanks for the encouragement. Is it possible that you could provide some details about what the shellscript would look like? I'm at a loss as to where to go next.

                                 

                                Thanks in advance,

                                 

                                Tim

                                • 13. Re: Opening a cash drawer with OS X
                                  odubov

                                  Tim,

                                   

                                  looks like you need to send special sequence to open cash drawer:

                                  http://keyhut.com/popopen.htm

                                   

                                  Are your HP model is in the list ?

                                  Could you please name it ?

                                   

                                  Oleksiy

                                  • 14. Re: Opening a cash drawer with OS X
                                    Erik

                                    The format for the shell script is "echo 'A' > /dev/cu.usbserial". This sends one character (A) to the device. In my solution it can be any character and I was simply being predicatable. Encapsulate the shellscript into a Filemaker Perform Applescript script step:

                                     

                                    tell application "Finder"

                                              do shell script "echo 'A' > /dev/cu.usbserial"

                                    end tell

                                     

                                    If you have more than one usb serial device you must correctly identify it in the  '/dev/cu.usbserial' string. It also follows that if you have a device that responds to a particular character only, change the value 'A' .

                                     

                                     

                                    If you haven't done so already, go into terminal and have a look at your serial devices. Type the command:

                                     

                                     

                                    ls /dev/cu.*

                                     

                                     

                                    Typically you would see

                                     

                                     

                                    /dev/cu.Bluetooth-Modem                    /dev/cu.Bluetooth-Serial-1

                                    /dev/cu.Bluetooth-PDA-Sync          /dev/cu.Bluetooth-Serial-2.

                                     

                                     

                                    The above example is missing a reference to '/dev/cu.usbserial'. If you don't see something like it, or something that related specifically to your cash drawer, OSX isn't seeing it natively.  You will need a driver for the drawer you have, or source a different drawer/ kicker combination.

                                     

                                    This method avoids the use of intermediate devices like receipt printers which were not part of my original brief.

                                    1 2 Previous Next