Wednesday, August 12, 2009

How to telnet to Vocality devices from Linux

How to telnet to Vocality VOIP (www.vocality.com) devices from Linux.
Alternative heading: How to make kermit behave like hyperterminal.

Target device: http://www.vocality.com/v150/ from here on caller V150
Linux Distribution: openSUSE 10.3 http://www.opensuse.org/

When one telnet from Linux or MacOS X to a V150 the Up and Down keys on the keyboard do not work, this makes navigation in the V150 near impossible. Along with the arrow keys that is not working there is also a problem with the combination keys like Ctrl+e. For long I have had a crooked workaround, that did not involve using hyperterminal. (I am fortunate enough to not have access to a MS device)

Today I took some timeout to configure kermit to give me the correct user experience. I chose to explore kermit for this application since I wish (its done now) to automate certain tasks.

I'll focus on configuring kermit for telnet only. You should install kermit yourself there are enough docs to help with that.

Edit you local users kermit startup file .kermrc located in your users home directory.
# vi ~/.kermrc

Add the following lines to that file.

SET TELOPT AUTHENTICATION REFUSE
SET TELOPT KERMIT REFUSE REFUSE
SET TELOPT NEW-ENVIRONMENT REFUSE
SET TELOPT NAWS REFUSE
SET TELOPT FORWARD-X REFUSE
SET TELOPT COM-PORT-CONTROL REFUSE
SET TELOPT AUTH REFUSE
SET TELOPT TERMINAL-TYPE REFUSED
SET TELNET BINARY-TRANSFER-MODE OFF
SET TELNET AUTHENTICATION FORWARDING OFF
SET TELNET AUTHENTICATION TYPE NONE
SET TELNET NEWLINE-MODE OFF
SET TELNET TERMINAL VT100


Most of the above is probably already in your ~/.kermrc file.
Next you launch kermit in network mode to you V150 device. For my example one of my V150 is on IP address 192.168.1.10

#kermit -J 192.168.1.10

That should give you control over the device as if you were accessing it form hyperterminal.

Some kermit:
http://www.columbia.edu/kermit/

The kermit escape key is “Ctrl+\
For help in the telnet session “Ctrl+\” then “?” this will guide you through the options.
To disconnect use “Ctrl+\” and “u

Sunday, February 1, 2009

Get data from busted ntfs partition.

Found a very cool and handy utility to recover data from an ntfs drive that was reformatted to FAT32.

http://memberwebs.com/stef/software/scrounge/

No need for me to explain the workings the documentation is good.

A friend was migrating from a Windows XP Laptop to a nice new Shiny MacBook. In the process he reformatted one of his USB 500GB drives, was NTFS, to FAT32 for cross compatibility. Unfortunately the backups of the drive was not good. So there we were a few Gig's of very good high quality photos gone. 

A hand full of standard unix tools and scrounge-ntfs has helped me to recover the data. Scrounge takes a few simple parameters one being the drive to scan and another a destination directory to dump the recovered file. 

for reference here is my executed command.
scrounge-ntfs -m 6291456 -o /data/d5/rescue /dev/sdf 63 1953546210

All in all scrounge-ntfs was easy to compile, clear documentation, simple parameter options and it works well, It saved the day.