CYBT-213043 mesh - Unable to print the log

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

cross mob
lock attach
Attachments are accessible only for community members.
PrRa_4726466
Level 2
Level 2
10 replies posted 5 replies posted First question asked

Hi Anjana and Dheeraj,

I am using Cybt-213043 mesh eval board. In modus toolbox 2.1 i downloaded mesh- demo scripts and executed it. But in the log i am not the data that i want to print. I am using Putty in Ubuntu with PUART and the baud rate is 921600.

I have attached a screen shot for your reference. I uploaded the Demo_mesh_temperature code and in the void mesh_app_init() function i made a led to glow and i am printing a sting called "PRINTING LED ON ". But after initialization the led blinks but the data is not printed.

Help me to solve the issue. Thanks in advance.

0 Likes
1 Solution
lock attach
Attachments are accessible only for community members.

Hi,

i just added below code in the sensor_temperature.c and, I am getting prints as expected (and LED is ON). Please find the attached code and logs.

if (mesh_sensor_sent_value < 500)

{

    WICED_BT_TRACE("LED ON\n");

    wiced_hal_gpio_set_pin_output(3,0);

}

else

{

  WICED_BT_TRACE("LED OFF\n");

  wiced_hal_gpio_set_pin_output(3,1);

}

I believe, other modification done to your code (Eg: max44009_init) is causing some problem. Could you please comment out the below lines from your code and try?

max44009_init(&max44009_usr_set, max44009IntProc, NULL);

mesh_sensor_current_light = max44009_read_ambient_light();

Since, you are not getting print for "WICED_BT_TRACE("PRINTING init done ");", I doubt the device goes to some bad state due to the max44009_init(). Could you please confirm that the device and the application is functional, after provisioning?

Thanks,

-Dheeraj

View solution in original post

0 Likes
3 Replies
DheerajPK_41
Moderator
Moderator
Moderator
750 replies posted 500 likes received 500 replies posted

Hi,

I believe you have added the print statement after the following check done in the mesh_app_init(). If the device is not provisioned, then the app won't execute beyond this "if" condition. After provisioning, you will be able to see the expected prints on the PUART trace. Please try it once.

if (!is_provisioned)

        return;

Did you configure the LED correctly? I can see that you have used some number in the config parameter of wiced_hal_gpio_configure_pin().

void wiced_hal_gpio_configure_pin(BYTE pin,UINT16 config, BYTE outputVal);

Config parameter should be set as below. (Please check wiced_hal_gpio.h)

For example, to enable interrupts for all edges, with a pull-down, you could set config parameter to:

GPIO_EDGE_TRIGGER | GPIO_EDGE_TRIGGER_BOTH | GPIO_INTERRUPT_ENABLE_MASK | GPIO_PULL_DOWN_MASK

Thanks,

-Dheeraj

0 Likes
lock attach
Attachments are accessible only for community members.

Hi Dheeraj,

Thanks for your response, I put the print statement only after that If condition, After it gets provisioned only i am printing the statement but still in the putty window i am not getting the desired print value. There is no issue with LED, it works fine, Instead of giving names like Outputval as high or low i am giving as 1 or 0, That works well for me. But the problem is with the print statement. I am sharing you the part of the code where i am intend to print, Please check and let me know the problem.

Thanks in advance.

0 Likes
lock attach
Attachments are accessible only for community members.

Hi,

i just added below code in the sensor_temperature.c and, I am getting prints as expected (and LED is ON). Please find the attached code and logs.

if (mesh_sensor_sent_value < 500)

{

    WICED_BT_TRACE("LED ON\n");

    wiced_hal_gpio_set_pin_output(3,0);

}

else

{

  WICED_BT_TRACE("LED OFF\n");

  wiced_hal_gpio_set_pin_output(3,1);

}

I believe, other modification done to your code (Eg: max44009_init) is causing some problem. Could you please comment out the below lines from your code and try?

max44009_init(&max44009_usr_set, max44009IntProc, NULL);

mesh_sensor_current_light = max44009_read_ambient_light();

Since, you are not getting print for "WICED_BT_TRACE("PRINTING init done ");", I doubt the device goes to some bad state due to the max44009_init(). Could you please confirm that the device and the application is functional, after provisioning?

Thanks,

-Dheeraj

0 Likes