anchor.diff:  
   			)
   		)
  -	)
  -	cmd_line
  +		(and (not (nil? cmd)) (nil? str)) ;; ʾֻûв
  +		(begin
  +			(assert "only cmd \n")
  +			(cond 
  +				((= (trim cmd ) "AT+PING") ;; ûвͱʾǷڵģǷĳ豸
  +						(setq cmd_line (string "70 69 6e 67"))
  +				)
  +				((= (trim cmd) "AT&ROUTER")
  +					(setq cmd_line (string "e0"))
  +				)
  +				((= cmd "AT&COORDI")
  +					(assert "set to coordi\n")
  +					(setq cmd_line (string "c0"))
  +					(assert cmd_line)
  +				)
  +			)
  +		)
  +	)
   )
   
   (define (parse_atcmd str)
   	(setq ret nil)
  +	
   	(cond 
   		((starts-with str "AT+")
  -			(setq tmplst (parse str "="))
  -			(setq cmd (tmplst 0) )
  -			(if (> (length  tmplst) 1)
  -				(begin
  -					(setq content (tmplst 1))
  -				)
  -			)
  -			(setq ret (make_serial_cmd cmd content) )
  +			(begin
  +				(setq tmplst (parse str "="))
  +				(setq cmd (tmplst 0) )
  +				(setq content nil)
  +				(if (> (length  tmplst) 1)
  +					(begin
  +						(setq content (tmplst 1))
  +					)
  +				)
  +				(setq ret (make_serial_cmd cmd content) )
  +			)
   		)
   		( (starts-with str "AT&")
  -			(setq tmplst (parse str "="))
  -			(setq cmd (tmplst 0))
  -			(if (> (length tmplst)  1)
  -				(begin
  -					(setq content_lst (parse ( tmplst 1 ) ","))
  -				)
  -			)
  -			(setq ret (make_serial_cmd cmd content_lst) )
  +			(begin
  +				(setq tmplst (parse str "="))
  +				(setq cmd (tmplst 0))
  +				
  +				(setq content_lst nil)
  +				(if (> (length tmplst)  1)
  +					(begin
  +						(setq content_lst (parse ( tmplst 1 ) ","))
  +					)
  +				)
  +				(make_serial_cmd (nth 0 tmplst) content_lst)
  +				(setq ret (copy cmd_line))
  +			)
   		)
   	)
   	
  
positive.code: 				
  				(setq read_data (read_serial dev) ) ;; ԶȴݵĽͻȻzigbeeˣҲ˳
  				;(sleep 100);;; make a delay to make sure data received
  				(if (= (share talk) 1)
  					(begin
  						(share content read_data)
  
negative.code: (define (getpid) (sys-info 7))
  
  (define (assert)
  	
  	(setq ret  "") 
  	;(doargs (i) (extend ret (string i))) 
  	
  	(dolist (x (args))
  		(extend ret (string x))
  	)
  	(write 1 ret ) ;; ǿʾstdout
  )
  
  