import sys
import subprocess

def get_eth_macaddr():
	try:
		output = subprocess.check_output(('ip', 'link', 'show', 'eth0'))
		lines = output.splitlines()
		macaddr = lines[1].split()[1]
	except Exception as e:
		macaddr = None
	return macaddr

def get_version():
	try:
		f = open("/etc/ak130_version.txt", "r")
		version = f.read()
		f.close()
	except Exception as e:
		version = None
	return version
