14 Replies Latest reply on Dec 10, 2014 1:12 PM by Intel_Alvarado

    connect two edison board via bluetooth

    Thror

      Hello everyone,

       

      I wanted to know if in the present it is possible to connect two edison board via bluetooth to transfer data. I red several topics in the forum and if I understood it is not possible to do it with Galileo Board.

       

      Thanks everyone

        • 1. Re: connect two edison board via bluetooth
          Intel_Alvarado

          Hi Thror,


          Part of the new software release is to make an improvement in the Bluetooth connectivity in the Edison. I suggest you to wait for this new software release due to the end of this year by checking the Edison downloads https://communities.intel.com/docs/DOC-23242 regularly.


          Regards

          Sergio

          • 2. Re: connect two edison board via bluetooth
            Thror

            Hi Sergio,

             

            Thank you for the reply.

             

            You can assure me that the software will be relased by the end of this year? I want to use Edison Board for a project in my company and the project has his schedule so I can't buy the edison if I'm not sure on this relase.

             

            Without open a new post. There is the possibility to attach an external antenna that replace the onboard antenna for bluetooth?.

             

            Regards.

             

            Giacomo

            • 3. Re: connect two edison board via bluetooth
              mhahn

              You can attach an external AUX antenna. But I think it's in addition to the built-in antenna and doesn't replace it.

              About Bluetooth: there are many protocols Bluetooth can run.

              what do you mean by "transfer data"?

              You could for instance create a serial over bluetooth (="RFCOMM") and transfer data this way which should work on pretty much every Bluetooth stack as RFCOMM is a base layer others rely on. Or do you mean Arduino support? Or do you mean file sharing? there are really so many protocols it's hard to tell what will work for you.

              • 4. Re: connect two edison board via bluetooth
                Intel_Alvarado

                Hi Thror,


                The new software release has Bluetooth connectivity enhancements and is planned to be released in December 2014.


                Regards

                Sergio

                • 5. Re: connect two edison board via bluetooth
                  Thror

                  Hi,

                   

                  Thanks Sergio for the specification.

                   

                  mhahn for the antenna it is ok.

                  For the use of bluetooth I have to create a Scatternet which is composed by three piconet. In this network the nodes send data coming from sensors measurements to a master node that sends the data to a web server via Ethernet or Wifi. So I think I can transfer the data through "RFCOMM" protocol, I'm not sure about this, it is the first time that I use bluetooth and I'm still studying it.

                   

                  thanks to both of you,

                   

                  Giacomo

                  • 6. Re: connect two edison board via bluetooth
                    Evinrude

                    Sergio et al,

                     

                    Will the connectivity enhancements aide in connecting the Edison to another source using the sockets API?

                    This may not be an issue with the Intel Edison, so here is what I am trying to accomplish.

                     

                    On the Intel Edison I am running a simple client using code similare to this: http://people.csail.mit.edu/albert/bluez-intro/x502.html

                    The server is running on a Linux Desktop using code from the same url.


                    If the devices are not paired, then the client connect() will return with EINPROGRESS after a long delay.

                    If the devices are paired, then the client connect() will return with ECONRESET after a very short delay.


                    I can see the Bluetooth traffic through Wireshark on the server side, so a connection is being attempted, but the server side never returns from accept().


                    wireshark_bt_capture.png


                    The full Wireshark capture is attached.


                    Any insight is appreciated, thanks.


                    --

                    Mickey

                    • 7. Re: connect two edison board via bluetooth
                      mhahn

                      You may want to also check btmon, or hcidump to monitor bt traffic in detail

                      • 8. Re: connect two edison board via bluetooth
                        Evinrude

                        Here is the server side output from hcidump . 00:43:34:B1:BE:EF is the client (Intel Edison).

                         

                        If I am reading the output correctly the server side is disconnecting the connection due to it being terminated before any RFCOMM is exchanged.

                         

                        > HCI Event: Connect Request (0x04) plen 10
                            bdaddr 00:43:34:B1:BE:EF class 0x000110 type ACL
                        < HCI Command: Accept Connection Request (0x01|0x0009) plen 7
                            bdaddr 00:43:34:B1:BE:EF role 0x00
                            Role: Master
                        > HCI Event: Command Status (0x0f) plen 4
                            Accept Connection Request (0x01|0x0009) status 0x00 ncmd 1
                        > HCI Event: Role Change (0x12) plen 8
                            status 0x00 bdaddr 00:43:34:B1:BE:EF role 0x00
                            Role: Master
                        > HCI Event: Connect Complete (0x03) plen 11
                            status 0x00 handle 70 bdaddr 00:43:34:B1:BE:EF type ACL encrypt 0x00
                        < HCI Command: Read Remote Supported Features (0x01|0x001b) plen 2
                            handle 70
                        > HCI Event: Page Scan Repetition Mode Change (0x20) plen 7
                            bdaddr 00:43:34:B1:BE:EF mode 0
                        > HCI Event: Max Slots Change (0x1b) plen 3
                            handle 70 slots 5
                        > HCI Event: Command Status (0x0f) plen 4
                            Read Remote Supported Features (0x01|0x001b) status 0x00 ncmd 0
                        > HCI Event: Command Status (0x0f) plen 4
                            Unknown (0x00|0x0000) status 0x00 ncmd 1
                        > HCI Event: Read Remote Supported Features (0x0b) plen 11
                            status 0x00 handle 70
                            Features: 0xbf 0xfe 0xcf 0xfe 0xdb 0xff 0x7b 0x87
                        < HCI Command: Read Remote Extended Features (0x01|0x001c) plen 3
                            handle 70 page 1
                        > HCI Event: Command Status (0x0f) plen 4
                            Read Remote Extended Features (0x01|0x001c) status 0x00 ncmd 1
                        > HCI Event: Read Remote Extended Features (0x23) plen 13
                            status 0x00 handle 70 page 1 max 2
                            Features: 0x07 0x00 0x00 0x00 0x00 0x00 0x00 0x00
                        < HCI Command: Remote Name Request (0x01|0x0019) plen 10
                            bdaddr 00:43:34:B1:BE:EF mode 2 clkoffset 0x0000
                        > HCI Event: Command Status (0x0f) plen 4
                            Remote Name Request (0x01|0x0019) status 0x00 ncmd 1
                        > HCI Event: Remote Name Req Complete (0x07) plen 255
                            status 0x00 bdaddr 00:43:34:B1:BE:EF name 'BlueZ 5.18'
                        < HCI Command: Disconnect (0x01|0x0006) plen 3
                            handle 70 reason 0x13
                            Reason: Remote User Terminated Connection
                        > HCI Event: Command Status (0x0f) plen 4
                            Disconnect (0x01|0x0006) status 0x00 ncmd 1
                        > HCI Event: Disconn Complete (0x05) plen 4
                            status 0x00 handle 70 reason 0x16
                            Reason: Connection Terminated by Local Host
                        
                        • 9. Re: connect two edison board via bluetooth
                          mhahn

                          looks your code doesn't request any other protocol but runs just a service discovery.

                          Not sure what your code is doing.

                          In order to use SPP (RFCOMM) you don't need pairing. You need to specify the inbound and outbound channel and would create a virtual /dev/rfcomm<number> device which you can use like a standard terminal.

                          You should find more details online.

                           

                          On your log: You might add "-R" and also run it on the other side to see both sides

                          • 10. Re: connect two edison board via bluetooth
                            Evinrude

                            I have gone a different route in troubleshooting the issue. I needed to know if it is the bluetooth device (CSR8510) attached to my linux desktop or the Edison itself not being able to communicate with other bluetooth devices. It can do a service discovery, but outside of that the edison or my configuration therein is falling short.

                             

                            I was able to l2ping my phone's bluetooth from my linux desktop with no issue, but  from the edison and got the following error:

                             

                            Can't connect: Operation now in progress

                             

                            I rebooted the Edison, rfkill unblock bluetooth, and still got the same error.

                            • 11. Re: connect two edison board via bluetooth
                              Pascal_R

                              @Intel_Alvaro

                               

                              Hi Alvaro, to follow-up the question, do you know if the BLE will be implemented for Arduino in the December release of Edison?

                               

                              Thanks, best regards

                               

                              Pascal

                              • 12. Re: connect two edison board via bluetooth
                                Intel_Alvarado

                                Hi Pascal_R,

                                There will be some improvements related to Bluetooth; however we can’t discuss most of the features of future releases.

                                Regards

                                Sergio

                                • 13. Re: connect two edison board via bluetooth
                                  bentrevett

                                  Hi Alvarado,

                                   

                                  Do you know when in December these Bluetooth enhancements are coming?

                                   

                                  Thanks.

                                  • 14. Re: connect two edison board via bluetooth
                                    Intel_Alvarado

                                    Hi bentrevett,

                                    Unfortunately, there is no ETA.

                                    Regards

                                    Sergio