WAPP_printer icon indicating copy to clipboard operation
WAPP_printer copied to clipboard

老大,我clone项目下来扫描不出打印机

Open zengholiday opened this issue 5 years ago • 21 comments

老大,我clone项目下来扫描不出打印机

zengholiday avatar Apr 19 '19 02:04 zengholiday

image 这个地方设置了自己打印机蓝牙设备的主服务了吗

dyl169 avatar Apr 19 '19 02:04 dyl169

你是哪一个项目啊?

在 2019-04-19 10:48:15,"ike" [email protected] 写道:

这个地方设置了自己打印机蓝牙设备的主服务了吗

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

zengholiday avatar Apr 26 '19 02:04 zengholiday

???

dyl169 avatar Apr 26 '19 02:04 dyl169

image 我指令都写入成功了,也连上了蓝牙打印机,但是为啥打印不了呢?

becky1992 avatar Aug 17 '19 06:08 becky1992

你的打印机机型是什么

------------------ 原始邮件 ------------------ 发件人: "becky1992"[email protected]; 发送时间: 2019年8月17日(星期六) 下午2:57 收件人: "dyl169/WAPP_printer"[email protected]; 抄送: "董云龙"[email protected];"Comment"[email protected]; 主题: Re: [dyl169/WAPP_printer] 老大,我clone项目下来扫描不出打印机 (#1)

我指令都写入成功了,也连上了蓝牙打印机,但是为啥打印不了呢?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

dyl169 avatar Aug 19 '19 01:08 dyl169

1566178343

容大的 RPP320 ,

becky1992 avatar Aug 19 '19 01:08 becky1992

设备的主服务UUID是多少知道吗

------------------ 原始邮件 ------------------ 发件人: "becky1992"[email protected]; 发送时间: 2019年8月19日(星期一) 上午9:32 收件人: "dyl169/WAPP_printer"[email protected]; 抄送: "董云龙"[email protected]; "Comment"[email protected]; 主题: Re: [dyl169/WAPP_printer] 老大,我clone项目下来扫描不出打印机 (#1)

容大的 RPP320 ,

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

dyl169 avatar Aug 19 '19 01:08 dyl169

base.Ble.initBle(['FFF0', '0A71', 'FFE0', '18F0']);

becky1992 avatar Aug 19 '19 01:08 becky1992

你现在是可以连接,但是打印不出来,我估计是指令问题,不知道你这个设备支不支持我那套佳博的指令

------------------ 原始邮件 ------------------ 发件人: "becky1992"[email protected]; 发送时间: 2019年8月19日(星期一) 上午9:46 收件人: "dyl169/WAPP_printer"[email protected]; 抄送: "董云龙"[email protected]; "Comment"[email protected]; 主题: Re: [dyl169/WAPP_printer] 老大,我clone项目下来扫描不出打印机 (#1)

base.Ble.initBle(['FFF0', '0A71', 'FFE0', '18F0']);

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

dyl169 avatar Aug 19 '19 01:08 dyl169

image image

我的代码是这样的 image

是的, 连上打印机了, 指令也成功了,打印机就是不反应, 我问之前的开发人员,他说编码格式不一样, 我不知道他说的编码格式是指什么? 难道不同型号的打印机指令也是不相同的吗?

becky1992 avatar Aug 19 '19 01:08 becky1992

之前也有人遇到过问题,换了个佳博打印机可以正常打印, 你的打印机有没有说明书,看支持什么格式的指令 比如什么TSPL ESC

------------------ 原始邮件 ------------------ 发件人: "becky1992"[email protected]; 发送时间: 2019年8月19日(星期一) 上午9:52 收件人: "dyl169/WAPP_printer"[email protected]; 抄送: "董云龙"[email protected]; "Comment"[email protected]; 主题: Re: [dyl169/WAPP_printer] 老大,我clone项目下来扫描不出打印机 (#1)

我的代码是这样的

是的, 连上打印机了, 指令也成功了,打印机就是不反应, 我问之前的开发人员,他说编码格式不一样, 我不知道他说的编码格式是指什么? 难道不同型号的打印机指令也是不相同的吗?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

dyl169 avatar Aug 19 '19 01:08 dyl169

我用的是CPCL 指令的。 有没有TPSL 的指令可以参考? 不会写 额额额额。。。

becky1992 avatar Aug 19 '19 02:08 becky1992

你看看这个:https://max.book118.com/html/2017/1203/142607214.shtm?k=overwrite

dyl169 avatar Aug 19 '19 02:08 dyl169

原来真是这样的,不同的打印机支持不同的打印指令。 虽然我还是没研究出TSC 指令。但是我换了个支持CPCL指令的打印机,可以打印了

becky1992 avatar Aug 19 '19 10:08 becky1992

那就好,demo里的指令只是一种------------------ 原始邮件 ------------------ 发件人: "becky1992"[email protected] 发送时间: 2019年8月19日(星期一) 晚上6:53 收件人: "dyl169/WAPP_printer"[email protected]; 抄送: "ike"[email protected];"Comment"[email protected]; 主题: Re: [dyl169/WAPP_printer] 老大,我clone项目下来扫描不出打印机 (#1)

原来真是这样的,不同的打印机支持不同的打印指令。 虽然我还是没研究出TSC 指令。但是我换了个支持CPCL指令的打印机,可以打印了

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

dyl169 avatar Aug 19 '19 10:08 dyl169

能问问你链接小程序打印机会不会出现这样一个问题, 当我打完这条数据时, 打下一条数据的时候,我又得重新链接蓝牙打印机,每次打完都得重新连那种。

becky1992 avatar Aug 21 '19 05:08 becky1992

就是每次都得重新扫描蓝牙打印机,非常的耗时。

becky1992 avatar Aug 21 '19 05:08 becky1992

你是打印一次退出当前页面了吗

------------------ 原始邮件 ------------------ 发件人: "becky1992"[email protected]; 发送时间: 2019年8月21日(星期三) 中午1:58 收件人: "dyl169/WAPP_printer"[email protected]; 抄送: "董云龙"[email protected]; "Comment"[email protected]; 主题: Re: [dyl169/WAPP_printer] 老大,我clone项目下来扫描不出打印机 (#1)

就是每次都得重新扫描蓝牙打印机,非常的耗时。

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

dyl169 avatar Aug 21 '19 06:08 dyl169

是的, 因为打印的数据在上一页传递过来的,我要回去上一页再把要打印的数据传递过来呢。

becky1992 avatar Aug 21 '19 06:08 becky1992

如果是这样的话是会出现这个问题,我之前你的做法是全局监听连接状态,将连接状态同步到app.js中 (这里要注意实时同步连接的状态) ;第二次进入打印页面先判断下状态如果仍处于连接状态 如果处于连接状态则直接打印;

------------------ 原始邮件 ------------------ 发件人: "becky1992"[email protected]; 发送时间: 2019年8月21日(星期三) 下午2:01 收件人: "dyl169/WAPP_printer"[email protected]; 抄送: "董云龙"[email protected]; "Comment"[email protected]; 主题: Re: [dyl169/WAPP_printer] 老大,我clone项目下来扫描不出打印机 (#1)

是的, 因为打印的数据在上一页传递过来的,我要回去上一页再把要打印的数据传递过来呢。

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

dyl169 avatar Aug 21 '19 06:08 dyl169

你是哪一个项目啊? 在 2019-04-19 10:48:15,"ike" [email protected] 写道: 这个地方设置了自己打印机蓝牙设备的主服务了吗 — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

这里的主服务是如何获取的呢

JoshuaFeng5 avatar Jun 09 '22 08:06 JoshuaFeng5