I want to interface Client Sensor over UART in light_switch_client code. Can you please give me the idea,how to do it.
I am using Mesh_V4.0 and SDK 16.0
I want to interface Client Sensor over UART in light_switch_client code. Can you please give me the idea,how to do it.
I am using Mesh_V4.0 and SDK 16.0
Hi,
I suggest you have a look at the UART Coexistence example from our Mesh SDK. The example integrates UART into the light switch client example.
Hi thanks for the reply.It compiled successfully.
1.Now will you please explain me which part in the code exhibits UART functionality ? Basically I want to send some commands from development kit,for which my sensor will send the response. (PHYSICAL WIRED INTERFACE)
2,Which pins I should use on the development kit to interface my external sensor ? (External sensor has RX,TX,RTS,CTS pins).
Hi thanks for the reply.It compiled successfully.
1.Now will you please explain me which part in the code exhibits UART functionality ? Basically I want to send some commands from development kit,for which my sensor will send the response. (PHYSICAL WIRED INTERFACE)
2,Which pins I should use on the development kit to interface my external sensor ? (External sensor has RX,TX,RTS,CTS pins).
Hi,
1. For sending and receiving over UART, have a look at these functions:
app_uart_get(..)
app_uart_put(..)
2. I suggest you have a look at the Product Specification for the nRF52832. P0.05 - P0.08 are connected to the interface MCU. Choose some other GPIO for communicating with the sensor.
Initialize the UART module with uart_init().
1.OK in that case I have to change the pins in default uart_init() function or I need to write separate uart_init() function for new pins ? can you please specify which four pins I shall use ?
2.I understand ble_app_uart_coexist doesn't have functionality to provision the device using nRF BLE mesh application so how I suppose to add the device in the same group to which server device is added ?
Basically I want to take data from sensor and then want to publish it over mesh from the client (I suppose ble_app_uart_coexist has client functionality ) to server.
Hi Mttrinh,
I am waiting for your reply.
Hi,Could you please look into my doubt
1. Like I mentioned in the previous reply, you can use any other GPIO pins. Have a look at the Pin assignments section in the the Product Specification for the nRF52832. Then you configure the UART peripheral to use those pins, change the pins in the default uart_init() function.
2. Yes, that is correct. The example doesn't have support for GATT provisioning so you can't use the nRF Mesh app to provision. You need to use our static provisioner in the SDK to provision. You can find it in the Light switch example.