473,395 Members | 1,422 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

I get error message „WARNING: terminal is not fully functional” when I use telnetlib

Hi Everybody,

I am a radio engineer who try making own working life easier by Python codes. In last time I used telnetlib to communicate to special shell of radio equipments. Everything is sunny until I apply any shell command which generates answer of more lines.

For example:

The next part of code gives back the correct part number of equipment


Expand|Select|Wrap|Line Numbers
  1.  tn.write("get part-number\n")
  2. pn = tn.read_until("inventory>", 15)
  3. print pn 
output on display: XC-123S

but, the next creates an error message: „WARNING: terminal is not fully functional”

Expand|Select|Wrap|Line Numbers
  1.  tn.write("show mrmc\n")
  2. response=tn.read_until("inventory>",15)
  3. print response
  4. tn.write("cd /radio/rfu\n")
output on display: WARNING: terminal is not fully functional

output on display should be:

IP-10:/interfaces/pdh/trails> show-all-trails
================================================== ========================
Legend: s/i/n/- 's'=slot-id 'i'=if-type 'n'=if-num '-'=Empty
s(0..6) i(l=line/r=radio/m=stm-1/c=chain/s=sync_ethernet) n(1..180)
================================================== ========================
Source Dest1 Dest2 Dest3 Dest4 Dest5 Dest6 Dest7 Dest8 Dest9
------------------------------------------------------------------------------
IndexInDb = 1, ID = TRAIL1, Desc = DefaultTrail1, Prio = high
Act = reserved, TS = (0)
0/l/ 1 0/r/ 1 - - - - - - - -
------------------------------------------------------------------------------
IndexInDb = 2, ID = TRAIL2, Desc = DefaultTrail2, Prio = high
Act = reserved, TS = (1)
0/l/ 2 0/r/ 2 - - - - - - - -
------------------------------------------------------------------------------
IndexInDb = 3, ID = TRAIL3, Desc = DefaultTrail3, Prio = high
Act = reserved, TS = (2)
0/l/ 3 0/r/ 3 - - - - - - - -
------------------------------------------------------------------------------
IndexInDb = 4, ID = TRAIL4, Desc = DefaultTrail4, Prio = high
Act = reserved, TS = (3)
0/l/ 4 0/r/ 4 - - - - - - - -
------------------------------------------------------------------------------

If I switch on debugging I see the correct answer of equipment but telnetlib could not give over multi-line answer to variable ’response’.

Telnet(10.128.90.209,23): send 'show mrmc\n'
Telnet(10.128.90.209,23): recv 'show mrmc\r\n'
Telnet(10.128.90.209,23): recv 'WARNING: terminal is not fully functional\r\n\r\x00- (p'
Telnet(10.128.90.209,23): recv 'ress RETURN)'
' show-all-trails\r\nWARNING: terminal is not fully functional\r\n\r- (press RETURN)'
Telnet(10.128.90.209,23): send '\r\n'
Telnet(10.128.90.209,23): send 'cd /radio/rfu\n'
Telnet(10.128.90.209,23): recv '\r\x00\r\x00'
Telnet(10.128.90.209,23): recv '================================================= ='
Telnet(10.128.90.209,23): recv "========================\r\nLegend: s/i/n/- 's'=slot"
Telnet(10.128.90.209,23): recv "-id 'i'=if-type 'n'=if-num '-'=Empty\r\n s(0."
Telnet(10.128.90.209,23): recv '.6) i(l=line/r=radio/m=stm-1/c=chain/s=sync_ethern'
Telnet(10.128.90.209,23): recv 'et) n(1..180)\r\n==================================='
Telnet(10.128.90.209,23): recv '=======================================\r\nSource D'
Telnet(10.128.90.209,23): recv 'est1 Dest2 Dest3 Dest4 Dest5 Dest6 De'
Telnet(10.128.90.209,23): recv 'st7 Dest8 Dest9\r\n-----------------------------'
Telnet(10.128.90.209,23): recv '-------------------------------------------------\r'
Telnet(10.128.90.209,23): recv '\nIndexInDb = 1, ID = TRAIL1, Desc = DefaultTrail1,'
Telnet(10.128.90.209,23): recv ' Prio = high\r\nAct = reserved, TS = (0) \r\n0/l/ 1 0'
Telnet(10.128.90.209,23): recv '/r/ 1 - - - - - -'
Telnet(10.128.90.209,23): recv ' - - \r\n-----------------------------'
Telnet(10.128.90.209,23): recv '-------------------------------------------------\r'
Telnet(10.128.90.209,23): recv '\nIndexInDb = 2, ID = TRAIL2, Desc = DefaultTrail2,'
Telnet(10.128.90.209,23): recv ' Prio = high\r\nAct = reserved, TS = (1) \r\n0/l/ 2 0'
Telnet(10.128.90.209,23): recv '/r/ 2 - - - - - -'
Telnet(10.128.90.209,23): recv ' - - \r\n-----------------------------'
Telnet(10.128.90.209,23): recv '-------------------------------------------------\r'
Telnet(10.128.90.209,23): recv '\nIndexInDb = 3, ID = TRAIL3, Desc = DefaultTrail3,'
Telnet(10.128.90.209,23): recv ' Prio = high\r\nAct = reserved, TS = (2) \r\n0/l/ 3 0'
Telnet(10.128.90.209,23): recv '/r/ 3 - - - - - -'
Telnet(10.128.90.209,23): recv ' - - \r\n-----------------------------'
Telnet(10.128.90.209,23): recv '-------------------------------------------------\r'
Telnet(10.128.90.209,23): recv '\nIndexInDb = 4, ID = TRAIL4, Desc = DefaultTrail4,'
Telnet(10.128.90.209,23): recv ' Prio = high\r\nAct = reserved, TS = (3) \r\n0/l/ 4 0'
Telnet(10.128.90.209,23): recv '/r/ 4 - - - - - -'
Telnet(10.128.90.209,23): recv ' - - \r\n-----------------------------'
Telnet(10.128.90.209,23): recv '-------------------------------------------------\r'
Telnet(10.128.90.209,23): recv '\n\r\x00IP-10:/interfaces/pdh/trails> cd /radio/rfu\r\nIP'
Telnet(10.128.90.209,23): recv '-10:/radio/rfu> '
Telnet(10.128.90.209,23): send 'get rx-level\n'
T

I have been googling and reading documentation a lot of to eliminate my issue without any success.

I work on SunOS with python 2.4.4

Any help would be very useful. Thanks, Gyorgy
Nov 10 '12 #1
0 1482

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Hong | last post by:
Hi, I am trying to create a switch but I do not know why I am geting an error message, can someone tell me what is wrong, Error Message; Warning: Unexpected character in input: '\'...
0
by: joeycalisay | last post by:
I sometimes encounter the above message when using Command Window eventhough it (CW) exposes a valid command signature with intellisense. Just now, I was able to research on the newsgroups about...
3
by: Trevor Andrew | last post by:
Hi There, I have a small ASP.NET application under development. I am using VS.NET 2002 (2003 upgrade is on the way) with .NET Framework 1.1. It is hosted on a web hosting service in the US. I am...
23
by: Xah Lee | last post by:
The Concepts and Confusions of Pre-fix, In-fix, Post-fix and Fully Functional Notations Xah Lee, 2006-03-15 Let me summarize: The LISP notation, is a functional notation, and is not a...
2
by: Joe Delphi | last post by:
Hi, I am writing an ASP.NET application that connects to a Microsoft Access database using the OleDB data controls. I keep getting this error message: "The Microsoft Jet database engine...
30
by: Xah Lee | last post by:
The Concepts and Confusions of Prefix, Infix, Postfix and Fully Functional Notations Xah Lee, 2006-03-15 In LISP languages, they use a notation like “(+ 1 2)” to mean “1+2”....
2
by: techjohnny | last post by:
Error: Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/jplane/certcent/phpweb/quiz/index.php on line 20 Warning: mysql_num_rows(): supplied argument is...
10
by: asit | last post by:
Are warnings equally dangerous like errors ???? What is the difference between errors and warnings ??
6
anfetienne
by: anfetienne | last post by:
hi ive been using a login code which uses sql & db its quite simple and has been working great.....but as i have just gone to do a final test on the site i've built starting from the login page i get...
3
anfetienne
by: anfetienne | last post by:
Hi all, this is real simple, I've written this code so I can duplicate images/files after uploading it with jumploader (this doesn't allow for duplicates during the upload process like standard...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.