Javelin vs T630 II
Ullrotta
Posts: 12
Hi!
What ascii character equals <ctrl-z> ?
I'm having problems getting my phone to execute the at+cmgs-command
after I've entered the message text. Works fine in HyperTerminal where
I can input the <ctrl-z> manually...
I realize this might be a little on the side of the forum, but hopefully
you can all handle it
What ascii character equals <ctrl-z> ?
I'm having problems getting my phone to execute the at+cmgs-command
after I've entered the message text. Works fine in HyperTerminal where
I can input the <ctrl-z> manually...
I realize this might be a little on the side of the forum, but hopefully
you can all handle it
Comments
regards peter
I get no feedback back from the phone. I know the program won't
catch anything coming back from the phone before after the last
AT-command has been executed, but there is nothing how ever I've tried.
Is there anything visibly wrong with the code?
import stamp.core.*;
public class ModemTest
{
final static int SERIAL_TX_PIN = CPU.pin0;
final static int SERIAL_RTS_PIN = CPU.pin1;
final static int SERIAL_CTS_PIN = CPU.pin2;
final static int SERIAL_RX_PIN = CPU.pin3;
static Uart rxUart = new Uart( Uart.dirReceive,
SERIAL_RX_PIN,
Uart.dontInvert,
SERIAL_CTS_PIN,
Uart.dontInvert,
Uart.speed9600,
Uart.stop1);
static Uart txUart = new Uart( Uart.dirTransmit,
SERIAL_TX_PIN,
Uart.dontInvert,
SERIAL_RTS_PIN,
Uart.dontInvert,
Uart.speed9600,
Uart.stop1);
public static void main()
{
txUart.sendString("AT+CPMS=\"ME\"\r\n");
CPU.delay(5000);
txUart.sendString("AT+CMGF=1\r\n");
CPU.delay(5000);
txUart.sendString("AT+CMGS=\"99999999\"\r");
CPU.delay(15000);
txUart.sendString("Hello, World!\032");
while (true)
{
System.out.println((char)rxUart.receiveByte());
}
}
}
is received by Hyperterminal?
If that is so, then the bytes are transmitted correctly and
there must be something missing/wrong in your protocol.
regards peter
What I have noticed, is this: in Advanced Serial Port Monitor there are three lights that indicate CTS (Clear To Send), DCD (Data Carrier Detect) and DSR (Data Set Ready). When the phone is connected to the computer all three are on, but when the Javelin is connected, only CTS is on.
Any and all suggestions are welcome
the DSR and DCD inputs) thst is toggled on/off by your phone
during communication with your pc.
Meaning: if DTR is set to off, the pc should not transmit.
When DTR is on again, the pc may start sending.
You can try to use the phone's DTR signal as handshake.
I would directly connect the phones RTS and CTS
(local handshake) and not use RTS handshake with the javelin.
Uart rxUart = new Uart(dirReceive,pinRX,dontInvert,baud,stop);
Uart txUart = new Uart(dirTransmit,pinTX,dontInvert,pinCTS,dontInvert,baud,stop);
//connect phone DTR to Javelin pinCTS
regards peter
Please explain:
DTR
DSR
DCD
you connect the phone to the PC. The DTR is an output from the PC. DSR
and DCD are inputs to the PC, so the phone sends an ON signal to these
pins. The PC's DSR and DCD·usually connect to the device's (ie. your phone)
DTR pin. But do check your phone cable. I know other serial devices like
serial printers often use their DTR pin for handshake. Maybe your phone
does to. That means you must wait for an ON signal from the device DTR pin
before you may send data to the device. You really need to check the manual
for the protocol used plus timing charts if these are given. You need to know
what pins are involved besides TX and RX. Contact the phone manufacter
if you don't have all these details.
regards peter.
·