What is the best way to perform communication between a PC and my Intel Edison using the bluetooth technology? I'd like to send some information from the Edison to the PC, but I don't know anything about bluetooth communication, and searching for Edison + bluetooth on the net only gives me directions for using it with phones, and they're very outdated.
If possible, I'd like to use node.js for that. That would be better but if there's no easy way, it's definitely not mandatory.
If maybe bluetooth is not a very good solution for that, what else could I do? I believe that Wireless networking would not be ideal because I want to use the Edison to communicate with my laptop, and not necessarily there will be a wireless connection available everywhere.
Take a look at the http://www.intel.com/support/edison/sb/CS-035381.htm Bluetooth User Guide, I think you will find helpful information there.
You could create a server/client with the FTP profile (Section 6.13) .
If you want to use node and bluetooth you should take a look into the https://www.npmjs.com/search?q=bluetooth npm modules for Bluetooth to check which one could work for your requirements.
An alternative is using Python and https://github.com/karulis/pybluez/tree/master/examples/simple PyBlueZ
Thanks for your answers. It clarifies a lot.
But I think that FTP is not the best approach. I'm sorry but I wasn't very clear before. I need to build an application em C/C++ on my PC that will connect to the Edison, and receive data over time through that connection.
I've looked into the guide you sent me, and it seems that SPP (Serial Port Profile) can do the trick. Do you think there's other way that's best to do I'm trying?
surely depends on what "kind of information" you want to share.
SPP gives you a virtual serial tty which you can use just as a physical one. There is also IP over bluetooth and various other protocols.
There are tools to help you on bluetooth (hci*, sdp*, btmon, ...). You may want to check BlueZ documentation (http://git.kernel.org/cgit/bluetooth/bluez.git/tree/doc bluez.git - Bluetooth protocol stack for Linux) as well as the python test scripts (http://git.kernel.org/cgit/bluetooth/bluez.git/tree/test bluez.git - Bluetooth protocol stack for Linux) for a quick start on bluetooth for various profiles. Probably there are some Node.JS samples out there as well - you'd have to check for that. Otherwise just add an additional hop and use for instance a socket between Python and Node.JS to forward data to Node.
However, to warn: Bluetooth might be not the easiest start. Maybe you want to give WiFi (direct) a chance?
I've tried doing direct wifi as you said, by making the Edison an Access Point (just pressed the power button for 4 seconds).
The problem is that I can't access the Edison at all. I've tried to ping it, or access on the browser. I've tried Edison.local, and also using the IP address that I get on the ifconfig command.
Am I missing something?
I've used this as reference:
Are you able to see the network generated for the Edison on your PC?
Which steps from https://software.intel.com/en-us/getting-started-with-ap-mode-for-intel-edison-board IoT - Getting started with Access Point (AP) Mode for the Intel® Edison board | Intel® Developer Zone were you able to follow successfully?
Hi! Thanks for your reply.
Yes, I can see the network generated on the PC.
I could do steps 1, 2 and 3 from the link. In other words, I can connect to the Edison.
I can't do the step 4:
Once you have connected to the hotspot, open a browser (preferably Firefox or Chrome) and enter
Edison.local in the URL bar...
be it using the Edison.local or the IP that I can get from the ifconfig command.
Using Edison.local could not work, I suggest you to check the IP address of your board by running the command configure_edison --showWiFiIP in the terminal console of the board, then put it in the web browser you are using.
Somehow it started working.
The IP that I get from issuing the command configure_edison --showWiFiIP is different from the one that I get from ifconfig. But even though the IP that I got from ifconfig wasn't working, it started to work now. Also, the IP that I got from your command only worked when the Edison and the PC were connected to the same network, not when the PC connected directly to the Edison.
I have a query about Bluetooth interface of intel edison. I have done Bluetooth communication successfully. But when I power off and again on the edison every time i have to configure BT usiing putty. Is there any way to program edison so that even after power reset i can pair directly to available Bluetooth and communicate with that.
I have configured bluetooth using putty with some following commands
rfkill unblock bluetooth
and then pairing and trusting the device.
Yes you always have to run the same commands in order to make it work. If you want to power your board and run these commands automatically I suggest you to create a script to run at boot. Something like this: