DEAR NXP engineer!
hello i am using kw38 also i possess a kw36 board in my project. i need to realize such function:
the kw38 want to gather data from 4 slave ble device, (they are all kw36) ,i know about how to connect to multiple slave implement refer to the temp_coll (AN12405.pdf,AN12404.pdf) demo. but my requirment is it can connect with the 4 slave device ,it also need to connect to smart phone and send datas. how to realize this multirole in one kw36,which using as a hub. how to configure the hub as a multirole
is there any design demo or guideline to refer to. thank you a lot!
Hello @shawn_123,
Hope you are doing well.
Could you please verify if Wireless UART (w_uart) demo application meets your requirements? This demo should support multiple devices that could be either mobile phones or another board.
The application behaves at first as a GAP central node. It enters GAP Limited Discovery Procedure and searches for other Wireless UART devices to connect. To change the device role to GAP peripheral, use the ROLESW button. The device enters GAP General Discoverable Mode and waits for a GAP central node to connect. Please consider that both roles do not work at the same time, the antenna should be switching between roles.
For more information, please refer to the Bluetooth Low Energy Demo Application User's Guide (inside KW36 SDK documentation folder > docs > wireless > Bluetooth).
Regards,
Eduardo.
yeah ,this demo i runned it indeed can connect to multi slave board. and also can launch advertising and connect with smart phone.
it can switch the role by press the ROLEBTN, in the demo board it exist the button, but in our project this is no such button,
i wonder if i define a global flag. and flip-flop it in a task. if the flag == 1 do the scan or do the advertise.
or i do the scan after a time intervel then do the advertise. or is there any method to achieve it without the button press event to trigger. thanks a lot!.
Hi,
Please, pay attention to gapRole_t mGapRole, this variable sets the current role, and you may try to make your own implementation of a software event to switch its value.
Regards,
Eduardo.