2013-05-27 66 views
1

我遇到了在osx獅子上閃動我的asuro的問題。OSX上閃爍的Asuro機器人(Arexx)

經過一些修正程序con_flash的來源,如某些論壇建議,它已成功編譯。

紅外設備正在工作,我可以通過screen命令向/從其他記事本發送/接收數據。我甚至可以接收來自asuro的本地IR信號(如Starting XYZ-test...)。

機器人絕對不會破損,他可以在窗戶上閃現。這是一個osx問題,論壇條目表明其他用戶也有問題。但是沒有提供解決方案。

domain:asuro mike$ sudo con_flash /dev/tty.usbserial-AXWAUG8P Asuro\ 020.hex 
ASURO Flash Copyright (c)2003-2004 DLR RM 
ASURO Flash comes with 
ABSOLUTELY NO WARRANTY 
This program is free software 
you can redistribute it and/or modify 
it under the terms of the 
GNU General Public License 
as published by 
the Free Software Foundation 
either version 2 of the License 
or any later version 


ASURO Flash Tool 
Version 1.2 
Author: Jan Grewe 
(c)DLR 2003-20004 
Linux Version 

. 
Open /dev/tty.usbserial-AXWAUG8P --> # always freezes here 



^Cdomain:asuro mike$ 

EDIT 問題在於通過open命令打開設備。甚至沒有工作,因爲我硬編碼的設備名稱!

bool CPosixSerial::Open(char* port) 
{ 
char text[256]; 

#ifdef LINUX 
/* 
#elif defined(Q_OS_IRIX) || defined(_OS_IRIX_) 
    sprintf(portName,"/dev/ttyf%d",port+1); 
#elif defined(Q_OS_HPUX) || defined(_OS_HPUX_) 
    sprintf(portName,"/dev/tty1p%d",port); 
#elif defined(Q_OS_SOLARIS) || defined(_OS_SOLARIS_) 
    sprintf(portName,"/dev/ttyS%d",port); 
#elif defined(Q_OS_ULTRIX) || defined(_OS_ULTRIX_) 
    sprintf(portName,"/dev/tty%02d",port+1); 
*/ 
#else 
#error Wrong OS only LINUX implemented 
#endif 

    strcpy(m_portName,port); 
    m_portHandle = open ((const char*)m_portName, O_RDWR | O_NOCTTY); 

    if (m_portHandle == -1) { 
     sprintf(text,"Could not open %s\nAlready in use ?!?!\n",m_portName); 
     MyMessageBox(text); 
     return false; 
    } 

    // configure port settings 
    tcgetattr(m_portHandle, &CommConfig); 

    // 2400 Baud 
    cfsetspeed(&CommConfig, B2400); 

    // Data Size 8-Bit/1 Stop Bit/No Parity/No Flow Control/Zero TimeOut 
    CommConfig.c_cflag = (CREAD | CLOCAL | CS8); 
    CommConfig.c_lflag = 0; 
    CommConfig.c_oflag = 0; 
    CommConfig.c_iflag = 0; 
    CommConfig.c_cc[VMIN] = 0; 
    CommConfig.c_cc[VTIME]= 0; 

    cfsetispeed(&CommConfig, B2400); // fix for osx 
    cfsetospeed(&CommConfig, B2400); // fix for osx 

    // Set DTR & RTS 
    ioctl(m_portHandle, TIOCMSET, TIOCM_DTR | TIOCM_RTS); 

    if (tcsetattr(m_portHandle, TCSAFLUSH, &CommConfig)) { 
     sprintf(text,"Can't write port settings on %s\n",m_portName); 
     MyMessageBox(text); 
     return false; 
    } 

    return true; 
} 

我會嘗試找出如何screen在OSX上的作品,也許我可以適應的funcionality。

回答

0

我使用的是最新版本的con_flash(http://www.arexx.com/downloads/asuro/asuro_flash_linux_mac_src.zip)並且有同樣的問題。

我發現在德國Roboternetz論壇解決方案:使用/dev/tty.usbserial*你必須使用/dev/cu.usbserial*不使用顯然握手 http://www.roboternetz.de/community/threads/59640-osx-asuro-flash-tool?p=565801&viewfull=1#post565801

代替。我還沒有完全理解這個區別。

+0

Thx,但我無法再測試它了。 – mike