anchor.diff:  	(setq len (length data))
   	
   	
  -	(while (< pos (- len 1))
  -		(if (and (= (char (nth pos data))  0xa0) (<= (+ pos 4) len)) ;; ¶,ҳȳǰλ 2 λ
  -			(begin
  +	(while (< pos len)
  +		(cond
  +			((and (= (char (nth pos data))  0xa0) (< (+ pos 4) len)) ;; ¶,ҳȳǰλ 2 λ
  +				(begin
  +					(setq tmp nil)
  +					(setq short_address nil)
  +					(setq short_address (format "%04X" (get-int (reverse (slice data pos 2)))))
  +					
  +					;(setq tmp (| (<< (char (nth (+ pos 3) data) ) 8 ) (char (nth (+ pos 4) data) ) ) )
  +					(setq tmp (get-int (slice data 2 2)))
  +					(BASE (string  (slice short_address 0 4) "_TEMP") (int tmp))
  +					(save "base.lsp" 'BASE)
  +					(setq pos (+ pos 5))
  +				)
  +			)
  + 			((and (= (char (nth pos data))  0xa1) (< (+ pos 4) len)) ;; ¶,ҳȳǰλ 2 λ
  +				(begin
   				(setq tmp nil)
   				(setq short_address nil)
  -				(setq short_address (| (<< (char (nth (+ pos 1) data) ) 8 ) (char (nth (+ pos 2) data) ) ) )
  -				(setq tmp (| (<< (char (nth (+ pos 3) data) ) 8 ) (char (nth (+ pos 4) data) ) ) )
  -				
  -				(BASE (string (format "%04X" short_address) "_TEMP") tmp)
  +				(setq short_address (format "%04X" (get-int (reverse (slice data pos 2)))))
  +				(setq tmp (get-int (reverse (slice data 2 2))))
  +				(BASE (string  (slice short_address 0 4) "_HUMI") (int tmp));; humidity 
   				(save "base.lsp" 'BASE)
   				(setq pos (+ pos 4))
  -			)
  -			(and (= (char (nth pos data))  0x01) (<= (+ pos 2) len)) ;;;ȡӽڵ̵ַ
  +				)
  +			)		
  +			((and (= (char (nth pos data))  0x02) (< (+ pos 2) len)) ;;;ȡӽڵ̵ַ
   			(begin
   				(setq short_address nil)
  -				(setq short_address (| (<< (char (nth (+ pos 1) data) ) 8 ) (char (nth (+ pos 2) data) ) ) ) ;; ʽַ xx xx,鿴
  -				(setq sa_string (format "%04x" short_address) )
  +				(setq short_address (format "%04X" (get-int (reverse (slice data pos 2)))))
  +				(setq sa_string (slice short_address 0 4))
   				
   				(if (nil? (BASE "NODES"))
   					(begin
  
positive.code: 		(if (= (semaphore sid) 1)
  			(begin
  				(write_string_to_serial "d8 ff ff a0") ;; ʪ Ŀǰǹ㲥Ժñж̵ַľ׼ʽвѯ
  				(sleep 1000)
  			)
  			(= (semaphore sid) 1)
  			(begin
  				(write_string_to_serial "a0") 
  				(sleep 1000)
  			)
  			(= (semaphore sid) 1)
  			(begin
  				(write_string_to_serial "d8 ff ff a6")
  				(sleep 30000);; pm25 sleep at least 30 seconds
  			)
  			
  			(= (semaphore sid) 1)
  			(begin
  				(write_string_to_serial "d8 ff ff a8")
  				(sleep 1000)
  			)
  		)
  		
  		(sleep (* 10 1000));; 
  		(++ sleep_time)
  
negative.code: 
  (define (hextostring hex_buf); xxxxxxx to xx xx xx xx
  	(setq nr (length hex_buf))
  	(assert "hextostring length: " nr "\n")
  	(setq ret nil)
  	(setq dupstr (dup "b " nr))
  	
  	(if (> (length dupstr) 1)
  		(begin
  			(setq dupstr (chop dupstr 1))
  	
  		(setq upk_lst (unpack dupstr hex_buf))
  
  		(dolist (y upk_lst)
  			(extend ret (format "%02x " y))
  		)
  	
  		(setq ret (chop ret 1))
  		)
  	)
  )
  
  (define (strtohex str);;xx xx xx to hex
  