Bluetooth instructions?


#1

Hi every one, i want to write a program to control the mbot via an external device all code in Javascript.

I can connect my computer to the mbot but i don’t know what to send ? Is there somewhere a kind of manual for this communication. In other words, what is the bluetooth api ? what kind of hexadecimals message that i should send ?

Regards


#2

This is the source for the mbot’s firmware, search for bluetooth and around line 210 you should see what they are sending. (This is my 2 minute stab at finding where the commands are.) It looks like they just switch serial to bluetooth and send the same commands as if the mbot was plugged into usb.


#3

Yes thank you but Its not enougth precise

I saw that :
/*
ff-55-len-idx-action-device-port-slot-data-a
0–1--2----3------4--------5--------6----7-----8
*/

But what I need is something like that https://github.com/mindboards/ev3sources/blob/master/lms2012/c_com/source/c_com.h

What I understand by reading the code is if I want to start the engine for example i should send a message like previously but I have no idea on how I should calculate the length, the index, …

regards


#4

You dont need to send a specific code…as long as you program your own sketch and upload it to the arduino, it will act as you want with your own commands. You can see my implementation of this at my blog.

itsallaboutcuriosity.wordpress.com

regards


#5

Thank you but it don’t correspond to my use case. In fact, I want to control the mbot via Myo and for that i will use a Node program that will send bluetooth instructions to the mBot. That’s why I need to have the precise instructions to send to MBots

But i like your idea and maybe i will try it

regards


#6

ok, if you wanna try it, and face some problem, let me know, here or at the blog, I will be glad to help.


#7

Hello all!

Since today I experience the same problems with Bluetooth connectivity; while my Fairphone 2 perfectly connected with my Logitech H 800 headset yesterday, it does not connect or even recognise it today.

Is this due to the new Android version?
What can I do?

I’m very sad and hope it can be resolved soon.

Thanks in advance!