added config_read() func to read device id and revision id
added testtest and tested savepattern a little