Archive for November, 2010

Create Christmas application with N-Button

Monday, November 29th, 2010

Christmas is coming!

N-Button makes it possible to create cool Christmas application without any programming!

Step 1. Download N-Button

Step 2. Download Configuration files for Christmas

Step 3. Install N-Button and Load configuration file *.nbc on N-Button Manager dialog.

Step 4. Christmas widgets will float on your desktop no.

Step 5. To setup the application, you need a  ProXR relay board from NCD. The configuration files are made to work with ProXR board. However, it works with any relay boards from NCD. It can control up to 255 relays. It works with both RS232, USB, fiber optical and ZigBee/XBee interface.

Just hook up the relay board with computer, install N-Button, load the configuration file and setup communication parameters. That’s it! You can control your Christmas light, music, bells from your desktop now!

Screenshot 1

N-Button Christmas application

All bells, boxes and hangers are clickable and will trigger a relay!

Screenshot 2

N-Button Christmas application

All balloons are clickable and will trigger a relay!

Tips:

  • Use touch screen.
  • Use Ethernet board or ZigBee module  if the device are far away from computer.

Create Virtual Key Fob with N-Button Lite

Thursday, November 18th, 2010

It is easy to create a virtual Key Fob on your desktop with N-Button Lite to control a relay on/off from computer.

Virtual Key Fob

 

 

 

 

 

 

 

Step 1. Download N-Button Lite

Step 2. Install N-Button Lite and Open N-Button Lite Manager

N-Button Lite Manager

Step 3. Setup the Relay board type and serial port or network parameter correctly according the your hardware type. Get a Relay board from NCD.

Step 4.  Add a Key fob image as background.  Here is the picture.

Virtual Key Fob background

Step 5. Click “Add Relay Button” to show the dialog Properties – Relay Button.

Properties - Relay Button

Step 6. Set Action to “Turn On” and select Relay ID you want to control. Set Style to “Image File” and Size to “Large 100%”. Select Image File for button. Here is the picture.

Virtual Key Fob button

It should include the status of normal and button pressed. The two parts need to be same size. Please refer “How to Prepare Button Images for N-Button” for how to make it.

Step 7. Click “OK”  to return N-Button Lite Manager dialog.

Step 8. Click “OK” to close N-Button Lite Manager dialog.

The key fob image and button will show on top left of the screen. Drag the button to center of key fob and drag the key fob to the place you want. Right click on the background image to uncheck the “Move” and check “Move All”.

That’s it! You have a virtual key fob on your desktop.

You can download the configuration file  for key fob and load it directly in N-Button Lite Manager dialog.

Download Virtual Key Fob Configuration File

Video: How to Save and Load Configuration File for N-Button

ZigBee Link Testing with ZigBee Operator

Thursday, November 18th, 2010

ZigBee Operator support “Explicit Addressing ZigBee Command”. We can use Explicit Addressing ZigBee Command for link testing with API firmware.

image

Steps for Link Testing

Prepare the mesh network. The minimum requirement for a mesh network is a coordinator and an end device. We use a end device with API firmware.

Power on both coordinator and end devices. Connect the coordinator to the computer.

Open the ZigBee Operator and connect with serial port of XBee modules.

Go to “Tools-XBee Devices Properties” or “image ” icon to open Properties window and check “API” check box. Click “Read” button to make sure the computer can talk to device correctly.

image

Go to “Tools->Search XBee Devices” or click “image”icon to open “Search Device” window and check “API Mode”. Click “Search Network” button to search the network to make sure the end device are connected with Coordinator.

image

Click “Add To Database” button to add all XBee modules’ information to database.

Close the search window.

Click “View->XBee & XBee Pro ZB ZigBee” or “image” icon to switch to “Mesh Network” panel. 

image

Select “Explicit Addressing ZigBee Command” in type

Select Coordinator’s address in Address

Set “Cluster ID” to 12 and “Source Endpoint” to E8 and “Destination Endpoint” to E8.

Set “Profile ID” to C105

Select “TEXT” in format and input “Echo” in RF Data. It can be any text as long as it is not empty.

Click “Send” button.

It will send the data to coordinator endpoint E8 from  source endpoint using cluster ID 12. This is setting for Loopback data. When coordinator received data from end point E8, it will send the data back.

Here is the data in log window.

Send:(09:03:46) 7E 00 18 11 01 00 13 A2 00 40 0A 2A 94 FF FE E8 E8 00 12 C1 05 00 00 45 63 68 6F 0C

Data Parsed: 7E 00 18 11 01 00 13 A2 00 40 0A 2A 94 FF FE E8 E8 00 12 C1 05 00 00 45 63 68 6F 0C
Explicit Addressing ZigBee Command
Frame ID: 0×01
64 Bits Address: 0013:A200-400A:2A94
16 Bits Network Address: FFFE
Source Endpoint: 0xE8
Destination Endpoint: 0xE8
Cluster ID: 0×0012
Profile ID: 0xC105
Broadcast Radius: 0×00
Options: 0×00
Data(Hex):45 63 68 6F
Data(Text):Echo

Rec:(09:03:47)7E 00 07 8B 01 85 BB 00 00 00 33 7E 00 10 90 00 13 A2 00 40 0A 2A 94 85 BB 41
Data Parsed: 7E 00 07 8B 01 85 BB 00 00 00 33
Transmit Status
Frame ID: 1
Network Address :0x85BB
Retries: 0×00
Delivery Status: 0×0 = Success
Discovery Status: 0×0 = No Discovery Overhead

45 63 68 6F B2
Data Parsed: 7E 00 10 90 00 13 A2 00 40 0A 2A 94 85 BB 41 45 63 68 6F B2
ZigBee Receive Packet
64 Bits Address: 0013:A200-400A:2A94
16 Bits Network Address: 85BB
Options: 0×41
Packet Acknowledged
Data(Hex):45 63 68 6F
Data(Text):Echo

Sometimes, the data send won’t be echo back. Please keep sending until you get the data back. Some times you need reset the end devices.

To check the signal strength on the remote module.

Switch to “Remote AT Command”, and select the address of the remote module and send “DB” Command. It will return the signal strength of last hop.

image

Here is the data in log window.

Send:(09:04:51) 7E 00 0F 17 01 00 13 A2 00 40 0A 2A 94 FF FE 00 64 62 67

Data Parsed: 7E 00 0F 17 01 00 13 A2 00 40 0A 2A 94 FF FE 00 64 62 67
Remote AT Command
Frame ID: 0×01
64Bits Destination Address: 0013:A200-400A:2A94
16Bits Destination Network Address: FFFE
Command Options: 0×00
Command: db
Para(Hex):
Para(Text):

Rec:(09:04:51)7E 00 10 97 01 00 13 A2 00 40 0A 2A 94 85 BB 64 62 00 24 80
Data Parsed: 7E 00 10 97 01 00 13 A2 00 40 0A 2A 94 85 BB 64 62 00 24 80
Remote AT Command Response
Frame ID: 0×01
64Bits Remote Module Address: 0013:A200-400A:2A94
16Bits Remote Module Network Address: 85BB
Command: db
Status: 0×00 = OK
Para: 24 

The signal strength on remote module is 24.

To Check the signal strength on the local module.

Switch to “AT Command” and send “DB” command. It will return the strength of the last hop.

image

Here is the data in log window.

Send:(09:09:55) 7E 00 04 08 01 64 62 30

Data Parsed: 7E 00 04 08 01 64 62 30
AT Command
Frame ID: 0×01
Command: db
Para(Hex):
Para(Text):

Rec:(09:09:55)7E 00 06 88 01 64 62 00 25 8B
Data Parsed: 7E 00 06 88 01 64 62 00 25 8B
AT Command Response
Frame ID: 1
Command: db
Status: 0 = OK
Para: 25 

The signal strength of local module for last hop is 25.