VT220 Emulation and RF Devices Log Out | Lost Password? | Topics | Search
Contact | Register | My Profile | SO home | MOL home

M-SO Message Board » Technology & The Internet » Archive through May 26, 2005 » VT220 Emulation and RF Devices « Previous Next »

  Thread Originator Last Poster Posts Pages Last Post
  ClosedClosed: New threads not accepted on this page          

Author Message
Top of pagePrevious messageNext messageBottom of page Link to this message

Brett
Citizen
Username: Bmalibashksa

Post Number: 1595
Registered: 7-2003
Posted on Thursday, April 7, 2005 - 9:29 am:   Edit PostDelete PostPrint Post   Move Post (Moderator/Admin Only)

Well here's a real shot in the dark:

We’ve written a Java Telnet server for a Warehouse Distribution Center. We tested this using QVT/Term and the screens all formatted correctly. But when we connect to the Telnet server using an RF Gun the screen doesn’t parse correctly.

The line 1;4H Title <- should print ‘Title’ on the first line starting on the fourth space. Instead it prints ‘4HTitle’. Skipping the 4H tag.
Top of pagePrevious messageNext messageBottom of page Link to this message

sullymw
Citizen
Username: Sullymw

Post Number: 530
Registered: 5-2001
Posted on Thursday, April 7, 2005 - 10:28 am:   Edit PostDelete PostPrint Post   Move Post (Moderator/Admin Only)

I am an old VT guy and I believe that you need an ESCAPE+[ before the 1;4H, like:

ESC[1;4H

Top of pagePrevious messageNext messageBottom of page Link to this message

Tom Reingold
Supporter
Username: Noglider

Post Number: 6209
Registered: 1-2003


Posted on Thursday, April 7, 2005 - 11:35 am:   Edit PostDelete PostPrint Post   Move Post (Moderator/Admin Only)

I don't understand what your question is.

I'm an old hand at terminal addressing and emulation. I used to code that stuff for a living. Fire away.
Top of pagePrevious messageNext messageBottom of page Link to this message

Brett
Citizen
Username: Bmalibashksa

Post Number: 1596
Registered: 7-2003
Posted on Thursday, April 7, 2005 - 12:01 pm:   Edit PostDelete PostPrint Post   Move Post (Moderator/Admin Only)

Your saying I should lead it with ESC[ ?

I've seen both ESC and CSI and I've also seen a bunch of Chars (<,>,[)
Top of pagePrevious messageNext messageBottom of page Link to this message

Tom Reingold
Supporter
Username: Noglider

Post Number: 6211
Registered: 1-2003


Posted on Thursday, April 7, 2005 - 12:13 pm:   Edit PostDelete PostPrint Post   Move Post (Moderator/Admin Only)

I guess your terminal manual doesn't list ESC[ because it's implied. Yes, all those sequences start with ESC[
Top of pagePrevious messageNext messageBottom of page Link to this message

sullymw
Citizen
Username: Sullymw

Post Number: 531
Registered: 5-2001
Posted on Thursday, April 7, 2005 - 12:14 pm:   Edit PostDelete PostPrint Post   Move Post (Moderator/Admin Only)

CSI is "ESC[". ESC can't just be the letters ESC, it must actually be the real Escape character (ASCII 27 I think)
Top of pagePrevious messageNext messageBottom of page Link to this message

Brett
Citizen
Username: Bmalibashksa

Post Number: 1597
Registered: 7-2003
Posted on Thursday, April 7, 2005 - 12:55 pm:   Edit PostDelete PostPrint Post   Move Post (Moderator/Admin Only)

So I should send 0xb1HTitle or 0xb1(some other char)HTitle to print Title?
Top of pagePrevious messageNext messageBottom of page Link to this message

Tom Reingold
Supporter
Username: Noglider

Post Number: 6213
Registered: 1-2003


Posted on Thursday, April 7, 2005 - 1:05 pm:   Edit PostDelete PostPrint Post   Move Post (Moderator/Admin Only)

Escape (0x1b) and then left square bracket (0x5b) and then capital H.

Did you write this in Windows or unix/linux? With unix (and linux) there are libraries (such as terminfo, curses) you should use which hide the terminal type. Then you can use any terminal at run time. Not sure how easy that is to do with Windows. When you use these libraries, you do things like position the cursor with a function call, rather than sending the actual escape sequences, which vary from one terminal type to the next.
Top of pagePrevious messageNext messageBottom of page Link to this message

sullymw
Citizen
Username: Sullymw

Post Number: 532
Registered: 5-2001
Posted on Thursday, April 7, 2005 - 1:16 pm:   Edit PostDelete PostPrint Post   Move Post (Moderator/Admin Only)

0x1b followed by the text "[1;4HTitle" to position to row 1, column 4. Any of the text can be replaced by its hex counterpart.
Top of pagePrevious messageNext messageBottom of page Link to this message

Brett
Citizen
Username: Bmalibashksa

Post Number: 1598
Registered: 7-2003
Posted on Thursday, April 7, 2005 - 1:21 pm:   Edit PostDelete PostPrint Post   Move Post (Moderator/Admin Only)

I’ll explain a little better.

We have a Legacy system running in a Warehouse in Michigan (Conagra). They want to run this system in another warehouse.

The telnet server was written in Java and is well over 2 Million lines of code. When you use a terminal Emulator (QVT/Term) or a Symbol RF gun., the screen displays well. But when I try to use a PerCon Falcon 325 RF gun the screen is wrong.

I tracked down some of the original developers and they said “Well it’s not exactly VT220 we had to tweak it”. Now I need to figure out that tweak.

Now luckily every String being sent to the RF device has to get parsed through a program called VT220 map, where things like the CGI and such are added. I’m guessing that this is the class that got tweaked.

This line is where I’m starting:

public static String getCursorPosition(int iRow,int iColm)
{
return (CSI + Integer.toString(iRow) + ";" +Integer.toString(iColm)+ "H" );

}

The CSI variable is the question.

ESC[ 1 ; 4H
[ 1;4H
0x1B1;4H
0x1B[1;4H

I’m lost
Top of pagePrevious messageNext messageBottom of page Link to this message

sullymw
Citizen
Username: Sullymw

Post Number: 533
Registered: 5-2001
Posted on Thursday, April 7, 2005 - 1:24 pm:   Edit PostDelete PostPrint Post   Move Post (Moderator/Admin Only)

the last one is correct, although you may need lower case '1b'. CSI is '0x1b['. I think if you just set the CSI variable to that, it will work
Top of pagePrevious messageNext messageBottom of page Link to this message

Brett
Citizen
Username: Bmalibashksa

Post Number: 1599
Registered: 7-2003
Posted on Thursday, April 7, 2005 - 1:28 pm:   Edit PostDelete PostPrint Post   Move Post (Moderator/Admin Only)

Wow that worked!!!!!

But now a lot of my text is followed by >21>121
Top of pagePrevious messageNext messageBottom of page Link to this message

sullymw
Citizen
Username: Sullymw

Post Number: 534
Registered: 5-2001
Posted on Thursday, April 7, 2005 - 1:34 pm:   Edit PostDelete PostPrint Post   Move Post (Moderator/Admin Only)

great....but I'm not sure what the >21>121 is. I've never seen that before. I know that the "H" replaced "f" in later versions of VT software. You may want to try replacing "H" with "f" just for the fun of it.

MOL rocks, eh?
Top of pagePrevious messageNext messageBottom of page Link to this message

Brett
Citizen
Username: Bmalibashksa

Post Number: 1600
Registered: 7-2003
Posted on Thursday, April 7, 2005 - 1:40 pm:   Edit PostDelete PostPrint Post   Move Post (Moderator/Admin Only)

It looks like some kind of screen lock.
Top of pagePrevious messageNext messageBottom of page Link to this message

Brett
Citizen
Username: Bmalibashksa

Post Number: 1601
Registered: 7-2003
Posted on Thursday, April 7, 2005 - 1:44 pm:   Edit PostDelete PostPrint Post   Move Post (Moderator/Admin Only)

Narrowed it down a little. The screen Formats correctly but when the Cursor moves to the location for the first entry it's followed by 21>121. Just need to hunt that down.

What is the Command for move Cursor to 3;6
Top of pagePrevious messageNext messageBottom of page Link to this message

sullymw
Citizen
Username: Sullymw

Post Number: 535
Registered: 5-2001
Posted on Thursday, April 7, 2005 - 2:02 pm:   Edit PostDelete PostPrint Post   Move Post (Moderator/Admin Only)

ESC[r;cH is the cursor position command.

ESC[2J clears the screen
Top of pagePrevious messageNext messageBottom of page Link to this message

Brett
Citizen
Username: Bmalibashksa

Post Number: 1602
Registered: 7-2003
Posted on Thursday, April 7, 2005 - 2:29 pm:   Edit PostDelete PostPrint Post   Move Post (Moderator/Admin Only)

Thanks, the ESC caommand was the answer. It looks like the system was using ">" and on your advice I changed it to "ESC["

The >21>12l Was negative / positive image
Top of pagePrevious messageNext messageBottom of page Link to this message

sullymw
Citizen
Username: Sullymw

Post Number: 536
Registered: 5-2001
Posted on Thursday, April 7, 2005 - 2:31 pm:   Edit PostDelete PostPrint Post   Move Post (Moderator/Admin Only)

glad it worked!
Top of pagePrevious messageNext messageBottom of page Link to this message

LibraryLady(ncjanow)
Supporter
Username: Librarylady

Post Number: 2407
Registered: 5-2001


Posted on Thursday, April 7, 2005 - 7:48 pm:   Edit PostDelete PostPrint Post   Move Post (Moderator/Admin Only)

Mr. LL says that this is the type of stuff that use to happen and you'd go down the aisle to the next cubicle and sak your buddy what to do. No more aisles, no more cubicles. MOL is the new virtual workplace!

Topics | Last Day | Last Week | Tree View | Search | User List | Help/Instructions | Credits Administration