Project Home
Project Home
Trackers
Trackers
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Migrating from Photon 6.3.x to 6.5.0: (25 Items)
   
Migrating from Photon 6.3.x to 6.5.0  
We're endeavoring to migrate from 6.3.x to 6.5.0 and it's unclear what is required to make the move in Photon. In 6.3.x,
 we run the Photon server on one computer (MCC) and the graphics subsystem/input support on a peripheral computer that 
contains a touch screen. In our 6.3.x implementation, we run the following four commands on the peripheral computer with
 the touch screen:

io-hid -dps2ser ps2mouse:mousedev &
devi-hid -P -r mouse
# Wait for Photon to start on the master computer
io-graphics -di830 vid=0x8086,did=0x3582,index=0,photon=/net/MCC/dev/photon,xres=800,yres=600,bitpp=32,refresh=60 -pphoton touchscreen -F-A
devi-elo -d/net/MCC/dev/photon smartset -b 9600 -R -c fd -d/dev/ser1 -s \
    abs -f/hm/config/calib.$HOSTNAME > /root/devi-elo.out 2>&1

Now 6.5.0 has added the Graphics Framework server, io-display. Does io-display need to be started on the peripheral or 
is it only needed on the server where Photon is running?

I see the interface to io-graphics has changed to a file based configuration so I presume we need to create an entry for
 the I830. Does the display.conf update need to be made on our server machine, peripheral machine, or both?

Is anything more required in the display.conf file than the following (i.e. what are the photon{} entries at the 
beginning of the file and inside the display{} entries)?

# Intel I830
device {
                        drivername=i830
                        vid=0x8086
                        did=0x3582
                        deviceindex=0
                        display {
                                                xres=800
                                                yres=600
                                                refresh=60
                                                pixel_format=argb8888
                        }
}

It looks like the calls to io-hid and devi-hid are the same in 6.3.x and 6.5.0.

io-graphics is a different matter, the interface has changed dramatically. For 6.5.0, it looks like we'll need '-d vid=
0x8086,did=0x3582,index=0' and '-n /net/MCC/dev/photon' arguments. How to handle the 6.3.x '-pphoton touchscreen' and '-
F-A' options in 6.5.0?

Any insights into the new framework are greatly appreciated.

Mark
Re: Migrating from Photon 6.3.x to 6.5.0  
1. The input related stuff has not changed -- so it should be used the same way as it was in 6.3.x.

2. Take a look at this docs: http://www.qnx.com/developers/docs/6.5.0/topic/com.qnx.doc.neutrino_utilities/d/dispconf.
html
This is the utility that is used to create/update the default display.conf file when a self hosted x86 is started.The 
enumerator (enum-devices) uses it. The default display section for your device looks like this:

display {
   xres=640
   yres=480
   refresh=60
   pixel_format=rgb565
   photon {
       enabled=1    # if this is the primary display card.
       xoffset=0
       yoffset=0
       cursor=hardware
       input_group=1
   }
}

You will need to modify it to reflect your graphics parameters. Most importantly the 'cursor=hardware' should be changed
 to 'cursor=none' --> this is your '-photon touchsceen' equivalent.

3. The graphics start up would be similar to this:
    io-display -d vid=...,did,...
    io-graphics -n /net/MCC/dev/photon

I didn't use '-d vid...' with the io-graphics, because there is only one device, and it should be detected automatically
.

4. The '-F-A' -- you need to modify the /usr/photon/font_repository/fontopts file and add the '-A' option' to the [io-
font] section. See phfont docs for details: http://www.qnx.com/developers/docs/6.5.0/topic/com.qnx.doc.
neutrino_utilities/p/phfont.html
Re: Migrating from Photon 6.3.x to 6.5.0  
Thanks for the help. Unfortunately, there's still something missing.

I used dispconf to update my display.conf file and found the following at the beginning of the file (I manually changed 
'cursor=hardware' to 'cursor=none'). Everything seems reasonable to me but I don't really know exactly what I'm looking 
at.

device {
        photon {
                driver {
                        drivername=i830
                        modeopts=
                }
        }
        drivername=i830
        modeopts=
        vid=0x8086
        did=0x3582
        deviceindex=0x0
        display {
                xres=800
                yres=600
                refresh=60
                pixel_format=argb8888
                photon {
                        enabled=1
                        xoffset=0
                        yoffset=0
                        cursor=none
                        input_group=1
                }
        }
}


On my peripheral, the machine with the touch screen, I attempted to run:

io-display -d vid=0x8086,did=0x3582,deviceindex=0
io-hid -dps2ser ps2mouse:mousedev &
devi-hid -P -r mouse
io-graphics -v -n /net/MCC/dev/photon
devi-elo ....

Unfortunately, I'm getting the following error on the touch screen

Could not initialize device "vid=0x8086,did=0x3582,deviceindex=0": No such file or directory
io-display failed to initialize

Must the graphics framework, io-display, run on both the server that's running Photon and the peripheral with the touch 
screen?

That's what I have running now, two instances of io-display, but that seems counter intuitive since the io-display 
documentation says it should be started before Photon. In all likelihood, Photon will have started on our server machine
 before io-display is started on the peripheral computer with the touch screen.

Re: Migrating from Photon 6.3.x to 6.5.0  
-- The config looks reasonable to me. 

-- running io-display on the server node is not mandatory. You will need to run io-display and io-graphics on the server
 node only if you plan to use the server as the client.

-- Photon could be started before any graphics device is present.

-- It looks like the initialization of the io-display failed, check:
---- sloginfo
---- pci -v (and see if you have the device you specified)
---- check that you have the devg-i830.so in a "searchable" location

-- you can run multiple copies of io-display -- more than one adapter provision, I don't think you need it.



Re: Migrating from Photon 6.3.x to 6.5.0  
The io-display error occurred because I updated display.conf on the server, not on the peripheral with the touch screen.
 I changed the io-display start call on the peripheral to:

io-display -c /net/MCC/etc/system/config/display.conf -d vid=0x8086,did=0x3582,deviceindex=0

and got a little further along.

I tried adding

[io-font]
-A

and 

[io-font]
A

to /usr/photon/font_repository/fontopts on the server computer and in both cases I get the following error on the touch 
screen

conf_load_display_dot_conf(): No such file or directory.

Ideas? Thanks.

Mark
Re: Migrating from Photon 6.3.x to 6.5.0  
The /usr/photon/font_repository/fontopts and all related font files should be present on the client when running io-
graphics with '-f local' or '-f global'. In your case, you *probably* need to start phfont on the server node, and tell 
io-graphics to use it via PHFONT envar. This envar should point to the server's font server: PHFONT=/net/MCC/dev/phfont.
 The io-graphics '-f none' should be specified too.

Where do you plan to run the Photon aplications, on the server or the client?


Re: Migrating from Photon 6.3.x to 6.5.0  
The Photon applications run on the server, the client just has the display device.
Re: Migrating from Photon 6.3.x to 6.5.0  
Take a look at the /usr/bin/ph script. It is used to bring a "desktop" photon. It is useful to understand the sequence 
of the photon startup.

I understood that you do not run io-graphics on the server. That is why you need to run the font server on the server. 

You may still want to run local/global (doesn't matter in your case ) font server on the client node. This will speed-up
 font rendering by eliminating message passing to/from the server node for font rendering requests. In this case your 
client node will need to have all the font related files installed on it. See this docs on photon embedding: http://www.
qnx.com/developers/docs/6.5.0/topic/com.qnx.doc.photon_prog_guide/embed.html and the font related stuff.
Re: Migrating from Photon 6.3.x to 6.5.0  
I missed one thing: the path to your display.conf should also be given to the io-graphics's -c option.
Re: Migrating from Photon 6.3.x to 6.5.0  
Hmm, I'm still missing something.

I am familiar with the Photon in Embedded Systems pages, I've been comparing different versions to see if I can map our 
current 6.3.x implementation to 6.4.1/6.5.0.

I'm also somewhat familiar with the ph script because we're using a slightly modified version to start Photon on our 
master computer (MCC). For 6.4.1/6.5.0, our version of ph does not start $PHGFX nor bkgdmgr.

Back to our computer with the touch screen. The commands are now:

io-display -c /net/MCC/etc/system/config/display.conf -d vid=0x8086,did=0x3582,deviceindex=0
io-hid -dps2ser ps2mouse:mousedev &
devi-hid -P -r mouse
export PHFONT=/net/MCC/dev/phfont
io-graphics -c /net/MCC/etc/system/config/display.conf -f none -v -n /net/MCC/dev/photon
devi-elo ....

Now I'm at least seeing something on the touch screen. Unfortunately, it's an Error dialog containing:

Unable to continue, possible reasons:
- more than one io-graphics is running
- is-graphics is running in a manual mode
- io-graphics using different config file
- Phindows is connected to this system

I checked both the MCC and the touch screen computer and there's only one PID for io-graphics so that seems to rule out 
1) above. I don't know what the second possible reason means. I don't think the third possibility is likely, I've 
specified the config file (at least I think I have) in each instance it's used. Finally, I don't know what Phindows is 
but I don't think it's connected to our system.

I'm still stumped. Thanks.

Mark
Re: Migrating from Photon 6.3.x to 6.5.0  
I think your are pretty much done. This error dialog comes from the 'phgrafx'. It obviously can't detected graphics 
correctly in this setup. You actually don't need to run it at all. It is ran in a few places in the ph script.
What happens when you click on the close button?
Re: Migrating from Photon 6.3.x to 6.5.0  
When I attempt to close the window on the touch screen, nothing happens. It looks like touch screen input is not working
.

Mark
Re: Migrating from Photon 6.3.x to 6.5.0  
"devi-hid -P" will "disable" photon mode.
What you need is "-d /net/MMC/dev/photon". I presume the devi-elo... needs the same argument.
Re: Migrating from Photon 6.3.x to 6.5.0  
Hmm, still not quite there. Without the '-P -r mouse' arguments, devi-hid core dumps. With '-P -r mouse', devi-hid 
doesn't crash but the close button still doesn't work on the touch screen. Here's the current set of commands run on the
 computer with the touch screen attached.

io-display -c /net/MCC/etc/system/config/display.conf -d vid=0x8086,did=0x3582,deviceindex=0
io-hid -dps2ser ps2mouse:mousedev &
devi-hid -d /net/MCC/dev/photon -P -r mouse
export PHFONT=/net/MCC/dev/phfont
io-graphics -c /net/MCC/etc/system/config/display.conf -f none -v -n /net/MCC/dev/photon
devi-elo -d /net/MCC/dev/photon smartset -b 9600 -R fd -d/dev/ser1 -s abs -f/hm/config/calib.$HOSTNAME

For devi-elo, $HOSTNAME is MID-1 and the contents of /hm/config/calib.MID-1 is '0x0:799x599:400 3560 3460 620 0'.
Re: Migrating from Photon 6.3.x to 6.5.0  
"-P" must NOT  be used in you want to use devi-hid with Photon. I would also look into why devi-elo doesn't work. Simple
 questions like these:
-- devi-elo is it running?
-- does it have an fd open to Photon (pidin fds)
-- sloginfo?
Re: Migrating from Photon 6.3.x to 6.5.0  
OK, devi-hid must not be started with the -P option. Got it. Unfortunately, without the -P option, devi-hid crashes 
(Memory fault (core dumped)). So before I can even begin to look at devi-elo, I presume I need to get devi-hid working. 
Any ideas? I'll try to capture the core file but my system goes into continuous reboot with devi-hid crashing.
Re: Migrating from Photon 6.3.x to 6.5.0  
The core file doesn't show much.

Program terminated with signal 11, Segmentation fault.
[New process 438291 thread 1]
#0  0x08058f4f in bus_complete ()

The core file is attached, perhaps you can glean more information with access to the source.

Attachment: Text devi-hid.core 820 KB
Re: Migrating from Photon 6.3.x to 6.5.0  
I simulated a similar setup and I tried running devi-hid on my system. It worked fine for me. This is something your 
setup... Try removing '-r' option.

You don't need to run devi-hid for your devi-elo to work. 

From your setup it looks like you want a touchscreen input and a mouse input at the same time... Why?

Re: Migrating from Photon 6.3.x to 6.5.0  
I actually already did remove '-r mouse', that's what caused devi-hid to core dump. I tried adding it back and devi-hid 
didn't crash but the touch screen still doesn't work (i.e. I get the previously mentioned error but the 'Cancel' button 
is not detected).

We have a touch screen and a mouse (trackball) attached, that's why we're starting the mouse driver.

I checked the computer with the touch screen connected and devi-elo is running and it has fd's open (see below) but I'm 
not sure what they all are.

MID-1# pidin -P devi-elo fds
     pid name
  471061 hoton/bin/devi-elo
           0  331785 rw        0 /dev/ser1
           1  507927
           2    4103 -w      331 /cf/.ccslog
           3    4101 r-       32 /hm/config/calib.MID-1
           0s      1
           2s      1 MP        0 /dev/devi/ig1

sloginfo contains a bunch of Qnet and Ethernet driver entries. The only I/O related entries appear to be:

Jul 11 10:35:08    2    12     0 ps2 - Device Timeout (0x5e)
Jul 11 10:35:09    6     8     0 VGA primary : bus 0x0 dev/func 0x10
Jul 11 10:35:09    6     8     0 Found 1 PCI/AGP display devices
Jul 11 10:35:09    6     8     0 pci_init: found PCI device 8086:3582

Re: Migrating from Photon 6.3.x to 6.5.0  
Let's get devi-hid running with the mouse first:

 run 'devi-hid -d /net/MMC/dev/photon mouse'

(make sure that you slay devi-hid before you run a new one, enable cursor in the display.conf otherwise you won't see 
it).

Do you get a mouse input now?

I asked about the devi-hid because I am not sure why you would need it if you can't see the mouse pointer.

Re: Migrating from Photon 6.3.x to 6.5.0  
OK, I tried 'devi-hid -d /net/MCC/dev/photon mouse' but our start-up script is failing because /dev/devi/mouse0 is not 
found. Is a different device being created for 6.4.1/6.5.0 versus 6.3.x? I checked the man page but only /dev/devi/
mouse0 was mentioned.

The touch screen machine was rebooted prior to running the new arguments for devi-hid.

I did not get mouse input because our start-up script failed and caused a reboot when no mouse driver was detected.
Re: Migrating from Photon 6.3.x to 6.5.0  
Aha, I understand now why you had the '-r' option -- this option creates the /dev/devi/mouse0 resource manager entry. 
Try putting it back in.

Unfortunately we are getting to a point where it gets very difficult for me to help you any further. I suggest 
contacting QNX Tech Support.
Re: Migrating from Photon 6.3.x to 6.5.0  
OK, thanks for all your help. I never thought this would be the place that we got stuck in the migration to 6.5.0. So 
much for "Load the new tools, recompile and go". I'll get in touch with Tech Support; hopefully they'll be able to get 
things straightened out.

Mark
Re: Migrating from Photon 6.3.x to 6.5.0  
What is an 'external font server' and when wouldn't we use one? I ask because the phfont documentation says "You can 
pass options through the -F option to io-graphics when you aren't running an external font server.".

Is this a viable alternative?

It looks like we would call io-graphics with the '-f local' option and then use -F"-A". Does that make sense?

Thanks.
Re: Migrating from Photon 6.3.x to 6.5.0  
The '-F"-A"' is a documentation bug. This operation mode is no longer present.