Jump to ID:
Networking

Project Home

Discussions

Wiki

Project Info
Forum Topic - Start script for two network cards: Page 1 of 2 (18 Items)
   
 
 
Start script for two network cards  
I have a qnx6.3.2 PC104 computer stack with two network cards, one is the onboard ethernet card, the other the orinoco 
wifi network card. Basically, i wanna use the wifi card for msg passing with other qnx machines, while the wired card 
for debugging usage. I have two problems:

1. I use the following boot scripts to start the wired network qnet:
    io-net -d ns83815 -p tcpip -p qnet &
    waitfor /dev/io-net/en0 
    waitfor /dev/socket/2

    ifconfig en0 *.*.*.*
and it works fine. but i used
    devp-pccard
    io-net -d orinoco -p tcpip

the machine gave the error during its boot:
    unable to init dll devn-orinoco: No such device.

But when the machine finishes starting, i typed the above two commands again, the orinoco wifi card starts to work. i 
have no ideas about this.

2. There are two network interfaces, so i should assign two different ip address for each interface? for the wired 
network case, the above scripts are okay. how about when coming the assign the ip to the wifi network card? use en1? or 
??

Thank you
Eric
RE: Start script for two network cards  
1) I wonder if you're starting things too early...  Is it possible that
you're trying to launch the Orinoco driver before devp-pccard has
completed?  If you add in a "waitfor /dev/pccard" after devp-pccard,
does that make any difference?

Also, just to make sure...  You aren't running two versions of the stack
on startup are you?  If you want to have two separate interfaces, you
have to either specify both on the command line (with separate -d
options) or "mount" the interfaces after io-net has started.  

2)  Interfaces in io-net are numbered sequentially from 0 as they're
loaded in.  You can either use dhcp.client or manually assign the
interface an IP address.  Make sure that the two interfaces are on
separate subnets though.  If you assign addresses on the same subnet to
different interfaces, you'll get peculiar results.


	Robert.

-----Original Message-----
From: Eric Dong [mailto:eric.dongxx@gmail.com] 
Sent: Tuesday, June 17, 2008 7:25 AM
To: builds-networking
Subject: Start script for two network cards

I have a qnx6.3.2 PC104 computer stack with two network cards, one is
the onboard ethernet card, the other the orinoco wifi network card.
Basically, i wanna use the wifi card for msg passing with other qnx
machines, while the wired card for debugging usage. I have two problems:

1. I use the following boot scripts to start the wired network qnet:
    io-net -d ns83815 -p tcpip -p qnet &
    waitfor /dev/io-net/en0 
    waitfor /dev/socket/2

    ifconfig en0 *.*.*.*
and it works fine. but i used
    devp-pccard
    io-net -d orinoco -p tcpip

the machine gave the error during its boot:
    unable to init dll devn-orinoco: No such device.

But when the machine finishes starting, i typed the above two commands
again, the orinoco wifi card starts to work. i have no ideas about this.

2. There are two network interfaces, so i should assign two different ip
address for each interface? for the wired network case, the above
scripts are okay. how about when coming the assign the ip to the wifi
network card? use en1? or ??

Thank you
Eric


_______________________________________________
Builds
http://community.qnx.com/sf/go/post9277
Re: RE: Start script for two network cards  
thx, Robet. now my scripts are like this:

    io-net -d ns83815 -p tcpip -p qnet &
    waitfor /dev/io-net/en0 
    waitfor /dev/socket/2
    
    ifconfig en0 *.*.*.* 
    netmask 255.255.0.0


	devp-pccard
	waitfor /proc/boot/devp-pccard (i put this binary here on the target)
	io-net -d orinoco channel=11,network=nusuav,mode=adhoc -p tcpip 
	sleep 2
	ifconfig en1 192.168.1.10 netmask 255.255.255.0


still the same error. thx for ur suggestions.

Eric
RE: RE: Start script for two network cards  
Hi Eric:
	There are a couple of problems here...
The

waitfor /dev/pccard

must be as typed.  What this does is wait for the devp-pccard binary to
start up and register /dev/pccard (as opposed to looking for the
binary).  The /dev/pccard entry is what the libs look for in order to
get access to the pccard information.

The second problem is that you're starting up two version of io-net and
this isn't going to give you the expected behaviour.  
Give this a try:

/proc/boot/devp-pccard

waitfor /dev/pccard
io-net -d ns83815 -d orinoco channel=11,network=nusuav,mode=adhoc -p
tcpip -p qnet &
waitfor /dev/io-net/en0 
wauitfor /dev/io-net/en1
waitfor /dev/socket
    
ifconfig en0 *.*.*.* netmask 255.255.0.0
ifconfig en1 *.*.*.* netmask 255.255.0.0



I suspect that this isn't going to fix the Orinoco problem since you're
sleep 2 should have been adequate. Is there any information in sloginfo?
(Is slogger up and running before you're script starts)?  You can also
add -vvv options to each of the drivers to get additional output for
debugging.  If the command works at the command line after the system is
booted, then there's another dependency that's being missed out on.

	Hope that helps,
		Robert.


-----Original Message-----
From: Eric Dong [mailto:eric.dongxx@gmail.com] 
Sent: Wednesday, June 18, 2008 3:31 AM
To: builds-networking
Subject: Re: RE: Start script for two network cards

thx, Robet. now my scripts are like this:

    io-net -d ns83815 -p tcpip -p qnet &
    waitfor /dev/io-net/en0 
    waitfor /dev/socket/2
    
    ifconfig en0 *.*.*.* 
    netmask 255.255.0.0


	devp-pccard
	waitfor /proc/boot/devp-pccard (i put this binary here on the
target)
	io-net -d orinoco channel=11,network=nusuav,mode=adhoc -p tcpip 
	sleep 2
	ifconfig en1 192.168.1.10 netmask 255.255.255.0


still the same error. thx for ur suggestions.

Eric


_______________________________________________
Builds
http://community.qnx.com/sf/go/post9371
Re: RE: RE: Start script for two network cards  
thx, Robert.

The script "io-net -d ns83815 -d orinoco channel=11,network=nusuav,mode=adhoc -p tcpip -p qnet &"

is going to assign two interfaces to the two network cards, right? a little confused is that the -p option, here can 
ns83815 work with tcpip and qnet while orinoco only work with tcpip or also with qnet?

Another problem about the orinoco, would it be that i need to put the devn-orinoco.so into some particular directory? 

thx
Eric
RE: RE: RE: Start script for two network cards  
Hi Eric:
	If you want to restrict the usage of qnet to a single interface
(the ns83815), you can use the following line

io-net -d ns83815 -d orinoco channel=11,network=nusuav,mode=adhoc -p
tcpip -p qnet bind=en0


And yes, devn-orinoco.so needs to be in the same place as you're ns83815
binary.

	Robert.

-----Original Message-----
From: Eric Dong [mailto:eric.dongxx@gmail.com] 
Sent: Thursday, June 19, 2008 8:06 AM
To: builds-networking
Subject: Re: RE: RE: Start script for two network cards

thx, Robert.

The script "io-net -d ns83815 -d orinoco
channel=11,network=nusuav,mode=adhoc -p tcpip -p qnet &"

is going to assign two interfaces to the two network cards, right? a
little confused is that the -p option, here can ns83815 work with tcpip
and qnet while orinoco only work with tcpip or also with qnet?

Another problem about the orinoco, would it be that i need to put the
devn-orinoco.so into some particular directory? 

thx
Eric

_______________________________________________
Builds
http://community.qnx.com/sf/go/post9421
Re: RE: RE: RE: Start script for two network cards  
thx again, Robert.

I put devn-orinoco.so in the same directory as devn-ns83815--/x86/dll
but still the same error:
   unable to load dll /x86/dll/orinoco: Library cannot be found
   unable to access "/dev/io-net/en1"

and when i tried "sloginfo":
   Unable to open /dev/slog: No such file or directory.

however, when the target finished booting, i typed "io-net -d orinoco -p tcpip" without specifying its directory, the 
orinoco card worked.
Appreciate your help.

Eric
Re: RE: RE: RE: Start script for two network cards  
> however, when the target finished booting, i typed "io-net -d orinoco -p tcpip
> " without specifying its directory, the orinoco card worked.

sorry, plz ignore this. i still kept the previous one under /proc/boot.

RE: RE: RE: RE: Start script for two network cards  
Hi Eric:

	You need to run "slogger" before you start io-net to get
sloginfo to work.

	I take it from the follow on e-mail that the orinoco driver
wasn't in the correct directory?  

	Robert.

-----Original Message-----
From: Eric Dong [mailto:eric.dongxx@gmail.com] 
Sent: Thursday, June 19, 2008 11:10 AM
To: builds-networking
Subject: Re: RE: RE: RE: Start script for two network cards

thx again, Robert.

I put devn-orinoco.so in the same directory as devn-ns83815--/x86/dll
but still the same error:
   unable to load dll /x86/dll/orinoco: Library cannot be found
   unable to access "/dev/io-net/en1"

and when i tried "sloginfo":
   Unable to open /dev/slog: No such file or directory.

however, when the target finished booting, i typed "io-net -d orinoco -p
tcpip" without specifying its directory, the orinoco card worked.
Appreciate your help.

Eric

_______________________________________________
Builds
http://community.qnx.com/sf/go/post9434
Re: RE: RE: RE: RE: Start script for two network cards  
Hi, Robert, here is the output of my sloginfo.txt:

Time             Sev Major Minor Args
Feb 17 21:30:41    5    18     0 devp-pccard: Found Vendor 104c - Device ac51
Feb 17 21:30:42    5    18     0 GetStatus Socket 0 returned CardState 0 - CtlInd 0 - State 0 - IREQRouting 0 - IFType 1

Feb 17 21:30:42    5    18     0 GetStatus Socket 1 returned CardState 80 - CtlInd 0 - State 0 - IREQRouting 0 - IFType 
1
Feb 17 21:30:42    5    18     0 GetSocket Socket 1 returned SCIntMask 0 - Vcontrol 10 - VppLevels 0 -
VccLevel 0 - CtlInd 0 - State 80 - IREQRouting 0 - IFType 1
Feb 17 21:30:42    5    18     0 Socket state 80
Feb 17 21:30:42    5    18     0 Card Inserted
Feb 17 21:30:42    5    18     0 5.0V Card
Feb 17 21:30:42    5    18     0 io_open for id = 30007
Feb 17 21:30:42    2    18     0 io_close_ocb
Feb 17 21:30:42    5    18     0 io_open for id = 7
Feb 17 21:30:43    2    18     0 Timer expired 2
Feb 17 21:30:43    5    18     0 Powered up 2
Feb 17 21:30:43    5    14     0 tcpip starting
Feb 17 21:30:43    3    14     0 Using pseudo random generator.  See "random" option
Feb 17 21:30:43    5    18     0 GetSocket Socket 1 returned SCIntMask 0 - Vcontrol 10 - VppLevels 22 -
VccLevel 2 - CtlInd 0 - State c0 - IREQRouting 0 - IFType 1
Feb 17 21:30:43    5    18     0 devp-pccard: Memory window req. 0
Feb 17 21:30:43    5    18     0 devp-pccard: Memory window act. 1e001000
Feb 17 21:30:43    2    18     0 LAN Node ID 00 02 2d 07 22 5e 
Feb 17 21:30:43    5    18     0 Config Base 3e0
Feb 17 21:30:43    5    18     0 Rmask 1
Feb 17 21:30:43    5    18     0 Rmask 0
Feb 17 21:30:43    5    18     0 Rmask 0
Feb 17 21:30:43    5    18     0 Rmask 0
Feb 17 21:30:43    5    18     0 IRQ1 = 7f - IRQ2 = ffff
Feb 17 21:30:43    5    18     0 I/O 0 - Len 64 - ip 8071ff0
Feb 17 21:30:43    5    18     0 IRQ 7
Feb 17 21:30:43    5    18     0 GetSocket Socket 1 returned SCIntMask 0 - Vcontrol 10 - VppLevels 22 -
VccLevel 2 - CtlInd 0 - State c0 - IREQRouting 0 - IFType 1
Feb 17 21:30:43    5    18     0 GetSocket Socket 1 returned SCIntMask 0 - Vcontrol 10 - VppLevels 22 -
VccLevel 2 - CtlInd 0 - State c0 - IREQRouting 0 - IFType 1
Feb 17 21:30:43    5    18     0 I/O port 300
Feb 17 21:30:43    5    18     0 Config base 3e0 - Index 1 - Window 0 - Page 0
Feb 17 21:30:43    5    18     0 Base - 40105000 - p = 401053e0
Feb 17 21:30:44    2    18     0 Timer expired 3
Feb 17 21:30:44    5    18     0 GetStatus Socket 0 returned CardState 0 - CtlInd 0 - State 0 - IREQRouting 0 - IFType 1

Feb 17 21:30:44    5    18     0 GetStatus Socket 1 returned CardState c0 - CtlInd 0 - State c0 - IREQRouting 0 - IFType
 1
Feb 17 21:30:44    5    18     0 GetSocket Socket 1 returned SCIntMask 0 - Vcontrol 10 - VppLevels 22 -
VccLevel 2 - CtlInd 0 - State c0 - IREQRouting 0 - IFType 1
Feb 17 21:30:44    5    18     0 Socket state c0
Feb 17 21:30:44    5    18     0 Card Inserted
Feb 17 21:30:45    2    18     0 Timer expired 3
Feb 17 21:30:45    5    18     0 GetStatus Socket 0 returned CardState 0 - CtlInd 0 - State 0 - IREQRouting 0 - IFType 1

Feb 17 21:30:45    5    18     0 GetStatus Socket 1 returned CardState c0 - CtlInd 0 - State c0 - IREQRouting 0 - IFType
 1
Feb 17 21:30:46    2    18     0 Timer expired 3
Feb 17 21:30:47    5    18     0 GetStatus Socket 0 returned CardState 0 - CtlInd 0 - State 0 - IREQRouting 0 - IFType 1

Feb 17 21:30:47    5    18     0 GetStatus Socket 1 returned CardState c0 - CtlInd 0 - State c0 - IREQRouting 0 - IFType
 1
Feb 17 21:30:48    2    18     0 Timer expired 3
Feb 17 21:30:48    5    18     0 GetStatus Socket 0 returned CardState 0 - CtlInd 0 - State 0 - IREQRouting 0 - IFType 1

Feb 17 21:30:48    5    18     0 GetStatus Socket 1 returned CardState c0 - CtlInd 0 - State c0 - IREQRouting 0 - IFType
 1
Feb 17 21:30:49    2    18     0 Timer expired 3
Feb 17 21:30:49    5    18     0 GetStatus Socket 0 returned CardState 0 - CtlInd 0 - State 0 - IREQRouting 0 -...
View Full Message