Serial connection over USB

Is the USB port of the Poynt terminal able to provide power to a connected device (like a serial-USB-adapter)?
Is it possible to communicate with a connected serial-USB-adapter over a virtual serial port on the Poynt terminal?

1 Like

Yes - that how in fact we connect with Cash Registers and Cash Drawers. You can try open source libraries like https://github.com/mik3y/usb-serial-for-android to simplify the integration.

But that said the problem you are going to face is to obtain the permission from the user (merchant) to use the usb device. Android does provide a way to request permission from the user but that only works for a front end activity. If you are trying to use the usb port from a background service the permission is not persisted. For this reason, we have built a Poynt Accessory Manager in PoyntOS where you can register your accessory handler and get the permissions auto-applied to your package. If you can share what kind of device you are trying to connect to - it would help us understand how we can make it work through our Poynt Accessory Manager.

cheers,
Praveen

We want to build a cashless system with electronic purses stored on the smartphones of the customers.
For the communication with the smartphone over bluetooth low energy and handling of the electronic purse (authentication, encryption), we want to use the two Legic chips SM-4300 and BT-4000.
On the other side the SM-4300 chip shall be connected over an USB-serial-adapter to the Poynt terminal.
Which of the USB ports can we use for this purpose?
The USB-ports of the docking station and/or the micro-USB port of the Poynt terminal itself?

Thanks,
Rupert

you can use either - micro-USB port of the terminal or the USB ports of the docking station based on your needs. The docking station is fixed so if you need something that you want to be portable along with the terminal then you can use the micro-USB port. Otherwise dock would provide a constant/fixed connection.

Hello,

could you please clarify how to use Poynt Accessory Manager?

I would like to connect M-S usb cash drawer to Poynt device, can I use this library for it https://github.com/mik3y/usb-serial-for-android , or maybe you can suggest how to do it in better way?

Thank you

PoyntAccesoryManager listens for any USB_ATTACHED event and will pop up a new accessory detected window. Merchant can then select the type/model of accessory they have attached. Once the accessory is configured it will be linked to the driver or the app that handle this accessory. Next time whenever a device is connected ACCESSORY_ATTACHED intent will be broadcast to your app along with the USB device.
Coming back M-S usb cash drawer, we already have a support for M-S cash drawer that is connected via USB-Serial switch. So please try it.
You can manager accessories by going to settings->accessory manager screen.
If you don’t want to go through accessory manager , you can directly handle usb device permission and use the above library. But only issue with that is AccessoryManager will keep poping up the new accessory attached dialog whenever the device is connected.
We will be releasing the example code on how to write a new accessory app soon.

1 Like

When will the documentation for the Accessory Manager be available?

Also are Cash Drawers from MMF supported ? We have https://www.mmfpos.com/16-x-16-val-u-line-cash-drawer-with-usb.html

Hello there,

Here’s the list of supported accessories: https://poynt.zendesk.com/hc/en-us/articles/215551868-What-external-accessories-are-compatible-with-the-Poynt-Smart-Terminal-. I will follow up with Sathya on getting the sample code released as soon as he is back in the office.

Thanks for the link to the list of devices. Any ideas where we can purchase the BT-100U to use with our printer driven cash drawers in the US, everywhere we looked seems to be shipping from China and takes several weeks to reach here. Since our current USB cash drawer does not work out of the box with the poynt device.

We also tried using a USB HID Bar code scanner but were unable to get the built in register app to respond to the Scanned UPC. We added the UPC code to one of our items in our Catalog but had no luck. The Barcode scanner we have is from Symbol.

Hi there,

Unfortunately, I am not sure where you can purchase BT-100U in US. I did a quick search on both Amazon and eBay and you are right, it appears most listing have this item shipping from China.

Regarding HID Bar code scanner, can you attached your scanner to the terminal and try to scan a few items and then capture the logcat output?

We got the following from LogCat when trying to use our HID Bar Code Scanner:

We saw this occur once:
I/InputReader( 938): Detected input event buffer overrun for device Symbol Technologies, Inc, 2008 Symbol Bar Code Scanner.

After a reboot when we tried to scan stuff again we got the following:

V/UsbRequest( 1570): endpoint still open in finalize(): android.hardware.usb.UsbRequest@41f96ab0
D/UsbRequestJNI( 1570): close
V/UsbRequest( 1570): endpoint still open in finalize(): android.hardware.usb.UsbRequest@4240aa18
D/UsbRequestJNI( 1570): close
V/UsbRequest( 1570): endpoint still open in finalize(): android.hardware.usb.UsbRequest@41f5c710
D/UsbRequestJNI( 1570): close
V/UsbRequest( 1570): endpoint still open in finalize(): android.hardware.usb.UsbRequest@4215eaa0
D/UsbRequestJNI( 1570): close
V/UsbRequest( 1570): endpoint still open in finalize(): android.hardware.usb.UsbRequest@41f90c00
D/UsbRequestJNI( 1570): close
V/UsbRequest( 1570): endpoint still open in finalize(): android.hardware.usb.UsbRequest@423f2220
D/UsbRequestJNI( 1570): close
V/UsbRequest( 1570): endpoint still open in finalize(): android.hardware.usb.UsbRequest@42359af8
D/UsbRequestJNI( 1570): close
V/UsbRequest( 1570): endpoint still open in finalize(): android.hardware.usb.UsbRequest@42363598
D/UsbRequestJNI( 1570): close
V/UsbRequest( 1570): endpoint still open in finalize(): android.hardware.usb.UsbRequest@42363690
D/UsbRequestJNI( 1570): close
V/UsbRequest( 1570): endpoint still open in finalize(): android.hardware.usb.UsbRequest@4240dd00
D/UsbRequestJNI( 1570): close
V/UsbRequest( 1570): endpoint still open in finalize(): android.hardware.usb.UsbRequest@42392b90
D/UsbRequestJNI( 1570): close
V/UsbRequest( 1570): endpoint still open in finalize(): android.hardware.usb.UsbRequest@42392f70
D/UsbRequestJNI( 1570): close
V/UsbRequest( 1570): endpoint still open in finalize(): android.hardware.usb.UsbRequest@42393068
D/UsbRequestJNI( 1570): close
V/UsbRequest( 1570): endpoint still open in finalize(): android.hardware.usb.UsbRequest@42393160
D/UsbRequestJNI( 1570): close
V/UsbRequest( 1570): endpoint still open in finalize(): android.hardware.usb.UsbRequest@42393258
D/UsbRequestJNI( 1570): close
V/UsbRequest( 1570): endpoint still open in finalize(): android.hardware.usb.UsbRequest@42311a60
D/UsbRequestJNI( 1570): close
V/UsbRequest( 1570): endpoint still open in finalize(): android.hardware.usb.UsbRequest@4236a720
D/UsbRequestJNI( 1570): close
V/UsbRequest( 1570): endpoint still open in finalize(): android.hardware.usb.UsbRequest@422f7ed8
D/UsbRequestJNI( 1570): close
V/UsbRequest( 1570): endpoint still open in finalize(): android.hardware.usb.UsbRequest@422f7fd0
D/UsbRequestJNI( 1570): close
V/UsbRequest( 1570): endpoint still open in finalize(): android.hardware.usb.UsbRequest@4231f898
D/UsbRequestJNI( 1570): close
V/UsbRequest( 1570): endpoint still open in finalize(): android.hardware.usb.UsbRequest@42320580
D/UsbRequestJNI( 1570): close
V/UsbRequest( 1570): endpoint still open in finalize(): android.hardware.usb.UsbRequest@42324828
D/UsbRequestJNI( 1570): close
W/dalvikvm( 2625): VFY: unable to find class referenced in signature (Ljava/nio/file/Path;)
W/dalvikvm( 2625): VFY: unable to find class referenced in signature ([Ljava/nio/file/OpenOption;)
I/dalvikvm( 2625): Could not find method java.nio.file.Files.newOutputStream, referenced from method okio.Okio.sink
W/dalvikvm( 2625): VFY: unable to resolve static method 47814: Ljava/nio/file/Files;.newOutputStream (Ljava/nio/file/Path;[Ljava/nio/file/OpenOption;)Ljava/io/OutputStream;
D/dalvikvm( 2625): VFY: replacing opcode 0x71 at 0x000a
W/dalvikvm( 2625): VFY: unable to find class referenced in signature (Ljava/nio/file/Path;)
W/dalvikvm( 2625): VFY: unable to find class referenced in signature ([Ljava/nio/file/OpenOption;)
I/dalvikvm( 2625): Could not find method java.nio.file.Files.newInputStream, referenced from method okio.Okio.source
W/dalvikvm( 2625): VFY: unable to resolve static method 47813: Ljava/nio/file/Files;.newInputStream (Ljava/nio/file/Path;[Ljava/nio/file/OpenOption;)Ljava/io/InputStream;
D/dalvikvm( 2625): VFY: replacing opcode 0x71 at 0x000a

Not sure if this helps.

Looking through the output we also see:

D/EventHub( 938): No input device configuration file found for device ‘Symbol Technologies, Inc, 2008 Symbol Bar Code Scanner’.
I/EventHub( 938): New device: id=14, fd=192, path=’/dev/input/event8’, name=‘Symbol Technologies, Inc, 2008 Symbol Bar Code Scanner’, classes=0x80000003, configuration=’’, keyLayout=’/system/usr/keylayout/Generic.kl’, keyCharacterMap=’/system/usr/keychars/Generic.kcm’, builtinKeyboard=false, usingSuspendBlockIoctl=true, usingClockIoctl=false
I/InputReader( 938): Device added: id=14, name=‘Symbol Technologies, Inc, 2008 Symbol Bar Code Scanner’, sources=0x00000101

and we get the

I/InputReader( 938): Detected input event buffer overrun for device Symbol Technologies, Inc, 2008 Symbol Bar Code Scanner.

If we try and scan allot of barcodes, so it looks like it is not processing the barcode scans that are in the buffer

Any updates on this?

Hi there, sorry for the delay. Can you run adb shell getevent and post the output when you scan something?

Sorry about the delay was traveling so was not able to test this until now. Below is the output of adb shell getevent

This is what we get before we scan anything

add device 1: /dev/input/event11
name: “touch_fusion”
add device 2: /dev/input/event9
name: “gpio-keys”
add device 3: /dev/input/event10
name: “POYNT Co. POYNT Reader HID - Device”
add device 4: /dev/input/event7
name: “Symbol Technologies, Inc, 2008 Symbol Bar Code Scanner”
add device 5: /dev/input/event8
name: “tegra-rt5640 Headphone Jack”
add device 6: /dev/input/event6
name: “SX9500-2”
add device 7: /dev/input/event5
name: “SX9500”
add device 8: /dev/input/event4
name: “cm32181-ls”
add device 9: /dev/input/event3
name: “bmm050”
could not get driver version for /dev/input/js2, Invalid argument
add device 10: /dev/input/event2
name: “bmg160”
could not get driver version for /dev/input/js1, Invalid argument
add device 11: /dev/input/event1
name: “bma_interrupt”
add device 12: /dev/input/event0
name: “bma2x2”
could not get driver version for /dev/input/js0, Invalid argument

This is after we scan a barcode

/dev/input/event4: 0003 0028 00000169
/dev/input/event4: 0000 0000 00000000
/dev/input/event4: 0003 0028 000002cb
/dev/input/event4: 0000 0000 00000000
/dev/input/event7: 0004 0004 000700e1
/dev/input/event7: 0001 002a 00000001
/dev/input/event7: 0004 0004 0007001b
/dev/input/event7: 0001 002d 00000001
/dev/input/event7: 0000 0000 00000000
/dev/input/event7: 0004 0004 000700e1
/dev/input/event7: 0001 002a 00000000
/dev/input/event7: 0004 0004 0007001b
/dev/input/event7: 0001 002d 00000000
/dev/input/event7: 0004 0004 00070027
/dev/input/event7: 0001 000b 00000001
/dev/input/event7: 0000 0000 00000000
/dev/input/event7: 0004 0004 00070027
/dev/input/event7: 0001 000b 00000000
/dev/input/event7: 0000 0000 00000000
/dev/input/event7: 0004 0004 00070027
/dev/input/event7: 0001 000b 00000001
/dev/input/event7: 0000 0000 00000000
/dev/input/event7: 0004 0004 00070027
/dev/input/event7: 0001 000b 00000000
/dev/input/event7: 0000 0000 00000000
/dev/input/event7: 0004 0004 00070027
/dev/input/event7: 0001 000b 00000001
/dev/input/event7: 0000 0000 00000000
/dev/input/event7: 0004 0004 000700e1
/dev/input/event7: 0001 002a 00000001
/dev/input/event7: 0004 0004 00070027
/dev/input/event7: 0001 000b 00000000
/dev/input/event7: 0004 0004 0007001b
/dev/input/event7: 0001 002d 00000001
/dev/input/event7: 0000 0000 00000000
/dev/input/event7: 0004 0004 000700e1
/dev/input/event7: 0001 002a 00000000
/dev/input/event7: 0004 0004 0007001b
/dev/input/event7: 0001 002d 00000000
/dev/input/event7: 0004 0004 00070021
/dev/input/event7: 0001 0005 00000001
/dev/input/event7: 0000 0000 00000000
/dev/input/event7: 0004 0004 000700e1
/dev/input/event7: 0001 002a 00000001
/dev/input/event7: 0004 0004 00070021
/dev/input/event7: 0001 0005 00000000
/dev/input/event7: 0004 0004 00070015
/dev/input/event7: 0001 0013 00000001
/dev/input/event7: 0000 0000 00000000
/dev/input/event7: 0004 0004 000700e1
/dev/input/event7: 0001 002a 00000000
/dev/input/event7: 0004 0004 00070015
/dev/input/event7: 0001 0013 00000000
/dev/input/event7: 0004 0004 0007001e
/dev/input/event7: 0001 0002 00000001
/dev/input/event7: 0000 0000 00000000
/dev/input/event7: 0004 0004 000700e1
/dev/input/event7: 0001 002a 00000001
/dev/input/event7: 0004 0004 0007001e
/dev/input/event7: 0001 0002 00000000
/dev/input/event7: 0004 0004 00070012
/dev/input/event7: 0001 0018 00000001
/dev/input/event7: 0000 0000 00000000
/dev/input/event7: 0004 0004 00070012
/dev/input/event7: 0001 0018 00000000
/dev/input/event7: 0004 0004 0007000b
/dev/input/event7: 0001 0023 00000001
/dev/input/event7: 0000 0000 00000000
/dev/input/event7: 0004 0004 000700e1
/dev/input/event7: 0001 002a 00000000
/dev/input/event7: 0004 0004 0007000b
/dev/input/event7: 0001 0023 00000000
/dev/input/event7: 0000 0000 00000000
/dev/input/event4: 0003 0028 0000023c
/dev/input/event4: 0000 0000 00000000
/dev/input/event4: 0003 0028 000002b4
/dev/input/event4: 0000 0000 00000000
/dev/input/event4: 0003 0028 000002ce
/dev/input/event4: 0000 0000 00000000

Any ideas on why the barcode scanning is not working.

Also has the sample code for the accessories been released?

Any update on the issue with the HID barcode scanner not working? Also is the Accessory Manager documentation available?

sorry for the delay. what is the exact model of your scanner? I tried googling “Symbol Technologies, Inc, 2008 Symbol Bar Code Scanner” but I am not able to find that specific model.

It is a Symbol DS9208 It can also be found listed under Motorola Solutions or the Zebra Brand with the same model number

Any Updates on this???