minlux / dymon Goto Github PK
View Code? Open in Web Editor NEWCommand line based print tool for DYMO LabelWriter Wireless.
License: MIT License
Command line based print tool for DYMO LabelWriter Wireless.
License: MIT License
I'm trying to build dymon on Linux Mint 20.3 and get the following errors. Any help would be appreciated.
~$ git clone https://github.com/minlux/dymon
Cloning into 'dymon'...
remote: Enumerating objects: 370, done.
remote: Counting objects: 100% (112/112), done.
remote: Compressing objects: 100% (76/76), done.
remote: Total 370 (delta 58), reused 77 (delta 35), pack-reused 258
Receiving objects: 100% (370/370), 3.56 MiB | 10.37 MiB/s, done.
Resolving deltas: 100% (171/171), done.
~$ cd dymon/build/
~/dymon/build$ ls
win32
~/dymon/build$ cmake ..
-- The C compiler identification is GNU 9.4.0
-- The CXX compiler identification is GNU 9.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: /home/---/dymon/build
~/dymon/build$ make
Scanning dependencies of target dymon_srv
[ 3%] Building C object CMakeFiles/dymon_srv.dir/libs/cjson/cJSON.c.o
[ 7%] Building CXX object CMakeFiles/dymon_srv.dir/src/bitmap/bitmap.cpp.o
[ 11%] Building CXX object CMakeFiles/dymon_srv.dir/src/bitmap/glyphIterator.cpp.o
[ 14%] Building CXX object CMakeFiles/dymon_srv.dir/src/bitmap/utf8decoder.cpp.o
[ 18%] Building CXX object CMakeFiles/dymon_srv.dir/src/barcode/barcodeEan8.cpp.o
[ 22%] Building CXX object CMakeFiles/dymon_srv.dir/src/dymon/dymon.cpp.o
[ 25%] Building CXX object CMakeFiles/dymon_srv.dir/src/dymon/dymon_linux.cpp.o
[ 29%] Building CXX object CMakeFiles/dymon_srv.dir/src/print.cpp.o
[ 33%] Building CXX object CMakeFiles/dymon_srv.dir/src/main_dymon_srv.cpp.o
[ 37%] Building C object CMakeFiles/dymon_srv.dir/src/index_html.c.o
[ 40%] Linking CXX executable dymon_srv
[ 40%] Built target dymon_srv
Scanning dependencies of target dymon_pbm
[ 44%] Building CXX object CMakeFiles/dymon_pbm.dir/src/bitmap/bitmap.cpp.o
[ 48%] Building CXX object CMakeFiles/dymon_pbm.dir/src/bitmap/glyphIterator.cpp.o
[ 51%] Building CXX object CMakeFiles/dymon_pbm.dir/src/bitmap/utf8decoder.cpp.o
[ 55%] Building CXX object CMakeFiles/dymon_pbm.dir/src/barcode/barcodeEan8.cpp.o
[ 59%] Building CXX object CMakeFiles/dymon_pbm.dir/src/dymon/dymon.cpp.o
[ 62%] Building CXX object CMakeFiles/dymon_pbm.dir/src/dymon/dymon_linux.cpp.o
[ 66%] Building CXX object CMakeFiles/dymon_pbm.dir/src/main_dymon_pbm.cpp.o
/home/---/dymon/src/main_dymon_pbm.cpp: In function ‘int main(int, char**)’:
/home/---/dymon/src/main_dymon_pbm.cpp:50:28: error: invalid conversion from ‘const void*’ to ‘void*’ [-fpermissive]
50 | int error = dymon.start(ipAddress); //connect to labelwriter
| ^~~~~~~~~
| |
| const void*
In file included from /home/---/dymon/src/main_dymon_pbm.cpp:4:
/home/---/dymon/src/dymon/dymon.h:24:21: note: initializing argument 1 of ‘int Dymon::start(void*)’
24 | int start(void * arg); //create connection to LabelWriter
| ~~~~~~~^~~
make[2]: *** [CMakeFiles/dymon_pbm.dir/build.make:141: CMakeFiles/dymon_pbm.dir/src/main_dymon_pbm.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:107: CMakeFiles/dymon_pbm.dir/all] Error 2
make: *** [Makefile:84: all] Error 2
~/dymon/build$ uname -a
Linux --- 5.15.0-33-generic #34~20.04.1-Ubuntu SMP Thu May 19 15:51:16 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
~/dymon/build$ lsb_release -a
No LSB modules are available.
Distributor ID: Linuxmint
Description: Linux Mint 20.3
Release: 20.3
Codename: una
Trying to build dymon_cli results in further error messages:
~/dymon/build$ make dymon_cli
Scanning dependencies of target dymon_cli
[ 12%] Building CXX object CMakeFiles/dymon_cli.dir/src/bitmap/bitmap.cpp.o
[ 25%] Building CXX object CMakeFiles/dymon_cli.dir/src/bitmap/glyphIterator.cpp.o
[ 37%] Building CXX object CMakeFiles/dymon_cli.dir/src/bitmap/utf8decoder.cpp.o
[ 50%] Building CXX object CMakeFiles/dymon_cli.dir/src/barcode/barcodeEan8.cpp.o
[ 62%] Building CXX object CMakeFiles/dymon_cli.dir/src/dymon/dymon.cpp.o
[ 75%] Building CXX object CMakeFiles/dymon_cli.dir/src/dymon/dymon_linux.cpp.o
[ 87%] Building CXX object CMakeFiles/dymon_cli.dir/src/main_dymon_cli.cpp.o
[100%] Linking CXX executable dymon_cli
/usr/bin/ld: CMakeFiles/dymon_cli.dir/src/dymon/dymon_linux.cpp.o: in function `DymonLinux::connect(void*)':
/home/---/dymon/src/dymon/dymon_linux.cpp:25: undefined reference to `cJSON_GetObjectItemCaseSensitive'
/usr/bin/ld: /home/---/dymon/src/dymon/dymon_linux.cpp:26: undefined reference to `cJSON_IsString'
collect2: error: ld returned 1 exit status
make[3]: *** [CMakeFiles/dymon_cli.dir/build.make:174: dymon_cli] Error 1
make[2]: *** [CMakeFiles/Makefile2:134: CMakeFiles/dymon_cli.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:141: CMakeFiles/dymon_cli.dir/rule] Error 2
make: *** [Makefile:144: dymon_cli] Error 2
hello this is nice thing you have done here. the software are no avalibale for download so i found this.
install and all god. but when i make change to print.cpp i dont get any update on webbpage to chose the new lable.
//To get an idea how to change the label size/format have a look into src/print.cpp. There is an implementation for two different label formats with different orientation.//
My code
static const LabelFormat_t m_LableFormat[NUM_LABEL_FORMATS] =
{
//Bitmap- Bitmap- Label- Barcode- Title- Body-
//Orientation Width/Height Length Scale Font Font
{ Bitmap::Orientation::Horizontally, 272, 252, 25.4, 0.9, &FreeSans18pt7b, &FreeSans15pt7b }, //0: 25mm x 25mm Label
{ Bitmap::Orientation::Vertically, 400, 960, 88.9, 0.8, &FreeSans24pt7b, &FreeSans18pt7b }, //1: 35mm x 89mm Label
{ Bitmap::Orientation::Horizontally, 224, 602, 51, 0.7, &FreeSans24pt7b, &FreeSans18pt7b }, //2: 19mm x 51mm Label
}; //Note: Width/Height are given as a pixels with 300dpi.
Hello,
you made my day. Thank you, to start with.
Perhaps it might be good idea to have the ability to pass arguments to the binary in order to connect to the printer's IP and pass a bitmap file externally also? This way it could be used in shell scripts.
Perhaps also include some sample bitmap files that work with specific paper sizes? That would make life easier for other people who want to use the wireless printer in Linux. I'm willing to debug and test for you (I am not a coder).
Again, thank you so much!
Cool project!
I successfully installed the project on my computer, but when I am pressing print in the web UI nothing happens on the printer itself. Is there any way I can increase the verbosity level of the commands to help me debug the connection? Any way I can confirm that the packages is able to make the connection to the printer?
Here is the command along with the output.
$ ./dymon_srv --log-level debug usb:/dev/bus/usb/002/050
Printserver for DYMO LabelWriter Wireless, by minlux. V2.00r0
Start listening to port 8092
Press [Ctrl + C] to quit!
Here is my lsusb results:
$ lsusb
Bus 002 Device 050: ID 0922:0021 Dymo-CoStar Corp.
Bus 002 Device 048: ID 046d:c05a Logitech, Inc. M90/M100 Optical Mouse
Bus 002 Device 049: ID 046d:c31c Logitech, Inc. Keyboard K120
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID ffff:5678
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Also tried running the example cli command. This gives me no output at all.
./dymon_cli "usb:/dev/bus/usb/002/050" "USB DYMO" "on" "Linux" 1234567
I just downloaded and compiled your code. worked perfectly from the outset. great work!
just wondering whether an implementation of QR Codes is planned for the future.
Using qrencode and convert to pbm is working well but just in case You have some spare time ;-)
regards
max
Hi,
I'm packaging this for Arch Linux (aur), but this code has no license, could you add a license so I can package it with the right one?
Thanks
I would love to contribute to the project, but would really appreciate it if you could point me in the right directly for how to do so. Any help would be appreciated.
Thank you!
Hi there,
thanks for the latest commits. Would it be possible to provide information on how to change the paper (label) size and/or orientation?
The command line options are very useful, thank you for that!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.