Hi,
I'm running the "Freescale MQX 3.4\usb\device\examples\cdc\virtual_nic" code on my TWR-MCF52259 and I'm not able to correctly connect the board with my PC (Win XP).
When I plugged the USB cable to my PC, the new device is detected and successfully installed using the included "fsl_rndis.inf" driver, but the state of the connection is always the same:"network cable unplugged" and no information is available using "ipconfig".
Am I missing something?
Thanks.
Hello,
I'm using MQX 4.0 and TWRK60F120M-KIT demo board, an I'm totally unable to get virtual_nic example projet working.
Any update ?
Best regards,
AV
Hello AV,
I just tried with TWR-K60F120M with TWR-SER, CW 10.3 and MQX 4.0. Configured TWR-SER for USB Device and Ethernet communication. Loaded the demo. By default there is nothing printed on the terminal, if things go correct.
When attached usb cable to my Windows 7 machine, enumeration goes on and I install the fsl_rndis.inf for that device. A new network interface called "Freescale USB RNDIS" appears, but Network and Sharing Center shows Media disconnected status. Then I found out the demo needs also the ethernet cable plugged into TWR-SER ethernet port (I connect it to a local router).
So I power off the board, plug in both ethernet and usb cables to TWR-SER and power on. Freescale USB RNDIS now works, Windows tries to identify the network and bind an IP address to it.
The demo is however just a simple ethernet layer forwarder. Whatever packet received via USB CDC it is sent to the TWR-SER ethernet. The other way seems not implemented by the demo (reception from ethernet and forward to USB CDC) thus ping only detects it can send echo, but echo reply is not received.
Hi Martin,
[This might duplicate a message I sent you earlier. I am still getting familiar with how this forum works. I am posting in case I never actually sent you a message -and- in case someone else can answer my question regarding the Freescale 4.1.1 Example code of Ethernet over USB.]
Quote from Martin:
"The demo is however just a simple ethernet layer forwarder. Whatever packet received via USB CDC it is sent to the TWR-SER ethernet. The other way seems not implemented by the demo (reception from ethernet and forward to USB CDC) thus ping only detects it can send echo, but echo reply is not received."
I have looked over the code. "virtual_nic.c" and "virtual_nic_enet.c". To me, it appears to handle messages in both directions. There are methods to send messages (I think) in both directions and call-backs to handle receiving messages. Can you explain in greater detail why only one direction is implemented?
Also, I have never messed with Ping w/only 1 way communication. Can you elaborate on what to expect? I would have thought if there was only 1 way communication, that the Ping command would utterly fail as if the far end did not exist.
-thank you
I hate leaving (or finding) threads open ended. Here's what I've discovered with help from Freescale's Derek. The 4.1.1 MQX CDC Example code appears to all be there. Both directions. From USB to Ethernet and from Ethernet to USB. But the USB to Ethernet path appears to be broken. The Type field in the Ethernet packet for ARP and Ping are flipped (i.e. instead of receiving and ARP with Type of 0x0806, the far end computer received a Ethernet message with a Type of 0x0608). To test this, I flipped these two 8 bit bytes in the USB_Notif_Callack() method. That fixed the ARP. As well as the Ping. That's a limited sample, but based on those two message, it would appear that the Type field is "jazzed up" somewhere deep in the MQX Ethernet libraries. One of my co-workers suggested that at this layer of the TCPIP stack, message are often rebuilt from the ground up. If that's the case, perhaps that is where the Type file is incorrectly (re)formed.
Edit: added later...
I believe I found the problem. I put code change details at the bottom of this thread:
Hello Martin,
Thank you for the explanation (and sorry for the late reply).
Best regards, AV
Hello Martin.
I'm interested to USB virtual nic project.
I'm started working with USB CDC project porting on it the mmcau_lib.a library so to use the encryption decryption features trough the USB bus.
The main problem i've encountered is that:
To set-up a communication protocol between my TWRK60F120M and the PC,in order to communicate it which action perfrom encryption/decription, aes/des....,,, i need to know when the frame start and ends. in light of this, in the first instance, I've thougt to implement,as layer 1 protocol, an asynchronous HDLC. The problem is that with this protocol, expecially with the fragments (you know in CDC project the MTU max is 64 byte), i need several memcpy, memset... that lower significantly the throughput.
My interest to USB virtual nic project is due to the fact that i suppose this communication has a native framing method (hardware implemented) that should helps me to understand when a frame starts and ends and that have an insignificant impact on performance.Is it true??
Should you give me some input about this problem.
Thanks in advance
Alessandro
Hi nroyer,
I too recently tried this and got the same result.
I will ask around within FSL if there is an update. I assumed it was work in progress that should not have made the distribution (or I just don't know what I'm doing...in that case we are alike :smileywink: ).
One side note while I was googling about RNDIS, it indicated FIREWALL shold be disabled. My work machine blocks me from disabling that and I just haven't tried it on my home machine yet.
Regards,
David
Hi David,
I have retried this with MQX 3.5 example code and Windows Firewall disabled for the corresponding NDIS connection, but got the same result...
Do you have news about this issue?
Thanks
Hi...
Any updates on this issue ?
We are trying to run the same demo without much success .
cheers.