Problems connecting with Siemens XT65

LK/ELK/VK/PK/OK/MX/GLK/EGLK/GVK/GLT Series

Moderators: Henry, Mods

Post Reply
jaimese
LCD?
Posts: 4
Joined: Sat Mar 29, 2008 5:08 pm

Problems connecting with Siemens XT65

Post by jaimese »

Hi,

I'm having serious problems connecting my display GLK19264-7T-1U with a GPRS/GSM module Siemens XT65. I hope you can help me...

First of all a few words to explain the scenario. This module is a GPS/GPRS integrated device with a RS232 interface and Java embeded. I'm developing a proyect in wich I need to attach a graphic display to the module to receive GPS data and since I don't want to fight with microcontrollers I choosed Matrix Orbital GLK hoping i could make the development process easier.

I have tried both devices working with my laptop and it works perfectly, no problems. Both use a RS232 interface standard or at least this is what it says the tech papers. The XT65 uses a 9 pin db9 connector with many features but I'm only interested in pins 2 (RX), 3 (TX) and 5 (GND).

This is the voltage and signals table:

1 DCD O Min +-5V Data carrier detect
2 RD 0 O Min +-5V Received data
3 TD 0 I
VILmax = 0.6V
VIHmin = 2.4V
VImax = +-25V
Transmitted data
4 DTR I
VILmax = 0.6V
VIHmin = 2.4V
VImax = +-25V
Data terminal ready
5 GND - 0V Ground connection
6 DSR O Min +-5V Data set ready
7 RTS I
VILmax = 0.6V
VIHmin = 2.4V
VImax = +-25V
Request to send
8 CTS O Min +-5V Clear to send
9 RI O Min +-5V Ring indicator

I have used diferent cables to try, specially crossing pin 2 and 3 in order to see if the problem can be associated with this. Unsuccesfull...

Now I'm thinking if the problem could be located in the +-5V that appears in the pin 2, since as far as I know the display works with +-30V in this pin.If I'm right this should be solved changing to TTL but I'm not sure and I prefer to ask before start "touching" the display and changing the 0Ohm resistors into the TTL places.

Truly I'm a newbie with this kind of topics but I feel strange knowing that both devices works perfectly with my computer and my laptop. This means that my computer can change this voltage or get adapted to it? Changing into TTL could help?

Any help will be very very appreciated.

Thanks,

Jaime.
jaimese
LCD?
Posts: 4
Joined: Sat Mar 29, 2008 5:08 pm

New info

Post by jaimese »

Hi again.

I have discovered that the display works in the other side, I mean, when I press a key in the display, I can read it from the XT65 but I can't print anything in the display. This makes me think that maybe is not a hardware problem but a software mistake...

As the result of my new study I have discovered that the bytes I send to the display remains "buffered" until I connect the serial cable into my pc and connect hyperterminal. At this time, all this data are flushed into the terminal. It seems like it were blocked in the display. Any Ideas?

I place the code:

try {
com_os = ASC1.createInstance("comm:com0;baudrate=115200").openOutputStream();
com_is = ASC1.getInstance().openInputStream();
com_os.write("test".getBytes());
com_os.flush();

} catch (IOException e) {
e.printStackTrace();
}

And the class ASC1:

class ASC1 implements StreamConnection {
static ASC1 asc = null;

CommConnection com = null;


/**
* @throws IOException
* Private constructor
* @inheritDoc
*/

private ASC1(String parameter) throws IOException {

com = (CommConnection) Connector.open(parameter);

}

/**
*
* @return ASC1 instance
* @throws IOException
*/
public static ASC1 getInstance() throws IOException {
if (asc == null) {
throw new IOException("ASC1 isn't created");
}
return asc;

}

/**
* Creates and return a object of this class
* @param parameter
* e.g. "comm:com0;baudrate=115200,autorts=off;autocts=off"
* @see CommConnection
* @return ASC1 instance
* @throws IOException
*/
public static ASC1 createInstance(String parameter) throws IOException {
if (asc == null) {
asc = new ASC1(parameter);
} else {
throw new IOException("Port allready in use");
}

return asc;

}

/**
* @inheritDoc
*/
public InputStream openInputStream() throws IOException {
return com.openInputStream();
}

/**
* @inheritDoc
*/
public DataInputStream openDataInputStream() throws IOException {
return com.openDataInputStream();
}

/**
* @inheritDoc
*/
public void close() throws IOException {
com.close();

}

/**
* @inheritDoc
*/
public OutputStream openOutputStream() throws IOException {
return com.openOutputStream();
}

/**
* @inheritDoc
*/
public DataOutputStream openDataOutputStream() throws IOException {

return com.openDataOutputStream();
}

/**
*
* @param bps
* bit per second
* @inheritDoc
*/
public void setBaudrate(int bps) {
com.setBaudRate(bps);
}

}

Thanks again,

Jaime.
Ray
Matrix Orbital
Matrix Orbital
Posts: 745
Joined: Thu Dec 13, 2001 4:00 pm
Location: Earth.... I think..
Contact:

Post by Ray »

Since you mention -5 and +5 on the datalines it does look like a 'real' rs232 port(specs say -3 or lower and +3 or higher, most PC's use +/- 12.5V nowdays) TTL would have been 0 and 5V.

It could be that by default the port gets created with flowcontrol enabled, could you try disabling flowcontrol (rts/cts) and see if that improves things for you?
jaimese
LCD?
Posts: 4
Joined: Sat Mar 29, 2008 5:08 pm

Post by jaimese »

Hi Ray,

Thanks for the answer. By default the port is created without any kind of flow control. Anyway, I have tried activating XON-XOFF flowcontrol without success.

Jaime.
jaimese
LCD?
Posts: 4
Joined: Sat Mar 29, 2008 5:08 pm

Post by jaimese »

It works!!! yipie! :D

I have solved the problem. Anyway I'm going to post whats wrong becuase maybe it could help someone in the future to aovid this headache...

As you said me, Ray, the problem was located in the CTS/RTS parameter. The modem waits to receive the signal to start sending the data and since the display has not this pin, it didn't work. I checked the display and the modem to get sure there is no flow control and I was right, but... I haven't check in the java source code where RTS is switched on by default. Once founded, problem solved.

The correct line if someone wants to use this code is:

com_os = ASC1.createInstance("comm:com0;baudrate=115200;autocts=off;autorts=off").openOutputStream();

Thanks!

Jaime.
Post Reply