Project Home
Project Home
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - connection to socket is failing with error "connection refused" after ASIX ethernet driver insertion : (7 Items)
   
connection to socket is failing with error "connection refused" after ASIX ethernet driver insertion  
I am using wireless driver and QNX ethernet driver (ASIX) in my unit with QNX-66 OS.
The problem is when I do ethernet driver insert, then all the socket connections are failing with error "connection 
refused".

The commands used for inserting driver are:

For ethernet:
io-pkt-v6-hc -d asix -i2 -ptcpip prefix=/alt2

For wireless:
io-pkt-v6-hc -d /usr/share/devnp-nxp_qnx.so -i2 -ptcpip prefix=/alt2 promiscous


When I do 'netstat -a' before ethernet driver insertion, I see the list of ports and firewall rules being used.
But after ethernet driver insertion, all the ports and firewall rules are getting flushed out.

Can you please help me with getting the reason for this behaviour?

Also, can I have both the environments 'alt2' and 'alt3' running together to avoid flushing of ports?
If yes, how can I do that?


Thanks in advance.
Re: connection to socket is failing with error "connection refused" after ASIX ethernet driver insertion  
You are starting 2 copies of io-pkt both running with the same prefix and same instance. The second copy will overwrite 
the first.
Re: connection to socket is failing with error "connection refused" after ASIX ethernet driver insertion  
We tried with keeping both io-pkt instances in two different prefixes 'alt2' and 'alt3'.
But the result is same.

Is it possible to export both the prefixes to same environment?
Re: connection to socket is failing with error "connection refused" after ASIX ethernet driver insertion  
Having both prefixes is perfectly workable. Remember you will need to do the appropriate SOCK environment variable on 
the netstat command.
Re: connection to socket is failing with error "connection refused" after ASIX ethernet driver insertion  
Thank you Nick for your reply. 


Let me simplify the problem statement further,

- I've an application (say XXX), it receives commands over socket from outside, then it sends then to another internal 
application (say YYY).

- for XXX, we need ethernet driver. We're starting that in SOCK=/alt3
- for YYY, we need wi-fi driver. We're starting that in SOCK=/alt2

Now, I'm able to receive commands from outside in XXX, but it is not able to connect over tcp6 socket to YYY. 
((connect system call fails with error "connection refused"))

So question is, how to make two application running in different context talk to each other over tcp socket.
Re: connection to socket is failing with error "connection refused" after ASIX ethernet driver insertion  
This is possible but complicated, it involves manipulating the environment as you do the socket calls.

But if you have applications that need access to both stacks then it sounds like you should be running one stack with 
both drivers loaded in to the same stack.
Re: connection to socket is failing with error "connection refused" after ASIX ethernet driver insertion  
Thanks a lot Nick. 

Your suggestions helped. Our applications are talking to each other now. :)