case MENU_ITEM_WIFI_CONNECT:
   // Launch the DeviceListActivity to see devices and do scan
   try { 
              setSocket(ip, port);
              output = new BufferedOutputStream(socket.getOutputStream());

              MyThread a = new MyThread();
              a.checkUpdate.start();
              Toast.makeText(getBaseContext(), "WIFI 모듈과 연결되었습니다.", 0).show();
              wifiPaired = true;
            
         } catch (IOException e) {
             // TODO Auto-generated catch block
             //e1.printStackTrace();
                //Log.e("TCP", "C: Error2", e);
          Toast.makeText(getBaseContext(), "WIFI 모듈과 연결 에러발생.", 0).show();
         }   
   return true;

 

위 빨간부분에서 NullPointException 에러가 계속 나는데 원인을 모르겠습니다.  아시는분 부탁드립니다.

 

에러메세지는 첨부하였습니다. 감사합니다.