9 Replies Latest reply on Jul 29, 2016 5:41 AM by FGT

    Interfacing Bluetooth and WiFi with Galileo Gen 2

    PranavP

      I have a Galileo Gen 2 board. For operating system I installed Debian on the SD card. I want to connect a bluetooth module to galileo for receiving data and WiFi module to upload that data on apache server.

      I'm trying to connect HC-05 to board now, so as to connect it I searched on the internet as I'm new with the board. I got some info on the Intel Centrino Wireless N module. Then as for HC-05, gpio pins and mraa library(This part I didn't understand). I tried using gpio pins but I'm not getting how to do it.

      Can someone tell me, what will be easier to interface with galileo hc-05 or wireless n module?

      1. If wireless n module(I got some information about mPCIe port), then how to interface it with board and after interfacing how to handle the incoming data(I mean how to know where the data received from bluetooth is stored and how to access it).

      2.If hc05 then, how to interface it using UART(tx rx pins) and how to handle the data(same as above). And then what should I use for WiFi module.

       

      Then should I use YOCTO image or is it possible in Debian linux.

       

      Through bluetooth continuous data will come from the other end.

      How to monitor that data?

      Then I want to write that data in a text file which will be uploaded on apache server(copied to /var/www).

       

      I've tried to describe everything I want to do on the board.Please help me for project.

      Sorry for bad English.

      Thanks in advance.

       

      Sites I referred:

      Setting up Bluetooth — Clay and Galileo

      How to program UART serial from Linux on Galileo Gen 2?

      WiFi access on Intel® Galileo with Yocto* Linux | Intel® Software

        • 1. Re: Interfacing Bluetooth and WiFi with Galileo Gen 2
          Intel Corporation
          This message was posted on behalf of Intel Corporation

          Hi,

          Are you using the HC 05 in the 6 pin configuration or the shield-mounted one? If you’re using the shield version then I’d suggest you to look at the shield test report. http://www.intel.com/content/www/us/en/support/boards-and-kits/000005913.html  .In section 5 of the guide, for example, you can see lots of information about this shield, including configuration tips, steps to connect and code among others.

          If you’re using the 6 pin configuration, then I’d suggest you, just to get you started, to look at this community thread https://communities.intel.com/message/404369#404369 . In this thread, the user compiled most of the helpful threads in the community that are related to this module. The information in the threads compiled should be able to give you an idea on how to use the sensor and gather the data.

          The suggestions above and the shield testing report have been tested with the Yocto image, so in order to get the same results as the guides it’d be recommended to use the Yocto image. If you prefer to use Debian, some of the suggestions might not work, in such case you can post your questions in http://www.emutexlabs.com/ubilinux .

          Let us know if you found this helpful.

          -Sergio
           

          2 of 2 people found this helpful
          • 2. Re: Interfacing Bluetooth and WiFi with Galileo Gen 2
            PranavP

            Thank you very much Sergio.

            I just interfaced 6-pin configuration hc-05 successfully by using the instructions given on this site

            How to program UART serial from Linux on Galileo Gen 2?

             

            But still I got a problem which is.

            The data sent from bluetooth terminal is received on ttyS0, to see it instruction used is cat /dev/ttyS0. Now to receive that data I need to run that instruction then only Bluetooth terminal is able to send the data. As soon as ^C is pressed bluetooth terminal doesn't work. ttyS0 is a device file so tried opening it using nano, file opened but still bluetooth terminal wasn't able to work. What I want to do is to copy the received data and paste it in a text file to upload it on apache server i.e. to copy that text file to /var/www. How to overwrite the continuously incoming data in that text file?

             

            And what should I use as WiFi module to give internet access to Galileo, and is it possible to interface both WiFi and Bluetooth module at same time.

             

            Thank you, your reply was very helpful.

            • 3. Re: Interfacing Bluetooth and WiFi with Galileo Gen 2
              Intel Corporation
              This message was posted on behalf of Intel Corporation

              I found a link that has multiple suggestions on how to get data from the serial port to a port. You can check the suggestion here: http://electronics.stackexchange.com/questions/54/saving-arduino-sensor-data-to-a-text-file  .

              About the Wi-Fi module, I use the Intel Centrino Wireless N-135. And yes, you can use Wi-Fi and Bluetooth at the same time.

              -Sergio
               

              • 4. Re: Interfacing Bluetooth and WiFi with Galileo Gen 2
                FGT

                Hi PranavP,

                 

                PranavP wrote:

                ...

                But still I got a problem which is.

                The data sent from bluetooth terminal is received on ttyS0, to see it instruction used is cat /dev/ttyS0. Now to receive that data I need to run that instruction then only Bluetooth terminal is able to send the data. As soon as ^C is pressed bluetooth terminal doesn't work. ttyS0 is a device file so tried opening it using nano, file opened but still bluetooth terminal wasn't able to work. What I want to do is to copy the received data and paste it in a text file to upload it on apache server i.e. to copy that text file to /var/www. How to overwrite the continuously incoming data in that text file?

                 

                How are you developing your software? Are you using any IDE?

                 

                Fernando.

                • 5. Re: Interfacing Bluetooth and WiFi with Galileo Gen 2
                  PranavP

                  No I'm not using any IDE.

                  Serial terminal PuTTY.

                  • 6. Re: Interfacing Bluetooth and WiFi with Galileo Gen 2
                    FGT

                    PranavP wrote:

                     

                    No I'm not using any IDE.

                    Serial terminal PuTTY.

                    ok, thanks,

                     

                    What I want to do is to copy the received data and paste it in a text file to upload it on apache server i.e. to copy that text file to /var/www. How to overwrite the continuously incoming data in that text file?

                     

                    What do you have right now in /var/www and what do you expect to have?

                     

                    Fernando.

                    • 7. Re: Interfacing Bluetooth and WiFi with Galileo Gen 2
                      Intel Corporation
                      This message was posted on behalf of Intel Corporation

                      Hi PranavP,

                      Do you still need help with this thread, were you able to interface Bluetooth and the Galileo?

                      -Sergio
                       

                      • 8. Re: Interfacing Bluetooth and WiFi with Galileo Gen 2
                        PranavP

                        Do you still need help with this thread, were you able to interface Bluetooth and the Galileo?

                        Hi Sergio,

                        I successfully interfaced Bluetooth and also found a way to copy incoming data on port ttyS0 to a text file using GNU AWK.

                        But I'm still trying to find a way to interface WiFi module(ESP8266) and Bluetooth module(HC05) both at the same time with Galileo Gen 2.

                        I'm still confused about what to use for WiFi ESP8266 or Intel Centrino Wireless-N 135.

                         

                        And

                         

                        What do you have right now in /var/www and what do you expect to have?

                        Hi Fernando,

                        In /var/www there are 3 files "index.html , test.jpeg , data.txt".

                        What I was trying to achieve was to copy the data from ttyS0 and paste it into data.txt.

                        That problem was solved by running "cat /dev/ttyS0 > /var/www/data.txt" instruction.

                         

                        Thanks.

                        -Pranav

                        • 9. Re: Interfacing Bluetooth and WiFi with Galileo Gen 2
                          FGT

                          Hi Pranav,

                           

                          I see your Bluetooth-related problem is solved.

                           

                          About ESP8266: I've seen a few threads which show how to use it with a simple Arduino sketch:

                          DAYTIME Client - Gen 1 / ESP8266-11

                          Wi-Fi module ESP8266 in Galileo

                          and I guess it would not be difficult from the command line (as in "Serial terminal PuTTY"), but I've not tried.

                           

                          BR,

                           

                          Fernando.