EPSON TM-T20II printing using RPI2 - linux

I am attempting to print a text document using a RPi 2 but when I attempt to print the printer just prints out unreadable text eg:-
#EJL 1284.4
#EJL
JSGUTENPRINTPMMIɸüüüüüÖüüüüüÖüüüüüÖüüüüüÖüüüüü
ÖüüüüüÖüüüüüÖüüüüüÖüüüüüÖüüüüüÖüüüüüÖüüüüüÖüüü
üüÖüüüüüÖüüüüüÖüüüüüÖüüüüüÖüüüüüÖ etc...
This is using the Epson Stylus T20 - CUPS+Gutenprint v5.2.9 (en) driver that came with CUPS.
When I attempt to use the driver from the Epson site I get the following error in CUPS:-
Idle - "File "/usr/lib/cups/filter/rastertotmt" not available: No such file or directory"
Has any one else had this issue, or does anybody know where I am able to get an armhf epson printer driver?
Hardware/Software Info:-
PRETTY_NAME="Raspbian GNU/Linux 7 (wheezy)"
NAME="Raspbian GNU/Linux"
VERSION_ID="7"
VERSION="7 (wheezy)"
Raspberry Pi 2 Model B
CUPS 1.5.3
Gutenprint v5.2.9
If there is any more info you need please ask.
Thank you in advance.

Skip CUPS and install this ESC/POS manipulation library for python.
Just tested it with RPI2 & Raspbian.

I tried the package from plinth666 but the raster wasn't quite proper and the print timing waas quiet long.
I used then a bunch of free code from Epson, a PPD file from another printer and modify them to produce this new package: https://github.com/groolot/epson-tm-t88v-driver
Better rasterization, cash drawer and buzzer, all is operational.
Hope that could help someone like I was: in pain.

Related

Could not open camera using gphoto2 in python

I try to control a Sony Alpha using Python/gphoto2 on a Raspberry PI. I've tried a number of python bindings (python-gphoto2, gphoto2-cffi, ...) but they all fail at the instruction to create a camera object (eg. my_cam = gphoto.Camera()) with the error:
"Could not claim interface 0 (Device or resource busy). Make sure no other program (gvfs-gphoto2-volume-monitor) or kernel module (such as sdc2xx, stv680, spca50x) is using the device and you have read/write access to the device."
We tried to kill background programs, make sure the kernel modules are not running, install the latest versions of the libraries and python packages, ... but could not get rid of the error. Furthermore C code using libgphoto2 works fine so it's not likely that the resource is really busy. We suspect the problem is missing USB libs in the python packages, and have tried to install libusb-dev, ... but it doesn't help.
Any suggestions what else we should try? Thanks.
You mentioned trying python-gphoto2. I'm the author of that package. Assuming you have installed it successfully then I'd try the list-cameras.py example program. It should list any cameras recognised by libgphoto2 that are connected and switched on.
If C programs are working but Python ones aren't you could check that they're using the same versions of libgphoto2. Try ldd on the C program's executable and on one of the python-gphoto2 compiled modules, e.g. /usr/local/lib/python3.5/dist-packages/gphoto2/_camera.cpython-35m-arm-linux-gnueabihf.so.

Adding kernel module to Debian

I have imx6-quad and Debian Jessie installed on it. Here is the full info about (uname -a):
Linux linaro-alip 4.1.15-g5599520 #1 SMP PREEMPT Sun Jan 8 13:03:20 IST 2017 armv7l GNU/Linux
I'm trying to run tunslip application for CC1350 Launchpad, but there is no kernel module "tun" in my OS. When I run command modprobe tun, I given an error:
modprobe: FATAL: Module tun not found.
At this point, I don't know how to install tun module to my Debian. I even don't know where to start. Is it possible to add tun module to running operation system or should I compile whole kernel from scratch? If I can add kernel module, how could I add to running OS?
Any help is too precious for me.
So, to sum up the discussion in the comments in case someone else will come here with the same problem:
Unfortunately, the precompiled kernel image provided by Variscite here doesn't come with tun support at all. Neither in modules nor compiled into the kernel.
If you want tun support, you will have to compile the kernel in your own. Sources can be found here on github.
Previous Answer:
Since I'm not allowed to comment yet, please take this less as an answer but more as a suggestion where to look for a solution.
What does the following command give you?
cat /boot/config-4.1.15-g5599520 | grep CONFIG_TUN
It should say CONFIG_TUN=m. If it doesn't, it may be that your kernel already supports tun devices.
Have you tried searching for tunmodules in /lib/modules? If not, run
find /lib/modules/ -name '*tun.ko*'
and let us know what it gives you.
as you are building your kernel. there are a couple of methods one is to compile the module separately and to install it on the existing image. The other is to create the tun module along with the kernel and the sdcard image creation will take care of your module.
TO build tun module. use menuconfig from the kernel folder. search for something matching to CONFIG_TUN if its is a module change its value to m. Rebuild and create the sdcard again. This is the easy way.
You can also craete the module separately and then bring the module to your filesystem but that can be more error prone.

XRUSB raspberry pi

I'm working with a raspberry pi connected with xrusb to a controller using python.I use make file to Compile and install the common usb serial driver module and it works fine. After reboot i have problem. The driver is lost. I have to install the module again using this
modprobe usbserial
insmod ./xr_usb_serial_common.ko
Any idea?
Now my answer might be off because of the way you say "install the driver". I bet the make script most likely just loaded the driver just like you did via modprobe.
In order to get the module to be loaded at boot time, you need to tell udev what to load/do during bootup. And tell the kernel to load your driver.. Otherwise it assumes you don't want it to be loaded at boot time.
Either you can do a automatic module handling via:
#nano /etc/modules-load.d/usbserial.conf
usbserial
or, you can specify options:
#nano /etc/modprobe.d/usbserial.conf
options usbserial parameter_name=parameter_value
Here's some documentation on how this works:
http://man7.org/linux/man-pages/man5/modules-load.d.5.html
https://wiki.archlinux.org/index.php/kernel_modules
(Even if you're not running Arch on your RPi, they still have one of the best documentation websites for Linux out there. User friendly, in depth etc. So apply the information there to your Distribution, they should be very much the same this day and age)
I found maybe a temporary solution so i can finish my project and look for the best way later.
I make a script to run after reboot to load the driver.
use:
sudo crontab -e
then go to the bottom and write
#reboot bash /your/path/script/script.sh
`

how to use XBMC with frame buffer?

We have cross-compiled XBMC for a Set-top-Box, board with Intel graphics card.
When I run XBMC , we are getting the following errors:
10:20:09 T:3053991728 M:527937536 ERROR: CXRandR::Query - unable to open xrandr xml
10:20:09 T:3053991728 M:527945728 NOTICE: Setup SDL
10:20:09 T:3053991728 M:529735680 FATAL: XBAppEx: Unable to initialize SDL: DirectFBCreate: Initialization error!
I do have all the related libraries and have linked the same thru LD_LIBRARY_PATH , Does any one know how to configure XBMC to use the FrameBuffers.
Any quick help in this regard is of great help.
Thanks in advance,

Beagleboard Angstrom Linux, Image Capture Script streamer alternative

I want to take a snapshot from my logitech webcam with desired resolution and save the image by using linux bash script. I need to do it on my beagleboard with Angstrom image. In my beagleboard i can capture with using cheese. But i dont know how to capture in terminal with script.
In my host computer i am using streamer with
streamer -c /dev/video0 -b 16 -o outfile.jpeg
But i dont know how to take snapshots in Angstrom. Can you make suggestions?
How can i capture with command line?
Regards
I've used mjpg-streamer with some success. It sends a video stream through port 8080, although you can change that by editing the startup script.
I used instructions from here, although I skipped the make install part and just run it off my home directory. Worked both with the default Angstrom image and with Debian running off the SD card (i.e., non-flashed).
You can view the stream by pointing your browser (either local or over-the-LAN) to http://beagle.address:8080/?action=x, where x is stream or snapshot. I trust those parameters are self-explanatory :).
You can use a text-based browser such as links to open the URL, and links will then prompt you for the filename of the image. That's for testing, then I suppose you can find a way to save the snapshot without human intervention if you intend to use it from a script.
I'm using gstreamer to capture webcam input on Beaglebone using a logitech webcam. You'll need gstreamer with gstreamer-utils installed. I'm using Ubuntu and they can be found from the standard repos. Here's the CLI command:
gst-launch v4l2src num-buffers=1 ! ffmpegcolorspace ! video/x-raw-yuv,width=320,height=240 ! jpegenc ! filesink location=test.jpg
Unfortunately, I'm experiencing some issues after some images as the pipeline freezes on v4l2src. Maybe you'll have better luck with your setup.

Resources