Current Cost Support Forum

A support forum for Current Cost users, partners and developers. Covering hardware, software and web.
Site Announcements

The support forum is moderated Monday to Friday, UK time. To submit a support ticket, please email: helpme [at] currentcost .com

It is currently Thu Mar 28, 2024 8:43 pm

All times are UTC [ DST ]




Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
PostPosted: Mon May 13, 2013 4:04 pm 
Offline

Joined: Mon May 13, 2013 3:45 pm
Posts: 1
I have my currentcost envi + data cable plugged into a sheevaplug (linux on arm). After about a month, the envi stops sending data on the usb serial port. Unplugging/replugging the usb connector does not help; I have to unplug the usb connector and power cycle the envi.

Is there newer firmware I can use? It is very annoying.

I've got some C code which polls the device. This is how it is opened:

nt currentcost_open(int *fd_ret, const char *path)
{
int rc, fd;

fd = TEMP_FAILURE_RETRY(open(path, O_RDWR | O_NOCTTY | O_NDELAY | O_CLOEXEC));
if (fd == -1)
return errno;

struct termios termios;

rc = TEMP_FAILURE_RETRY(tcgetattr(fd, &termios));
if (rc == -1) {
rc = errno;
TEMP_FAILURE_RETRY(close(fd));
return rc;
}

// 57600 8N1 no flow control (hardware or software)
cfmakeraw(&termios);
cfsetspeed(&termios, B57600);
termios.c_iflag &= ~(INPCK | IXON | IXOFF);
termios.c_cflag &= ~(CSTOPB | CRTSCTS);

rc = TEMP_FAILURE_RETRY(tcsetattr(fd, TCSAFLUSH, &termios));
if (rc == -1) {
rc = errno;
TEMP_FAILURE_RETRY(close(fd));
return rc;
}

*fd_ret = fd;

return 0;
}


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 10 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group