Serial Port as Debug Interface

Hi,
I have a standard x86 board. I have put QNX 6.4.1 without photon on it. During the development phase, I have a display monitor connected to the x86 where I can see the console. On field, there won’t be any monitor connected. In that scenario, I want to use the serial port as a Debug Interface so that, it can be connected to my laptop and run the applications on the QNX terminal. I would like to know what needs to be done in order to see the QNX console on the Hyperterminal of my laptop.
Any suggestion is highly appreciated.
Thanks.

As far as i know → Connect your x86 board to the laptop using a serial modem cable. Port settings should be the same. Write a script in which attach your executable to pseudo tty by using pterm <executable_name>. Save this script in /etc/profile.d. Run the script. Your executable will start working and the serial console in your laptop will give out the prints given in the executable.

This is what i know. I request the rest of our open qnx friends to give more input on this

Are you self hosting or are you using the IDE on some other system, eg. Windows? If the former, take a look at a .build file in /boot/build. If the latter, create a target project and look at the default boot script file.

In either case you will see something like this:

devc.console &
reopen /dev/con1

You will need to replace this with something like:
devc.8250 &
reopen /dev/ser1

Examples in the docs should be helpful.

This will redirect the console to the serial port.

Hi Maschoen,
Thanks for the reply. I thought that I need to write some application which redirects the console. A simple redirection has solved the problem.

My problem has become a bit more complicated. I came to know that the serial port will be used to connect to some external peripheral. Can I use the ethernet port to redirect the console on to the network port? If yes, pls share the info.
Maschoen: I’m using Windows IDE and flashed QNX on the target.

I don’t know the answer to that. Ethernet is not like a serial port. There may be a simple way to do it, but here is a complicated way.

Write an resource manager that owns /dev/eth_con that you can open and write to, like a serial port. When a client writes to this device, send out UDP packets to some known IP/Port address. Before starting this resource manager in the build script you will first need to start io-pkt, mount tcpip, and configure your ethernet. After that, you can use reopen to redirect the console to this port.

Then you will need a program to read at this IP/Port address.

Since this is such an obvious way to debug things, I’d guess that there is an easier way. You might want to check the docs on building embedded systems and debugging targets.

I’m thinking about one solution in my mind. Please suggest whether that is possible or not. I would like to see the console of target which is having no photon from Phindows. Can I connect to a QNX target without photon using Phindows?

No. My solution to this is to run a virtual session of photon, without any graph driver. That means it can ONLY be access via phindows. All of a processes are started in pterms that are running inside the virtual photon session. Works great for us.

You may be able to telnet into the machine and sendreceivereply.wordpress.com/2 … delivered/ never tried it myself.

There is also : community.qnx.com/sf/discussion/ … CCCDA7BC94