CAPWAP implementation

Hi
I'm trying to implement CAPWAP protocol for my application.i'm able to configure my server side but i'm getting error at client(WTP) side as IOCTL error.while running the command

                                 #./WTP /mnt/cf/capwap/ 



  : wlan2  
  Starting WTP...  
 [Admin@MTM6 capwap]#  WTP Loads Configuration  
  </WTP_FORCE_MTU>1500  
  </AC_LOG_FILE_ENABLE>1  
  </AC_LOG_FILE_SIZE>30000000  
  WTPDriverInteraction.c 230 Ioctl error Error Init Configuration  

please anyone help me how to debug it.i'm using open source code.i have changed the interface wl0 to my interface of WTP

Thank you