import wibohost
import pprint
import time

if __name__ == '__main__':
	wh = wibohost.WIBONetwork(port='COM4',baudrate=38400, timeout=1.0)
	time.sleep(0.1) # wait boot printout
	
	print "-- Initial --"
	print wh.nodes
	
	print "-- Scan --"
	wh.scan(range(1,20))
	print wh.nodes
	
	print "-- JBootl --"
	wh.jbootl(0xFFFF)
	wh.scan(range(1,20))
	print wh.nodes

	print "-- Filter --"
	wh.filter_board('radiofaro')
	print wh.nodes
# EOF
