Project Home
Project Home
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - qconn doesnt work after migration: (8 Items)
   
qconn doesnt work after migration  
Hi,
    I've just migrated the kernel from 6.3.2 to 6.4.1(QNX momentics ide 4.6.0), and re-coded the network driver which is
 a native io-pkt driver.
    Host(windows) and target(arm9) can “ping" each other. But when I want to debug an application via qconn, I found 
that IDE cant connect to the target. Then I telnet the qconn port (8000) to the target under windows, cant connect too.
    I made a tcpdump, shows that target gets the "qconn request packet"(used the wireshark to check out what the qconn 
request packet is like...), but driver doesnt tx any packets, it seems the protocol stack doesnt make any response to 
that request.
    Q:
Is the qconn shipped with momentics 4.6.0 compatible with the new io-pkt framework? Should I add any other libaries to 
image besides libsocket?

----------------------------------------
# netstat
Active Internet connections
Proto Recv-Q Send-Q  Local Address          Foreign Address        State
tcp        0      0  *.8000                 *.*                    LISTEN
udp        0      0  *.*                    *.*                   
# pidin -p qconn   
     pid tid name               prio STATE       Blocked                     
    4103   1 sbin/qconn          10r SIGWAITINFO                             
    4103   2 sbin/qconn          10r CONDVAR     (0x120bc0)                  
    4103   3 sbin/qconn          10r RECEIVE     1                           
    4103   4 sbin/qconn          10r RECEIVE     3                           
# pidin -p qconn fd 
     pid name               
    4103 sbin/qconn         
           0       4 rw        0 /dev/ser1
           1       4 rw        0 /dev/ser1
           2       4 rw        0 /dev/ser1
           3       5 rw        0 I4TCP  *.8000                *.*                   LISTEN
           4    4103 
           0s      1 
           2s      1 MP        0 /dev/dbgmem
           4s      1 MP        0 /dev/profiler
# 

----------------------------------------


attachment's my build file

Attachment: Text s3c2440.build 12.75 KB
Re: qconn doesnt work after migration  
Yes, qconn should work with io-pkt. And AFAIK if qconn starts then all 
libs it needs must be available. What other programs it might need 
depends on what you're doing, e.g. I believe pdebug is necessary on the 
target for debugging with the IDE. Looks like you've got that though. 
(Just check that it's available in qconn's path?)

Can you connect to any other TCP service on the target? E.g. telnetd, 
sshd? What about UDP or raw IP? Does anything work?

What do the driver stats and the stack stats say? (nicinfo and netstat 
-p ip/tcp)

Is there another driver you can try with and see if that works? E.g. 
your original devn (io-net) driver?

Hope this may help!
/P
Re: qconn doesnt work after migration  
   thanks a lot for early reply, Patrik
   With your help,I found something wrong...

>What do the driver stats and the stack stats say? (nicinfo and netstat 
>-p ip/tcp)
---------------------------------------------------------------------
# nicinfo
dm0: 
  DM9000 Ethernet Controller

  Physical Node ID ........................... 000000 000000
  Current Physical Node ID ................... 111213 141516
  Current Operation Rate ..................... 100.00 Mb/s full-duplex
  Active Interface Type ...................... MII
    Active PHY address ....................... 0
  Maximum Transmittable data Unit ............ 1500
  Maximum Receivable data Unit ............... 1500
  Hardware Interrupt ......................... 0x6b
  Memory Aperture ............................ 0x1800300 - 0x18003ff
  Promiscuous Mode ........................... Off
  Multicast Support .......................... Enabled

  Packets Transmitted OK ..................... 3
  Bytes Transmitted OK ....................... 126
  Broadcast Packets Transmitted OK ........... 0
  Multicast Packets Transmitted OK ........... 0
  Memory Allocation Failures on Transmit ..... 0

  Packets Received OK ........................ 318
  Bytes Received OK .......................... 24468
  Broadcast Packets Received OK .............. 0
  Multicast Packets Received OK .............. 318
  Memory Allocation Failures on Receive ...... 0

  Single Collisions on Transmit .............. 0
  Multiple Collisions on Transmit ............ 0
  Late Collision on Transmit errors .......... 0
  Transmits aborted (excessive collisions) ... 0
  Transmit Underruns ......................... 0
  No Carrier on Transmit ..................... 0
  Receive Alignment errors ................... 0
  Received packets with CRC errors ........... 0
  Packets Dropped on receive ................. 0
  Short packets .............................. 0
  Total Frames experiencing Collison(s) ...... 0

# netstat -p ip/tcp
netstat: ip/tcp: unknown or uninstrumented protocol
-----------------------------------------------------------------------

But isnt tcpip the default protocol of io-pkt???
why the protocol isnt up?

RE: qconn doesnt work after migration  
 
># nicinfo
>  Current Physical Node ID ................... 111213 141516
 
Please set the first byte of your mac address to be zero instead
of 0x11, because you have accidentally set the multicast bit
in a unicast address.
 
There's a better way to generate a mac address, if you're
going to use this on a larger network.
 
--
aboyd
 
 
Re: RE: qconn doesnt work after migration  
>  
> ># nicinfo
> >  Current Physical Node ID ................... 111213 141516
>  
> Please set the first byte of your mac address to be zero instead
> of 0x11, because you have accidentally set the multicast bit
> in a unicast address.
>  
> There's a better way to generate a mac address, if you're
> going to use this on a larger network.
>  
> --
> aboyd
>  
>  

Thank a lot and a lot , Andrew.
It works! I didnt know that mac address has such a rule....
Re: qconn doesnt work after migration  
>    Multicast Packets Received OK .............. 318
>    
I see Andrew already spotted the problem for you, but for anybody 
listening, here you see that all the packets you received were treated 
as multicasts (because of that MAC address).
/P
Re: qconn doesnt work after migration  
sorry, i typed a bad command just now...
now here's what i got:


------------------------------------------------
# netstat -p ip  
ip:
        38 total packets received
        0 bad header checksums
        0 with size smaller than minimum
        0 with data size < data length
        0 with length > max ip packet size
        0 with header length < data size
        0 with data length < header length
        0 with bad options
        0 with incorrect version number
        0 fragments received
        0 fragments dropped (dup or out of space)
        0 fragments dropped (out of ipqent)
        0 malformed fragments dropped
        0 fragments dropped after timeout
        0 packets reassembled ok
        38 packets for this host
        0 packets for unknown/unsupported protocol
        0 packets forwarded (0 packets fast forwarded)
        0 packets not forwardable
        0 redirects sent
        0 packets no matching gif found
        0 packets sent from this host
        0 packets sent with fabricated ip header
        0 output packets dropped due to no bufs, etc.
        0 output packets discarded due to no route
        0 output datagrams fragmented
        0 fragments created
        0 datagrams that can't be fragmented
        0 datagrams with bad address in header
# netstat -p tcp
tcp:
        0 packets sent
                0 data packets (0 bytes)
                0 data packets (0 bytes) retransmitted
                0 ack-only packets (0 delayed)
                0 URG only packets
                0 window probe packets
                0 window update packets
                0 control packets
                0 send attempts resulted in self-quench
        18 packets received
                0 acks (for 0 bytes)
                0 duplicate acks
                0 acks for unsent data
                0 packets (0 bytes) received in-sequence
                0 completely duplicate packets (0 bytes)
                0 old duplicate packets
                0 packets with some dup. data (0 bytes duped)
                0 out-of-order packets (0 bytes)
                0 packets (0 bytes) of data after window
                0 window probes
                0 window update packets
                0 packets received after close
                0 discarded for bad checksums
                0 discarded for bad header offset fields
                0 discarded because packet too short
        0 connection requests
        0 connection accepts
        0 connections established (including accepts)
        0 connections closed (including 0 drops)
        0 embryonic connections dropped
        0 delayed frees of tcpcb
        0 segments updated rtt (of 0 attempts)
        0 retransmit timeouts
                0 connections dropped by rexmit timeout
        0 persist timeouts (resulting in 0 dropped connections)
        0 keepalive timeouts
                0 keepalive probes sent
                0 connections dropped by keepalive
        0 correct ACK header predictions
        0 correct data packet header predictions
        0 PCB hash misses
        0 dropped due to no socket
        0 connections drained due to memory shortage
        0 PMTUD blackholes detected
        0 bad connection attempts
        0 SYN cache entries added
                0 hash collisions
                0 completed
                0 aborted (no space to build PCB)
                0 timed out
                0 dropped due to overflow
                0 dropped due to bucket overflow
                0 dropped due to RST
                0 dropped due to ICMP unreachable
                0 delayed free of SYN cache entries
        0 SYN,ACKs retransmitted
        0 duplicate SYNs received for entries already in the cache
        0 SYNs dropped (no route or no space)
        0 packets with bad signature
        0 packets with good signature
        0...
View Full Message
Re: qconn doesnt work after migration  
it seems tcp received the request. why doesnt the qconn socket accept the request? It's just listening peacefully,but 
does nothing...