ayufan / niimprint-web

A simple Niimbot D11/D110 web tester
23 stars 6 forks source link

B1 and serial connection #3

Open bradley-schaefer opened 5 months ago

bradley-schaefer commented 5 months ago

This is a great repository! I am trying to use the B1 in a website and this is a great start! Would there be any problems using a serial connection rather than a Bluetooth?

ayufan commented 5 months ago

@bradley-schaefer Probably not, but you have to add support yourself. I assume that this should support BLE as well, similar to what is done now.

MultiMote commented 3 months ago

B1 has some differences in the printing process.

Here is dumps for comparison:

D110

SetLabelType              555523010123aaaa
SetDensity                555521010323aaaa
PrintStart                555501010101aaaa
PrintClear                555520010120aaaa
PageStart                 555503010103aaaa
SetPageSize               5555130400f0006087aaaa
PrintQuantity             55551502000116aaaa
PrintEmptyRows            55558403000052d5aaaa
PrintBitmapRows           5555851200521820180400ffffffffff ff ff ff ff ff 00 e1 aa aa
PrintBitmapRows           5555851200560400044800f000000000 00 00 00 00 0f 00 76 aa aa
PrintBitmapRows           55558512009e1820180400ffffffffff ff ff ff ff ff 00 2d aa aa
PrintEmptyRows            5555840300a22603aaaa
PrintEmptyRows            5555840300c82867aaaa
PageEnd                   5555e30101e3aaaa
PrintStatus               5555a30101a3aaaa (alot, status response has 4 bytes of data)
PrintEnd                  5555f30101f3aaaa

B1

SetDensity        555521010222aaaa
SetLabelType      555523010123aaaa
PrintStart        555501070001000000000007aaaa
PageStart         555503010103aaaa
SetPageSize       5555130600a000f0000144aaaa
PrintEmptyRows    5555840300001d9aaaaa
PrintBitmapRows   55558524001d3e300004000000000000003ffffffffffffffffffffffffffffffff000000000000086aaaa
PrintBitmapRows   555585240021b8300021000000000000003c000000000000000000000000000000f0000000000000e5aaaa
PrintBitmapRows   5555852400429e300004000000000000003c000000000007fffffe000000000000f00000000000007caaaa
PrintBitmapRows   555585240046b0300014000000000000003c00000000000780001e000000000000f000000000000026aaaa
PrintBitmapRows   55558524005a9e300004000000000000003c000000000007fffffe000000000000f000000000000064aaaa
PrintBitmapRows   55558524005eb8300023000000000000003c000000000000000000000000000000f000000000000098aaaa
PrintBitmapRows   5555852400813e300004000000000000003ffffffffffffffffffffffffffffffff00000000000001aaaaa
PrintEmptyRows    5555840300851b19aaaa
PageEnd           5555e30101e3aaaa
PrintStatus       5555a30101a3aaaa (alot, status response has 8 bytes of data)
PrintEnd          5555f30101f3aaaa