Skip to content
This repository has been archived by the owner on Aug 29, 2023. It is now read-only.

cash drawer open command not working #27

Open
dgarunkumar opened this issue Jun 30, 2020 · 11 comments
Open

cash drawer open command not working #27

dgarunkumar opened this issue Jun 30, 2020 · 11 comments

Comments

@dgarunkumar
Copy link

dgarunkumar commented Jun 30, 2020

No description provided.

@dannyzar
Copy link

any discovery of how to make it work?

@tmalbonph
Copy link

@dannyzar are you using as SUNMI device for this?
For issue related to SUNMI V1/V2 you can ask here https://github.com/tmalbonph/cordova-plugin-sunmi-inner-printer

@dannyzar
Copy link

Yes, I'm using SUNMI T2 mini. This device have a port to connect a cashdrawer and I'm trying to make it work.

@tmalbonph
Copy link

@dannyzar Do you have a cordova plugin for this SUNMI T2 device?
On sunmi webpage, I can't locate a driver for it but a bunch of *.aidl files were available. Do you have those file too?

@tmalbonph
Copy link

tmalbonph commented Sep 29, 2020

@dannyzar
In one of the IWoyouService.iadl there is a java method for opening a drawer as follows:

/**
* JIUI T1 print service
* AIDL Version: 2.1
*/

package woyou.aidlservice.jiuiv5;

import woyou.aidlservice.jiuiv5.ICallback;
import android.graphics.Bitmap;
import woyou.aidlservice.jiuiv5.ITax;

interface IWoyouService {

/**
* Open the cash drawer
*/
void openDrawer(in ICallback callback);
}

Maybe you can create a plugin for it and use that method

@dannyzar
Copy link

@tmalbonph Yes, I have the .aidl files of this device. I'm trying to make the plugin work using this one's as base and just adding these new functions (openDrawer) to the ./src/android/com/sunmi/innerprinter/Printer.java and ./www/innerprinter.js files. Any other thing you know I should be missing?

@tmalbonph
Copy link

@dannyzar Most of the plugin or driver provided by sunmi on there webpage were outdated. If you're using a react maybe you can view issue on openDrawer() here januslo/react-native-sunmi-inner-printer#23

@dgarunkumar
Copy link
Author

dgarunkumar commented Oct 2, 2020 via email

@tmalbonph
Copy link

@dgarunkumar If it is working, please close this issue as the original owner @labibramadhan no longer maintain this org @labibramadhan/cordova-sunmi-inner-printer .

@dannyzar
Copy link

dannyzar commented Oct 2, 2020

@tmalbonph it's finally working for me, the problem was the functions change their return value in each .aidl file. Thanks for the support.

@mjawadyasin
Copy link

@dannyzar for me it is not working after adding files
Could you share your solution ?

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

No branches or pull requests

4 participants