scan mac

update! scan mac
add the learning code