2013-04-28 21 views
0

我有一臺打印機RW420和Zsdk'm使用打印出來,因爲我通過斑馬線的設置實用程序的詳細配置引腳,當我嘗試打開穿過運行MAC地址與它的連接軟件的Android 4.0它打開屏幕,詢問腳兩次,不能在logcat中返回bluez.Error.AlreadyExists日食的連接,然後第二個錯誤connectionAttemptFailed(主機關閉)。任何人都設法使用這臺打印機和Android執行打印?有什麼不同嗎?使用Zsdk或類爲android的本地通信?斑馬rw420錯誤的Android藍牙的Xperiaü

我測試的代碼是這樣的:

MacAdd String = "00037A67EF08"; 
BluetoothPrinterConnection myConn = new BluetoothPrinterConnection (macAdd); 
PrinterCommandImpl cmdGetFirmware PrinterCommandImpl = new ("! U1 getvar \" appl.name \   "\ r \ n"); 

try { 

    // Open connection to printer. This requires que 
    // The devices already be paired. 
    myConn.open(); 

    // Send command to printer and wait for 8000 ms response 
    byte [] response = cmdGetFirmware.sendAndWaitForResponse (myConn, 8000, 200); 

    // Display the responses in a TextView 
    // Status.setText (new String (response)); 
    String s = new String (response); 

    // Close connection 
    myConn.close(); 
} Catch (Exception ex) { 
// Catch error here 
} 

什麼可以幫助的,因爲我對這個問題的一個星期,無法脫身的地方!也許是一個實際工作的代碼示例。

謝謝

回答

0

雖然這不一定是一個編程的答案,與舊固件的Zebra打印機具有藍牙不一致的屈指可數。可能值得檢查打印機的固件並確保它是最新的。您需要知道打印機的PCC數(應該是標籤打印機的底部),以確定所需的固件。

www.zebra.com/firmware

還有Android市場被稱爲「斑馬實用程序」,是爲了幫助演示斑馬SDK功能上的免費應用程序。您可能需要下載的應用程序,看它是否能與RW溝通420