Recover Data from HTerm

Last week I had the task to logg XBee data with my laptop using the really great terminal program HTerm. After the crucial data arrived the program hang up and was unresponsive.

The first aid was to make a screenshot, but this recovers only the latest data but not the whole log.

Without closing the unresponsive window I opened the task manager went to applications and searched for HTerm. Then choosed the option showing the process. The next step is to „Create Dump file“ (or „Abbilddatei“).

To regain access to your data you have to search the dump file for your data. In my case I searched for GPS data lines starting with „$GPS“. So I wrote a little python script scanning all lines for this specific string and saving everything in a new log-file.

# -*- coding: utf-8 -*-
"""Recovery of data from HTerm
@author: michael russwurm

from __future__ import print_function

# open dump file
log_file = open("HTerm.dmp",'rb') 
recovered_data = open("recovered_data.log",'w')
for line in log_file:
    line = line.strip()
    if ('$GPS') in line:
        print (line)
    #else: # for debugging
input("Press Enter to exit.")

Kommentar verfassen

Trage deine Daten unten ein oder klicke ein Icon um dich einzuloggen:

Du kommentierst mit Deinem Abmelden / Ändern )


Du kommentierst mit Deinem Twitter-Konto. Abmelden / Ändern )


Du kommentierst mit Deinem Facebook-Konto. Abmelden / Ändern )

Google+ Foto

Du kommentierst mit Deinem Google+-Konto. Abmelden / Ändern )

Verbinde mit %s