This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

RTOS/NDKTCPIP: Can't connect to host computer using NDK_connect

Part Number: NDKTCPIP
Other Parts Discussed in Thread: SYSBIOS

Tool/software: TI-RTOS

Hi,

I am trying to create a simple TCP/IP application using TI-RTOS. I was successful to create the socket and bind it. But when I try to connect it to the host computer, it exits the BIOS. My host computer is configured to 192.168.1.1. I request you to please have a look. Here are the details of SOC and components I am using:

Soc: AM335x

EVM: BeagleBone Black

SYSBIOS Version: 6.73.1.01

NDK Version: 3.40.1.01

I tried NIMU_Basic Example and it was running good.

My Task function looks something like this:

Void taskFxn(UArg a0, UArg a1)
{
    SOCKET s;
    struct sockaddr_in cli_addr, serv_addr;

    s = NDK_socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
    if (s == INVALID_SOCKET)
    {
        UART_printf("%x\n", fdError());
    }

    bzero(&cli_addr, sizeof(struct sockaddr_in));
    cli_addr.sin_family = AF_INET;
    cli_addr.sin_port = 7;
    cli_addr.sin_addr.s_addr = inet_addr("192.168.1.010");

    bzero(&serv_addr, sizeof(struct sockaddr_in));
    serv_addr.sin_family = AF_INET;
    serv_addr.sin_port = 7;
    serv_addr.sin_addr.s_addr = inet_addr("192.168.1.1");

    int err = NDK_bind(s, (struct sockaddr *)&cli_addr, sizeof(cli_addr));
    if(err <0)
    {
        UART_printf("%x\n", fdError());
    }

    err = NDK_connect(s,(struct sockaddr *)&serv_addr, sizeof(serv_addr));
    if(err <0)
    {
        UART_printf("%x\n", fdError());
    }


    System_printf("enter taskFxn()\n");
	
    Task_sleep(10);
	
    System_printf("exit taskFxn()\n");
}