Tiny Core Linux

Tiny Core Base => Raspberry Pi => Topic started by: antord on February 21, 2015, 11:40:59 AM

Title: Serial port for printing on Till printer
Post by: antord on February 21, 2015, 11:40:59 AM
I have a pi B+ booting tinycore 6.0 and starting rdesktop automaticaly to a fixed internal ip running pos software on win 2008 rc server. I need to redirect the COM1 to ttyAMA0 which I believe i have done. -r comport COM1:ttyAMA0. I am going off the GND and Tx pins (3 an 4). The printer is a bematech MP-4200 TH.
This is the limit of my capabilities how can I test this is sending signals?
Is my wiring too simplistic do I need to attach other pins?
Would it be better to get a RS232 to DB9 converter board and do I need to get on with a voltage shifter? If so where I cannot find any..
and finally when accessing local ports from rdesktop am I the original tc user or do I change to the user for the server? (from my understanding I need to change permissions on the port to access it)
Sorry about all the questions. Any help would be greatly appreciated..
Anto
Title: Re: Serial port for printing on Till printer
Post by: Rich on February 21, 2015, 12:50:50 PM
Hi antord
If you are connecting to a serial port on the printer you need to convert the signal so it's RS-232 compatible. Googling for:
Code: [Select]
3.3v to rs232 converterwill return many sources. Make sure you pick one that is meant for 3.3 volt operation.

Here is an example of someone who added a converter:
http://www.davidhunt.ie/add-a-9-pin-serial-port-to-your-raspberry-pi-in-10-minutes/
Title: Re: Serial port for printing on Till printer
Post by: antord on February 21, 2015, 03:03:27 PM
Thanks Rich,
One ordered.
Anto
Title: Re: Serial port for printing on Till printer
Post by: antord on February 27, 2015, 06:16:41 PM
A final question.. Do I need to turn the serial port over to software rather then console. I think Pi 6.0 has the console enabled through the port but I cannot find where it has been setup.
Title: Re: Serial port for printing on Till printer
Post by: bmarkus on February 28, 2015, 01:09:30 AM
It is configured in cmdline.txt and started in /opt/bootlocal.sh
Title: Re: Serial port for printing on Till printer
Post by: antord on February 28, 2015, 08:04:33 AM
Thanks, I just commented out the line is that all that I need to do to cancel console output?
Title: Re: Serial port for printing on Till printer
Post by: antord on February 28, 2015, 11:08:41 AM
I think I need to edit something.  dmesg | grep tty shows console=ttyAMA0 in kernal command line. How will i edit this?
Title: Re: Serial port for printing on Till printer
Post by: antord on February 28, 2015, 11:34:48 AM
I think i have found it in /proc/cmdline but i cannot edit it even as su
Title: Re: Serial port for printing on Till printer
Post by: Rich on February 28, 2015, 11:46:19 AM
Hi antord
Maybe this is of some use:
http://www.hobbytronics.co.uk/raspberry-pi-serial-port
Title: Re: Serial port for printing on Till printer
Post by: bmarkus on February 28, 2015, 12:04:58 PM
I think i have found it in /proc/cmdline but i cannot edit it even as su

Mount /mnt/mmcblk0p1 and edit /mnt/mmcblk0p1/cmdline.txt When finished, umount it.
Title: Re: Serial port for printing on Till printer
Post by: antord on March 01, 2015, 05:56:50 PM
(https://lh6.googleusercontent.com/-Y3Va4Q3u2Ms/VPOXdhihqoI/AAAAAAAASRU/52kznM9xqxY/w1186-h879-no/IMG_20150301_224922.jpg)
Thanks for all the help .. mission successful.. a pos thinclient for 60 euro now to try a touch screen
Title: Re: Serial port for printing on Till printer
Post by: curaga on March 02, 2015, 12:23:42 PM
That's pretty involved when you can get "real" thin clients for less money and less trouble ;)

(though more power use if that matters)
Title: Re: Serial port for printing on Till printer
Post by: antord on March 05, 2015, 11:23:28 AM
where would the fun be in that?  :)
Title: Re: Serial port for printing on Till printer
Post by: sodface on March 05, 2015, 07:16:15 PM
where would the fun be in that?  :)

Exactly!  Good job with the progress!
Title: Re: Serial port for printing on Till printer
Post by: antord on March 06, 2015, 07:31:58 AM
I now need to change a few settings on the .config kernel module settings file. Where is it I cannot find it anywhere?
Title: Re: Serial port for printing on Till printer
Post by: bmarkus on March 06, 2015, 08:24:32 AM
sudo zcat /proc/config.gz