Problem connecting to target with gdb.

When trying to connect to the remote ‘pdebug’ I get the following:

(gdb) target qnx /dev/ser1 Remote debugging using /dev/ser1 Timeout in mid-packet, retrying MsgNak received - resending Timeout in mid-packet, retrying MsgNak received - resending Timeout in mid-packet, retrying MsgNak received - resending Remote exhausted 3 retries. Couldn't establish connection to remote target Connection failed: 5. Timeout in mid-packet, retrying MsgNak received - resending Timeout in mid-packet, retrying MsgNak received - resending Timeout in mid-packet, retrying MsgNak received - resending Remote exhausted 3 retries.

Yes, I have tried to extend the timeout to as much as 120 sec.
Yes, both serial ports are set to the same baudrate and comms. settings.

Yes, a nullmodem cable is used.
Yes, something happens on the target side
and that is (after a successful pdebug init) when i call (gdb) target
qnx /dev/ser1:

Host resent message with id 0 (0x0). Resending response.
Host resent message with id 0 (0x0). Resending response.
Host resent message with id 1 (0x1). Resending response.
Host resent message with id 1 (0x1). Resending response.

Any sugestions of what might be wrong anyone?

Regards
-Arve

A few things to try…

  1. check that you can send data via the ‘cat’ command both ways over
    the null modem

eg:
host$ cat > /dev/ser1
fjdslkfjdlksjfkldsjflkdsjflds

target$ cat < /dev/ser1
fjdslkfjdlksjfkldsjflkdsjflds

  1. check that you are starting pdebug with the right baudrate, I believe
    the default is 57600

eg:
target$ pdebug /dev/ser1,115200

  1. if you have another port to the machine, start pdebug in verbose mode

eg

target$ PDEBUG_DEBUG=1 pdebug /dev/ser1,115200

Arve Slenes <arve@datarespons.no> wrote:

When trying to connect to the remote ‘pdebug’ I get the following:

START
(gdb) target qnx /dev/ser1
Remote debugging using /dev/ser1
Timeout in mid-packet, retrying
MsgNak received - resending
Timeout in mid-packet, retrying
MsgNak received - resending
Timeout in mid-packet, retrying
MsgNak received - resending
Remote exhausted 3 retries.
Couldn’t establish connection to remote target
Connection failed: 5.
Timeout in mid-packet, retrying
MsgNak received - resending
Timeout in mid-packet, retrying
MsgNak received - resending
Timeout in mid-packet, retrying
MsgNak received - resending
Remote exhausted 3 retries.
END

Yes, I have tried to extend the timeout to as much as 120 sec.
Yes, both serial ports are set to the same baudrate and comms. settings.

Yes, a nullmodem cable is used.
Yes, something happens on the target side
and that is (after a successful pdebug init) when i call (gdb) target
qnx /dev/ser1:

Host resent message with id 0 (0x0). Resending response.
Host resent message with id 0 (0x0). Resending response.
Host resent message with id 1 (0x1). Resending response.
Host resent message with id 1 (0x1). Resending response.

Any sugestions of what might be wrong anyone?

Regards
-Arve



cburgess@qnx.com

Status:
I can receive stuff both ways with ‘cat < /dev/serX’ when using ‘qtalk’, but
not when using
‘cat > /dev/serX’. That is ‘cat > /dev/serX’ does not seem to work, ‘qtalk’
works.
Are there any special serial settings I need for cat perhaps??

Still no contact with pdebug other than pdebug saying
‘Host resent message with id 0 (0x0). Resending response.’

I’m using pdebug -v

-Arve

Colin Burgess wrote:

A few things to try…

  1. check that you can send data via the ‘cat’ command both ways over
    the null modem

eg:
host$ cat > /dev/ser1
fjdslkfjdlksjfkldsjflkdsjflds

target$ cat < /dev/ser1
fjdslkfjdlksjfkldsjflkdsjflds

  1. check that you are starting pdebug with the right baudrate, I believe
    the default is 57600

eg:
target$ pdebug /dev/ser1,115200

  1. if you have another port to the machine, start pdebug in verbose mode

eg

target$ PDEBUG_DEBUG=1 pdebug /dev/ser1,115200

Arve Slenes <> arve@datarespons.no> > wrote:
When trying to connect to the remote ‘pdebug’ I get the following:

START
(gdb) target qnx /dev/ser1
Remote debugging using /dev/ser1
Timeout in mid-packet, retrying
MsgNak received - resending
Timeout in mid-packet, retrying
MsgNak received - resending
Timeout in mid-packet, retrying
MsgNak received - resending
Remote exhausted 3 retries.
Couldn’t establish connection to remote target
Connection failed: 5.
Timeout in mid-packet, retrying
MsgNak received - resending
Timeout in mid-packet, retrying
MsgNak received - resending
Timeout in mid-packet, retrying
MsgNak received - resending
Remote exhausted 3 retries.
END

Yes, I have tried to extend the timeout to as much as 120 sec.
Yes, both serial ports are set to the same baudrate and comms. settings.

Yes, a nullmodem cable is used.
Yes, something happens on the target side
and that is (after a successful pdebug init) when i call (gdb) target
qnx /dev/ser1:

Host resent message with id 0 (0x0). Resending response.
Host resent message with id 0 (0x0). Resending response.
Host resent message with id 1 (0x1). Resending response.
Host resent message with id 1 (0x1). Resending response.

Any sugestions of what might be wrong anyone?

Regards
-Arve


cburgess@qnx.com

Can you post the output of stty -a < /dev/ser for BOTH serial ports
when gdb and pdebug are trying to connect?

Arve Slenes <arve@datarespons.no> wrote:

Status:
I can receive stuff both ways with ‘cat < /dev/serX’ when using ‘qtalk’, but
not when using
‘cat > /dev/serX’. That is ‘cat > /dev/serX’ does not seem to work, ‘qtalk’
works.
Are there any special serial settings I need for cat perhaps??

Still no contact with pdebug other than pdebug saying
‘Host resent message with id 0 (0x0). Resending response.’

I’m using pdebug -v

-Arve

Colin Burgess wrote:

A few things to try…

  1. check that you can send data via the ‘cat’ command both ways over
    the null modem

eg:
host$ cat > /dev/ser1
fjdslkfjdlksjfkldsjflkdsjflds

target$ cat < /dev/ser1
fjdslkfjdlksjfkldsjflkdsjflds

  1. check that you are starting pdebug with the right baudrate, I believe
    the default is 57600

eg:
target$ pdebug /dev/ser1,115200

  1. if you have another port to the machine, start pdebug in verbose mode

eg

target$ PDEBUG_DEBUG=1 pdebug /dev/ser1,115200

Arve Slenes <> arve@datarespons.no> > wrote:
When trying to connect to the remote ‘pdebug’ I get the following:

START
(gdb) target qnx /dev/ser1
Remote debugging using /dev/ser1
Timeout in mid-packet, retrying
MsgNak received - resending
Timeout in mid-packet, retrying
MsgNak received - resending
Timeout in mid-packet, retrying
MsgNak received - resending
Remote exhausted 3 retries.
Couldn’t establish connection to remote target
Connection failed: 5.
Timeout in mid-packet, retrying
MsgNak received - resending
Timeout in mid-packet, retrying
MsgNak received - resending
Timeout in mid-packet, retrying
MsgNak received - resending
Remote exhausted 3 retries.
END

Yes, I have tried to extend the timeout to as much as 120 sec.
Yes, both serial ports are set to the same baudrate and comms. settings.

Yes, a nullmodem cable is used.
Yes, something happens on the target side
and that is (after a successful pdebug init) when i call (gdb) target
qnx /dev/ser1:

Host resent message with id 0 (0x0). Resending response.
Host resent message with id 0 (0x0). Resending response.
Host resent message with id 1 (0x1). Resending response.
Host resent message with id 1 (0x1). Resending response.

Any sugestions of what might be wrong anyone?

Regards
-Arve


cburgess@qnx.com


cburgess@qnx.com

Hi!

I hope this can be of some use:

No progress in the communication between gdb and pdebug.
I have tried to specify ‘stty +raw < /dev/ser1’ before running gdb and pdebug,
but it seems like the stty gets altered by gdb and pdebug…
I have tried to set the ‘clocal’ equal on both host and target, but it seems like
pdebug and gdb alters this and sets this parameter differently when running, so too

with ‘min=’ parameter…

Commands used for gdb:
#gdb -b 9600
(gdb) set qnxtimeout 25
(gdb) target qnx /dev/ser1

Commands used for pdebug:
#pdebug -v /dev/ser1,9600

Stty after gdb and pdebug has been run:

stty -a < /dev/ser1

Name: /dev/ser1
Type: serial
Opens: 2
-hupcl +cread +clocal -isig -icanon -iexten -echo -echoe -echok -echoke
-echonl -echoctl -noflsh -ignbrk -brkint -ignpar
-parmrk -istrip -inlcr -igncr -icrnl -imaxbel -opost -onlcr
-isflow -osflow +ihflow +ohflow
intr=^C quit=^\ erase=^? kill=^U eof=^D eol=^- eol2=^- swtch=^-
start=^Q stop=^S susp=^Z dsusp=^- reprint=^- discard=^- werase=^- lnext=^V
min=00 time=00 fwd=^- login=^- pr1=^[ pr2=5B pr3=^- pr4=^-
sf1=^- sf2=^- sf3=^- sf4=^- left=44 right=43 up=41 down=42
ins=40 del=50 rub=^- can=^- home=48 end=59
par=none bits=8 stopb=1 baud=9600 rows=0,0

# stty -a < /dev/ser1 Name: /dev/ser1 Type: serial Opens: 2 -hupcl +cread -clocal -isig -icanon -iexten -echo -echoe -echok -echoke -echonl -echoctl -noflsh -ignbrk -brkint -ignpar -parmrk -istrip -inlcr -igncr -icrnl -imaxbel -opost -onlcr -isflow -osflow +ihflow +ohflow intr=^C quit=^\ erase=^? kill=^U eof=^D eol=^- eol2=^- swtch=^- start=^Q stop=^S susp=^Z dsusp=^- reprint=^- discard=^- werase=^- lnext=^V min=01 time=00 fwd=^- login=^- pr1=^[ pr2=5B pr3=^- pr4=^- sf1=^- sf2=^- sf3=^- sf4=^- left=44 right=43 up=41 down=42 ins=40 del=50 rub=^- can=^- home=48 end=59 par=none bits=8 stopb=1 baud=9600 rows=0,0

Colin Burgess wrote:

Can you post the output of stty -a < /dev/ser for BOTH serial ports
when gdb and pdebug are trying to connect?

Arve Slenes <> arve@datarespons.no> > wrote:
Status:
I can receive stuff both ways with ‘cat < /dev/serX’ when using ‘qtalk’, but
not when using
‘cat > /dev/serX’. That is ‘cat > /dev/serX’ does not seem to work, ‘qtalk’
works.
Are there any special serial settings I need for cat perhaps??

Still no contact with pdebug other than pdebug saying
‘Host resent message with id 0 (0x0). Resending response.’

I’m using pdebug -v

-Arve

Colin Burgess wrote:

A few things to try…

  1. check that you can send data via the ‘cat’ command both ways over
    the null modem

eg:
host$ cat > /dev/ser1
fjdslkfjdlksjfkldsjflkdsjflds

target$ cat < /dev/ser1
fjdslkfjdlksjfkldsjflkdsjflds

  1. check that you are starting pdebug with the right baudrate, I believe
    the default is 57600

eg:
target$ pdebug /dev/ser1,115200

  1. if you have another port to the machine, start pdebug in verbose mode

eg

target$ PDEBUG_DEBUG=1 pdebug /dev/ser1,115200

Arve Slenes <> arve@datarespons.no> > wrote:
When trying to connect to the remote ‘pdebug’ I get the following:

START
(gdb) target qnx /dev/ser1
Remote debugging using /dev/ser1
Timeout in mid-packet, retrying
MsgNak received - resending
Timeout in mid-packet, retrying
MsgNak received - resending
Timeout in mid-packet, retrying
MsgNak received - resending
Remote exhausted 3 retries.
Couldn’t establish connection to remote target
Connection failed: 5.
Timeout in mid-packet, retrying
MsgNak received - resending
Timeout in mid-packet, retrying
MsgNak received - resending
Timeout in mid-packet, retrying
MsgNak received - resending
Remote exhausted 3 retries.
END

Yes, I have tried to extend the timeout to as much as 120 sec.
Yes, both serial ports are set to the same baudrate and comms. settings.

Yes, a nullmodem cable is used.
Yes, something happens on the target side
and that is (after a successful pdebug init) when i call (gdb) target
qnx /dev/ser1:

Host resent message with id 0 (0x0). Resending response.
Host resent message with id 0 (0x0). Resending response.
Host resent message with id 1 (0x1). Resending response.
Host resent message with id 1 (0x1). Resending response.

Any sugestions of what might be wrong anyone?

Regards
-Arve


cburgess@qnx.com


cburgess@qnx.com

Hi Colin!

Could you perhaps post a pair of stty settings that DO work…
Then I can try those. :slight_smile:

-Arve

Colin Burgess wrote:

Can you post the output of stty -a < /dev/ser for BOTH serial ports
when gdb and pdebug are trying to connect?

Arve Slenes <> arve@datarespons.no> > wrote:
Status:
I can receive stuff both ways with ‘cat < /dev/serX’ when using ‘qtalk’, but
not when using
‘cat > /dev/serX’. That is ‘cat > /dev/serX’ does not seem to work, ‘qtalk’
works.
Are there any special serial settings I need for cat perhaps??

Still no contact with pdebug other than pdebug saying
‘Host resent message with id 0 (0x0). Resending response.’

I’m using pdebug -v

-Arve

Colin Burgess wrote:

A few things to try…

  1. check that you can send data via the ‘cat’ command both ways over
    the null modem

eg:
host$ cat > /dev/ser1
fjdslkfjdlksjfkldsjflkdsjflds

target$ cat < /dev/ser1
fjdslkfjdlksjfkldsjflkdsjflds

  1. check that you are starting pdebug with the right baudrate, I believe
    the default is 57600

eg:
target$ pdebug /dev/ser1,115200

  1. if you have another port to the machine, start pdebug in verbose mode

eg

target$ PDEBUG_DEBUG=1 pdebug /dev/ser1,115200

Arve Slenes <> arve@datarespons.no> > wrote:
When trying to connect to the remote ‘pdebug’ I get the following:

START
(gdb) target qnx /dev/ser1
Remote debugging using /dev/ser1
Timeout in mid-packet, retrying
MsgNak received - resending
Timeout in mid-packet, retrying
MsgNak received - resending
Timeout in mid-packet, retrying
MsgNak received - resending
Remote exhausted 3 retries.
Couldn’t establish connection to remote target
Connection failed: 5.
Timeout in mid-packet, retrying
MsgNak received - resending
Timeout in mid-packet, retrying
MsgNak received - resending
Timeout in mid-packet, retrying
MsgNak received - resending
Remote exhausted 3 retries.
END

Yes, I have tried to extend the timeout to as much as 120 sec.
Yes, both serial ports are set to the same baudrate and comms. settings.

Yes, a nullmodem cable is used.
Yes, something happens on the target side
and that is (after a successful pdebug init) when i call (gdb) target
qnx /dev/ser1:

Host resent message with id 0 (0x0). Resending response.
Host resent message with id 0 (0x0). Resending response.
Host resent message with id 1 (0x1). Resending response.
Host resent message with id 1 (0x1). Resending response.

Any sugestions of what might be wrong anyone?

Regards
-Arve


cburgess@qnx.com


cburgess@qnx.com

Arve Slenes <arve@datarespons.no> wrote:

Hi. What are your host and target machines? To eliminate variables,
please try using baudrates of 38400 on both machines.

Before running pdebug, export PDEBUG_DEBUG=1, which will provide the
maximum debug output, and then please post the output here. Also, be
aware that pdebug will set the baudrate, so you must give it the right
speed on the command line. The default is 57600, so if you run:

stty 38400 < /dev/serN
pdebug &

it will reset the serial port to 57600.

Another thing that has helped me on occasion is to slay and restart
devc-ser8250: (on x86)

slay devc-ser8250
devc-ser8250 &

Let me know.
GP

Hi Colin!

Could you perhaps post a pair of stty settings that DO work…
Then I can try those. > :slight_smile:

-Arve

Colin Burgess wrote:

Can you post the output of stty -a < /dev/ser for BOTH serial ports
when gdb and pdebug are trying to connect?

Arve Slenes <> arve@datarespons.no> > wrote:
Status:
I can receive stuff both ways with ‘cat < /dev/serX’ when using ‘qtalk’, but
not when using
‘cat > /dev/serX’. That is ‘cat > /dev/serX’ does not seem to work, ‘qtalk’
works.
Are there any special serial settings I need for cat perhaps??

Still no contact with pdebug other than pdebug saying
‘Host resent message with id 0 (0x0). Resending response.’

I’m using pdebug -v

-Arve

Colin Burgess wrote:

A few things to try…

  1. check that you can send data via the ‘cat’ command both ways over
    the null modem

eg:
host$ cat > /dev/ser1
fjdslkfjdlksjfkldsjflkdsjflds

target$ cat < /dev/ser1
fjdslkfjdlksjfkldsjflkdsjflds

  1. check that you are starting pdebug with the right baudrate, I believe
    the default is 57600

eg:
target$ pdebug /dev/ser1,115200

  1. if you have another port to the machine, start pdebug in verbose mode

eg

target$ PDEBUG_DEBUG=1 pdebug /dev/ser1,115200

Arve Slenes <> arve@datarespons.no> > wrote:
When trying to connect to the remote ‘pdebug’ I get the following:

START
(gdb) target qnx /dev/ser1
Remote debugging using /dev/ser1
Timeout in mid-packet, retrying
MsgNak received - resending
Timeout in mid-packet, retrying
MsgNak received - resending
Timeout in mid-packet, retrying
MsgNak received - resending
Remote exhausted 3 retries.
Couldn’t establish connection to remote target
Connection failed: 5.
Timeout in mid-packet, retrying
MsgNak received - resending
Timeout in mid-packet, retrying
MsgNak received - resending
Timeout in mid-packet, retrying
MsgNak received - resending
Remote exhausted 3 retries.
END

Yes, I have tried to extend the timeout to as much as 120 sec.
Yes, both serial ports are set to the same baudrate and comms. settings.

Yes, a nullmodem cable is used.
Yes, something happens on the target side
and that is (after a successful pdebug init) when i call (gdb) target
qnx /dev/ser1:

Host resent message with id 0 (0x0). Resending response.
Host resent message with id 0 (0x0). Resending response.
Host resent message with id 1 (0x1). Resending response.
Host resent message with id 1 (0x1). Resending response.

Any sugestions of what might be wrong anyone?

Regards
-Arve


cburgess@qnx.com


cburgess@qnx.com

OK!
It miraculously worked once… So it’s a bit unstable…
After miraculously getting it to work straigth away, running gdb and pdebug as
they talked perfectly over the 38400 bps serial line, I closed down the programs to
do some other stuff. Then, when trying to connect again, it did not work… The old
problems where back.

Restarting the PC and the target, or slaying the devc-ser8250, did not seem to help.
gdb with the same messages as before and pdebug gave the following text with
PDEBUG_DEBUG=1 set and ‘pdebug /dev/ser1,38400’ running:

Com port /dev/ser1 initialized OK
Target initialized OK
pdebug initialized
TargetDisconnect
TargetEnv: Clearing Environment
TargetEnv: Clearing Arguments
TargetConnect: major=0 minor=1
ResponseOKStatus status=1056
Host resent message with id 0 (0x0). Resending response.
Host resent message with id 0 (0x0). Resending response.
TargetDisconnect
TargetEnv: Clearing Environment
TargetEnv: Clearing Arguments
TargetDetach pid=0
Response OK
Host resent message with id 1 (0x1). Resending response.
Host resent message with id 1 (0x1). Resending response.

Graeme Peterson wrote:

Arve Slenes <> arve@datarespons.no> > wrote:

Hi. What are your host and target machines? To eliminate variables,
please try using baudrates of 38400 on both machines.

Before running pdebug, export PDEBUG_DEBUG=1, which will provide the
maximum debug output, and then please post the output here. Also, be
aware that pdebug will set the baudrate, so you must give it the right
speed on the command line. The default is 57600, so if you run:

stty 38400 < /dev/serN
pdebug &

it will reset the serial port to 57600.

Another thing that has helped me on occasion is to slay and restart
devc-ser8250: (on x86)

slay devc-ser8250
devc-ser8250 &

Let me know.
GP

Hi Colin!

Could you perhaps post a pair of stty settings that DO work…
Then I can try those. > :slight_smile:

-Arve

Colin Burgess wrote:

Can you post the output of stty -a < /dev/ser for BOTH serial ports
when gdb and pdebug are trying to connect?

Arve Slenes <> arve@datarespons.no> > wrote:
Status:
I can receive stuff both ways with ‘cat < /dev/serX’ when using ‘qtalk’, but
not when using
‘cat > /dev/serX’. That is ‘cat > /dev/serX’ does not seem to work, ‘qtalk’
works.
Are there any special serial settings I need for cat perhaps??

Still no contact with pdebug other than pdebug saying
‘Host resent message with id 0 (0x0). Resending response.’

I’m using pdebug -v

-Arve

Colin Burgess wrote:

A few things to try…

  1. check that you can send data via the ‘cat’ command both ways over
    the null modem

eg:
host$ cat > /dev/ser1
fjdslkfjdlksjfkldsjflkdsjflds

target$ cat < /dev/ser1
fjdslkfjdlksjfkldsjflkdsjflds

  1. check that you are starting pdebug with the right baudrate, I believe
    the default is 57600

eg:
target$ pdebug /dev/ser1,115200

  1. if you have another port to the machine, start pdebug in verbose mode

eg

target$ PDEBUG_DEBUG=1 pdebug /dev/ser1,115200

Arve Slenes <> arve@datarespons.no> > wrote:
When trying to connect to the remote ‘pdebug’ I get the following:

START
(gdb) target qnx /dev/ser1
Remote debugging using /dev/ser1
Timeout in mid-packet, retrying
MsgNak received - resending
Timeout in mid-packet, retrying
MsgNak received - resending
Timeout in mid-packet, retrying
MsgNak received - resending
Remote exhausted 3 retries.
Couldn’t establish connection to remote target
Connection failed: 5.
Timeout in mid-packet, retrying
MsgNak received - resending
Timeout in mid-packet, retrying
MsgNak received - resending
Timeout in mid-packet, retrying
MsgNak received - resending
Remote exhausted 3 retries.
END

Yes, I have tried to extend the timeout to as much as 120 sec.
Yes, both serial ports are set to the same baudrate and comms. settings.

Yes, a nullmodem cable is used.
Yes, something happens on the target side
and that is (after a successful pdebug init) when i call (gdb) target
qnx /dev/ser1:

Host resent message with id 0 (0x0). Resending response.
Host resent message with id 0 (0x0). Resending response.
Host resent message with id 1 (0x1). Resending response.
Host resent message with id 1 (0x1). Resending response.

Any sugestions of what might be wrong anyone?

Regards
-Arve


cburgess@qnx.com


cburgess@qnx.com

Arve Slenes <arve@datarespons.no> wrote:

Ok, so it can work. This is good news. Have you tried a different
serial cable? When you first start pdebug, what date does it say
it was built on, and what Protocol Version is it using?

eg:
This version of pdebug was built on Jun 3 2001.
ProtoVer 0.1

What speed and OS are your host and your target? ie: PIII-850 ntox86 targetting
a 20 MHz ntoarm board?

What about gdb? which -l gdb ? Is it gdb5 ?

Thanks.

OK!
It miraculously worked once… So it’s a bit unstable…
After miraculously getting it to work straigth away, running gdb and pdebug as
they talked perfectly over the 38400 bps serial line, I closed down the programs to
do some other stuff. Then, when trying to connect again, it did not work… The old
problems where back.

Restarting the PC and the target, or slaying the devc-ser8250, did not seem to help.
gdb with the same messages as before and pdebug gave the following text with
PDEBUG_DEBUG=1 set and ‘pdebug /dev/ser1,38400’ running:

Com port /dev/ser1 initialized OK
Target initialized OK
pdebug initialized
TargetDisconnect
TargetEnv: Clearing Environment
TargetEnv: Clearing Arguments
TargetConnect: major=0 minor=1
ResponseOKStatus status=1056
Host resent message with id 0 (0x0). Resending response.
Host resent message with id 0 (0x0). Resending response.
TargetDisconnect
TargetEnv: Clearing Environment
TargetEnv: Clearing Arguments
TargetDetach pid=0
Response OK
Host resent message with id 1 (0x1). Resending response.
Host resent message with id 1 (0x1). Resending response.

Graeme Peterson wrote:

Arve Slenes <> arve@datarespons.no> > wrote:

Hi. What are your host and target machines? To eliminate variables,
please try using baudrates of 38400 on both machines.

Before running pdebug, export PDEBUG_DEBUG=1, which will provide the
maximum debug output, and then please post the output here. Also, be
aware that pdebug will set the baudrate, so you must give it the right
speed on the command line. The default is 57600, so if you run:

stty 38400 < /dev/serN
pdebug &

it will reset the serial port to 57600.

Another thing that has helped me on occasion is to slay and restart
devc-ser8250: (on x86)

slay devc-ser8250
devc-ser8250 &

Let me know.
GP

Hi Colin!

Could you perhaps post a pair of stty settings that DO work…
Then I can try those. > :slight_smile:

-Arve

Colin Burgess wrote:

Can you post the output of stty -a < /dev/ser for BOTH serial ports
when gdb and pdebug are trying to connect?

Arve Slenes <> arve@datarespons.no> > wrote:
Status:
I can receive stuff both ways with ‘cat < /dev/serX’ when using ‘qtalk’, but
not when using
‘cat > /dev/serX’. That is ‘cat > /dev/serX’ does not seem to work, ‘qtalk’
works.
Are there any special serial settings I need for cat perhaps??

Still no contact with pdebug other than pdebug saying
‘Host resent message with id 0 (0x0). Resending response.’

I’m using pdebug -v

-Arve

Colin Burgess wrote:

A few things to try…

  1. check that you can send data via the ‘cat’ command both ways over
    the null modem

eg:
host$ cat > /dev/ser1
fjdslkfjdlksjfkldsjflkdsjflds

target$ cat < /dev/ser1
fjdslkfjdlksjfkldsjflkdsjflds

  1. check that you are starting pdebug with the right baudrate, I believe
    the default is 57600

eg:
target$ pdebug /dev/ser1,115200

  1. if you have another port to the machine, start pdebug in verbose mode

eg

target$ PDEBUG_DEBUG=1 pdebug /dev/ser1,115200

Arve Slenes <> arve@datarespons.no> > wrote:
When trying to connect to the remote ‘pdebug’ I get the following:

START
(gdb) target qnx /dev/ser1
Remote debugging using /dev/ser1
Timeout in mid-packet, retrying
MsgNak received - resending
Timeout in mid-packet, retrying
MsgNak received - resending
Timeout in mid-packet, retrying
MsgNak received - resending
Remote exhausted 3 retries.
Couldn’t establish connection to remote target
Connection failed: 5.
Timeout in mid-packet, retrying
MsgNak received - resending
Timeout in mid-packet, retrying
MsgNak received - resending
Timeout in mid-packet, retrying
MsgNak received - resending
Remote exhausted 3 retries.
END

Yes, I have tried to extend the timeout to as much as 120 sec.
Yes, both serial ports are set to the same baudrate and comms. settings.

Yes, a nullmodem cable is used.
Yes, something happens on the target side
and that is (after a successful pdebug init) when i call (gdb) target
qnx /dev/ser1:

Host resent message with id 0 (0x0). Resending response.
Host resent message with id 0 (0x0). Resending response.
Host resent message with id 1 (0x1). Resending response.
Host resent message with id 1 (0x1). Resending response.

Any sugestions of what might be wrong anyone?

Regards
-Arve


cburgess@qnx.com


cburgess@qnx.com

Hi,

Was this ever resolved? I’m having the exact same problem.

pdebug 8000 + gdb target qnx :8000 works fine

pdebug /dev/ser1 + gdb target /dev/ser1 doesn’t

The target in this case is the PowerPC RPX-LITE SBC. Problem is, I’m
debugging a network driver, so using the ethenet port is kinda
problematic…

(The serial cable works fine for qtalk and for downloading images via ‘cp
image.srec /dev/ser1’. Futzing around with the baud rates didn’t help much.
I notice that qtalk and gdb can’t “share” /dev/ser1 from the host side -
qtalk exits with an error message when the “target qnx” command is given.
Perhaps there’s a similar contention between the shell and pdebug on the
target side?)

Thanks,

Rony


“Graeme Peterson” <gp@qnx.com> wrote in message
news:9jmloh$7qa$1@inn.qnx.com

Arve Slenes <> arve@datarespons.no> > wrote:

Ok, so it can work. This is good news. Have you tried a different
serial cable? When you first start pdebug, what date does it say
it was built on, and what Protocol Version is it using?

eg:
This version of pdebug was built on Jun 3 2001.
ProtoVer 0.1

What speed and OS are your host and your target? ie: PIII-850 ntox86
targetting
a 20 MHz ntoarm board?

What about gdb? which -l gdb ? Is it gdb5 ?

Thanks.

OK!
It miraculously worked once… So it’s a bit unstable…
After miraculously getting it to work straigth away, running gdb and
pdebug as
they talked perfectly over the 38400 bps serial line, I closed down the
programs to
do some other stuff. Then, when trying to connect again, it did not
work… The old
problems where back.

Restarting the PC and the target, or slaying the devc-ser8250, did not
seem to help.
gdb with the same messages as before and pdebug gave the following text
with
PDEBUG_DEBUG=1 set and ‘pdebug /dev/ser1,38400’ running:

Com port /dev/ser1 initialized OK
Target initialized OK
pdebug initialized
TargetDisconnect
TargetEnv: Clearing Environment
TargetEnv: Clearing Arguments
TargetConnect: major=0 minor=1
ResponseOKStatus status=1056
Host resent message with id 0 (0x0). Resending response.
Host resent message with id 0 (0x0). Resending response.
TargetDisconnect
TargetEnv: Clearing Environment
TargetEnv: Clearing Arguments
TargetDetach pid=0
Response OK
Host resent message with id 1 (0x1). Resending response.
Host resent message with id 1 (0x1). Resending response.

Graeme Peterson wrote:

Arve Slenes <> arve@datarespons.no> > wrote:

Hi. What are your host and target machines? To eliminate variables,
please try using baudrates of 38400 on both machines.

Before running pdebug, export PDEBUG_DEBUG=1, which will provide the
maximum debug output, and then please post the output here. Also, be
aware that pdebug will set the baudrate, so you must give it the right
speed on the command line. The default is 57600, so if you run:

stty 38400 < /dev/serN
pdebug &

it will reset the serial port to 57600.

Another thing that has helped me on occasion is to slay and restart
devc-ser8250: (on x86)

slay devc-ser8250
devc-ser8250 &

Let me know.
GP

Hi Colin!

Could you perhaps post a pair of stty settings that DO work…
Then I can try those. > :slight_smile:

-Arve

Colin Burgess wrote:

Can you post the output of stty -a < /dev/ser for BOTH serial
ports
when gdb and pdebug are trying to connect?

Arve Slenes <> arve@datarespons.no> > wrote:
Status:
I can receive stuff both ways with ‘cat < /dev/serX’ when using
‘qtalk’, but
not when using
‘cat > /dev/serX’. That is ‘cat > /dev/serX’ does not seem to
work, ‘qtalk’
works.
Are there any special serial settings I need for cat perhaps??

Still no contact with pdebug other than pdebug saying
‘Host resent message with id 0 (0x0). Resending response.’

I’m using pdebug -v

-Arve

Colin Burgess wrote:

A few things to try…

  1. check that you can send data via the ‘cat’ command both ways
    over
    the null modem

eg:
host$ cat > /dev/ser1
fjdslkfjdlksjfkldsjflkdsjflds

target$ cat < /dev/ser1
fjdslkfjdlksjfkldsjflkdsjflds

  1. check that you are starting pdebug with the right baudrate, I
    believe
    the default is 57600

eg:
target$ pdebug /dev/ser1,115200

  1. if you have another port to the machine, start pdebug in
    verbose mode

eg

target$ PDEBUG_DEBUG=1 pdebug /dev/ser1,115200

Arve Slenes <> arve@datarespons.no> > wrote:
When trying to connect to the remote ‘pdebug’ I get the
following:

START
(gdb) target qnx /dev/ser1
Remote debugging using /dev/ser1
Timeout in mid-packet, retrying
MsgNak received - resending
Timeout in mid-packet, retrying
MsgNak received - resending
Timeout in mid-packet, retrying
MsgNak received - resending
Remote exhausted 3 retries.
Couldn’t establish connection to remote target
Connection failed: 5.
Timeout in mid-packet, retrying
MsgNak received - resending
Timeout in mid-packet, retrying
MsgNak received - resending
Timeout in mid-packet, retrying
MsgNak received - resending
Remote exhausted 3 retries.
END

Yes, I have tried to extend the timeout to as much as 120 sec.
Yes, both serial ports are set to the same baudrate and comms.
settings.

Yes, a nullmodem cable is used.
Yes, something happens on the target side
and that is (after a successful pdebug init) when i call (gdb)
target
qnx /dev/ser1:

Host resent message with id 0 (0x0). Resending response.
Host resent message with id 0 (0x0). Resending response.
Host resent message with id 1 (0x1). Resending response.
Host resent message with id 1 (0x1). Resending response.

Any sugestions of what might be wrong anyone?

Regards
-Arve


cburgess@qnx.com


cburgess@qnx.com

Sorry about the delay, but I’ve been tied up with a few other things…
Anyway, pdebug says:

This version of pdebug was built on Jun 22 2001.
ProtoVer 0.1

I’m running a DigitalLogic 66Mhz (can increase speed to 133Mhz)
target and a IBM PC with some Pentium MMX processor as host.
Not sure which speed, but sertainly not the fastest in the world.

GDB says it is gdb 5.0 when it starts up. ‘which -l gdb’ returns
‘/usr/bin/gdb’

Just tried ‘gdb -b 38400’ and ‘PDEBUG_DEBUG=1 pdebug /dev/ser1,38400’.
Same response as before mentioned.

-Arve

Graeme Peterson wrote:

Arve Slenes <> arve@datarespons.no> > wrote:

Ok, so it can work. This is good news. Have you tried a different
serial cable? When you first start pdebug, what date does it say
it was built on, and what Protocol Version is it using?

eg:
This version of pdebug was built on Jun 3 2001.
ProtoVer 0.1

What speed and OS are your host and your target? ie: PIII-850 ntox86 targetting
a 20 MHz ntoarm board?

What about gdb? which -l gdb ? Is it gdb5 ?

Thanks.

OK!
It miraculously worked once… So it’s a bit unstable…
After miraculously getting it to work straigth away, running gdb and pdebug as
they talked perfectly over the 38400 bps serial line, I closed down the programs to
do some other stuff. Then, when trying to connect again, it did not work… The old
problems where back.

Restarting the PC and the target, or slaying the devc-ser8250, did not seem to help.
gdb with the same messages as before and pdebug gave the following text with
PDEBUG_DEBUG=1 set and ‘pdebug /dev/ser1,38400’ running:

Com port /dev/ser1 initialized OK
Target initialized OK
pdebug initialized
TargetDisconnect
TargetEnv: Clearing Environment
TargetEnv: Clearing Arguments
TargetConnect: major=0 minor=1
ResponseOKStatus status=1056
Host resent message with id 0 (0x0). Resending response.
Host resent message with id 0 (0x0). Resending response.
TargetDisconnect
TargetEnv: Clearing Environment
TargetEnv: Clearing Arguments
TargetDetach pid=0
Response OK
Host resent message with id 1 (0x1). Resending response.
Host resent message with id 1 (0x1). Resending response.

Graeme Peterson wrote:

Arve Slenes <> arve@datarespons.no> > wrote:

Hi. What are your host and target machines? To eliminate variables,
please try using baudrates of 38400 on both machines.

Before running pdebug, export PDEBUG_DEBUG=1, which will provide the
maximum debug output, and then please post the output here. Also, be
aware that pdebug will set the baudrate, so you must give it the right
speed on the command line. The default is 57600, so if you run:

stty 38400 < /dev/serN
pdebug &

it will reset the serial port to 57600.

Another thing that has helped me on occasion is to slay and restart
devc-ser8250: (on x86)

slay devc-ser8250
devc-ser8250 &

Let me know.
GP

Hi Colin!

Could you perhaps post a pair of stty settings that DO work…
Then I can try those. > :slight_smile:

-Arve

Colin Burgess wrote:

Can you post the output of stty -a < /dev/ser for BOTH serial ports
when gdb and pdebug are trying to connect?

Arve Slenes <> arve@datarespons.no> > wrote:
Status:
I can receive stuff both ways with ‘cat < /dev/serX’ when using ‘qtalk’, but
not when using
‘cat > /dev/serX’. That is ‘cat > /dev/serX’ does not seem to work, ‘qtalk’
works.
Are there any special serial settings I need for cat perhaps??

Still no contact with pdebug other than pdebug saying
‘Host resent message with id 0 (0x0). Resending response.’

I’m using pdebug -v

-Arve

Colin Burgess wrote:

A few things to try…

  1. check that you can send data via the ‘cat’ command both ways over
    the null modem

eg:
host$ cat > /dev/ser1
fjdslkfjdlksjfkldsjflkdsjflds

target$ cat < /dev/ser1
fjdslkfjdlksjfkldsjflkdsjflds

  1. check that you are starting pdebug with the right baudrate, I believe
    the default is 57600

eg:
target$ pdebug /dev/ser1,115200

  1. if you have another port to the machine, start pdebug in verbose mode

eg

target$ PDEBUG_DEBUG=1 pdebug /dev/ser1,115200

Arve Slenes <> arve@datarespons.no> > wrote:
When trying to connect to the remote ‘pdebug’ I get the following:

START
(gdb) target qnx /dev/ser1
Remote debugging using /dev/ser1
Timeout in mid-packet, retrying
MsgNak received - resending
Timeout in mid-packet, retrying
MsgNak received - resending
Timeout in mid-packet, retrying
MsgNak received - resending
Remote exhausted 3 retries.
Couldn’t establish connection to remote target
Connection failed: 5.
Timeout in mid-packet, retrying
MsgNak received - resending
Timeout in mid-packet, retrying
MsgNak received - resending
Timeout in mid-packet, retrying
MsgNak received - resending
Remote exhausted 3 retries.
END

Yes, I have tried to extend the timeout to as much as 120 sec.
Yes, both serial ports are set to the same baudrate and comms. settings.

Yes, a nullmodem cable is used.
Yes, something happens on the target side
and that is (after a successful pdebug init) when i call (gdb) target
qnx /dev/ser1:

Host resent message with id 0 (0x0). Resending response.
Host resent message with id 0 (0x0). Resending response.
Host resent message with id 1 (0x1). Resending response.
Host resent message with id 1 (0x1). Resending response.

Any sugestions of what might be wrong anyone?

Regards
-Arve


cburgess@qnx.com


cburgess@qnx.com

Rony Shapiro <rshapiro@everbee.com> wrote:

Hi,

Was this ever resolved? I’m having the exact same problem.

pdebug 8000 + gdb target qnx :8000 works fine

pdebug /dev/ser1 + gdb target /dev/ser1 doesn’t

The target in this case is the PowerPC RPX-LITE SBC. Problem is, I’m
debugging a network driver, so using the ethenet port is kinda
problematic…

(The serial cable works fine for qtalk and for downloading images via ‘cp
image.srec /dev/ser1’. Futzing around with the baud rates didn’t help much.
I notice that qtalk and gdb can’t “share” /dev/ser1 from the host side -
qtalk exits with an error message when the “target qnx” command is given.
Perhaps there’s a similar contention between the shell and pdebug on the
target side?)

Oh. Are you trying to use the same serial port for debugging that the console
is being run on? Use a seperate dedicated port for pdebug, and let me know.

FYI, the only issue we have seen with pdebug and serial ports is when the target
machine is too slow to drain a stream of data from the serial port that is being
sent at a high baud rate. ie: PIII-850 host talking to a 486-33 target at 115,200.

Or something to that effect. Your trying slower baud rates would have avoided
that issue, so in this case I don’t think that is the problem.

Sorry I have been silent - I was on holiday.

Let me know if the dedicated ports help.

Regards.
GP

Thanks,

Rony



“Graeme Peterson” <> gp@qnx.com> > wrote in message
news:9jmloh$7qa$> 1@inn.qnx.com> …
Arve Slenes <> arve@datarespons.no> > wrote:

Ok, so it can work. This is good news. Have you tried a different
serial cable? When you first start pdebug, what date does it say
it was built on, and what Protocol Version is it using?

eg:
This version of pdebug was built on Jun 3 2001.
ProtoVer 0.1

What speed and OS are your host and your target? ie: PIII-850 ntox86
targetting
a 20 MHz ntoarm board?

What about gdb? which -l gdb ? Is it gdb5 ?

Thanks.

OK!
It miraculously worked once… So it’s a bit unstable…
After miraculously getting it to work straigth away, running gdb and
pdebug as
they talked perfectly over the 38400 bps serial line, I closed down the
programs to
do some other stuff. Then, when trying to connect again, it did not
work… The old
problems where back.

Restarting the PC and the target, or slaying the devc-ser8250, did not
seem to help.
gdb with the same messages as before and pdebug gave the following text
with
PDEBUG_DEBUG=1 set and ‘pdebug /dev/ser1,38400’ running:

Com port /dev/ser1 initialized OK
Target initialized OK
pdebug initialized
TargetDisconnect
TargetEnv: Clearing Environment
TargetEnv: Clearing Arguments
TargetConnect: major=0 minor=1
ResponseOKStatus status=1056
Host resent message with id 0 (0x0). Resending response.
Host resent message with id 0 (0x0). Resending response.
TargetDisconnect
TargetEnv: Clearing Environment
TargetEnv: Clearing Arguments
TargetDetach pid=0
Response OK
Host resent message with id 1 (0x1). Resending response.
Host resent message with id 1 (0x1). Resending response.

Graeme Peterson wrote:

Arve Slenes <> arve@datarespons.no> > wrote:

Hi. What are your host and target machines? To eliminate variables,
please try using baudrates of 38400 on both machines.

Before running pdebug, export PDEBUG_DEBUG=1, which will provide the
maximum debug output, and then please post the output here. Also, be
aware that pdebug will set the baudrate, so you must give it the right
speed on the command line. The default is 57600, so if you run:

stty 38400 < /dev/serN
pdebug &

it will reset the serial port to 57600.

Another thing that has helped me on occasion is to slay and restart
devc-ser8250: (on x86)

slay devc-ser8250
devc-ser8250 &

Let me know.
GP

Hi Colin!

Could you perhaps post a pair of stty settings that DO work…
Then I can try those. > :slight_smile:

-Arve

Colin Burgess wrote:

Can you post the output of stty -a < /dev/ser for BOTH serial
ports
when gdb and pdebug are trying to connect?

Arve Slenes <> arve@datarespons.no> > wrote:
Status:
I can receive stuff both ways with ‘cat < /dev/serX’ when using
‘qtalk’, but
not when using
‘cat > /dev/serX’. That is ‘cat > /dev/serX’ does not seem to
work, ‘qtalk’
works.
Are there any special serial settings I need for cat perhaps??

Still no contact with pdebug other than pdebug saying
‘Host resent message with id 0 (0x0). Resending response.’

I’m using pdebug -v

-Arve

Colin Burgess wrote:

A few things to try…

  1. check that you can send data via the ‘cat’ command both ways
    over
    the null modem

eg:
host$ cat > /dev/ser1
fjdslkfjdlksjfkldsjflkdsjflds

target$ cat < /dev/ser1
fjdslkfjdlksjfkldsjflkdsjflds

  1. check that you are starting pdebug with the right baudrate, I
    believe
    the default is 57600

eg:
target$ pdebug /dev/ser1,115200

  1. if you have another port to the machine, start pdebug in
    verbose mode

eg

target$ PDEBUG_DEBUG=1 pdebug /dev/ser1,115200

Arve Slenes <> arve@datarespons.no> > wrote:
When trying to connect to the remote ‘pdebug’ I get the
following:

START
(gdb) target qnx /dev/ser1
Remote debugging using /dev/ser1
Timeout in mid-packet, retrying
MsgNak received - resending
Timeout in mid-packet, retrying
MsgNak received - resending
Timeout in mid-packet, retrying
MsgNak received - resending
Remote exhausted 3 retries.
Couldn’t establish connection to remote target
Connection failed: 5.
Timeout in mid-packet, retrying
MsgNak received - resending
Timeout in mid-packet, retrying
MsgNak received - resending
Timeout in mid-packet, retrying
MsgNak received - resending
Remote exhausted 3 retries.
END

Yes, I have tried to extend the timeout to as much as 120 sec.
Yes, both serial ports are set to the same baudrate and comms.
settings.

Yes, a nullmodem cable is used.
Yes, something happens on the target side
and that is (after a successful pdebug init) when i call (gdb)
target
qnx /dev/ser1:

Host resent message with id 0 (0x0). Resending response.
Host resent message with id 0 (0x0). Resending response.
Host resent message with id 1 (0x1). Resending response.
Host resent message with id 1 (0x1). Resending response.

Any sugestions of what might be wrong anyone?

Regards
-Arve


cburgess@qnx.com


cburgess@qnx.com

Arve Slenes <arve@datarespons.no> wrote:

Sorry about the delay, but I’ve been tied up with a few other things…
Anyway, pdebug says:

This version of pdebug was built on Jun 22 2001.
ProtoVer 0.1

I’m running a DigitalLogic 66Mhz (can increase speed to 133Mhz)
target and a IBM PC with some Pentium MMX processor as host.
Not sure which speed, but sertainly not the fastest in the world.

GDB says it is gdb 5.0 when it starts up. ‘which -l gdb’ returns
‘/usr/bin/gdb’

Just tried ‘gdb -b 38400’ and ‘PDEBUG_DEBUG=1 pdebug /dev/ser1,38400’.
Same response as before mentioned.

Hey, Arve. Just curious, but are you trying to double up /dev/ser1 on the
target? Is pdebug trying to share with the console? If so, this is probably
the problem. Give pdebug a dedicated serial port.

Let me know.
GP

-Arve

Graeme Peterson wrote:

Arve Slenes <> arve@datarespons.no> > wrote:

Ok, so it can work. This is good news. Have you tried a different
serial cable? When you first start pdebug, what date does it say
it was built on, and what Protocol Version is it using?

eg:
This version of pdebug was built on Jun 3 2001.
ProtoVer 0.1

What speed and OS are your host and your target? ie: PIII-850 ntox86 targetting
a 20 MHz ntoarm board?

What about gdb? which -l gdb ? Is it gdb5 ?

Thanks.

OK!
It miraculously worked once… So it’s a bit unstable…
After miraculously getting it to work straigth away, running gdb and pdebug as
they talked perfectly over the 38400 bps serial line, I closed down the programs to
do some other stuff. Then, when trying to connect again, it did not work… The old
problems where back.

Restarting the PC and the target, or slaying the devc-ser8250, did not seem to help.
gdb with the same messages as before and pdebug gave the following text with
PDEBUG_DEBUG=1 set and ‘pdebug /dev/ser1,38400’ running:

Com port /dev/ser1 initialized OK
Target initialized OK
pdebug initialized
TargetDisconnect
TargetEnv: Clearing Environment
TargetEnv: Clearing Arguments
TargetConnect: major=0 minor=1
ResponseOKStatus status=1056
Host resent message with id 0 (0x0). Resending response.
Host resent message with id 0 (0x0). Resending response.
TargetDisconnect
TargetEnv: Clearing Environment
TargetEnv: Clearing Arguments
TargetDetach pid=0
Response OK
Host resent message with id 1 (0x1). Resending response.
Host resent message with id 1 (0x1). Resending response.

Graeme Peterson wrote:

Arve Slenes <> arve@datarespons.no> > wrote:

Hi. What are your host and target machines? To eliminate variables,
please try using baudrates of 38400 on both machines.

Before running pdebug, export PDEBUG_DEBUG=1, which will provide the
maximum debug output, and then please post the output here. Also, be
aware that pdebug will set the baudrate, so you must give it the right
speed on the command line. The default is 57600, so if you run:

stty 38400 < /dev/serN
pdebug &

it will reset the serial port to 57600.

Another thing that has helped me on occasion is to slay and restart
devc-ser8250: (on x86)

slay devc-ser8250
devc-ser8250 &

Let me know.
GP

Hi Colin!

Could you perhaps post a pair of stty settings that DO work…
Then I can try those. > :slight_smile:

-Arve

Colin Burgess wrote:

Can you post the output of stty -a < /dev/ser for BOTH serial ports
when gdb and pdebug are trying to connect?

Arve Slenes <> arve@datarespons.no> > wrote:
Status:
I can receive stuff both ways with ‘cat < /dev/serX’ when using ‘qtalk’, but
not when using
‘cat > /dev/serX’. That is ‘cat > /dev/serX’ does not seem to work, ‘qtalk’
works.
Are there any special serial settings I need for cat perhaps??

Still no contact with pdebug other than pdebug saying
‘Host resent message with id 0 (0x0). Resending response.’

I’m using pdebug -v

-Arve

Colin Burgess wrote:

A few things to try…

  1. check that you can send data via the ‘cat’ command both ways over
    the null modem

eg:
host$ cat > /dev/ser1
fjdslkfjdlksjfkldsjflkdsjflds

target$ cat < /dev/ser1
fjdslkfjdlksjfkldsjflkdsjflds

  1. check that you are starting pdebug with the right baudrate, I believe
    the default is 57600

eg:
target$ pdebug /dev/ser1,115200

  1. if you have another port to the machine, start pdebug in verbose mode

eg

target$ PDEBUG_DEBUG=1 pdebug /dev/ser1,115200

Arve Slenes <> arve@datarespons.no> > wrote:
When trying to connect to the remote ‘pdebug’ I get the following:

START
(gdb) target qnx /dev/ser1
Remote debugging using /dev/ser1
Timeout in mid-packet, retrying
MsgNak received - resending
Timeout in mid-packet, retrying
MsgNak received - resending
Timeout in mid-packet, retrying
MsgNak received - resending
Remote exhausted 3 retries.
Couldn’t establish connection to remote target
Connection failed: 5.
Timeout in mid-packet, retrying
MsgNak received - resending
Timeout in mid-packet, retrying
MsgNak received - resending
Timeout in mid-packet, retrying
MsgNak received - resending
Remote exhausted 3 retries.
END

Yes, I have tried to extend the timeout to as much as 120 sec.
Yes, both serial ports are set to the same baudrate and comms. settings.

Yes, a nullmodem cable is used.
Yes, something happens on the target side
and that is (after a successful pdebug init) when i call (gdb) target
qnx /dev/ser1:

Host resent message with id 0 (0x0). Resending response.
Host resent message with id 0 (0x0). Resending response.
Host resent message with id 1 (0x1). Resending response.
Host resent message with id 1 (0x1). Resending response.

Any sugestions of what might be wrong anyone?

Regards
-Arve


cburgess@qnx.com


cburgess@qnx.com

I don’t think I’m using the same port. I’m using /dev/ser2
as the console and /dev/ser1 for pdebug…

But I’ll do an extra check on that, just to be absolutely sure. :slight_smile:

-Arve

Graeme Peterson wrote:

Arve Slenes <> arve@datarespons.no> > wrote:
Sorry about the delay, but I’ve been tied up with a few other things…
Anyway, pdebug says:

This version of pdebug was built on Jun 22 2001.
ProtoVer 0.1

I’m running a DigitalLogic 66Mhz (can increase speed to 133Mhz)
target and a IBM PC with some Pentium MMX processor as host.
Not sure which speed, but sertainly not the fastest in the world.

GDB says it is gdb 5.0 when it starts up. ‘which -l gdb’ returns
‘/usr/bin/gdb’

Just tried ‘gdb -b 38400’ and ‘PDEBUG_DEBUG=1 pdebug /dev/ser1,38400’.
Same response as before mentioned.

Hey, Arve. Just curious, but are you trying to double up /dev/ser1 on the
target? Is pdebug trying to share with the console? If so, this is probably
the problem. Give pdebug a dedicated serial port.

Let me know.
GP

-Arve

Graeme Peterson wrote:

Arve Slenes <> arve@datarespons.no> > wrote:

Ok, so it can work. This is good news. Have you tried a different
serial cable? When you first start pdebug, what date does it say
it was built on, and what Protocol Version is it using?

eg:
This version of pdebug was built on Jun 3 2001.
ProtoVer 0.1

What speed and OS are your host and your target? ie: PIII-850 ntox86 targetting
a 20 MHz ntoarm board?

What about gdb? which -l gdb ? Is it gdb5 ?

Thanks.

OK!
It miraculously worked once… So it’s a bit unstable…
After miraculously getting it to work straigth away, running gdb and pdebug as
they talked perfectly over the 38400 bps serial line, I closed down the programs to
do some other stuff. Then, when trying to connect again, it did not work… The old
problems where back.

Restarting the PC and the target, or slaying the devc-ser8250, did not seem to help.
gdb with the same messages as before and pdebug gave the following text with
PDEBUG_DEBUG=1 set and ‘pdebug /dev/ser1,38400’ running:

Com port /dev/ser1 initialized OK
Target initialized OK
pdebug initialized
TargetDisconnect
TargetEnv: Clearing Environment
TargetEnv: Clearing Arguments
TargetConnect: major=0 minor=1
ResponseOKStatus status=1056
Host resent message with id 0 (0x0). Resending response.
Host resent message with id 0 (0x0). Resending response.
TargetDisconnect
TargetEnv: Clearing Environment
TargetEnv: Clearing Arguments
TargetDetach pid=0
Response OK
Host resent message with id 1 (0x1). Resending response.
Host resent message with id 1 (0x1). Resending response.

Graeme Peterson wrote:

Arve Slenes <> arve@datarespons.no> > wrote:

Hi. What are your host and target machines? To eliminate variables,
please try using baudrates of 38400 on both machines.

Before running pdebug, export PDEBUG_DEBUG=1, which will provide the
maximum debug output, and then please post the output here. Also, be
aware that pdebug will set the baudrate, so you must give it the right
speed on the command line. The default is 57600, so if you run:

stty 38400 < /dev/serN
pdebug &

it will reset the serial port to 57600.

Another thing that has helped me on occasion is to slay and restart
devc-ser8250: (on x86)

slay devc-ser8250
devc-ser8250 &

Let me know.
GP

Hi Colin!

Could you perhaps post a pair of stty settings that DO work…
Then I can try those. > :slight_smile:

-Arve

Colin Burgess wrote:

Can you post the output of stty -a < /dev/ser for BOTH serial ports
when gdb and pdebug are trying to connect?

Arve Slenes <> arve@datarespons.no> > wrote:
Status:
I can receive stuff both ways with ‘cat < /dev/serX’ when using ‘qtalk’, but
not when using
‘cat > /dev/serX’. That is ‘cat > /dev/serX’ does not seem to work, ‘qtalk’
works.
Are there any special serial settings I need for cat perhaps??

Still no contact with pdebug other than pdebug saying
‘Host resent message with id 0 (0x0). Resending response.’

I’m using pdebug -v

-Arve

Colin Burgess wrote:

A few things to try…

  1. check that you can send data via the ‘cat’ command both ways over
    the null modem

eg:
host$ cat > /dev/ser1
fjdslkfjdlksjfkldsjflkdsjflds

target$ cat < /dev/ser1
fjdslkfjdlksjfkldsjflkdsjflds

  1. check that you are starting pdebug with the right baudrate, I believe
    the default is 57600

eg:
target$ pdebug /dev/ser1,115200

  1. if you have another port to the machine, start pdebug in verbose mode

eg

target$ PDEBUG_DEBUG=1 pdebug /dev/ser1,115200

Arve Slenes <> arve@datarespons.no> > wrote:
When trying to connect to the remote ‘pdebug’ I get the following:

START
(gdb) target qnx /dev/ser1
Remote debugging using /dev/ser1
Timeout in mid-packet, retrying
MsgNak received - resending
Timeout in mid-packet, retrying
MsgNak received - resending
Timeout in mid-packet, retrying
MsgNak received - resending
Remote exhausted 3 retries.
Couldn’t establish connection to remote target
Connection failed: 5.
Timeout in mid-packet, retrying
MsgNak received - resending
Timeout in mid-packet, retrying
MsgNak received - resending
Timeout in mid-packet, retrying
MsgNak received - resending
Remote exhausted 3 retries.
END

Yes, I have tried to extend the timeout to as much as 120 sec.
Yes, both serial ports are set to the same baudrate and comms. settings.

Yes, a nullmodem cable is used.
Yes, something happens on the target side
and that is (after a successful pdebug init) when i call (gdb) target
qnx /dev/ser1:

Host resent message with id 0 (0x0). Resending response.
Host resent message with id 0 (0x0). Resending response.
Host resent message with id 1 (0x1). Resending response.
Host resent message with id 1 (0x1). Resending response.

Any sugestions of what might be wrong anyone?

Regards
-Arve


cburgess@qnx.com


cburgess@qnx.com

Hi, all.

I just found a bug in GDB which destabilized serial port debugging.
The bug causes gdb to sometimes communicate improperly with pdebug over
serial ports. This is why we see it working sometimes, and then not working.

The bug does not appear to affect TCP/IP.

Which host/target are you using? I can then build a TRIAL version of
gdb for each of you and make it available on Developer’s Corner.
Then we can see if this is what you have been tripping over.

Please let me know.
Regards,
GP

Arve Slenes <arve@datarespons.no> wrote:

I don’t think I’m using the same port. I’m using /dev/ser2
as the console and /dev/ser1 for pdebug…

But I’ll do an extra check on that, just to be absolutely sure. > :slight_smile:

-Arve

Graeme Peterson wrote:

Arve Slenes <> arve@datarespons.no> > wrote:
Sorry about the delay, but I’ve been tied up with a few other things…
Anyway, pdebug says:

This version of pdebug was built on Jun 22 2001.
ProtoVer 0.1

I’m running a DigitalLogic 66Mhz (can increase speed to 133Mhz)
target and a IBM PC with some Pentium MMX processor as host.
Not sure which speed, but sertainly not the fastest in the world.

GDB says it is gdb 5.0 when it starts up. ‘which -l gdb’ returns
‘/usr/bin/gdb’

Just tried ‘gdb -b 38400’ and ‘PDEBUG_DEBUG=1 pdebug /dev/ser1,38400’.
Same response as before mentioned.

Hey, Arve. Just curious, but are you trying to double up /dev/ser1 on the
target? Is pdebug trying to share with the console? If so, this is probably
the problem. Give pdebug a dedicated serial port.

Let me know.
GP

-Arve

Graeme Peterson wrote:

Arve Slenes <> arve@datarespons.no> > wrote:

Ok, so it can work. This is good news. Have you tried a different
serial cable? When you first start pdebug, what date does it say
it was built on, and what Protocol Version is it using?

eg:
This version of pdebug was built on Jun 3 2001.
ProtoVer 0.1

What speed and OS are your host and your target? ie: PIII-850 ntox86 targetting
a 20 MHz ntoarm board?

What about gdb? which -l gdb ? Is it gdb5 ?

Thanks.

OK!
It miraculously worked once… So it’s a bit unstable…
After miraculously getting it to work straigth away, running gdb and pdebug as
they talked perfectly over the 38400 bps serial line, I closed down the programs to
do some other stuff. Then, when trying to connect again, it did not work… The old
problems where back.

Restarting the PC and the target, or slaying the devc-ser8250, did not seem to help.
gdb with the same messages as before and pdebug gave the following text with
PDEBUG_DEBUG=1 set and ‘pdebug /dev/ser1,38400’ running:

Com port /dev/ser1 initialized OK
Target initialized OK
pdebug initialized
TargetDisconnect
TargetEnv: Clearing Environment
TargetEnv: Clearing Arguments
TargetConnect: major=0 minor=1
ResponseOKStatus status=1056
Host resent message with id 0 (0x0). Resending response.
Host resent message with id 0 (0x0). Resending response.
TargetDisconnect
TargetEnv: Clearing Environment
TargetEnv: Clearing Arguments
TargetDetach pid=0
Response OK
Host resent message with id 1 (0x1). Resending response.
Host resent message with id 1 (0x1). Resending response.

Graeme Peterson wrote:

Arve Slenes <> arve@datarespons.no> > wrote:

Hi. What are your host and target machines? To eliminate variables,
please try using baudrates of 38400 on both machines.

Before running pdebug, export PDEBUG_DEBUG=1, which will provide the
maximum debug output, and then please post the output here. Also, be
aware that pdebug will set the baudrate, so you must give it the right
speed on the command line. The default is 57600, so if you run:

stty 38400 < /dev/serN
pdebug &

it will reset the serial port to 57600.

Another thing that has helped me on occasion is to slay and restart
devc-ser8250: (on x86)

slay devc-ser8250
devc-ser8250 &

Let me know.
GP

Hi Colin!

Could you perhaps post a pair of stty settings that DO work…
Then I can try those. > :slight_smile:

-Arve

Colin Burgess wrote:

Can you post the output of stty -a < /dev/ser for BOTH serial ports
when gdb and pdebug are trying to connect?

Arve Slenes <> arve@datarespons.no> > wrote:
Status:
I can receive stuff both ways with ‘cat < /dev/serX’ when using ‘qtalk’, but
not when using
‘cat > /dev/serX’. That is ‘cat > /dev/serX’ does not seem to work, ‘qtalk’
works.
Are there any special serial settings I need for cat perhaps??

Still no contact with pdebug other than pdebug saying
‘Host resent message with id 0 (0x0). Resending response.’

I’m using pdebug -v

-Arve

Colin Burgess wrote:

A few things to try…

  1. check that you can send data via the ‘cat’ command both ways over
    the null modem

eg:
host$ cat > /dev/ser1
fjdslkfjdlksjfkldsjflkdsjflds

target$ cat < /dev/ser1
fjdslkfjdlksjfkldsjflkdsjflds

  1. check that you are starting pdebug with the right baudrate, I believe
    the default is 57600

eg:
target$ pdebug /dev/ser1,115200

  1. if you have another port to the machine, start pdebug in verbose mode

eg

target$ PDEBUG_DEBUG=1 pdebug /dev/ser1,115200

Arve Slenes <> arve@datarespons.no> > wrote:
When trying to connect to the remote ‘pdebug’ I get the following:

START
(gdb) target qnx /dev/ser1
Remote debugging using /dev/ser1
Timeout in mid-packet, retrying
MsgNak received - resending
Timeout in mid-packet, retrying
MsgNak received - resending
Timeout in mid-packet, retrying
MsgNak received - resending
Remote exhausted 3 retries.
Couldn’t establish connection to remote target
Connection failed: 5.
Timeout in mid-packet, retrying
MsgNak received - resending
Timeout in mid-packet, retrying
MsgNak received - resending
Timeout in mid-packet, retrying
MsgNak received - resending
Remote exhausted 3 retries.
END

Yes, I have tried to extend the timeout to as much as 120 sec.
Yes, both serial ports are set to the same baudrate and comms. settings.

Yes, a nullmodem cable is used.
Yes, something happens on the target side
and that is (after a successful pdebug init) when i call (gdb) target
qnx /dev/ser1:

Host resent message with id 0 (0x0). Resending response.
Host resent message with id 0 (0x0). Resending response.
Host resent message with id 1 (0x1). Resending response.
Host resent message with id 1 (0x1). Resending response.

Any sugestions of what might be wrong anyone?

Regards
-Arve


cburgess@qnx.com


cburgess@qnx.com