Gedday not working - post a functioning example...?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
MaVa_3369831
Level 1
Level 1
First like given

I am using the gedday or mDNS interface - at least attempting to.  I have used the examples that I can find in Wiced 6.1 and also tried it in 6.4.  Since there is no source code and only examples that are in different places and not tied together in a meaningful way I am stuck.

I have included snips for both discovery and service add (each run on separate Cypress HW) below.  These take place after the apps are up and running - wiced_init and network stack are fully functional, each has obtained a DHCP lease, etc.

I see traffic in wireshark as well as a program called zeroconfServiceBrowser (most of the time it is...touchy - at best).  I can also see the traffic from my MacAir every time.

But "Discovery" always returns...

---  mDNS  -- Discover try [172] -- result == 4

[ERROR] -- mDNS -- Service Discovery Failed with Error [4]

Any suggestions?

[note to Cypress] having code supported only by a library (no source code) - it is non optimal to return "error" only with no other explanations.

Discovery --

static char hostName[64] = {"G0017\0"};

static wiced_bool_t exitMDNS= WICED_TRUE;

static char serviceN[] = {"_http._tcp.local"};

void service_Discovery( void )

{

    wiced_result_t  res = 0;

    gedday_service_t service_result;

    int i = 0;

    exitMDNS = WICED_TRUE;

    WPRINT_APP_INFO(("---  mDNS  -- Init Service Discover -- %s --\n", serviceN));

    res = gedday_init(WICED_STA_INTERFACE, hostName);

    while ( exitMDNS )

    {

        WPRINT_APP_INFO(("---  mDNS  -- Discover try [%03d] -- result == %d \n", i++, res));

        memset(&service_result, 0x0, sizeof(service_result));

        res = gedday_discover_service(serviceN, &service_result);

        if (res != WICED_SUCCESS)

        {

            WPRINT_APP_INFO(("[ERROR] -- mDNS -- Service Discovery Failed with Error [%d]\n", res));

        }

        else

        {

            WPRINT_APP_INFO(("\nService Discovery Result:\n"));

            WPRINT_APP_INFO(("  Service Name  = [%s]\n", service_result.service_name));

            WPRINT_APP_INFO(("  Instance Name = [%s]\n", service_result.instance_name));

            WPRINT_APP_INFO(("  Host Name     = [%s]\n", service_result.hostname));

            WPRINT_APP_INFO(("  TXT Record    = [%s]\n", service_result.txt));

            WPRINT_APP_INFO(("  Port          = [%d]\n", service_result.port));

            /* Free the records */

            if (service_result.instance_name != NULL)

            {

                free(service_result.instance_name);

            }

            if (service_result.hostname != NULL)

            {

                free(service_result.hostname);

            }

            if (service_result.txt != NULL)

            {

                free(service_result.txt);

            }

        }

        wiced_rtos_delay_milliseconds( 500 );

    }  //end WHILE

}

ServiceAdd

void service_start_Add( void )

{

    wiced_result_t  res;

    WPRINT_APP_INFO(("---  mDNS  -- serviceN -- %s --\n", serviceN));

    res = gedday_init(WICED_STA_INTERFACE, hostName);

    if (res != WICED_SUCCESS)

    {

        WPRINT_APP_INFO(("Failed to init Geddy. Error [%d]\n", res));

        return;

    }

    service_Add(hostName);

}

void service_Add( char* svc )

{

    wiced_result_t  res;

    res = gedday_add_service(svc, serviceN, 80, 300, NULL );

    if (res != WICED_SUCCESS)

    {

        WPRINT_APP_INFO(("Service Add Failed with Error [%d]\n", res));

    }

}

0 Likes
1 Solution

MaVa_3369831

I would recommend starting with doing an advertise and using a client app on iOS such as “discove”  to look if you can see the device being listed there

few sample applications that demonstrate Gedday is Appliance that can be found under the demo folder and apple_wac or homekit if you have the MFi sdk .

i would start with the appliance app and see if you can get that to work on your setup .

DavidD_91

View solution in original post

0 Likes
5 Replies
MaVa_3369831
Level 1
Level 1
First like given

Additional data - when I run snip.service_discovery I see the same issue - Error 4

Discovering service Try [2] -- [_wiced123._tcp.local]

Service Discovery Failed with Error [4]

Anyone else seeing this issue?  Seems like some are having success with Gedday...

0 Likes

More data then I am towel tossing...

Wireshark sees the PTR requests and the other unit responding with replies. 

****

This appears to be a failure in the Cypress provided library since the snip exhibits the same behavior.

****

0 Likes

MaVa_3369831

Note that I'm reaching out to the local team supporting your company as well.

carlf_66

MaVa_3369831

I would recommend starting with doing an advertise and using a client app on iOS such as “discove”  to look if you can see the device being listed there

few sample applications that demonstrate Gedday is Appliance that can be found under the demo folder and apple_wac or homekit if you have the MFi sdk .

i would start with the appliance app and see if you can get that to work on your setup .

DavidD_91

0 Likes
MaVa_3369831
Level 1
Level 1
First like given

Solved - the code in  Wiced_006.001.000.0085 doesnt work.  I copied the Gedday library/code for 006.004 over the 6.1 code and it worked.  No need to upgrade to 6.4 - this wasnt going to happen on my project any time soon.

0 Likes