Hello again, Gurus! It's w00tus, your favorite problem child..
The issue I have today is with rdesktop. Here's the skinny of what I'm working with and what I'm trying to do:
I've got a AIO pc I'm using just to run rdesktop. It's got Debian Stretch installed with LXDE installed, along with rdesktop (obviously, lol) all of it's dependencies and apache2 and cups for extra measure. I'm using the following command..
Code:
rdesktop 192.168.0.21 -f -u guestservices -r printer:MFC-L2740DW -r printer:"Star TSP700" -r usb:MS9520 -r usb:MSR90
Where the last two things are a bar code scanner and a credit card reader, respectively. I took a guess on how to redirect them and it worked.
I'm rdesktopping to a Lenovo server with Windows 2016 Datacenter Edition installed. (It had Debian 9 for two years.. But when we brought it down to the spa, the single most important piece of software that can't be done away with ONLY works on windows..) Everything is connected via LAN/Cat5, no wireless between any thin client and the host server.
The remote works great, program works great, credit card reader and bar code scanner work. Brother Printer works.. Latency is shockingly low considering the only way I could get a network cable to the server was to patch two long ones in the middle with RJ-45 tips and a FF connector and then hop through an old Airport Extreme.
I've installed the Star TSP700 thermal receipt printer drivers to the server exactly as the directions said on
the support site, which I've done successfully three times now on three other computers as we where playing musical chairs just to keep the business open for daily operations. Both printers are plugged directly into existing usb ports, not through a hub.
What I think my problem is, is that I just can't get the stupid USB port to forward to the server. It shows up on the "devices and printers" screen exactly as I typed it in the command line from the thin client. But unlike the Brother printer, I can't add a new printer by searching. It simply cannot detect it.
Any ideas?
*update*
I thought, 'maybe I didn't install the drivers right on the thin client running Debian Stretch?' So, in a terminal, I typed..
And sure enough, only my Brother printer showed up. So, I headed back over to Star's website and got a fresh new copy of the Linux drivers/firmware, extracted it and started following the instructions:
Code:
libstario
---------
***********
Explination
***********
This is the libstario package, providing the libstario.so component and related development headers.
The libstario.so provides the following functionality:
* Binary input and output communications channels to Star printer and Visual Card devices over serial, parallel, or USB ports
* Status reading from Star printers in a parsed & easy to use format
* Block checked output to Star printers giving the client application the ability to detect printing completion and/or error.
* Hardware reset of Star printers allowing client applications to recover the device back to a know state
* Command transaction execution for Star Visual Card devices allowing client applications to execute Visual Card commands including both tx and rx data.
**********************************
Package usage via makefile targets
**********************************
This project is built and installed using the included makefile. The following is an explination of the various targets contained in this makefile and what they do:
cmd & target: 'make'
--------------------
Build all project sources and create a new libstario.so component version.
cmd & target: 'make clean'
--------------------------
Clean the project and return it to the initial configuration.
cmd & target: 'make install'
----------------------------
Installs the compiled libstario.so component and related header files. The libstario.so component is installed (by default) into the /usr/lib directory. The header files prototyping this component's API are installed (by default) into the /usr/include/stario directory.
Note, this target requires root user permissions to execute.
cmd & target: 'make remove'
---------------------------
Removes any previously installed libstario.so component and related header files.
Note, this target requires root user permissions to execute.
cmd & target: 'make help'
-------------------------
Prints a summary of the various targets contained in this makefile.
******************************************
Device & client application configuration
******************************************
When using libstario, please configure your device and client applications as such:
usb printer or Visual Card
--------------------------
Turn DIP switches 1-5 and 1-8 OFF (under panel on bottom of device, see printer user manual for details).
Applications should pass a string of the following form in the portName parameter to the openPort API:
usb:TSP700;sn:12345678
| | | |
| | | |
| | | |--> usb serial number
| | |
| | |------> beginning of usb serial number sub-string - optional
| |
| |------------> Device ID (one of SP512, SP542, TSP613, TSP600, TSP700
| TSP800, TUP900, TUP992, TCP300)
|
|----------------> beginning of usb portName string
Note, libstario effects usb communications via the libusb architecture; make sure that this is installed. In addition, Linux allows only the root user to access usb device by default - execute your application under the root account or give user-level access to the device by customizing the hot-plug configuration.
serial printer or Visual Card
-----------------------------
Turn serial interface card DIP switches 1-7 and 1-8 ON (remove interface card from back of printer, see printer user manual for details).
Applications should pass a string of the following form in the portName parameter to the openPort API:
/dev/ttyS0
| |
| |
| |--> serial port number (0, 1, ... n)
|
|-----------> beginning of serial portName string
The portSettings parameter is also required in the following form:
38400,none,8,1,hdwr
| | | | |
| | | | |
| | | | |--> flow control (one of hdwr, none)
| | | |
| | | |----> stop bits (fixed at 1)
| | |
| | |------> data bits (one of 8, 7)
| |
| |-----------> parity (one of none, even, odd)
|
|-----------------> baud rate (one of 38400, 19200, 9600, 4800)
parallel printer
----------------
Turn DIP switch 1-8 OFF (under panel on bottom of device, see printer user manual for details).
Applications should pass a string of the following form in the portName parameter to the openPort API:
/dev/parport0
| |
| |
| |--> parallel port number (0, 1, ... n)
|
|-----------> beginning of parallel portName string
Note, libstario effects parallel communications via the PPDEV module. Many distributions install and load this module by defualt. If the /dev/parport0 node is not present on your system, please install and configure the PPDEV module.
***********************************
Sample application stariotest usage
***********************************
This package includes the a sample client application called stariotest that demonstrates client usage of the libstario component and API. This sample application is based on QT3, and as such, requires QT3 to be available.
To execute stariotest, enter the stariotest directory and enter the following command: './stariotest'
This will launch the stariotest application. Use the above application configuration instructions to populate the portName and portSettings fields, then click the 'Open Port' button. Excercise the API and the device by clicking the various other buttons.
Note, the stariotest application contains functionality not directly exposed by the libstario API. For example, stariotest support image printing; this is done by generating image printing commands within the stariotest application and then passing those commands to libstario for output to the device. Please take note of this fact when designing your own application.
Also note that when using stariotest (and libstario in general) with a Star usb device, the application must be run under the root use account (see above for further explination).
******************************
Client application development
******************************
The primary purpose of libstario is to facilitate the development of client applications that control Star printer and Visual Card devices. Here is a minimal set of steps required to use libstario:
1. Add the line, '#include <stario/stario.h' in your source file(s)
2. Add the '-lstario' compile option to your linker command
The API exposed by libstario is prototyped in the stario.h header file. Included within this file are explinations of each API function. Please open this header file and read these explinations while developing your own application.
**********************
Open Source - License
**********************
All source code for the libstario component and the stariotest application are included in this package. Please feel free to look at and change this source code at your will. If you make changes that are usefull, and would like to share those changes, send them to albert at star-m.jp.
libstario is licensed under the GNU Lesser General Public License. This license is included in this package for your reference.
What the LGPL means for you - a totally non-legal(ly binding) explination:
The LGPL allows you to link your applications with libstario and release your application under any license of your choosing (open or closed source). This is important to you because, you are NOT forced to open source your application as a result of linking with libstario.
***************
Support contact
***************
My name is Albert Kennis. I am a proud employee of Star Micronics - the leading manufacturer of POS printers and card products. I hope that you find libstario useful. If you have any problems, questions, or suggestions - please email me at:
albert at star-m.jp
*******
History
*******
Version
Date (Major.Minor) Notes
---- ------------- -----
July 16, 2004 0.0 initial public release
And here's where I'm stuck.. (On my screen)
Code:
root@guestservices:/home/guestservices/Documents/TSP700/libstario-0.0.5107# make installer
mkdir bin
cat src/installer.in | sed -e 's/(MAJOR)/0/g' | sed -e 's/(MINOR)/0/g' | sed -e 's/(COMPILE)/107/g' > installer
chmod +x installer
root@guestservices:/home/guestservices/Documents/TSP700/libstario-0.0.5107# make install
#installing
/bin/sh: 1: [: Illegal number:
mkdir -p /usr/include/stario
mkdir -p /usr/include/stario/example
cp -f src/stario.h /usr/include/stario
cp -f src/stario-structures.h /usr/include/stario
cp -f src/stario-error.h /usr/include/stario
cp -f bin/teststario /usr/include/stario/example
cp: cannot stat 'bin/teststario': No such file or directory
makefile:79: recipe for target 'install' failed
make: *** [install] Error 1
I made sure I had the current/right headers installed with:
Code:
apt install linux-headers-$(uname -r)
Grasping at straws currently..
Perhaps I'm not calling the printer by the right name in the rdesktop command line? Or I need to specify the driver.. I read this in the man page for rdesktop:
Code:
-r printer:<printername>[=<driver>],...
Redirects a printer queue on the client to the server. The <printername> is the name of the queue in your local system. <driver> defaults to a simple PS-driver unless you specify one. Keep in mind that you need a 100% match in the server environment, or the driver will fail. The first printer on the command line will be set as your default printer.