Hello. Sign in to get personalized recommendations. New customer? Start here.

中文网站

Hi!   Sign in    Register

Home > life > Wireless Expert > How to Deploy Bluetooth Secure Gateway on Intel Edison

How to Deploy Bluetooth Secure Gateway on Intel Edison

2017/1/3 13:46:10     Source: SIG     Views:422     Comments:0

Summary:Bluetooth Secure Gateway

1. Serial Connection

After your Edison is up and running, you should try to build a serial connection with it, then you can configure the board through serial interface.

Open “Device Manager” of Windows and check which Com port should be used, you can see my port is COM3.


Then open a serial port utility on your Windows computer and set baud rate to 115200; a serial connection is established like below. If this is first time you’ve logged into this board, you may need to input user name: “root” and click Enter key.

*More information about serial connection, please refer to here.

2. Change password for SSH

When you login to the board, you need to change password to enable SSH. Type this command in the console:

configure_edison --password
A prompt pops up and you can type the password and then re-type it to change it. 
After that, SSH is enabled.




3. Connect to the Internet

Since Edison already has a Wi-Fi interface, you can set it up to connect with your wireless router, and connect to the internet. Type this command in the console:

configure_edison –wifi

A prompt will come up and you can select the Wi-Fi network you want to join; type the password following the hint message in the console.

*More information about connecting to network, please refer to here.

4. Update & Upgrade

Type the below commands to update and upgrade software packs.
opkg update
opkg upgrade


5. Install node-gyp

Finally, we will need to install node-gyp. node-gyp is a cross-platform command-line tool written in Node.js for compiling native add-on modules for Node.js. The Bluetooth Secure Gateway needs this to compile some modules, so we MUST install it here. 
npm install -g node-gyp


6. Download Source Code for the Bluetooth Secure Gateway toolkit and Deployment Scripts

Then enter the following command to download the code:
wget http://downloads.bluetooth.com/tools/SG/smart-gateway-installscript.zip



When the zip has downloaded enter the following command to unzip it:

unzip smart-gateway-installscript.zip

 

When the code has been unzipped, navigate to the \gateway folder where we will install all the prerequisites defined in package.json. Run the command below to do this. The command may take some time to complete during which you will see a number of warnings. These are to be expected and should be ignored.
cd ./BluetoothSecureGateway1.0.14/ScriptsAndSourceCode/gateway/
npm install


Once completed the gateway server can be started by entering the following command:
rfkill unblock bluetooth
npm start


Open an SSH client and login to your Edison board, navigate to the \navible folder and install all prerequisites defined in package.json by running the commands below:
cd ./BluetoothSecureGateway1.0.14/ScriptsAndSourceCode/navible/
cd navible
npm install


Once completed the gateway server can be started by entering the following command:

npm start

If all is working you will see a message indicating that the server is now up and an IP address you can connect to will be displayed. It should look something like this:
Server running at: https://192.168.128.66:8000

Copy the URL and paste into a browser. See section 5.4 and 5.5 in BluetoothSecureGateway-HandsOnLab.pdf for further information.

7. Conclusion

After finishing this hands-on lab, you should be set with the Bluetooth Secure Gateway up on your Edison board. With this gateway on Edison, you can connect any Bluetooth LE device by browser, navigate through the various devices that you see, and interact with your peripherals. If you want to add a cloud service module to it, you can do this in a very standard way because most of cloud service vendors provide node.js modules for it. Enjoy, and start to expand your reach of Bluetooth devices through the Internet!

(Credit: Kai Ren)


About Product
Stepping it up

Last week, I took to the str...[More]

Make Your Home

Innovative product offerings...[More]