I have extend the light switch example to send message to the other node. I have refer This example to send message. But how to configure another node to receive the message and relay the same message to server using WiFi. Will you please provide some sample example code to receive the message and relay that message. It also gives the error "Undefined reference to address_set." in following code
uint32_t status=0;
uint8_t buffer[30];
uint8_t length;
uint16_t address;
access_message_tx_t msg;
length= SEGGER_RTT_Read(0,buffer, sizeof(buffer));
if (length)
{
msg.opcode.opcode =simple_message_OPCODE_SEND;
msg.opcode.company_id = 0x0059; // Nordic's company ID
msg.p_buffer = (const uint8_t *) &buffer[0];
msg.length =length;
address = 0xCAFE;
address_set(address);
SEGGER_RTT_printf(0,"Sending to group address 0x%04x\n", address);
status= access_model_publish(m_clients[0].model_handle, &msg);
if (status == NRF_ERROR_INVALID_STATE ||
status == NRF_ERROR_BUSY||status == NRF_ERROR_NO_MEM)
{
__LOG(LOG_SRC_APP, LOG_LEVEL_INFO, "Cannot send. Device is busy.\n");
hal_led_blink_ms(LEDS_MASK, 50, 4);
}
else
{
ERROR_CHECK(status);
}
}