On Dec 19, 2006, at 20:41 UTC, Chad Bullock wrote: > I'm trying to get a serial device to work (through a Keyspan serial->usb > converter)...though have run into some troubles.
For what it's worth, I have the same setup (using the Keyspan USA-19HS adapter from OS X), and it's working fine here. > For example, there's a simple command > that just turns the device on; this works perfectly in other terminal > emulator programs and turns the device on. When I setup a serial control in > RB (making sure the settings - baud, parity, etc are exactly the same), > there's no activity, and I can't turn on the device. I recently worked with one weird device that wouldn't talk to me properly until I changed the RequestToSend and DataSetReady lines. Most devices don't care about these, but this one used them for odd purposes and so I had to change the defaults. > I've tried messing around with the encoding of the text > string that's being sent, but am guessing I'm missing > something somewhere. Yes, these are just ASCII strings; encoding doesn't have much of anything to do with it. (The only way that'd be a problem is if you were sending UTF-16, but it's hard to imagine how you would do that accidentally.) > I won't even bother dealing with the Data Available data until > I can get this first part working - since they're probably related. But the data coming back might be informative... might as well at least throw in a System.DebugLog me.ReadAll and see if you get anything. > 1) even though the baud rate is set correctly (9600), is there a chance that > it's just sending too quickly....er something like that? I suppose it's possible. How exactly are you setting the baud rate? > 2) *something* must be different about how RB is sending the serial command > than other terminal apps, but I can't find any details specifically about > what special encodings, etc the other programs use, so I really don't know. That's because it's just ASCII data. Not much to say about that. > 3) I've tried converting the string before sending to ascii, and the other > normal ones I thought it might be, but still nothing. No, there wouldn't be, since ASCII is a subset of nearly every other encoding. The string "HI?" will be compiled as UTF-8, but also happens to be valid ASCII, valid Iso-Latin-1, valid MacRoman, and almost everything else too. Quit worrying about encodings; that's barking up the wrong tree. > Sorry for the long post, but can anyone think of any other > thing I could try on this? Well, the only things I can think of are either (a) you've selected the wrong port, and aren't speaking to the Keyspan adapter at all (make sure the blinky green light goes solid when you open the port); (b) you've failed to open the port; (c) you've somehow got the wrong speed/parity/stop bits/etc; or (d) you really do need a linefeed or CR after sending the command. If you get desperate, you should try to better define what's being sent over the wire by plugging it into another computer, which just receives and logs the data. Then do the command with a terminal program, and do it with your RB program, and see what's the difference. HTH, - Joe -- Joe Strout -- [EMAIL PROTECTED] Verified Express, LLC "Making the Internet a Better Place" http://www.verex.com/ _______________________________________________ Unsubscribe or switch delivery mode: <http://www.realsoftware.com/support/listmanager/> Search the archives of this list here: <http://support.realsoftware.com/listarchives/lists.html>
