import binascii


def hex_to_str(hexv):
    """Convert hex value into byte string."""
    hstr = "{:02x}".format(hexv)
    if len(hstr) % 2 == 1:
        hstr = "0"+hstr
    return binascii.unhexlify(hstr)