jueves, 28 de noviembre de 2013

Github Node.js + BLE + Pi


- Node.js wiring tool: http://nodered.org/

- GPIO Raspberry Pi: http://wiringpi.com/

- https://sourcegraph.com/sandeepmistry

JavaScript403 ✱12
JavaScript255 
JavaScript245 
JavaScript92 ✱4
JavaScript91 
JavaScript72 
JavaScript70 
JavaScript68 
JavaScript56 
JavaScript54 
JavaScript36 
JavaScript32 
C++
C++
C++
JavaScript
Objective-C
JavaScript
C++
Objective-C
Arduino
C++

SensorTag Firmware

Firmware hex files

To upload a new hex file to the SensorTag you need a CC Debugger  and TI's SmartRF Flash Programmer .
Connect the 10 pin flat cable (1.27 mm pitch) which is included with the CC Debugger, to the debug header (J1) on the SensorTag as shown here.
Over the Air Download
For the latest release of the SensorTag Firmware can be uploaded through the SensorTag app or by using the BLE Device Monitor using Over-the-Air-Download (OAD). OAD is supported in the TI BLE stack version 1.3 and newer . Read more about OAD in the User Guide
CC2541DK-Sensor Firmware
Download here: SensorTag Firmware rev 1.5
Revision 1.5 of the SensorTag firmware is the same version as in TI's Bluetooth low energy SW stack 1.4.0 , . The package Includes a hex image which can be used with a CC debugger and bin files for over the air download.
Download here: SensorTag Firmware rev 1.4
FW with 8G accelerometer resolution and 1 second barometer period
Download here: SensorTag 8G
Source code for MAC OS X application example
Download here: SensorTag OS X example
Screenshots:

Source code

Source code of SensorTag and other BLE projects is included in http://www.ti.com/tool/ble-stack 

NODE.js

SensorTag Step by Step Guides

Step-by-Step Guides


Frontline Sniffer Captures

Application Notes

Reference Designs

CC254X

CC2540

CC2541


source: http://processors.wiki.ti.com/index.php/Category:BluetoothLE#CC2541

TI SensorTag example apps

Embedded.png

Embedded - Applications (BLEv1.4.0 source)


Embedded - Applications (BLEv1.3 source)

Embedded - Applications (BLEv1.2.1 source)

  • BLE Stack Sample Applications - The sample applications that are included in the BLE stack installer
  • BLE-RC-Car - BLE Remote Controlled Car Demo (Including iPhone 4S Application Source Code)
  • 128-bit UUID - Implementation of SimpleBLECentral and SimpleBLEPeripheral using 128-bit UUID's
  • MasterSlaveSwitch - Dynamically switch between master and slave roles on a CC2540KeyFob.
  • DataThroughput - Send data at 5.9K per second. Sniffer capture file included.
  • DeviceNameWrite
  • SerialApp - Send data over UART. PC#1->SmartRF_Peripheral->SmartRf_Central->PC#2.
  • LowPowerNWP - HostTestRelease with power management using UART. No HW flow control.
  • PeripheralBroadcaster - Peripheral device sending out advertisements while connected.
  • KeyFobDemo Obsolete. Now included in the installer

Smart Phone - Applications and examples


Android

iOS




Pc.png

PC - Tools and Applications


  • SBLTool - PC Tool to download bootload compatible images (.bin) to CC2540 over serial link. (COM)
  • LinuxHostTest - Simple python script to make a HostTestRelease USB dongle perform a BLE device discovery. [PYTHON]
  • LinuxHostTest2 - More complete script to manage a HostTestRelease USB dongle like a BLE master. [PYTHON]
  • JavaSimplePeripheral - Example App to talk with SimplePeripheral application. [JAVA]
  • HealthDemoGUI - Example App which interfaces to Health Thermometer and Blood Pressure Profile. [C#]
  • py-ble-hci - Script for controlling a HostTestRelease USB dongle focusing on Direct Test Mode. Includes binary parser built using construct for easy extension to other HCI commands/events. [PYTHON]
  • pyblehci - Python Library for building and parsing vendor-specific HCI packets used by the HostTestRelease application (USB dongle) [PYTHON] NEW!
  • Raspberry PI and CC2541 SensorTag project by Mike Saunby NEW!
  • TISmartRFSnifferPython - Intercept and interpret TI Packet sniffer data via UDP (work in progress, only adv so far) [PYTHON] NEW!


source: http://processors.wiki.ti.com/index.php/Category:BluetoothLE#CC2541

Github - HTML5 realtime Snapshots

https://github.com/trygve-lie/demos-html5-realtime

What?

These are small demos using two or more (browser) clients interacting with each other in real time. Most demos have a remote and a receiver. The remote is used as a "remote control" to control what's going on on the receiver. These demos does show some new and experimental parts in browsers using native implementations so each demo might require different browser versions / experimental browser builds.

Getting started

For clients to communicate with each other most demos rely on a WebSocket connection. Iow; a server is needed. These demos come with a very simple server which uses ws for WebSockets so Node.js is needed.
Installation:
  • Download and install Node.js 6.x or later
  • Install ws: npm install ws
Starting the server:
  • In the demos-html5-realtime directory: cd www
  • Start the server: node server.js
  • The server should now be running at: http://localhost:8080/

Enable WebSockets

These demos use native WebSockets in modern browsers. At the time of writing, WebSockets are implemented or available in most modern browsers but due to a security issue they are disabled in some browsers:

Opera 11.xx (desktop) and Opera Mobile 11.xx:

In the address bar, write opera:config and then go to User Prefs. Set Enable WebSockets to true.

FireFox 4.x:

In the address bar, write about:config and then set network.websocket.enabled to true. Do also set tonetwork.websocket.override-security-block to true.

Chrome:

Should be enabled by default.

Safari 5.x:

Should be enabled by default.

IOS 4.2:

Should be enabled by default.

IE9:

IE has no support for WebSockets but the IE team has released a prototype which will extend IE with WebSockets.

Enable Device APIs

Different Device APIs are fairly new and just starting to occur in browsers. Some of these demos rely on beta and lab releases so do expect specific browser versions to run some of these demos. Please see the description of each demo if any specific browsers or configuration has to be used or performed.

Opera Mobile 12

Opera Mobile 12 for Android has native camera access and orientation events.

Firefox Mobile Nightly

Firefox Mobile nightly has Vibration API implemented.

Demos

These are the current demos:

Demo I - Simple chat:

A very simple chat client just passing messages between attached clients. Should be able to run in all WebSocket enabled browsers.

Demo II - Instant Camera:

A remote / receiver demo based on access to the camera on the device. The remote will display the video from the camera in a HTML5 video tag on the device which acts as a remote. A snapshot can then be taken on the remote device by clicking on the video and the snapshot will instantly be transferred to the receiver and displayed.
NOTE I: This demo requires the Opera Mobile 12 for Android which gains native access to the web camera. WebSockets must be enabled as described above in this document.
NOTE II: To be able to grab a image from the video stream and transfer it over the wire a security change must be applied to the browser. In the address bar, write opera:config, select Security Prefs and set Allow Camera to Canvas Copy.

Demo III - Remote Rotation:

A remote / receiver demo based on orientation events in a device. The remote will capture the orientation events from a device and transfer these over a WebSocket to the receiver and create a rotating image in the receiver. The image in the receiver will rotate depending upon how the remote is rotated.
NOTE: This demo requires the Opera Mobile 12 for Android which gains native access to orientation events. WebSockets must be enabled as described above in this document.

Demo IV - TV Remote:

A remote / receiver demo where a remote (handheld) device with touch events control playback, volume and switching between videos on a receiving device. Touch and click events are captured on the remote device and transferred trough a WebSocket to the receiving device.
Click the screen on the remote to start and stop playback. Swipe up to increase the volume. Swipe down to decrease the volume. Swipe to the right to switch to the next video and swipe to the left to switch to the previous video.
NOTE: This demo requires a device with touch events to act as a remote. The receiver must be able to play HTML5 video and have support for Ogg Theora. Both devices need WebSockets enabled.

Demo V - Remove Vibration:

A remote / receiver demo where a remote (handheld) device with support for device orientation acts as remote to trigger the Vibration API in a receiver (handheld) device. Shake the remote device and the receiver device will vibrate according to the shaking...
NOTE I: This demo requires the Firefox mobile nightly to act as the receiving part.