Satellite communications via RS232 connection
Archiver
Posts: 46,084
Hello Everybody,
I would like to use a BS2 and the serial connection on a Board of
Education to send preprogrammed messages and commands via a satellite
modem. The modem uses RS422 (DB25 connector) so I purchased a RS232 -
RS422 port powered converter (B&B Electronics part # 422LP9TBN
www.bb-elec.com).
I have successfully sent the following commands via PC HyperTerminal:
<enter>
echo off <enter>
send gps fix <enter>
I can monitor the fix arriving at the ground station via telnet.
I have also successfully programmed the following into the BS2 and
observed its execution via HyperTerminal.
'Send text via sat terminal test
loop:
if in4=1 then xmit 'in4 is keypad - transmit command when
PIN is entered
goto loop
xmit:
serout 16,16468,1000,[noparse][[/noparse]13,"echo off",13,"send gps fix",13]
pause 5000 'Allow keypad to reset
goto loop
The problem is when I connect the BS2 to the Sat Modem the fix is not
transmitted.
Thank you for your assistance.
Regards,
Bob Landsfield
I would like to use a BS2 and the serial connection on a Board of
Education to send preprogrammed messages and commands via a satellite
modem. The modem uses RS422 (DB25 connector) so I purchased a RS232 -
RS422 port powered converter (B&B Electronics part # 422LP9TBN
www.bb-elec.com).
I have successfully sent the following commands via PC HyperTerminal:
<enter>
echo off <enter>
send gps fix <enter>
I can monitor the fix arriving at the ground station via telnet.
I have also successfully programmed the following into the BS2 and
observed its execution via HyperTerminal.
'Send text via sat terminal test
loop:
if in4=1 then xmit 'in4 is keypad - transmit command when
PIN is entered
goto loop
xmit:
serout 16,16468,1000,[noparse][[/noparse]13,"echo off",13,"send gps fix",13]
pause 5000 'Allow keypad to reset
goto loop
The problem is when I connect the BS2 to the Sat Modem the fix is not
transmitted.
Thank you for your assistance.
Regards,
Bob Landsfield
Comments
gsynergy@p... writes:
> Hello Everybody,
>
> I would like to use a BS2 and the serial connection on a Board of
> Education to send preprogrammed messages and commands via a satellite
> modem. The modem uses RS422 (DB25 connector) so I purchased a RS232 -
> RS422 port powered converter (B&B Electronics part # 422LP9TBN
> www.bb-elec.com).
>
> I have successfully sent the following commands via PC HyperTerminal:
>
> <enter>
> echo off <enter>
> send gps fix <enter>
>
> I can monitor the fix arriving at the ground station via telnet.
>
> I have also successfully programmed the following into the BS2 and
> observed its execution via HyperTerminal.
>
> 'Send text via sat terminal test
>
> loop:
> if in4=1 then xmit 'in4 is keypad - transmit command when
> PIN is entered
> goto loop
>
> xmit:
> serout 16,16468,1000,[noparse][[/noparse]13,"echo off",13,"send gps fix",13]
> pause 5000 'Allow keypad to reset
> goto loop
>
> The problem is when I connect the BS2 to the Sat Modem the fix is not
> transmitted.
>
> Thank you for your assistance.
>
> Regards,
>
> Bob Landsfield
Check the specs on your satellite modem. You may need to add pacing to the
SEROUT command. You never notice this when using Hyperterminal, since humans
-- no matter how fast they can type -- can't send characters to a modem as
fast as the Stamp can.
-- Jon Williams
-- Dallas, TX
> In a message dated 10/7/00 1:23:57 PM Central Daylight Time,
> gsynergy@p... writes:
>
> > Hello Everybody,
> >
> > I would like to use a BS2 and the serial connection on a Board
of
> > Education to send preprogrammed messages and commands via a
satellite
> > modem. The modem uses RS422 (DB25 connector) so I purchased a
RS232 -
> > RS422 port powered converter (B&B Electronics part # 422LP9TBN
> > www.bb-elec.com).
> >
> > I have successfully sent the following commands via PC
HyperTerminal:
> >
> > <enter>
> > echo off <enter>
> > send gps fix <enter>
> >
> > I can monitor the fix arriving at the ground station via telnet.
> >
> > I have also successfully programmed the following into the BS2
and
> > observed its execution via HyperTerminal.
> >
> > 'Send text via sat terminal test
> >
> > loop:
> > if in4=1 then xmit 'in4 is keypad - transmit command when
> > PIN is entered
> > goto loop
> >
> > xmit:
> > serout 16,16468,1000,[noparse][[/noparse]13,"echo off",13,"send gps fix",13]
> > pause 5000 'Allow keypad to reset
> > goto loop
> >
> > The problem is when I connect the BS2 to the Sat Modem the fix
is not
> > transmitted.
> >
> > Thank you for your assistance.
> >
> > Regards,
> >
> > Bob Landsfield
>
> Check the specs on your satellite modem. You may need to add
pacing to the
> SEROUT command. You never notice this when using Hyperterminal,
since humans
> -- no matter how fast they can type -- can't send characters to a
modem as
> fast as the Stamp can.
>
> -- Jon Williams
> -- Dallas, TX
Jon:
I searched the modem's API and have not found the spec you
mentioned however, I did include a 1000 milliseconds in the orginal
code.
serout 16,16468,1000,[noparse][[/noparse]13,"echo off",13,"send gps fix",13]
Do you think there should be more time?
Thanks for your assistance.
Bob Landsfield
gsynergy@p... writes:
> I searched the modem's API and have not found the spec you mentioned
> however, I did include a 1000 milliseconds in the orginal code.
Sorry, I missed that in the original post. Perhaps it's too long and the
modem is timing out. Based on other (general-purpose) modems I've connected
the Stamp to, I'd suggest a 50 ms pacing value.
>
> loop:
> if in4=1 then xmit 'in4 is keypad - transmit command when
> PIN is entered
> goto loop
>
> xmit:
> serout 16,16468,1000,[noparse][[/noparse]13,"echo off",13,"send gps fix",13]
> pause 5000 'Allow keypad to reset
> goto loop
>
A few questions:
1) Are you at 9600 baud on pin 16? Use 84 (unless you are using BS2SX). You
do not need the inverted baud mode. This will be 8 bits no parity, is that
OK too?
2) Port 16 uses the other sender and steals -12V from it. This has three
ramifications. a) If the other device is recieve only (or you don't hook up
its TX line) the Stamp is mute; b) Everything the other device sends gets
echoed back; c) No full duplex communications is possible. If these don't
suit you, you need to use a port other than 16. You can either hope the
reciever will take 0 and 5V and use inverted mode or you can use a MAX232 or
MAX233 driver. If you don't use drivers, use a 22k resistor between the
remote sender and the recieve stamp pin (if you even have it hooked up).
You probably are putting yourself in a loop when you send echo off. You send
E, it sends E back, so it sees you sending an E and it sends E back......
you get the idea. However, if you disconnect its transmit line, you no
longer get -12V and so you can't send data.
So in summary, I'd say use another pin other than 16, directly connect it,
ignore the data coming back in and use inverted mode. See if that doesn't
work.
Regards,
Al Williams
AWC
*Expand your Stamp I/O: http://www.al-williams.com/awce/pak3.htm
> In a message dated 10/7/00 1:45:25 PM Central Daylight Time,
> gsynergy@p... writes:
>
> > I searched the modem's API and have not found the spec you
mentioned
> > however, I did include a 1000 milliseconds in the orginal code.
>
> Sorry, I missed that in the original post. Perhaps it's too long
and the
> modem is timing out. Based on other (general-purpose) modems I've
connected
> the Stamp to, I'd suggest a 50 ms pacing value.
Jon -- The 50 ms did not do the trick. I suspect the problem is more
complex but I am relatively new to serial communications. A post by
Al Williams raises some interesting points that I will try to figure
out.
Thanks again.
Bob Landsfield
> > 'Send text via sat terminal test
> >
> > loop:
> > if in4=1 then xmit 'in4 is keypad - transmit command when
> > PIN is entered
> > goto loop
> >
> > xmit:
> > serout 16,16468,1000,[noparse][[/noparse]13,"echo off",13,"send gps fix",13]
> > pause 5000 'Allow keypad to reset
> > goto loop
> >
>
> A few questions:
>
> 1) Are you at 9600 baud on pin 16? Use 84 (unless you are using
BS2SX). You
> do not need the inverted baud mode. This will be 8 bits no parity,
is that
> OK too?
>
> 2) Port 16 uses the other sender and steals -12V from it. This has
three
> ramifications. a) If the other device is recieve only (or you don't
hook up
> its TX line) the Stamp is mute; b) Everything the other device
sends gets
> echoed back; c) No full duplex communications is possible. If these
don't
> suit you, you need to use a port other than 16. You can either hope
the
> reciever will take 0 and 5V and use inverted mode or you can use a
MAX232 or
> MAX233 driver. If you don't use drivers, use a 22k resistor between
the
> remote sender and the recieve stamp pin (if you even have it hooked
up).
>
> You probably are putting yourself in a loop when you send echo off.
You send
> E, it sends E back, so it sees you sending an E and it sends E
back......
> you get the idea. However, if you disconnect its transmit line, you
no
> longer get -12V and so you can't send data.
>
> So in summary, I'd say use another pin other than 16, directly
connect it,
> ignore the data coming back in and use inverted mode. See if that
doesn't
> work.
>
> Regards,
>
> Al Williams
> AWC
> *Expand your Stamp I/O: http://www.al-williams.com/awce/pak3.htm
Al
The API specifies configuring a PC's serial port to 9600 baud, 8 bits
data, no parity, 1 stop bit.
I am relatively new to the world of serial communications so please
forgive my lack of understanding.
Question 1: You said to use 84. I'm not sure what you are referring
to.
Question 2: In reading the manual, I suspected that using pin 16 may
be the problem however, I am not sure how to wire a serial connection
directly rather than using the DB9 connection on the Board of
Education.
With regard to wiring serial connections directly, the API states the
following:
"The modem communicates with external devices over RS422 lines, also
contained in the DB25 connector. The RS422 pins are 8 - negative
input, 9 - negative output, 21 - positive input, and 22 - positive
output. An RS422 to RS232 converter is highly recommended as
connections without them have exhibited unreliability. In theory,
however, you can forego a converter and hook pins 8,9,21,and 22 of
the modem DB25 connector to pins 3,2,8 and 7 respectively of a 9-pin
RS232 connector. This pinout will work for a PC's COM1 serial port."
As I said, I am uncertain how to wire pins 8,9,21 and 22 directly to
the BS2 without using the Board of Ed's serial connection.
Thanks for your patients and assistance.
Bob Landsfield
>
> Question 1: You said to use 84. I'm not sure what you are referring
> to.
>
Use 84 for the baudmode. This is 9600 baud with a line driver. Port 16 has
an integrated line driver. If you are not using port 16, and you are not
using a MAX232 or similar, then you use the large number (84+$4000 I think).
This all assume BS2 and not BS2SX.
> Question 2: In reading the manual, I suspected that using pin 16 may
> be the problem however, I am not sure how to wire a serial connection
> directly rather than using the DB9 connection on the Board of
> Education.
>
> With regard to wiring serial connections directly, the API states the
> following:
>
> "The modem communicates with external devices over RS422 lines, also
> contained in the DB25 connector. The RS422 pins are 8 - negative
> input, 9 - negative output, 21 - positive input, and 22 - positive
> output. An RS422 to RS232 converter is highly recommended as
> connections without them have exhibited unreliability. In theory,
> however, you can forego a converter and hook pins 8,9,21,and 22 of
> the modem DB25 connector to pins 3,2,8 and 7 respectively of a 9-pin
> RS232 connector. This pinout will work for a PC's COM1 serial port."
>
> As I said, I am uncertain how to wire pins 8,9,21 and 22 directly to
> the BS2 without using the Board of Ed's serial connection.
>
Well, I know there is some way to do that, but you say you already have a
converter, right? I'd wire to the converter. Ground is a must (pin 5 of
DB9). Pins 2 and 3 are the transmit and receive. One end's transmit must
connect to the other end's receive. This could be a problem too -- try
crossing 2 and 3.
However, what I would do -- is connect a Stamp pin (other than 16) directly
to the other side's RX (either pin 2 or 3 on the DB9 depending of how it is
wired). The converter _probably_ will accept inverted mode serial (84+$4000
in the baud mode). If you want to hook the RX back to another Stamp pin, do
so through a 22K resistor.
The converter is probably made to connect a PC with a straight cable. That
would make it DCE. The BOE is also DCE (the PC is DTE -- DTE connects to DCE
with a straight cable). If this is the case, then pin 2 and 3 should be
crossed on port 16, but without knowing the converter, that is just a guess.
Hope that helps.
Regards,
Al Williams
AWC
* 8 channels of PWM at http://www.al-williams.com/awce/pak5.htm
>--- In basicstamps@egroups.com, "Al Williams" <alw@a...> wrote:
> > > 'Send text via sat terminal test
> > >
> > > loop:
> > > if in4=1 then xmit 'in4 is keypad - transmit command when
> > > PIN is entered
> > > goto loop
> > >
> > > xmit:
> > > serout 16,16468,1000,[noparse][[/noparse]13,"echo off",13,"send gps fix",13]
> > > pause 5000 'Allow keypad to reset
> > > goto loop
> > >
> >
> > A few questions:
> >
> > 1) Are you at 9600 baud on pin 16? Use 84 (unless you are using
>BS2SX). You
> > do not need the inverted baud mode. This will be 8 bits no parity,
>is that
> > OK too?
> >
> > 2) Port 16 uses the other sender and steals -12V from it. This has
>three
> > ramifications. a) If the other device is recieve only (or you don't
>hook up
> > its TX line) the Stamp is mute; b) Everything the other device
>sends gets
> > echoed back; c) No full duplex communications is possible. If these
>don't
> > suit you, you need to use a port other than 16. You can either hope
>the
> > reciever will take 0 and 5V and use inverted mode or you can use a
>MAX232 or
> > MAX233 driver. If you don't use drivers, use a 22k resistor between
>the
> > remote sender and the recieve stamp pin (if you even have it hooked
>up).
> >
> > You probably are putting yourself in a loop when you send echo off.
>You send
> > E, it sends E back, so it sees you sending an E and it sends E
>back......
> > you get the idea. However, if you disconnect its transmit line, you
>no
> > longer get -12V and so you can't send data.
> >
> > So in summary, I'd say use another pin other than 16, directly
>connect it,
> > ignore the data coming back in and use inverted mode. See if that
>doesn't
> > work.
> >
> > Regards,
> >
> > Al Williams
> > AWC
> > *Expand your Stamp I/O: http://www.al-williams.com/awce/pak3.htm
Bob -
These answers DO NOT consider the converter, but only view the Stamp
responsibility. See Al's further comments for converter information
>Al
>
>The API specifies configuring a PC's serial port to 9600 baud, 8 bits
>data, no parity, 1 stop bit.
>
>I am relatively new to the world of serial communications so please
>forgive my lack of understanding.
>
>Question 1: You said to use 84. I'm not sure what you are referring
>to.
The specified baudmode parameter in the Serin/Serout statement.
>Question 2: In reading the manual, I suspected that using pin 16 may
>be the problem however, I am not sure how to wire a serial connection
>directly rather than using the DB9 connection on the Board of
>Education.
>
>With regard to wiring serial connections directly, the API states the
>following:
>
>"The modem communicates with external devices over RS422 lines, also
>contained in the DB25 connector. The RS422 pins are 8 - negative
>input, 9 - negative output, 21 - positive input, and 22 - positive
>output. An RS422 to RS232 converter is highly recommended as
>connections without them have exhibited unreliability. In theory,
>however, you can forego a converter and hook pins 8,9,21,and 22 of
>the modem DB25 connector to pins 3,2,8 and 7 respectively of a 9-pin
>RS232 connector. This pinout will work for a PC's COM1 serial port."
>
>As I said, I am uncertain how to wire pins 8,9,21 and 22 directly to
>the BS2 without using the Board of Ed's serial connection.
Serin documentation begins on P. 308 with diagram I-18 on P. 309 indicating
the RS-232 connector wiring. Similarly, P. 319 starts the Serout
documentation, with a similar example, I-21, shown on P. 320.
SERIN rpin{\fpin},baudmode,{plabel,}{timeout,tlabel,}[noparse][[/noparse]inputData]
SEROUT tpin\fpin,baudmode,{timeout,tlabel,}[noparse][[/noparse]outputData]
SEROUT tpin,baudmode,{pace,}[noparse][[/noparse]outputData]
Logical
Cmd Tpin or Rpin \ Fpin Pin
Serin STAMP_Rx_Pin ->Tx_Pin on PC, { Flow_Pin} p0-15 or 16
Serout STAMP_TX_pin->Rx_Pin on PC, Flow_Pin p0-15 or 16
or
pace
Logical to Physical Pin Mapping
See Page 208
Rx and Tx at the connector depend on the Port pins selected, as reflected
in the layout on P. 208 .
Hope that helps.
>Thanks for your patients and assistance.
>
>Bob Landsfield
Regards,
Bruce Bates
> input, 9 - negative output, 21 - positive input, and 22 - positive
> output. An RS422 to RS232 converter is highly recommended as
> connections without them have exhibited unreliability. In theory,
> however, you can forego a converter and hook pins 8,9,21,and 22 of
> the modem DB25 connector to pins 3,2,8 and 7 respectively of a 9-pin
> RS232 connector.
Hi Bob,
Hmmmm. It seems to me that the positive input and output from the RS422
should go to the RS232 ground (pin 5 on the DB9), _not_ to Pins 7 and 8.
Pins 7 & 8 on the RS232 DB9 are handshaking lines--RTS and CTS.)
Al mentioned the problem that occurs when you connect BS2 P16 to a standard
modem, that of infinite reverb, as both the modem and the BS2 echo the data
that comes to them. This would be a problem whether or not you use the
RS422/RS232 converter. The question is, does the modem echo?
>I have successfully sent the following commands via PC HyperTerminal:
><enter>
>echo off <enter>
>send gps fix <enter>
Was hyperterminal set for half or full duplex?
The command string you showed us:
serout 16,16468,1000,[noparse][[/noparse]13,"echo off",13,"send gps fix",13]
implies that the modem is already connected. The "echo off" here has
nothing to do with the echo problem in the previous paragraph. What I am
wondering is, does this modem use standard "AT" commands to establish the
connection initially? If so, there are some things you can do to prep the
modem to make it more friendly to the BS2 P16 port.
-- Tracy Allen
electronically monitored ecosystems
http://www.emesystems.com
> > The RS422 pins are 8 - negative
> > input, 9 - negative output, 21 - positive input, and 22 -
positive
> > output. An RS422 to RS232 converter is highly recommended as
> > connections without them have exhibited unreliability. In
theory,
> > however, you can forego a converter and hook pins 8,9,21,and 22
of
> > the modem DB25 connector to pins 3,2,8 and 7 respectively of a 9-
pin
> > RS232 connector.
>
> Hi Bob,
>
> Hmmmm. It seems to me that the positive input and output from the
RS422
> should go to the RS232 ground (pin 5 on the DB9), _not_ to Pins 7
and 8.
> Pins 7 & 8 on the RS232 DB9 are handshaking lines--RTS and CTS.)
>
> Al mentioned the problem that occurs when you connect BS2 P16 to a
standard
> modem, that of infinite reverb, as both the modem and the BS2 echo
the data
> that comes to them. This would be a problem whether or not you use
the
> RS422/RS232 converter. The question is, does the modem echo?
>
> >I have successfully sent the following commands via PC
HyperTerminal:
> ><enter>
> >echo off <enter>
> >send gps fix <enter>
>
> Was hyperterminal set for half or full duplex?
>
>
> The command string you showed us:
> serout 16,16468,1000,[noparse][[/noparse]13,"echo off",13,"send gps fix",13]
> implies that the modem is already connected. The "echo off" here
has
> nothing to do with the echo problem in the previous paragraph.
What I am
> wondering is, does this modem use standard "AT" commands to
establish the
> connection initially? If so, there are some things you can do to
prep the
> modem to make it more friendly to the BS2 P16 port.
>
> -- Tracy Allen
> electronically monitored ecosystems
> http://www.emesystems.com
Well guys I'm crying Uncle! I'm in a bit over my head with this and
am under a tight time table with this product. I'm going to bring a
couple of engineers I know on board to finish the design.
Thanks to Tracy, Al, Jon and Bruce for your time and assistance.
Regards,
Bob Landsfield