Koozali.org: home of the SME Server

Using minicom macros

Offline axessit

  • *****
  • 213
  • +0/-0
Using minicom macros
« on: May 05, 2008, 06:31:38 PM »
I have a device connected to a serial port on my SME 7.3 box which I need to "telnet" to or something.

I can use Minicom to connect to the device, but it needs to see a "PF1" key press that you get on a dumb vt100 keyboard. I am trying to work out how to use the macros, and it doesn't seem to work. For now, I have programmed a macro for the F1 key that simply spits out a text string, and I have Hyperterm hookd up to the serial port to test it. While I can communicate in normal mode (ie type on the SME keyboard and it comes up on the Hyperterm screen and vice versa) when I press the F1 key, nothing comes up on the screen.

I created a macro file, and if I ipdate the macro in minicom, it changes the data in the macro file, so I figure that's working.

How to I get minicom to send the text macro ?

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: Using minicom macros
« Reply #1 on: May 05, 2008, 07:50:49 PM »
How to I get minicom to send the text macro ?

I don't think this is the right place for you to be asking that question. You should try to find a different forum or mailing list which is more specific to minicom. Very few people here ever use minicom.

Be sure to read the documentation thoroughly, including whatever you can find on the web.

Offline warren

  • *
  • 293
  • +0/-0
Re: Using minicom macros
« Reply #2 on: May 05, 2008, 11:36:09 PM »
Axessit,

I not exactly sure from your description what it is you want to achieve ?  Do you need to communicate interactively with the device : ie send contents of macro, then read the response from the device ?

However , if for example you have a file called "macro.txt", and this file contains the
 VT100 "PF1" escape sequence ( from memory think its : "ESC O P " ), then you could simply
cat macro.txt > /dev/ttyS0  ( if device connected to com port1 ).

Also do a google search on " Serproxy", this is piece of software that will enable you to talk to a serial port / device attached to serial port.

I also have a php app that talks to a modem on a serial port in much the same way, the difference is that the php app controls what is  piped to the serial port and therefore to the modem.

Hope this helps some.

warren

Offline axessit

  • *****
  • 213
  • +0/-0
Re: Using minicom macros
« Reply #3 on: May 05, 2008, 11:50:36 PM »
Yes i am trying to interact with the device, I need to use the PF1 through PF 4 keys to access a menu onboard the device. And yes, i have the ESC OP, ESC OQ, ESC OR and ESC OS programmed.

It works with hyperterm to the device, but i want to access the device occasionally via remote VPN and SSH into my SME.

I'll look for serproxy.

Offline warren

  • *
  • 293
  • +0/-0
Re: Using minicom macros
« Reply #4 on: May 06, 2008, 08:43:53 AM »
Axessit,
If you have the escape sequences programmed, the nyou could have a files : PF1, PF2, PF3, PF4
If you need to send PF1, then logon via ssh of via vpn as per normal, then do :
# cat PF1 > /dev/ttyS0  to send to the device the ESC OP
# cat PF2 > /dev/ttyS0  and so on...

warren

Offline axessit

  • *****
  • 213
  • +0/-0
Re: Using minicom macros
« Reply #5 on: May 06, 2008, 10:28:02 PM »
Thanks for all the help. The device is a security controller, and uses a built in VT100 interface to present information and a menu structure to programme it. It is an interactive interface. I have installed serproxy, managed to get it to work on Com port 6 (I have some extra com ports in my machine for fax modems, UPS monitoring). I can use Hyperterm to send the F1 -F4 keys.

Once again, thanks for all your help and advice. :cool: