WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Serial port for printing on Till printer  (Read 6367 times)

Offline antord

  • Newbie
  • *
  • Posts: 10
Serial port for printing on Till printer
« on: February 21, 2015, 08: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

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11285
Re: Serial port for printing on Till printer
« Reply #1 on: February 21, 2015, 09:50:50 AM »
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/
« Last Edit: February 21, 2015, 09:53:03 AM by Rich »

Offline antord

  • Newbie
  • *
  • Posts: 10
Re: Serial port for printing on Till printer
« Reply #2 on: February 21, 2015, 12:03:27 PM »
Thanks Rich,
One ordered.
Anto

Offline antord

  • Newbie
  • *
  • Posts: 10
Re: Serial port for printing on Till printer
« Reply #3 on: February 27, 2015, 03: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.

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Serial port for printing on Till printer
« Reply #4 on: February 27, 2015, 10:09:30 PM »
It is configured in cmdline.txt and started in /opt/bootlocal.sh
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline antord

  • Newbie
  • *
  • Posts: 10
Re: Serial port for printing on Till printer
« Reply #5 on: February 28, 2015, 05:04:33 AM »
Thanks, I just commented out the line is that all that I need to do to cancel console output?

Offline antord

  • Newbie
  • *
  • Posts: 10
Re: Serial port for printing on Till printer
« Reply #6 on: February 28, 2015, 08: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?

Offline antord

  • Newbie
  • *
  • Posts: 10
Re: Serial port for printing on Till printer
« Reply #7 on: February 28, 2015, 08:34:48 AM »
I think i have found it in /proc/cmdline but i cannot edit it even as su

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11285
Re: Serial port for printing on Till printer
« Reply #8 on: February 28, 2015, 08:46:19 AM »

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Serial port for printing on Till printer
« Reply #9 on: February 28, 2015, 09:04:58 AM »
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.
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline antord

  • Newbie
  • *
  • Posts: 10
Re: Serial port for printing on Till printer
« Reply #10 on: March 01, 2015, 02:56:50 PM »

Thanks for all the help .. mission successful.. a pos thinclient for 60 euro now to try a touch screen

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10980
Re: Serial port for printing on Till printer
« Reply #11 on: March 02, 2015, 09:23:42 AM »
That's pretty involved when you can get "real" thin clients for less money and less trouble ;)

(though more power use if that matters)
The only barriers that can stop you are the ones you create yourself.

Offline antord

  • Newbie
  • *
  • Posts: 10
Re: Serial port for printing on Till printer
« Reply #12 on: March 05, 2015, 08:23:28 AM »
where would the fun be in that?  :)

Offline sodface

  • Jr. Member
  • **
  • Posts: 90
Re: Serial port for printing on Till printer
« Reply #13 on: March 05, 2015, 04:16:15 PM »
where would the fun be in that?  :)

Exactly!  Good job with the progress!

Offline antord

  • Newbie
  • *
  • Posts: 10
Re: Serial port for printing on Till printer
« Reply #14 on: March 06, 2015, 04: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?