LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 11-10-2008, 01:53 AM   #1
Cottsay
Member
 
Registered: Feb 2004
Location: Chaska, MN
Distribution: Fedora
Posts: 195

Rep: Reputation: 31
USB Serial Interface


So I have this relay board that I got on eBay. It's supposed to work in linux via the ftdi_sio driver. It is able to activate a relay, but not deactivate a relay. I use this command:

echo $'\xff\x01\x01' > /dev/ttyUSB0

to activate and I'm supposed to use:

echo $'\xff\x01\x00' > /dev/ttyUSB0

to deactivate. If I send this to a file instead of /dev/ttyUSB0, I get nothing for the x00. I don't know if thats the way it's supposed to be, or what. I think the problem is that the command never passes a third value (x00) and so the relay ignores it. Is there a way to force a "null" value instead of nothing? Am I completely off?

Thanks,

Scott
 
Old 11-10-2008, 01:59 AM   #2
Cottsay
Member
 
Registered: Feb 2004
Location: Chaska, MN
Distribution: Fedora
Posts: 195

Original Poster
Rep: Reputation: 31
Nevermind, I added the "-e" option to echo (interpretation of backslash chars) and it works now.
 
Old 04-28-2009, 08:44 AM   #3
dchurch24
LQ Newbie
 
Registered: Apr 2009
Posts: 1

Rep: Reputation: 0
Hi

Hi, I am having the same problem, but the -e didn't fix it.

Do you have to power the relay board seperately?
 
Old 04-28-2009, 02:13 PM   #4
Cottsay
Member
 
Registered: Feb 2004
Location: Chaska, MN
Distribution: Fedora
Posts: 195

Original Poster
Rep: Reputation: 31
Yes, my relay board takes 12v of power. Just the USB power isn't enough to hold all 8 of the active relays on.

--scott
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Using USB<->Serial and serial gender changer to transmit data between computers JoeyAdams Linux - Hardware 4 04-17-2008 05:15 AM
Serial interface programming smallfire Programming 2 07-12-2006 09:24 AM
ttyS0 - I only have one serial interface, believe me. calutateo Linux - Hardware 3 06-25-2005 12:55 AM
zoom external serial with usb to serial adapter foustware Linux - Hardware 1 12-07-2003 02:02 AM
How to Change config to use USB serial interface hughmax Linux - Newbie 4 03-31-2003 03:34 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 01:48 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration