Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems with the buffer or RAM of the device I communicate with #596

Open
srcactus opened this issue Sep 25, 2024 · 1 comment
Open

Problems with the buffer or RAM of the device I communicate with #596

srcactus opened this issue Sep 25, 2024 · 1 comment

Comments

@srcactus
Copy link

I am developing an application in Android Studio type Point of Sale which must communicate with a device for card payments, said device is an Ingenico desk3200 and from what I found it seems to use a CDC ACM interface, even the usbManager.getDeviceList() code does it. I show LogCat in Android Studio and it tells me the following:

{/dev/bus/usb/001/007=UsbDevice[mName=/dev/bus/usb/001/007,mVendorId=2816,mProductId=84,mClass=2,mSubclass=0,mProtocol=0,mManufacturerName=INGENICO,mProductName=Desk3200,mVersion=2.0,mSerialNumber=000000000000000000000000,mConfigurations=[ UsbConfiguration[mId=2,mName=CDC ACM config,mAttributes=192,mMaxPower=250,mInterfaces=[ UsbInterface[mId=0,mAlternateSetting=0,mName=CDC Abstract Control Model (ACM),mClass=2,mSubclass=2,mProtocol=1,mEndpoints=[ UsbEndpoint[mAddress=131,mAttributes=3,mMaxPacketSize=10,mInterval=9]] UsbInterface[mId=1,mAlternateSetting=0,mName=CDC ACM Data,mClass=10,mSubclass=0,mProtocol=0,mEndpoints=[ UsbEndpoint[mAddress=129,mAttributes=2,mMaxPacketSize=512,mInterval=0] UsbEndpoint[mAddress=2,mAttributes=2,mMaxPacketSize=512,mInterval=0]]]]}

The android application communicates correctly to make payments (I had to resort to this library since there is no SDK for android devices from the supplier of the Ingenico desk3200 device that acts as the payment gateway) and I am very grateful for this library. The problem is that there are times when it seems that the device crashes due to a lot of data. At first I thought it could be the buffer, then I consulted with another integrator who has experience with the device and he mentioned that it could be the RAM of the Ingenico desk3200 device, try clean the buffer with the CdcAcmSerialDriver class but it gives me an error:

java.lang.UnsupportedOperationException at com.hoho.android.usbserial.driver.CommonUsbSerialPort.purgeHwBuffers(CommonUsbSerialPort.java:349) at appnettecht1.appnetpost2onlineof.VentaFragment.sendVentaMessage(VentaFragment.java:2502) at appnettecht1.appnetpost2onlineof.VentaFragment$52$3.run(VentaFragment.java:3050)

Is there a way to clear the buffer in CDC ACM or is it simply not compatible with the Ingenico dek3200 device?

I hope you can help or guide me, thank you.

@kai-morich
Copy link
Collaborator

purgeHwBuffers is not defined for CDC ACM. I am not aware of commands for resetting the remote device.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants