Android Question How to send BLE strings from my phone to a BLUNO mega card ?

julien789

Member
Hello, I introduce myself, I am Julien, a student in France in the field of electrical engineering and industrial computing.

We are currently in the process of designing a terrestrial drone composed of several operating modes.

It is controlled by a BLE link via a universal mobile application which transmits command characters.

We now want to use b4a so that we can create our own android remote control.

We have already designed the HMI part by designating and adding MsgBoxes to be able to see the characters that will be sent when we press the buttons.

So I installed all the software with the SDK files through your platform, then the libraries.

I have been looking for how to send these orders for several days.

I used most of the codes available on this platform.

I was able to retrieve the information from the mega bluno card using the "example BLE" code you provide.

I am currently blocked because I do not know the procedure which allows to emit these character strings in BLE, I also consulted B4A-codex but I did not find anything.

I also try the "BLE central" code because the card is programmed via AT commands as a BLE peripheral, but I still cannot send data.

Can you advise me?

Thank you in advance

cordially

Julian

Here is the terrestrial drone :

thumbnail_IMG_20210219_172030_8_1.jpg


Here is the link to our blog in French if you want to know more:

 
Last edited:

f0raster0

Well-Known Member
Licensed User
Longtime User
check this B4I and B4A examples:

I based my code on that to control my hardware.
 
Upvote 0

julien789

Member
Hello, very well, I will follow your procedure carefully to see if I manage to make the connection work, I will get back to you in case of problem.
Thank you
 
Upvote 0

klaus

Expert
Licensed User
Longtime User
Upvote 0

julien789

Member
Good evening, I saw the part concerning the HC -05 module but I can not find as much information as you, I suspected it poorly I look at all its and I keep you informed.
Thank you.
Good evening to you!
 
Upvote 0

julien789

Member
After searching it is a Hc-05 module (master) ( https://www.gotronic.fr/pj2-35192-2247.pdf) working in Bluetooth and not Bluetooth Low Energy it is the nRF8001 module which uses the BLE.
1616013345408.png

The mega bluno card is therefore not similar to this module.
However, I will try to attribute a link between the provided code and the BLE.
Don't you know an instruction like Serial.print ("abcd"); in arduino, because sending strings in BLE is just like sending information from the serial port ??
cordially
 
Last edited:
Upvote 0

f0raster0

Well-Known Member
Licensed User
Longtime User
if you are using the module nRF8001 then first step is check its information using the App nRF connect from Nordic Semiconductor, after that use the example B4A or B4I from post #2 to control your module (you will need to update serviceId and charId, take this information using the App nRF Connect)

Try to make the connection between B4A or B4I and your nRF8001, once it is done the next step will be control your module :cool:
 
Last edited:
Upvote 0

julien789

Member
Thank you for your answer but I am not trying to use the nRF8001 module, we are using a bluno mega from df robot, did you think the programming is the same for the BLE link?
 
Upvote 0

f0raster0

Well-Known Member
Licensed User
Longtime User
Thank you for your answer but I am not trying to use the nRF8001 module, we are using a bluno mega from df robot, did you think the programming is the same for the BLE link?
if you are using the module BLE then first step is check its information using the App nRF connect from Nordic Semiconductor, after that use the example B4A or B4I from post #2 to control your module (you will need to update serviceId and charId, take this information using the App nRF Connect)

Try to make the connection between B4A or B4I and your module BLE, once it is done the next step will be control your module.
 
Upvote 0
Top