View topic - problem with npm-tcpip.so in x86 image

problem with npm-tcpip.so in x86 image

Discussion about the general applications that run on QNX6

problem with npm-tcpip.so in x86 image

Postby raohansikarao » Thu Feb 25, 2010 7:19 am

hi frnds,
my network card is realtek, in build file when i include 'npm-tcpip.so', in booting image is strucked , please inform where to put this .so and path also. :?:
raohansikarao
Active Member
 
Posts: 34
Joined: Thu Feb 25, 2010 4:25 am

RE: problem with npm-tcpip.so in x86 image

Postby Elmi » Thu Feb 25, 2010 8:18 am

Hm, did anybody understand this question?
Elmi
Active Member
 
Posts: 63
Joined: Sun Aug 02, 2009 4:57 pm

RE: problem with npm-tcpip.so in x86 image

Postby raohansikarao » Thu Feb 25, 2010 9:26 am

what i mean to say u is "i am developing a qnx image, in that image i need to assign an ipaddress to the system. for that purpose i am including corresponding libraries and Dlls, but the problem i am facing is when i include the 'npm-tcpip.so' (dll) the system is not booting(it strucks at the initial stage only) if i remove the 'npm-tcpip.so' it works fine(but when i type the command ifconfig in image it saying that address family is not supported by protocol family)"
Below is the image i developed. can any one please verify and tell me where i am doing wrong(my ethernet driver is realtek)


[virtual=x86,bios +compress] .bootstrap = {
startup-bios -v
PATH=:/proc/boot:/usr/bin:/bin:/usr/photon/bin
LD_LIBRARY_PATH=:/proc/boot:/usr/lib:/lib:/lib/dll PHOTON_PATH=/usr/photon procnto -v
}

[+script] .script = {
procmgr_symlink ../../proc/boot/libc.so.2 /usr/lib/ldqnx.so.2
display_msg QNX Neutrino 6.3 on an x86 platform with Photon
slogger &

display_msg Starting PCI
pci-bios
waitfor /dev/pci 10

display_msg Starting Serial
devc-ser8250 &
reopen /dev/ser1 &

devc-con &

display_msg Set Env Var
PATH=:/proc/boot:/usr/bin:/bin:/usr/photon/bin

LD_LIBRARY_PATH=:/proc/boot:/usr/lib:/lib:/lib/dll

PHOTON=/usr/photon
PHOTON_PATH=/usr/photon

SYSNAME=nto
TERM=qansi

ABLANG=en_US
SHELL=/bin/sh
TMPDIR=/tmp
ABLPATH=/usr/photon/translations
PHFONT=/dev/phfont
HOME=/



display_msg Starting Photon
Photon
waitfor /dev/photon 10

display_msg Starting Input
devi-hirun kbd fd -d/dev/kbd



##### /*USB driver**/
display_msg "Start USB driver...."
on -C 1 /sbin/io-usb -duhci -dohci -dehci
waitfor /dev/io-usb/io-usb 4


io-net -drtl -p tcpip
ifconfig en0 10.153.29.95 netmask 255.255.255.0
waitfor /dev/socket 10

inetd &

qconn &

phfont -d /usr/photon/font_repository &
waitfor /dev/phfont


fontsleuth -d /usr/photon/font_repository &

display_msg Starting Graphics
#io-graphics -dvesabios photon,xres=1024,yres=768,bitpp=16,refresh=60 -pphoton
io-graphics -dvesabios photon,xres=1280,yres=1024,bitpp=32,refresh=60 -pphoton
waitfor /dev/phfont 10

display_msg Starting Window Manager
pwm &
bkgdmgr &
devc-pty &

display_msg Starting Terminal
pterm /proc/boot/sh &

display_msg Starting Application

phcalc &

[+session] sh &

}

[type=link] /bin/sh = /proc/boot/sh
[type=link] /dev/console = /dev/ser1
[type=link] /tmp = /dev/shmem

# graphics driver
devg-vesabios.so
/etc/system/config/crtc-settings = /etc/system/config/crtc-settings
/usr/photon/palette/default.pal = /usr/photon/palette/default.pal

# standard libs
libc.so
libm.so

# photon libs
libph.so
libAp.so
libphexlib.so

libphimg.so
libmedia.so

# io-graphics libs
gri-photon.so
libphrender.so
libgri.so
libdisputil.so
libffb.so

#####/*uncomment for USB driver*/
libusbdi.so
devu-uhci.so
devu-ohci.so
devu-ehci.so
devn-asix.so
######/*end USB driver*/

#########network driver ###########
devn-rtl.so
npm-tcpip.so
##########


/lib/dll/font/ttfFFcore.so = /lib/dll/font/ttfFFcore.so
/lib/dll/font/FCcore.so = /lib/dll/font/FCcore.so
/lib/dll/font/PHFcore.so = /lib/dll/font/PHFcore.so
/lib/dll/mmedia/stream_reader.so = /lib/dll/mmedia/stream_reader.so
/lib/dll/gl/gl-ph.so = /lib/dll/gl/gl-ph.so

libfontharnessutils.so
libfontutils.so
libblkcache.so
libFF-T2K.so
libFF-T2K-cache.so
libFF-T2K-fm.so

#procmgr_symlink /lib/dll/libfont.so.1
libfont.so
phfont.so

# font config
/usr/photon/font_repository/phcursor.phf = /usr/photon/font_repository/phcursor.phf
/usr/photon/font_repository/tt2001m_.ttf = /usr/photon/font_repository/tt2001m_.ttf
/usr/photon/font_repository/mappings = /usr/photon/font_repository/mappings

/usr/photon/font_repository/fontdir = {
;
; fontdir config file
;
phcursor,.phf,Photon Cursor,0,,E900-E921,Np,32x32,3K
primasansbts,0@tt2001m_.ttf,PrimaSans BT,0,,0020-F002,p,192x170,162K
primasansmonobts,0@tt2009m_.ttf,PrimaSansMono BT,0,,0020-F002,f,79x170,109K
arial,0@tt0003m_.ttf,arial,0,,0020-F002,MIp,130x119,148K
}

/usr/photon/font_repository/fontext = {
;
; fontext config file
;
+normal = primasansbts, primasansmonobts,phcursor
}

/usr/photon/font_repository/fontmap = {
;
; fontmap config file
;
?=primasansbtsb
? = primasansmonobts
}

/usr/photon/font_repository/fontdesc = {
;
; fontdesc config file
;
[SANSERIF]
PrimaSans BT
PrimaSansMono BT
}


/usr/photon/font_repository/fontdynamic = {
;
; fontdynamic config file
;
swis721btsb,0@tt0005m_.ttf,Swis721 BT,0,B,0020-F002,MIp,132x119,139K
}



# pwm and bkgdmgr config
/usr/photon/config/wm/wm.cfg = /usr/photon/config/wm/wm.cfg

# input config
/usr/photon/keyboard/en_US_101.kbd = /usr/photon/keyboard/en_US_101.kbd
/usr/photon/keyboard/en_US_101.kdef = /usr/photon/keyboard/en_US_101.kdef

# Executables
[data=c]
cp
chmod
pci-bios
devc-pty
devc-ser8250
devc-con
ftp
ls
sh
cat
pipe
pidin
uname
slogger
sloginfo
slay
clear
Photon
phfont
io-graphics
devi-hirun
pwm
wmswitch
shutdown
netmanager
ping
clear
io-net
inetd
setconf
ifconfig
ping
qconn
mount
ftp
inetd
io-usb
usb

#Services (telnetd etc) config
telnetd
ftpd
login

#/etc/ppp/chap-secrets = {
# Client Server Secret Addrs
#########################################
#* * "password" *
#}

/etc/syslog.conf = {
*.* /tmp/syslog
*.* /.../....
}

# Inetd config Files
/etc/services= /etc/services
/etc/protocols= /etc/protocols
/etc/termcap= /etc/termcap
/etc/passwd= /etc/passwd
/etc/default/login= /etc/default/login
/etc/resolv.conf= /etc/resolv.conf
/etc/shadow = /etc/shadow


/etc/inetd.conf = {
telnet stream tcp nowait root /usr/sbin/telnetd in.telnetd
ftp stream tcp nowait root /usr/sbin/ftpd in.ftpd
-l
}

/etc/services={
ftp 21/tcp
telnet 23/tcp
}

/etc/ftpusers={

}


/etc/shadow={
root:CDIdxOja3k5lk:1166770462:0:0
}

/etc/passwd={
root::0:0:Superuser:/:/bin/sh
ftp:x:14:80:FTP User:/:
ftplogin:x:0:0::/:/bin/sh
}

[+raw] /usr/photon/bin/pterm = pterm
[+raw] /usr/photon/bin/phcalc = phcalc
[+raw] /usr/photon/bin/phshutdown = phshutdown
[+raw] /usr/photon/bin/bkgdmgr = bkgdmgr
[+raw] /usr/photon/bin/pwmopts = pwmopts
[+raw] /usr/photon/bin/phmenu = phmenu
[+raw] /usr/photon/bin/phlip = phlip


# allow pterm to save its configuration to RAM, if the user changes it.
[type=link] /.ph/pterm = /dev/shmem

# allow pwm and bkgdmgr to save their configuration to RAM, if the user changes it.
[type=link] /.ph/wm = /dev/shmem
raohansikarao
Active Member
 
Posts: 34
Joined: Thu Feb 25, 2010 4:25 am

Postby Tim » Fri Feb 26, 2010 6:16 pm

raohansikarao,

Just a pure guess but you might try waiting between starting io-net and your ifconfig statement.

io-net -drtl -p tcpip
waitfor /dev/io-net 10
ifconfig en0 10.153.29.95 netmask 255.255.255.0
waitfor /dev/socket 10

In my boot image I add the ampersand when starting io-net so that it runs as a daemon process.

io-net -drtl -p tcpip &

It may be that io-net is simply not returning control to your script.

Also I'd add some display_msg's between statements so you know exactly where it hangs up as it could be the inetd or qconn commands that cause the problem.

Tim
Tim
Senior Member
 
Posts: 1503
Joined: Wed Mar 10, 2004 12:28 am

problem with ftp

Postby raohansikarao » Sat Feb 27, 2010 6:59 am

when i try to connect my qnx system from windows system(using ftp) it is connecting for first time and when i quit that ftp session and try to connect it again it is giving error "connection refused by remote host" ........can any one please tell me why this is happening.
raohansikarao
Active Member
 
Posts: 34
Joined: Thu Feb 25, 2010 4:25 am

RE: problem with ftp

Postby maschoen » Sat Feb 27, 2010 7:26 pm

How is the first ftpd getting started? inetd? Or do you start ftpd manually. If the latter, maybe ftpd is dying?
maschoen
QNX Master
 
Posts: 2720
Joined: Wed Jun 25, 2003 5:18 pm

RE: problem with ftp

Postby raohansikarao » Mon Mar 01, 2010 3:56 am

thank u for quick responce ......... what you mean by ftpd is dying? if that is true how to restart it. i am beginner to the qnx will u please explain me in detail .... i am starting ftpd with inetd only
raohansikarao
Active Member
 
Posts: 34
Joined: Thu Feb 25, 2010 4:25 am

RE: problem with ftp

Postby maschoen » Mon Mar 01, 2010 5:25 am

This is a unix'ie thing. ftpd is the server side of the client-server connection. ftp is the client side. In order to connect ftp, ftpd has to be running. There are two ways that this can occur.

1) You run inetd. It uses a file /etc/inetd.conf for configuration. It will start programs like ftpd when ftp tries to connect. In your situation, it might be inetd that is dying but that is very unlikely.

2) You run ftpd manually. I'm not sure, but I think there is a parameter that tells it to stay resident, so that after the first connection it doesn't die. When it is started by inetd, it will die after the connection ends.

You probably can google ftp, ftpd, inetd and inetd.conf to get lots of information.
maschoen
QNX Master
 
Posts: 2720
Joined: Wed Jun 25, 2003 5:18 pm

Postby raohansikarao » Mon Mar 01, 2010 8:48 am

what i am doing is i am setting ip address of qnx system with io-net command as shown below

>>io-net -d rtl -p ttcpip if=en0:xxx.xxx.x.xx(in qnx)

>>ftpd(in qnx)

>> ftp xxx.xxx.x.xx(from windows system)

in windows system

it displaying the message "unknown error number"

if i type inetd(in qnx) then the message is "connection closed by remote host"

>> but from qnx system i am able to do ftp to windows system however from windows to qnx it is not possible.

please suggest me where i am doing wrong, thanks in advance
raohansikarao
Active Member
 
Posts: 34
Joined: Thu Feb 25, 2010 4:25 am

Postby maschoen » Mon Mar 01, 2010 5:31 pm

Well I think it is exactly as I stated earlier. The first time you ftp from windows it works because ftpd is present. When complete ftpd exits and connections no longer work.

Take a look at the -D option in this doc:
http://www.openbsd.org/cgi-bin/man.cgi? ... &sektion=8

I don't know why but the qnx ftpd does not have this option.

That suggests that the only way to accomplish what you want is using inetd.

Check the file /etc/inetd.conf to make sure that the line

ftp stream tcp nowait root /usr/sbin/ftpd in.ftpd -l

is uncommented.


Not start inetd as follows:

# inetd &

That should solve the problem.
maschoen
QNX Master
 
Posts: 2720
Joined: Wed Jun 25, 2003 5:18 pm

Postby raohansikarao » Tue Mar 02, 2010 4:21 am

i checked the file /etc/inetd.conf the line "ftp stream tcp nowait root /usr/sbin/ftpd in.ftpd -l" is in uncomment only and i am starting inetd as follows "inetd" but still problem exist
raohansikarao
Active Member
 
Posts: 34
Joined: Thu Feb 25, 2010 4:25 am


Return to QNX6 - Applications

Who is online

Users browsing this forum: No registered users and 2 guests