• Hi All,

    I just got around to playing with two espruino boards with HC-05 Bluetooth modules to see if this platform can be used for a multi agent system. I looked through git and on these forums but I cant find any hint as to if its possible to have two espruinos talking to each other over bluetooth. Can this be set up and can the espruino read out the signal strength?

    Regards,

    Alex

  • If you look at the section on 'Changing Name and Passkey' at http://www.espruino.com/Bluetooth you'll get some idea of how to actually send commands to the bluetooth module itself.

    If you google 'HC-05' commands you should get some information like this and then you can use it to put one module into 'Master' mode, and to tell it to connect to the other (client) module.

    The command AT+INQ should also give you signal strength indications :)

  • Hi Gordon,
    Thank you for your reply! I have 2 espruinos talking to eachother now :) I would like to switch the master slave connection between 2 slaves and one master. So the master has to disconnect from the first and connect to the second. The problem I'm facing is that once a connection has been made, the AT commands are just sent over as text.. Is there anything I can do about that? I want the master to keep interpreting the AT commands. I've googled this quite a lot but I cant seem to find anything..

    Regards,

    Alex

  • Great!

    I'm not sure... Have you tried connecting pin 34 (the one that was 3.3v) to a GPIO pin on Espruino? It may be that the act of connecting it to 0v (when you want to send/receive data normally) is enough to reset it such that when you raise it to 3.3v again it listens for AT commands again?

    Worst case you could connect pin 11 (which is reset) up to Espruino. Pulsing it to 0 (1=normal, 0=reset) would reset it and you could enter AT mode again that way.

  • Hi Gordon,

    Thank you for your response! It seems that pin 34 (orange label) acts as a walkie-talkie switch, when its pushed, the chip listens to AT commands, when released it doesnt and it just communicates with the connected device over serial.

    I have also been looking into the nRF24L01+ you mention on your site. I have two of them here and I was wondering if there are any plans to make use of the Gazell Link system from Nordic? Also, I read the module code on git and I can't find any way to get the RSSI from that. Its a shame because it would really be a great option for us. Are there any future plans to incorporate these features? For now I'll stick to serial connecting and RFduino to the espruino.

    Regards,

    Alex

    PS. if the USB cable is connected, bluetooth becomes Serial1, if I solder pins B6 and B7 to use the USART1 TX RX to talk to a RFduino, which Serialx do I use?

  • Hi Alex,

    Maybe xBee would be an alternative solution for you ? I will contribute a module for it shortly.

    Sacha

  • Hi Sacha, xBee would indeed be a very good alternative for my situation. I would really like to use the espruino because we are developing an agent platform for javascript. If xBee would be available that would be great! I require some kind of mesh network (or dynamic sets of star networks) that can pass information to every node in the system in under a second and an RSSI indicator for location approximation. Thanks for the great work!

    Regards,

    Alex

  • PS. if the USB cable is connected, bluetooth becomes Serial1, if I solder pins B6 and B7 to use the USART1 TX RX to talk to a RFduino, which Serialx do I use?

    I'm not sure I understand - you can set Serial1 up to be on either A9/A10 or B6/B7 using Serial1.setup(...) - but obviously not both at the same time. You can move the console to any other Serial port you wish using SerialX.setConsole().

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

Connecting espruino to other espruino dynamically using bluetooth?

Posted by Avatar for Alex @Alex

Actions