Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
8 years, 5 months ago.
BLE, SimpleBLE RPC
What is the best way to remotely execute a function on a nRF51822 using BLE protocol? Until now I didn't need it, just read and write data but in this case be able to remotely start the execution of a function (or a class method) would simplify my source code.
The function should return an int and accept 4 parameters.
Question relating to:
1 Answer
8 years, 5 months ago.
Best solution might be an overstatement, but I can think of one: Have one Characteristic for the parameters that can only be written to (supports Write). The limitation is that the parameters should be fixed, and if there are several functions you would need an opcode. Then have another Characteristic for the result, which can notify or indicate. Group them in an RPC service.
Sounds good?
Yes, more or less it is what I tryed after the first answer because at the moment I need 3 functions with different parameters and two returning a value.
posted by 15 Jun 2016P.S. I posted the question in 2 different places in mbed.org so here yours is the 1st. Apart Simple BLE in the mbed BLE stack is there any support to RPC or similar? I mean a way to pass some parameters, execute a specific function and return a value. Returning a value could be done asynchronously and started from the device because the function can require no so little time to execute.
posted by 15 Jun 2016