Hello all,
My task is to transmit ping packet from C6678 DSP(on our custom board) to my laptop(having fixed IP: 192,168,1,10). So far that i found "PA_emacExample_exampleProject" from the path C:\ti\pdk_C6678_1_1_2_5\packages\ti\drv\exampleProjects\PA_emacExample_exampleProject.
[C6678 DSP --> Vitesse 7421 switch--> RJ-45 connector--> laptop]
I dont know much about this project so i did some small changes here,
1) I made ICMP packet here by changing pktMatch,
UInt8 pktMatch[] = {
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, /*Dest MAC:broadcast dest MAC*/
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, /* Src MAC */
0x08, 0x00, /* Ethertype = IPv4 */
/* IP version, services, total length */
0x45, 0x00, 0x00, 0x3C, /*IP data len: 60 B*/
0x00, 0x00, 0x00, 0x00, /* IP ID, flags, fragment offset */
0x64, 0x01, 0xA2, 0x4F, /*TTL: 64, ICMP protocol: 0x01, checksum*/
0xc0, 0xa8, 0x01, 0x01, /* Source IP address */
0xc0, 0xa8, 0x01, 0x0a, /* Destination IP address */
0x08, 0x00, 0xF7, 0x2D, /*ICMP data*/
0x00, 0x0A, 0x00, 0xC8,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 32 bytes of padding data to make sure 74 bytes*/
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00
};
2) Commented out below portion from cpsw_singlecore.c
/* Setup Rx */
if (Setup_Rx () != 0)
{
System_printf ("Rx setup failed \n");
BIOS_exit (-1);
}
else
{
System_printf ("Rx setup successfully done \n");
}
/* Setup PA */
if (Setup_PASS () != 0)
{
System_printf ("PASS setup failed \n");
BIOS_exit (-1);
}
else
{
System_printf ("PASS setup successfully done \n");
}
then compiled and running successfully, what i found is gTxCounter value is 10 i.e. packets are transmitted. But i didn't get any packet on system while checking in wireshark on my laptop(IP : 192.168.1.10).
console msg,
**************************************************
******* Ethernet Single Core Example Start *******
**************************************************
QMSS successfully initialized
CPPI successfully initialized
PASS successfully initialized
Ethernet subsystem successfully initialized
Tx setup successfully done
Following is the ALE table before transmits.
Packet Transmission Start ...
Tx counter value:1
Tx counter value:2
Tx counter value:3
Tx counter value:4
Tx counter value:5
Tx counter value:6
Tx counter value:7
Tx counter value:8
Tx counter value:9
Tx counter value:10
Following is the ALE table after transmits.
Packet Transmission Done.
Wait for all packets to be Received ...
Received 0 packets so far...
Received 0 packets so far...
Received 0 packets so far...
Received 0 packets so far...
pls suggest me where im doing mistakes.
Thanks,
Gourav jain