Nicholas Skinner

Freelance website and web application developer

Building An Active RFID People / Asset Tracking System With Mesh Networking

Introduction

All Hardware ComponentsI was initially looking into off the shelf hardware, however was unable to find any readily available equipment (to the hobbyist market in low quantities) that was reasonably priced, and fit the requirements. Therefore partly as a personal project, and partly in preparation for a possible commercial product I decided to put together a prototype active RFID tracking System.

The solution I came up with is based on 3 main hardware components, and 5 software components. It utilises mesh networking meaning that only a single reader needs to be physically connected to a PC, all other readers just require power.

Hardware:

  • Tags – Carried around / placed on assets to be tracked.
  • Reader Nodes – Placed around the area where the assets need to be tracked in.
  • PC Reader – Connected to the PC, receives data from reader nodes and sends it to the PC.

The main hardware component used is the Synapse RF Engine, a 2.4 GHz transceiver module with built in support for running Python scripts, 2 UARTs, a number of GPIOs, and a 2.5uA low power mode.

Software:

  • Tags – Software running on the tag to send out a “ping” at a defined interval, then put the “tag” to sleep before sending another ping.
  • Reader Nodes – Software running on the reader node hardware to listen for tag “pings”, and after receiving a ping, send the tag ID, reader node ID, and received signal strength to the PC Reader.
  • PC Reader – Software running on the reader hardware to receive data over the air from the many reader nodes and forward it to the serial / USB interface.
  • PC Serial to HTTP data forwarder – Software running on the PC that listens for data from the serial / USB connected PC Reader, and forwards that data via HTTP to a server.
  • Location tracking processing / display GUI – Web based software to process the tag data into a location, and display it on a map.

The software consists of Python used by the Tags, Reader Nodes, PC Reader. C# used by the “PC Serial to HTTP data forwarder”, and PHP, HTML, JavaScript, SVG used by the “Location tracking processing / display GUI”.

Video showing simulation of tracking between 8 rooms, using 5 tags. For real life demo showing a single tag moving between 3 rooms see below.

System Design

All Hardware ComponentsThe system was originally designed around the principle of Trilateration. Reader Nodes are placed at fixed known positions around the room / rooms containing tags that need to be located. As long as a tag is within range of at least 3 reader nodes the tags position can be calculated by using the signal strength of the tag to each of the 3 nearest readers. However this approach turned out not to be very feasible since past around 2 meters the signal strength started fluctuating in a seemingly unpredictable way. It may be possible to predict / error correct for the fluctuations however I opted to go for a simpler approach of just plotting tags next to the reader with the highest signal strength (the one they are nearest to). This now means that readers need to be placed in each room (ideally centrally) where tags need to be tracked and it is only possible to determine a tag is in a room, and not its position in that room (although it is not used the original trilateration code has been left in the download).

Using a two part system of sending the tag data to a web server (via a locally run data forwarding application) then displaying it back to clients in the browser has a number of advantages:

  • Main application processing / display logic can be maintained in a single central location for one or more deployments.
  • Location display / viewing GUI is cross platform (can be accessed via most modern browsers the have support for SVG excluding Internet Explorer).
  • No software to install on client PCs viewing the map.
  • Multiple users can logon and view the map at the same time.

The use of mesh networking means that only a single device needs to be directly connected to a PC, all the others just need to be within range of any other unit that itself is either close to the PC, or close to another reader that is close to the PC. The makes setting up the system much easier as there is no need to wire each node to the PC / the network or have a PC next to each node. The nodes just require 3V power.

Tag Hardware

Parts List

Per individual tag

Qty Name Supplier Cost (£ GBP)
x1 Pocket Card Enclosure Teko PC.4 3.56
x1 RF100P86 Synapse RF Engine Future RF100P86 15.09
x1 VBH2032-1-LF Battery Holder Farnel 1216359 0.84
x1 CR2032 Battery Rapid 18-0386 0.88
x1 Small Stick On Feed (sold in packs of 4) Maplin FE32K 0.89
x1 Large Stick On Feed (sold in packs of 4) Maplin FW38R 0.89

Note: I used a CR2032 battery from Rapid however both Farnel, and Future also have a selection available from various manufacturers.

Building The Tag

Tag Boxed

I choose the Teko Enclosure because of its compact, credit card size. Unfortunately however this meant that the RF Engine would not fit vertically inside. I could have used one of the alternate form factor modules (sold by companies such as Panasonic that also support the Synapse firmware) however having the pins broken out is actually useful for updating the tag Python software / firmware at a later date. I therefore decided to bend over the pins, allowing one side to be plugged into the evaluation board as normal (albeit it a much looser fit) and the other to be plugged into the IDC header via an extension cable. Tag Without Cover I tried a number of approaches to bending over the pins, including bending them all at once using pliers, and trying to bend them against a flat surface, neither proved very fruitful. In the end I found the best approach was individually bend each using the tip of the pliers.

In terms of wiring things are fairly straight forward, pin 24 on the modules goes to (-) on the battery holder, and pin 21 to (+) on the battery holder. I soldered to the top of the module to avoid obstructing the pins meaning they can still be plugged into the evaluation board/extension cable for reprogramming. I also used some heat shrink tubing to tidy things up.

Evaluation Board

To secure the module in the enclosure I used two small stick on feet on the module itself, and two larger stick on feet to wedge the battery holder into a corner of the enclosure.

Not being as adept as I could be with finding productions on Digikey’s site I took the approach of ordering two parts (3M1324-ND, SAM1242-12-ND) really designed for PCB mounting and soldering a ribbon cable to them. A better approach (if such parts exist) would have been to purchase connectors that can mount directly to ribbon cable (therefore requiring no soldering), and to purchase suitable sized ribbon cable to fit.

Note: If you are going to use the same approach I did and solder the connections then ensure the solder does not leak into the socket, otherwise it will not be possible to plug it in to the evaluation board.

Reader Node Hardware

Parts List

Per individual reader – at least 3 reader nodes are required

Qty Name Supplier Cost (£ GBP)
x1 50mm x 50mm x 20mm ABS Box Maplin N53FK 1.59
x1 RF100P86 Synapse RF Engine Future RF100P86 15.09
x1 2.1mm DC Socket Maplin JK09K 1.69
x1 Regulated 3V DC 400mA Power Adapter Maplin MG76H 7.99

Building The Reader Node

Reader Node UnboxedAs with the tags in terms of wiring, the reader nodes are fairly straight forward, with pins 21 and 24 going to the appropriate connections on the DC plug.

As with the PC reader it would be possible to use the “SNAPstick USB Module Interface” to avoid the soldering work, and in this case a USB power supply e.g. plug form or cabled form would also be required.

Using the Maplin N53FK box I found the modules only just fitted alongside the DC Plug, I had to remove one of small plastic mounting stands in the box to make it fit. The other small mounting stand served to secure the module in the box with one row of pins on the module fitting between it and the outer case wall. 4 Reader Nodes Without Lids After the module and DC plug were fitted inside the box some space remained between the top of the module and the top of the box, therefore I used a single packing peanut to secure things. Something like hot glue could also be used however the packing peanut means the modules can quickly and easily be removed and put back into the box, e.g. for reprogramming (however generally it would be possible to reprogram them over the air).

Note: If you are looking for additional range the Synapse RF100PC6 (including a transmit amplifier) or RF100PD6 (including a transmit amplifier and allowing connector of an external antenna) may be more suitable for the both the PC reader, and reader nodes.

PC Reader Hardware

Parts List

Qty Name Supplier Cost (£ GBP)
x1 50mm x 50mm x 20mm ABS Box Maplin N53FK 1.59
x1 RF100P86 Synapse RF Engine Future RF100P86 15.09
x1 TTL-232R-3V3 USB to Serial (3.3v level) Cable SK Pang 18.98
x2 LP2950ACZ-3.0 Voltage Regulator Farnel 1685546 0.64 ea
x1 6 Way 2.54mm Molex Header Rapid 22-0846 0.48
x1 Cable Tie

Building The Reader

PC Reader No Lid

To simplify the process of linking the 3V Synapse module to the PC (i.e. avoid using a MAX232 and the extra PCB / wiring that would involve) I used a 3V FTDI USB to serial cable. The USB end plugs straight into the PC and provides a virtual serial port, the other end connects to the UART pins on the Synapse module. In terms of power, to avoid the need for an external power supply I used an LP2950ACZ-3.0 Voltage Regulator to convert the 5V power provided by the USB port / FTDI cable to the 3V needed by the module. The LP2950ACZ-3.0 however is only rated for 100mA therefore I used two in parallel to provide 200mA (the Synapse RF Engine datasheet quotes a transmit current of 110mA and a receive current of 65mA).

PC Reader Unit

To save some of the work involved in building the readers a SNAPstick USB Module Interface (as included in the evaluation kit), and a RF100P86 could be used instead however it would still require a suitable enclosure, and USB extension cable bringing the cost to ~50 GBP per reader.

[View: Module Wiring | Connector Wiring | Connector & Module]

Tag Software

The Python tag software is fairly straight forward, it performs 5 main functions:

  1. Set transmit power level for the tags.
  2. Initialise GPIOs to optimise current consumption in sleep mode.
  3. Turn off relaying of messages for other devices in the mesh network (it will only be powered up for a small amount of time every specified interval therefore this would not be very useful, also it may use up extra current).
  4. Send out a ping (via multicast RPC) to any reader nodes in range with the tag id, and a TTL of 1.
  5. Go to sleep for e.g. 10 seconds.

Tag Unboxed

Specifying a TTL of 1 on the multicast RPC call causes only readers that are directly in range of the tag to receive the ping, otherwise by default any nodes not in direct range of the tag would be forwarded the call from readers that were. This would mean it would not be possible to work out which reader actually communicated with the tag directly and which communicated 2nd hand.

The software is loaded onto the tag via the Synapse “Portal” application available for Windows, Mac, and Linux, also included with the evaluation kit.

When programming the tag you should plug it into the evaluation board rather than run it on battery and program it over the air because leaving the module on the workbench un-programmed, even for just a few minutes will quickly drain the small battery (15mA when idle according to the datasheet) and 40mA / 110mA when receiving / transmitting.

[Download: Python Source]

Reader Node Software

The reader node Python software is responsible for receiving a multicast ping from the tag, and then forwarding it back to the module connected to the PC, along with the signal strength of the tag that sent the ping, and the id of the reader itself. Thanks to the SNAP (Synapse Network Appliance) protocol the intricacies usually involved with using a mesh network are all abstracted away from the programmer meaning it can be done in only 2 lines of code (excluding comments, variables).

[Download: Python Source]

PC Reader Software

The PC Reader Python software handles receiving data from the reader nodes (which themselves receive data from tags). It initialises the serial port, connects UART 1 (itself connected to the FTDI cable, which appears as a virtual serial port on the PC side) to STDIN/STDOUT (i.e. meaning that any Python “print” statements cause that data to be sent over the UART to the PC), and then initialises it to 9600 baud. The software prints the tag ping data to the serial port (after decoding the hex values to plain text).

Example: 003c02,001a06,57
(i.e. [tag id],[reader id],[signal strength]

If the tag that sent the ping is in range of e.g. 4 reader nodes at that time, 4 lines will be received with the same tag id, but different reader ids, and varying signal strengths depending on which reader nodes the tag is closer to.

Note: There is not a command / function to send data to the UART, Python access to it is available only by e.g. cross connecting the UART with STDIN/STDOUT.

[Download: Python Source]

PC Serial To HTTP Data Forwarder

Data Forwarder Application Screenshot

The data forwarding application listens for data on the virtual serial port created by the FTDI adapter, and sends it to a HTTP server via HTTP Post. The local “COM Port” (e.g. COM 6) and remote servers HTTP address (http://www.example.com/locationtrack/?p=clientapi&password=track111) running the server software should be specified. If no HTTP server API address is specified tag data will be logged to the screen only (useful for debugging / testing).

It does not simply pass data straight through to the web API however does some initial processing, firstly in order to minimise HTTP requests (improve performance), and secondly in order to group tag pings together based on a 1 second time limit (something that would be otherwise unnecessarily complex to do on the web application side). It is assumed a tag is in the same location when any reader reports seeing that particular tag within a 1 second window from when the tag was first seen by any reader.

Data Forwarder Code ScreenshotThe application includes an “Auto Connect” checkbox which will cause it to automatically open the connection to the serial port when the software is loaded.

Note: One of the selling points of using the Synapse module (Python / high level language / RPC) based solution is the ease of use of it, everything is very much simplified for the programmer over other options such as perhaps using a Nordik nRF24LU1, and controlling it over I2C with an AVR in “C”. However this does bring with it additional licensing costs if you use over 6 modules on a network at a time using Portal. Therefore I coded a custom client side data forwarding application, rather than loading a Python script into Portal to do this and using RPC calls which would have been a simpler solution. In terms of deployments using the C# application also simplifies things avoiding the need for Portal to be installed / configured, the C# application just requires setting the COM port and URL.

The .net framework is required to run this application, it is available from Microsoft Update or as a download from microsoft.com.

C# Express Edition is available for free from Microsoft for viewing / editing the source code.

[Download: C# Source | Application Executable]

Location Tracking Processing / Display GUI

Display GUI (Tracking Map)Coded in PHP this part of the code is responsible for accepting data from the HTTP Data Forwarder, converting the signal data into a location on a map, saving the data to a MySQL database and displaying it to one of more users viewing the map. The frontend is coded in JavaScript and SVG (using the jQuery SVG plugin). AJAX is used to poll the server for tags that have moved and JavaScript / SVG is used to dynamically animate them to their new positions on screen.

When the map is first loaded the tags will animate from their last 2 positions coming to rest at the current live location. JavaScript code has been written to ensure that tags are not placed on top of each other but rather clustered around the closest reader.

Support is provided on GUI for adding maps (one or more), readers, tags, and users (who can login) to the system.

[Download: PHP Source]

[View: Demo]

Video showing a single tag moving around the map plan diagram corresponding to its real world location in one of 3 rooms. The tag ping interval was set to 3 seconds.

Video showing failed attempt to use trilateration to determine the unknown position of tag using the known position of 3 readers, and signal strengths to them.

General Notes

I would suggest purchasing the Synapse Starter Kit (Future Electronics), since although modules are programmable over the air, a serial connection is required in some situations such as deleting running scripts that are in an infinite loop, or have disabled the RF interface used by the “Portal” software for uploading new software.

Synapse Wireless software, and documentation is available from the Synapse forum.

Download All

Includes all project files as linked individually above (Tag Python, Reader Node Python, PC Reader Python, C# Data Forwarder Source, Data Forwarder Binary, PHP Processing / Display application).

[Download: All Code]

Issues

  • With the non trilateration approach of placing tags nearest to the highest signal strength reader, readers need to be carefully situated, particularly if they are in different sized rooms adjacent to each other in order to avoid false readings.
  • If building the readers again I would use a different type of DC socket, as the one chosen was fairly loose when used with the 3V adapter plugs.
  • I was expecting to achieve a longer battery life, as it stands battery life is around 1 week for a 10 second ping interval, and around 2 days for a 3 second interval on the CR2032. In terms of increasing battery life the main options would be decreasing the ping rate (therefore increasing the sleep time), or going for a different battery however this would likely require a larger form factor enclosure.

OpenBeacon Suitability

OpenBeacon Tag

At first glance OpenBeacon hardware (as used at conferences such as the CCC’s 24C3) would appear to be an ideal choice, their website even mentions it is “meant to be used as a reference platform by hardware and software developers”, however the more I looked into it the more it did not seem suitable for my particular requirements:

  • Form factor of 20 EUR white tags is not particularly ideal (open circuit board / battery).
  • Keyring tags are available however they cost 25 EUR each + 5 EUR for the case, i.e. 30 EUR in total per tag.
  • USB readers are available for 85 EUR however require a PC by each reader, not particularly suitable for even a small deployment with e.g. 4 or 5 readers.
  • Ethernet readers are available but at a cost of 340 EUR’s they are somewhat expensive and still require a network cable to each, not ideal.
  • Readers are not able to provide received signal strength but rather rely on the tags broadcasting at a set (limited) number of power levels meaning a position can not be calculated as accurately as it may otherwise.

Update: Reader Tip on setting up “Reader Nodes”.

Other Projects

Parallel Track Screenshot

If you are interested in this project you may find these others also of interest: Parallel Track, a free (for personal non commercial use) server side vehicle tracking application coded in PHP designed to be used with Python supporting Telit hardware modules running the embedded TModSoft software (firmware). Track Any Mobile, a web application for mobile phone tracking using the MSC (MSISDN) available using an SS7 API provider.

119 Responses to “Building An Active RFID People / Asset Tracking System With Mesh Networking”

  1. RFID tracking system - Hack a Day Says:

    [...] built an active tracking system using RFID tags. The system’s tags operate in the 2.4 GHz band and are used to track either people or assets. [...]

  2. Oryan Baker Says:

    I’m extremely interested in this project. I’m planning a complete home automation system that integrates into my Ubuntu Linux based XBMC HTPC, and I think this would be awesome for tracking keys, cellphone, and things that are often misplaced in the house. Is there anyway to do multiple tag tracking with this? Please contact me via email. I’m highly interested, thank you for your time.

    Oryan Baker

  3. Rupin Says:

    I was looking at a solution like this to a project I was considering.Quick Question-does this work well enough with passive RFID tags?

  4. admin Says:

    @Oryan Baker

    Tracking multiple tags is already supported. Demo of this is available in the videos.

  5. admin Says:

    @Rupin

    I do not see any reason why you could not adapt the code to work with passive readers, however obviously with this approach users would likely need to manually swipe tags due to the limited read range.

    I would however suggest going with a 13.5 GHz reader as in my experience the performance seems to be better over 125 kHz. I have used the 13.5 GHz “APSX RW-210 RFID Reader/Writer” before http://apsx.com/RW210.aspx They also have a larger version (APSX RW-310) that quotes a read range of 11″

  6. lukus Says:

    Nice write-up on a wicked project. kudos

  7. sermad Says:

    Is this possible with only using a wireless network to track the tags?

  8. Electronics-Lab.com Blog » Blog Archive » Building An Active RFID People / Asset Tracking System With Mesh Networking Says:

    [...] An Active RFID People / Asset Tracking System With Mesh Networking – [Link] Tags: RFID Filed in Uncategorized | 1 views No Comments [...]

  9. Hoektoe Says:

    Hi

    Awesome work, can you link on of those RFID tags to a smartphone via mini-usb and then display the user’s location on the map on the smartphone? what is the minimum requirement for the smartphone, is internet connection needed or can data be transmitted via the rfid?

  10. admin Says:

    @Hoektoe

    In terms of displaying the users location on a smartphone, the system works in Safari, and the iPhone supports Safari, therefore it should work on the iPhone in the same way however currently it does not seem to. I believe however with a few minor adjustments it could be made to work. This would be the quickest / most straight forward solution.

    In terms of eliminating the server completely, I would suggest that the best/simplest solution would be to use a smartphone with serial port support (e.g. jailbroken iPhone, some Android phones) then link a Synapse module directly to it that way rather than trying to use USB / any inbuilt RFID capability on the phone. You would however need to write custom software to read in the serial data, and plot it on a map.

  11. William Viker Says:

    Cool stuff. I’ve been wanting to play with RFID for a while myself :)

  12. Erwin Ried Says:

    Hi!

    Great project

    I want to ask why the power/distance relation is so weak? I mean in Synapse website I see a 1000 ft. outdoor distance transmit capability, why do you need the nodes so close to the persons?

    I wish to implement this project with longer distances (100 mts outdoor) and more people (20) but I am unsure about the hability of the H/W to do that.

    Thanks!

  13. admin Says:

    @Erwin Ried

    >I mean in Synapse website I see a 1000 ft. outdoor distance transmit capability

    It is not really distance that is the issue, I did not have a problem receiving the “ping” from tags, but rather I had a problem reliably working out distance from signal strength.

  14. Kacho Says:

    Any more info on how to ‘reverse’ the application with the reader being with a robot and measuring distance between stationary tags? The distance measured doesn’t really need to be reliable… more in terms of I’d like a robot to know it’s in a room using RFID tags on a door frame. Any good resources on how I can implement something like that at a more basic level (I have very limited knowledge of RFID, etc).

  15. Darnell Brown Says:

    Nicholas,

    Is there any off the shelf software that you recommend for creating your own interactive floorplans or do you sell the program you used for you “Location Track” live map demo?

    Thanks.

  16. admin Says:

    @Darnell Brown

    Just checked with the designer I used and he said it was done in Photoshop.

  17. Andrei Says:

    Hi

    I’ve read in Synapse RF Engine docs:

    This equipment should be installed and operated with
    minimum distance 20cm between the radiator and your body.

    Do you think it is ok to track person with Synapse RF Engine?

  18. John Says:

    Hello,

    Is it possible to use not the RF tag (RF100P86 ) but for example this one: https://shop.openpcd.de/product_info.php?cPath=27&products_id=46 ?

  19. admin Says:

    @John

    The main issue with any of the Sputnik hardware is that by default (unless you write your own code for it) you will need to purchase multiple 85 EUR readers, and locate a PC next to each of them (readers connect to a PC via USB) i.e. they do not do support mesh networking like the Synapse hardware does.

  20. Erwin Ried Says:

    Hi again!

    What may be the simplest and cheapest way of programming a Synapse RF Engine?

    I have a USB to TTL converter.

    Thanks

  21. Erwin Ried Says:

    Well, forget the last comment… just connect the RX, TX, RTS and CTS from the FTDI Breakout (USB2TTL) and voilá!

  22. Erwin Ried Says:

    This is my cardboard programmer for the RF engines:
    http://sphotos.ak.fbcdn.net/hphotos-ak-snc3/hs065.snc3/13328_379557014078_685334078_3843457_3769996_n.jpg

    I have the last question for you (sorry to bother you much), how can you re-program a the module running your “TAG” program?

  23. Eric Says:

    To answer Erwin’s question, I was only able to reprogram nodes running the tag script by first erasing them through the Portal using the “Erase SnapPy Image” button, and then uploading a new script. Since the tag code makes the node sleep for most of the time, I have found it impossible to update the image running on the node as you normally would with other continuously running nodes.

  24. Eric Says:

    Mr. Skinner, I have recreated your work here and I want to say thank you for documenting this process so well. The only issue that I came across was that I don’t believe you make any mention that there is a line of code in the python file for the reader nodes that needs to be updated with the address of the PC interface node. Describing this in your readme file or in the blog would be a tremendous timesaver for anyone else following in your footsteps.

    A curious problem that I’m now dealing with, is that the live map only seems to be truly live on the computer that is serving as the webhost (as well as the PC interface) and not any of the client computers. I can refresh the browser window for any of the client computers and they will show an updated map, but the tags never move as they do on the server. I have tested this in Chrome, Firefox and Safari. Do you have any idea why that might be? Or is it somehow intentional?

    Finally, have you any experience with SVG plugins for Internet Explorer? I know SVG isn’t natively supported, but there are a variety of companies that produce plugins to provide aftermarket support. Unfortunately neither the Adobe nor the Corel plugins I have tried work. If you know of any company with a plugin that works with your application, I would be very interested.

  25. admin Says:

    @Eric

    I would suggest the first thing check is that you have the $cfg['site_url'] variable set correctly in includes/config.php and that it is set to a URL reachable by those other computers e.g. not http://localhost/locationtrack/ if that does not work you could debug things further by e.g. installing the Firefox live headers plugin and check the AJAX requests are being made, where they are going to, and that if you request the same AJAX page manually it does actually work.

    >Finally, have you any experience with SVG plugins for Internet Explorer?

    I do not have any experience with these. Also probably not too useful in your situation however looks like IE 9 will likely support SVG http://www.itworld.com/development/102422/microsoft-supports-svg

  26. Tristan Says:

    I just uploaded the software to my readers to be placed around the room but when i try and put the python onto my PC reader the tag will accept it and then stop responding in the portal software. is this normal or am i doing something wrong?

  27. Tristan Says:

    i figured it out. its because I am using the USB stick and its looking for a serial cable. anyone have code to use the USB synapse reader instead of the serial cable code already available?

  28. admin Says:

    @Tristan

    Yes this is normal because the tags are mostly sleeping, therefore Portal will not reliably see them if it does at all.

  29. Tristan Says:

    If i were to use the SNAPstick USB Module Interface instead of building the serial adapter for the pc reader what needs to be changed? I know the PC reader code has to be changed but what specifically has to be adjusted? also will the web page still interact the same way?

  30. admin Says:

    @Tristan

    I believe all you would need to do is change your USB adapter to appear as a virtual serial port rather than as a Synapse USB adapter to the PC. Looks like there is now a command in Portal to do this. Check the Synapse support forums / documentation for more information.

    http://forums.synapse-wireless.com/showthread.php?t=461
    http://forums.synapse-wireless.com/showthread.php?t=143

  31. Tristan Says:

    thank you so much for all the help! i have my com port working and hopefully it will be all set once i reprogram my readers to look for the pc reader.

    one last final question if all goes well. my addresses for the readers are things like 00.66.0D and 00.66.FF is that expected as your demo software has nodes with numbers such as 00007. if i put them into the webpage as 00660D etc will that work out?

    also in this line of code PC_LINKED_READER = ‘\x03\xa2\x83′ if my address is something like 00.66.0D do i replace it as PC_LINKED_READER = ‘\x00\x66\x0D’?

  32. admin Says:

    @Tristan

    Looks correct.

  33. Thomas Says:

    Hi,

    I built the tags and the reader nodes as per your instructions.

    For the PC Reader I used the stick module from the evaluation kit and replaced the engine with the one like the tag and readers one.

    I also uploaded the scripts using Portal. However after I uploaded the tag scripts, the node isn’t visible on the portal software anymore. So if I need to change the script, how would I do this?

    Also, since I am using the usb stick as the pc reader, do i need to change something in the script or not?

  34. Thomas Says:

    Hi again,

    I have a a problem and I would appreciate if someone helped me.

    I can’t get the usb stick to display as a VCP. I ran the command root.steup_usb_as_vcp() but now i can’t connect with the usb stick. Do I need to download drivers or something? Also I tried going back to usb however it isn’t working now as well :(

    I’d appreciate any help. Thanks.

  35. Thomas Says:

    Hi,

    the RF engines I bought (the same as per your instructions) have the firmware out of date (2.1.8), so is portal saying. Do I need to update the firmware for them to work? And if yes from where? There are various firmware upgrades in the portal folder however i don’t know which one to use, or if i should use one.

    I ask because I used the c# application and nothing is being received in the c# textbox and i don’t know how to check if the scripts are working or not.

    I also changed the script of the reader nodes to match the network address of the pc reader (this was something like 00.1F.1B to PC_LINKED_READER = ‘\x00\x1f\x1b’ – correct?)

    Any help is greatly appreciated.

  36. Eric Says:

    @admin

    In your experimenting or in theory, is there any practical limit to how large of a tracking network you could build? Do you imagine any problems with using 15 readers and 30 tags? Do you think that would overwhelm the mesh network?

  37. admin Says:

    @Eric

    Not something I have any real experience with but I do not think you would have an issue with 15-30. Also looking on the Synapse forum, there is a post http://forums.synapse-wireless.com/showthread.php?t=479 that mentions theoretically using 50 nodes and none of the commenter’s mention any issues with that number.

  38. Francesco Says:

    Hi,

    I am in the situation in which I am “locked out”. A script disable UART0 and UART1 and crossConnect DS_NULL to DS_PACKET_SERIAL. This imply that radio access to the node is already working, I suppose, but the node goes to sleep and i am not able to see it in the portal. I see it only when it wake up for just sending a ping (this is a node supposed to be a “tag” that send a ping every 3 seconds then goes to sleep).

    I tried to erase the image but the COM access is disabled. I tried to reset the node via HW (GND on pin 23) but without success. Are there any mode to “lock myself in” the node? Or the node is locket to run this script forever?

    I have a Synapse USB interface and two serial cable (one USB to Serial and one “real” RS232 cable). Can the protoboard be useful for the HW reset?

    Maybe this is a common issue, and I found in the Synapese forum some information but I have not solved it at the present time.

    Thanks for your help,
    Francesco

    PS: Sorry for the crossposting to the general Synapse forum but I see the discussion on this system here, so I post both

  39. Kevin Banks Says:

    Nicholas: Somebody linked to this web page from our Synapse User Forum today. I only had time to take a quick look, but at a glance it appears you have done a really good job.

    If you are not already active on our forum, I encourage you to sign up (I think I have seen you on there, but I have seen a LOT of forum posts in the last three years).

    On the forum, I encourage you to publish your work in either our Application Notes section, or in our SNAPpy Script Exchange section.

    You can attach scripts and documents directly on the forum, or we’re happy with links to your own site.

    you can find the forum at forums.synapse-wireless.com.

    Keep up the interesting work!

    Kevin Banks
    Director of Research & Development
    Synapse Wireless, Inc.

  40. admin Says:

    @Francesco

    Looks like there has been a reply to your post on the Synapse forums http://forums.synapse-wireless.com/showthread.php?t=811 with some ideas.

  41. admin Says:

    @Kevin Banks

    Thank you for the comments. I did not upload any of the files however I did post a link at http://forums.synapse-wireless.com/showthread.php?t=705 for anyone over there who may be interested in it.

    —–

    Also worth noting for anyone else looking for support with the modules you will normally get a fairly quick and comprehensive reply from Kevin at http://forums.synapse-wireless.com/forumdisplay.php?f=2

  42. Eric Says:

    Have you had any problems with the tags jumping around as if they can’t determine which reader is nearest? It seems they’ll sit on the nearest reader node for about 60 seconds, and then every few minutes, briefly jump to a different node before immediately returning. Sometimes the node they jump to is the next nearest, sometimes it might be two hops away (physically, not in network terms). Sometimes more than one might bounce around, sometimes only one does. Have you experienced this at all? Any suggestions?

    What I’m going to try (I don’t actually know php, so I’m not sure if I’ll succeed) is to add some sort of condition forcing the system to wait until a tag is read by a reader for two consecutive pings before actually moving it in the gui. This would increase the accuracy of the displayed results for stationary tags, but would probably be less effective at tracking a moving person/tag.

  43. admin Says:

    @Eric

    >Have you had any problems with the tags jumping around as if they can’t determine which reader is nearest?

    I can recall seeing this a few times but it is not something I looked into in detail.

    Possibly the issue is the C# data forwarder is occasionally not getting data from the closer readers in time (before it sends a group of tag data from all readers to the server).

    When you experience the issue is the closest reader missing from the last data set sent to the server? (you should be able to see this from the log shown in the window on the C# app). If so you can try increasing the timeout value on line 433 of HandleSerial.cs to perhaps 3 seconds:

    tagCollectionItem.firstSeen.AddSeconds(3);

    >add some sort of condition forcing the system to wait until a tag is read by a reader for two consecutive pings before actually moving it in the gui

    That should also work.

  44. Eric Says:

    It seems the more tags and readers I add, the more they seem to jump around. Every once in a while the signal strength will legitimately vary so that the tag moves to the wrong reader, but it seems like usually the case is that the reader simply doesn’t report that it saw all of the tags. I tried lengthening the timeout to 3 seconds and then to 4.5 seconds and each time seemed to help, but now I suspect I’m just misinterpreting the fact that they don’t move around as much as an improvement.

    The output of the Location Tracking Collection Client is also somewhat confusing, it will frequently report that it is posting data to the server without showing any data in the output, often as much as four times in a row, like this:
    Posting data to server
    Posted data to server, response: ok, not moved
    Posting data to server
    Posted data to server, response: ok, not moved
    Posting data to server
    Posted data to server, response: ok, not moved
    Posting data to server
    Posted data to server, response: ok, not moved

    Do you think that is indicative of a problem? Does that mean no data was received in that time? Also, what determines how the data is grouped in the output window? I’m sending you some data in your contact form so you can see what I mean without crowding this comments section any more than I already am.

  45. admin Says:

    @Eric

    >it will frequently report that it is posting data to the server without showing any data in the output

    Checking the code, tag data is logged to the screen when it is received, rather than when it is sent, therefore this would likely account for the issue you are seeing. I had not anticipated this before. A better test may be to actually check the server side logs rather than the log in the C# forwarder itself. There is a log created in “includes/other/client_post_api_log.txt” showing posted data.

    >Also, what determines how the data is grouped in the output window?

    In terms of deciding when data is sent to the server (and therefore when it is grouped), basically there is a 1.5 second wait between the time the tag is first seen, by any reader, and the time it is sent. Therefore when a tag ping is first picked up by any reader, all other readers must report their data to the collection client within the next 1.5 seconds or those readers tag pings will not be included in that group of data. This will then cause the server to make its decision as to where the tag is, based only on the readers it has data for in that particular group, and if it has incomplete data, the position may also be incorrect (location would be next to the closest reader for which data was sent to the server).

  46. Eric Says:

    Interesting, partially based on what you’ve described, I no longer think that waiting for the tag to be heard twice by the closest reader would not be a very good solution. It would make it considerably easier for the physical tag to outrun the virtual representation on it as the chance of the reader not reporting back two consecutive cycles in a row are fairly high. Instead my new idea is to try to require the reader the tag is currently at to report back before allowing the tag to move. This should only be a problem if the tag somehow moves out of range of the reader in that time period or the reader loses power, effectively freezing all tags that are nearest to it.

    What do you think is causing the readers to fail to report back? Sometimes only a few readers will report back in a 4.5 second period and the tag will jump straight to the furthest reader. With 4 tags sitting near to 1 of 13 readers, I would estimate that roughly 25% of the time one of them is falsely showing itself to be near to a different reader. They show a preference for the nearest, but occasionally jump to the furthest. As I understand it, these RF Engines function as repeaters normally, do you know if that functionality is diminished while they are performing the reader function? Do you think the data isn’t making it back to the client because it is getting lost in the repeater broadcasts? Would adding more unprogrammed, powered synapse rf engines to repeat the signal back would help? Alternatively, if the problem is simply too much RF Traffic for the PC interface to handle, I imagine adding more would actually hurt.

    So far, it seems adding more programmed devices has hurt the accuracy of the system.

  47. admin Says:

    @Eric

    >What do you think is causing the readers to fail to report back?

    Ok are you saying that you have checked your “includes/other/client_post_api_log.txt” log and found that when the tag jumps around the reader nearest to it was missed out in the group of data posted at that time?

    If so I think the next step would be to remove the URL from the C# forwarder application (to remove any delays in terms of data being shown on screen) then look in the log window, and determine if you are seeing expected data. i.e. take a single tag and check that every time it is seen by the reader it is physically close to, that the signal strength for that reader is always the greatest (i.e. no other reader has a greater signal strength). If everything looks ok you could then look at the time difference between log lines for the reader the tag is physically close to. What you should see is a fairly consistent e.g. 3 seconds (if you have your tag set to broadcast a ping every 3 seconds). If you see a consistent 3 seconds then the issue is occurring in the C# forwarder when it groups/sends the data, otherwise it is occurring somewhere earlier in the process, and needs to be narrowed down further from there.

    >As I understand it, these RF Engines function as repeaters normally, do you know if that functionality is diminished while they are performing the reader function?

    Not sure but should be possible to test by moving all the individual readers nodes to be within direct range of the PC reader.

  48. Eric Says:

    @Admin

    Actually I was still using the displayed output, but after confirming in the log file it seems the batches of data are usually incomplete. Of 13 readers, only 10 or so usually report back, frequently as few as 6, and every once in a while only 1 reports back.

    My temporary quick fix is to simply ignore any array of tag data passed back with less than 6 readers in it. This seems to greatly reduce the amount of momentary wandering, but somewhat slows the rate at which the display updates. I think ensuring the currently closest reader is in the array before updating is the best solution, but I haven’t yet figured out the best way to go about this.

    Every once in a while the signal strengths tie for multiple readers or a faraway reader will briefly report a stronger signal strength than the local reader, but this does not appear to be a major issue.

  49. Marcel Says:

    Thanks for your good description, very nice and useful.

    @Eric:
    Unfortunately I don’t have enough devices to test yet, but I think that I know the possible problem you are experiencing.
    When a lot off devices call a rpc-function at the same time it can cause an overflow. In this case the rpc-function returns false and will not be executed. When it returns false you have to resend the message yourselves, the stack does not do this for you.

  50. Hacked Gadgets Quick Links - Hacked Gadgets - DIY Tech Blog Says:

    [...] LINK [...]

  51. Jacob Says:

    This seems to be a great project. However, is it possible to connect the web gui interface with XAMPP? as after uploading it to localhost server through XAMPP, I can’t seem to be able to edit the Menus ( TAGS, READERS, MAPS etc ).

  52. admin Says:

    @Jacob

    What do you mean “connect the web gui interface with XAMPP” – setup the application using the XAMPP distribution? http://www.apachefriends.org/en/xampp.html

    I do not see any reason why it should not work, what error are you getting?

  53. Jacob Says:

    Hi again,

    I am getting this sort of error messages whenever i tried to edit the tags, users, readers, and maps.

    Notice: Undefined index: password in D:\xampp\htdocs\test\includes\classes\auth.php on line 68

    Notice: Undefined index: autologin in D:\xampp\htdocs\test\includes\classes\auth.php on line 69

    Warning: Cannot modify header information – headers already sent by (output started at D:\xampp\htdocs\test\includes\classes\auth.php:68) in D:\xampp\htdocs\test\includes\classes\auth.php on line 128

    Warning: Cannot modify header information – headers already sent by (output started at D:\xampp\htdocs\test\includes\classes\auth.php:68) in D:\xampp\htdocs\test\includes\classes\template.php on line 209

  54. admin Says:

    @Jacob

    I would suggest clearing your cookies, and seeing if that helps.

    Possibly you previously installed another application on that same server which happened to use a cookie by the same name.

  55. znelson Says:

    This looks great. I’ve been keeping an eye on OpenBeacon for the past 3 years. I really wish their system was more commercial and complete. Last time I contacted them, they said I’d have to write code to interpret all the tag values and figure out their physical location. That defeats the purpose IMHO – I need a solution that already does that. Let me know if you find any alternatives!

  56. Joseph Says:

    Will the application,serial_http_data_forwarder, still work even without the reader node?

    Is there an alternative devices that we can use aside from devices that you used?

  57. admin Says:

    @Joseph

    >Will the application,serial_http_data_forwarder, still work even without the reader node?

    It will still run, but it is not really going to be of any use without at least one reader.

    >Is there an alternative devices that we can use aside from devices that you used?

    There are various different technologies / radio modules etc that can be used, including OpenBeacon, and the Nordik nRF24LU1. You may also be able to find other suitable hardware at http://www.sparkfun.com/commerce/categories.php?c=16

  58. Raj Says:

    Hi nick,

    I am trying to build this for my class, but I don’t know how to communicate with the pc reader once i connect it to usb. I don’t have a synapse starter kit, so no protoboard. Do I have to have the board? I tried to portal but it says snap bridge not found. Please advice.

    Thank you,
    raj

  59. admin Says:

    @Raj

    >I am trying to build this for my class, but I don’t know how to communicate with the pc reader once i connect it to usb.

    The issue is that the C# PC application is expecting to communicate via a serial port rather than USB. One solution is to change the USB adapter to appear as a virtual serial port. For further details please see this comment: http://www.ns-tech.co.uk/blog/2010/02/active-rfid-tracking-system/#comment-431

  60. Michael Says:

    Hi,

    This system is very interesting and would probably serve very well for a system we’re currently involved with.
    we will have about 1500 devices on the network. Has anybody had experience with this size of network using synapse? Can the software support 1500 devices?

    I see that the RF100P86 is flagged as ‘not for new design’. What would be the suggested replacement?

    Many thanks

  61. Paul Drage Says:

    Firstly – wow, this has opened my eyes, and i thank you for that – i’ve been toying with the idea of ethernet based home control etc, then i found this and synapse !

    based soley on this post i’ve spent around £250 on gear which has arrived from USA in about 4 days from future electronics.

    it arrived today, its out of the box and all over the house which is good!

    just dropping a line to say i experienced issues in google chrome 8.0.5.
    the map would not show and would throw errors about map width not being set, this is down to an issue where one of the javascript files responsible for calling up tag data is outputting the addresses as tho they were an integer – however most of my rf modules have letters in them.

    ive fixed on my copy simply by:
    (editting some php i hope the project owner doesnt mind?)

    i will post my fixes on a new post!

  62. Paul Drage Says:

    i dont think this thing likes me posting code.

    maybe the owner will update this post with my content from:

    http://www.e-swoosh.co.uk/ahome/oops.txt

    hth
    Paul
    e-swoosh.co.uk

  63. admin Says:

    @Paul Drage

    Thanks for the comment. I tried setting a tag address to “001X89″ but it came out as “addr”: “001×89″ and everything seemed to be working as it should. Not sure why it is different for you however possibly the “if (is_numeric($value)) {” check is returning true (includes/classes/appgeneral.php line 246, if this is the case a slightly better “quick fix” may be to change that line to be ( (is_numeric($value)) && (!self::node_addr_valid($value)) )

    I wish you well with your build.

  64. admin Says:

    @Paul Drage

    >i’ve been toying with the idea of ethernet based home control etc, then i found this and synapse !

    I am actually just starting to do a few other “home automation” projects with Synapse module myself at the moment as well e.g. http://www.ns-tech.co.uk/blog/2010/12/doorbell-control-home-automation-with-the-synapse-rf-engine/ After an update last week I now have a ring on the doorbell triggering a notification to a custom C# application that uses the Asterisk Manager interface to “ring” the notification through to our house phones.

  65. Paul Drage Says:

    Ah hah, well, sounds like we come from the same school of mad hatter ideas!

    I’m going to modify this system quite a bit, and use it to track us around the home, depending on which tag is in which room, that audio stream will be pushed to the speakers in that room, so i will be able to seamlessly listen to music (a whole album?) without ever having to stop and start it.

    Pairing this powerful synapse engine together with X10 and some bits i’ve got already i should be able to create something quite magical!

    I’ve ordered some of those tag pc.4 enclosures you purchased, although im thinking i will add some buttons to the card/enclosure (may need a slightly larger enclosure), which will active some of the wake up pins and transmit data to the host/pc – modify tag code slightly so that it transmits ping before the other data transmission this way the house/host pc will know which room the command relates to – smart hey?

    before i found this i was considering some kind of scanners built into the door frames.

  66. admin Says:

    >I’ve ordered some of those tag pc.4 enclosures you purchased, although im thinking i will add some buttons to the card/enclosure (may need a slightly larger enclosure)

    I would suggest going for larger enclosures may be a better idea, since that also means you can fit in some larger batteries (for me having to replace the batteries e.g. every 10 days was a bit much). But you also may have better luck at cutting down the power usage even more in sleep more (I always got the feeling I was missing something and I should have been able to get it lower I did).

    Another thing I am currently looking into is extending the system slightly to support commercial Wavetrend tags. Basically just means adding a Wavetrend reader (I am looking into the L-RX300 but I think they also have a TTL version that may be a better fit with interfacing to Synapse) to each “Reader Node” node. So the Wavetrend reader receives the tag signal and the Synapse module relays it to the server. The advantage is that you do not have to build the tags, and they batteries last years not weeks. But the disadvantages are that the Waverend hardware is difficult to get hold of, some is now becoming special order only, and you can not replace the batteries yourself, you need to buy new tags.

  67. Active RFID with the Wavetrend L-RX300 and Synapse RF Engine - Nicholas Skinner’s Blog Says:

    [...] Project: Building An Active RFID People / Asset Tracking System With Mesh Networking [...]

  68. Max Says:

    I’m thinking of using your setup as a starting point for a project of mine. Did you do any multi-floor/story testing? Curious if the reader on a floor above or below would potentially be seen as the closest match.

    Also, did you ever make any progress on extending the battery life of the tags?

    Cheers!

  69. admin Says:

    I did not do any multi-floor unfortunately, but you raise a valid point.

    In terms of battery life / other issues such as ease of production I have now been looking into some alternate hardware commercially produced by WaveTrend. I would suggest considering WaveTrend tags/serial readers, some suppliers are:

    http://www.iautomate.com/
    http://www.gaorfid.com/index.php?main_page=product_info&cPath=133&products_id=669
    http://www.aeroscout.be/contents/en-uk/d140_Wavetrend.html
    http://www.upswung.com/Wavetrend/Wavetrend_readers.htm

    The protocol is serial so it is a fairly easy process to integrate with the readers, and they also provide signal strength.

  70. Max Says:

    What wavetrend parts would you suggest to replicate the synapse parts you used?

  71. admin Says:

    I purchased the “Wavetrend L-RX300″ reader, tags really depend on what form factor you are looking for. I tested the L-TG100 and L-TG800.

  72. Fred Penner Says:

    FYI – If you need your floor plans in a system that can easily display your RFID data in realtime, try floorplanmapper.com

  73. Massimo Says:

    To increase the precision with rssi I find this document:
    http://infocom.uniroma1.it/~robby/Tesi/Sperduti%202008luglio.pdf

  74. admin Says:

    @Massimo

    I do not speak Italian / not sure how relevant it is specifically to the Synapse modules, but thanks for the link.

  75. Massimo Says:

    Sorry for language.
    In your project you start with principle of Trilateration, but you change because it is not precision, in the document is described how increase the precision with Trilateration.

    With L-RX300 solution the tags L-TG100 or L-T800 how long the battery work?. 5 years like the technical document or less. Do you buy with motion dectect or normal?.

    I bought 3 tags and 2 L-RX300 to make some test, I have a home with automation of Bticino with many IR sensor for alarm system and home automation, but i like to increase the automation with rtls system, I ask to Ekahau system but it’s vary expensive for home.

    Massimo

  76. admin Says:

    @Massimo

    >With L-RX300 solution the tags L-TG100 or L-T800 how long the battery work?

    Not something I can really verify at the moment as I have not had mine running that long.

    >Do you buy with motion dectect or normal?.

    I purchased the non movement detection versions.

    Good luck with your project.

  77. Kevin Says:

    I am not well-versed in this technology, but am wondering what would be needed to make a portable tracking system – locating a tag (keyring type) in a building where no readers have been placed or mapped in advance. A picture of people searching for treasures on the beach with large metal detectors flashes in my mind, though for this RFID locating system one would wish something more discrete. Any ideas?

  78. admin Says:

    @Kevin

    Perhaps look into something like the Loc8tor http://www.loc8tor.com/uk/primary-products/loc8tor-plus-pack.html

  79. Can Says:

    I need a extended explanation for the programing the engines.
    Is synapse kit enough to program the engines and how ?
    help please.

  80. admin Says:

    @Can

    There are various starter kits available such as the EK2100 http://www.synapse-wireless.com/snap-components/kit/network-starter that have everything you need to get started.

  81. Anthony Says:

    Hi,

    Firstly I would like to say impressive work! I actually saw this on hackaday awhile back and was blown away then aswell.

    I was curious as to what off the shelf hardware you looked into? Is there really nothing as reasonable as your custom build, even now two years later? I am most concerned with the size of the tag and its battery life, as I would like to track humans day in day out.

    Any help would be much appreciated!

  82. admin Says:

    @Anthony

    Thanks for the comment. I have not really looked into it much further since my blog post, but in terms of more off the shelf hardware, or at least hardware that requires less work to build I would suggest looking into the Wavetrend tags (available in various form factors with long battery life’s of several years), and Wavetrend serial dongles to read the tags. For another post I did on Wavetrend hardware see http://www.ns-tech.co.uk/blog/2011/03/active-rfid-with-the-wavetrend-l-rx300-and-synapse-rf-engine/

  83. Anthony Says:

    That was quick :)

    Ive looked into the Wavetrend guys, but their long range reader are $500. For my smaller property I am looking at $5500 just for the readers, less their antennas! Isnt there anything with similar capability but for <$250, or am I just dreaming?

    What I dont understand is the expense. I imagine all they provide is low level reporting on the state of the signal. Otherwise they have the same components as a standard wireless hub.

    Anyway, if you were to do this all over again would you use the same components, or have things progressed?

  84. admin Says:

    How far is “long range” to you? the datasheet for the serial reader seems to indicate a read range of “Typically 10m” and “up to 15m” http://www.wavetrend.net/downloads/information-sheets/RX300-00-PI-A4.pdf

    Perhaps it would worth considering using more of the shorter range readers rather than trying to find a single long range reader at an effective price point – perhaps more short range readers would be more cost effective, if there are not practical issues with installing more of them.

    >Anyway, if you were to do this all over again would you use the same components, or have things progressed?

    If I were to do it again I would not build the tags myself, would not use Synapse hardware for the tags, unless I found a way to improve accuracy of reporting and battery life, and possibly not even then. Can not comment on if things have progressed as it is not a project I have attempted again since the original post.

  85. Jonathan Says:

    Nick,

    Thanks so much for this post! I am starting a side project that has a module which will have a very similar hardware system and really appreciate you taking the time to document, but more importantly, answer peoples questions as I had many of the same. Just wanted to say thank you =)

    Cheers

  86. Anthony Says:

    Oh, sorry. I meant to say longest range. Which according to them can be from 50m to 80m.

    I was leaning towards trying to implement some sort of tracking using shorter range readers, with “choke point” logic, however it limits the regions you can define to physically separated areas.

    Thanks for all your help!

  87. Can Says:

    hi again I have connected all the devices and start HTTP data forwarder it says waitin for data but nothing happens what would be the problem Can you help please ?

  88. admin Says:

    I would suggest checking your COM port is correct, if so maybe try using Hyperterminal instead and check if you see any data. If not the next step would be to work out where the problem is, either the sending or receiving side. Maybe try hard coding the receiving module to output some known data and see if it is picked up by the C# app, if that works then its probably an issue on the sending side, maybe try sending some data via Portal instead of the tag, and debug it that way.

  89. Steve Bardocz Says:

    Do you have a commercially available product yet or one that you would recommend?

  90. admin Says:

    Unfortunately not, but I would suggest considering using Wavetrend hardware http://www.ns-tech.co.uk/blog/2010/02/active-rfid-tracking-system/#comment-1848

  91. greg Says:

    hi,
    What a great project. Solves a problem I have been wrestling with for a while. I am not able to locate the RF100P86 Synapse RF Engine. Has it been superseded? Do you know which I should get as a replacement?

    Thanks
    Greg

  92. admin Says:

    @greg

    I think you would be fine with any RF100, http://www.synapse-wireless.com/snap-components/rf-engine would not worry about the exact part number. Come to think of it you may have better results with the lower frequency RF300 in terms of a more accurate relationship with signal strength/distance, but thats just a guess, I have not tried the RF300.

  93. greg Says:

    hi Nicholas,
    Thank you for the reply. With regards to the signal strength/distance accuracy are you saying that lower frequencies could give better results? Also did synapse ever shed any light on the matter?

    Greg :)

  94. admin Says:

    @greg

    Not something I know much about but I think the lower frequencies might be better, at least they are with direction finding:

    Because low-frequency transmissions have a longer wavelength, they interact differently with the ionosphere than high frequency “short waves” do. Because of the longer wavelength and different kind of propagation, it is easier to find the bearing of low-frequency wavelengths.
    http://tighar.org/wiki/Direction_finding

  95. Michael Reynolds Says:

    Finally got everything up and running. I didn’t realize how much I’d be on the synapse forums, reading all the manuals I could. Quite impressive you put this all together. I set this system up at work to monitor efficiencies. I wasn’t able to use your lovely web client. Oh man how much easier it is to make the front end with asp.net and c# :P Really great project though

    As a side note, you should go back and simplify your steps as well as add some clarification. Like pointing to the pcreader from reader nodes, the deal with reprogramming via cable or over the air. Who is going to use a dc adapter for their tags? Tags are going to be small and inconspicuous, you really need a battery pack. Watch batteries don’t work btw, double a’s are essentially required. These are all small, but fundamental steps. I suppose it is best to figure it out on one’s own, but a lot of time could have been saved.

  96. admin Says:

    Thanks for the comments.

  97. Thomas Says:

    Hi Nicholas,

    very interresting project, i’d like to adapt it for lapcounting on our rc-car circuit. Is it in our opinion possible with special antennadsign ?

    Thomas

  98. admin Says:

    @Thomas

    Not sure it would be suitable for that situation. I think a short range passive RFID type system would be better.

    Possibly something like the APSX RW-210/310 https://www.apsx.com/catalog/1 placed under the track or above the track (I have used the 210 for a door entry system before). Over the track might be more reliable / less likely to suffer from interference.

    The other thing I think you would need to watch for however is the read speed – i.e. before making any purchase check that the reader will be able to pick up the tag travelling at speed.

  99. karthik Says:

    Hi Nicholas,
    I have been trying to implement your system by using the USB Snapstick instead of the the UART to TTL cable. I have converted the snapstick to virtual COM with the command given in synapse forum, but it seems the http data forwarder doesnt seem to recognize the data format.

    Could you please tell me where i am going wrong?

  100. admin Says:

    @karthik

    By “doesnt seem to recognize the data format”?, do you mean you are getting the error message “Unrecognised data from reader: ” from the C# PC app. If so what does it show after the colon? – should be simple text data e.g. “003c02,001a06,57″ if not then perhaps check you have the correct COM port / have correctly converted it to virtual COM mode. I have not used a SNAP Stick before but I can recall there being a reason why I went with a “SNAP Stick USB Module” instead on another project (despite the SNAP Stick SS200 having a nicer form factor). I would double check you are definitely able to convert the “SNAP Stick” to virtual COM mode, you are able to run scripts directly on it as you can with the USB Module.

    Also perhaps worth trying to narrow down where the problem is. If you have e.g. the EK2100 Starter Kit which has a real serial port on it see if that works, if so then I would look more on the SNAP Stick end of things for the problem. Maybe try just writing a simple Python script to send some sample data to the COM port directly from Python, and check in e.g. HyperTerminal / RealTerm etc that the data being output is correct / then try it with the C# app again.

  101. karthik Says:

    Hi Nicholas,
    Yeah, I do get the address and link quality following the Unrecognised data from the reader, instead of the date and time. So the virtual COM Port does work. Also I am using XAMPP to create a virtual localhost server. The http data forwarder doesnt seem to post any data to the local server. It just continuously displays Unrecognised data:the addresses and link quality.

  102. admin Says:

    @karthik

    I would guess it is failing to match the C# regex for some reason. The regex is: “^([A-F0-9]{6})\,([A-F0-9]{6})\,(\d{2})$”

    Does your data match that pattern e.g. 6 characters consisting of “A, B, C, D, E, F, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9″, then a comma, then another 6, then a comma, then a two digit number.

    Looking at it again I can not recall any problems when I was testing it but I wonder if it was an oversight to permit only a two digit signal strength. Perhaps try changing the last part of the regex to \d{1,2} to permit a one or two digit signal strength.

    Also the other thing that comes to mind is possibly your node addresses are coming through as lowercase rather than uppercase, if so change “A-F” to “a-f” instead and recompile the C# app.

    If you still have no luck perhaps use RealTerm to check the exact data including line endings coming from the module and/or add in the ConvertStringToHex function from http://snipplr.com/view/36461/ then the line “Console.WriteLine(ConvertStringToHex(line));” just above “Unrecognied data from reader” in the C#. That way you could see exactly what is being received (including any non visible characters) and try to work out from there why it is not matching the regex.

  103. karthik Says:

    Hi Nicholas,
    I had written the code to print an extra line apart from the address and signal strength. That was the reason it failed to match the regex. So, now the data forwarder posts the data to the server properly, but server doesnt give a response and the live map is not updating. I am using XAMPP to create a local server. I have edited the addresses to the tag and reader addresses in the server. The data is not being plotted. Were am I going wrong..?

  104. admin Says:

    Are you saying the C# app is printing “Posted data to server, response: ” i.e. a blank response?

    Have you checked the URL and password is correct? What happens if you visit the URL in a browser e.g. http://localhost/location-track/?p=clientapi&password=track111 you should see an error about tags not being specified (because you made a “GET” request rather than a “POST”), if you see any other errors e.g. password not specified, password incorrect then I would check that. (Make sure you have error reporting turned on in the config i.e. error_reporting(E_ALL); $cfg['devmode'] = true; to see the errors first).

    You could also check the log at includes/other/client_post_api_log.txt to see what data is getting posted (ensure XMPP has write access to that file), and perhaps try creating a HTML page to emulate a “POST” made by the C# see if you get any errors there that are not showing up on the C# app.

  105. Arman Says:

    Hi, I was wondering if anyone has tried replicating this exact project in America. I am looking for these same parts as used in this project, but I cannot find the exact same parts that can ship to America online. Maplin/Amazon.uk don’t ship to America.

  106. Mark Says:

    Arman,

    I’m in the middle of implementing this with a few slight deviations. I’m in the U.S. so I had to order a few different parts. I’ve using the RF200PD1 with the evaluation kits and ordered them through Arrow. I’m also using different containers, antennas, batteries, power adapters, etc. Using the eval kits make things quite a bit easier.

    Admin,
    I feel like I’m missing something with the “call-in” time for the tags. They are currently set to call in every three seconds, but when I change the time to say 10 seconds or 20 minutes it stops calling in. Any idea why that is?

  107. admin Says:

    @Mark

    Can not recall seeing that issue from memory, however I wonder if it might be due to how the mesh network is operating in your environment. Possibly worth testing different values for the following “SNAP Node Configuration Parameters”:

    – ID 16 – Carrier Sense
    – ID 17 – Collision Detect
    – ID 18 – Collision Avoidance
    – ID 20 – Mesh Routing Maximum Timeout
    – ID 25 – Mesh Routing RREQ Retries
    – ID 27 – Mesh Routing Initial Hop Limit

    (page 90 of the SNAP Reference manual 2.4, although there is likely a new version out now)

  108. Ryan Says:

    I am in a Computational Linear Algebra class in college and I have been assigned an assignment to find a “real world” problem that I can apply least squares or kalman filters. I believe that I can apply least squares to this to help locate the tags. I was wondering how you calculate the location of the tags and also if there is anywhere I can see some sample data of the information that the reader sends to the PC. If you can help that would be much appreciated. Thank you.

  109. admin Says:

    @Ryan

    Interesting, least squares/kalman filters are not something I have come across before.

    Originally I attempted to use trilateration http://en.wikipedia.org/wiki/Trilateration however unfortunately it did not work out, therefore I switched to just using the closest reader (highest signal strength).

    Not sure if it will be enough data for you however there is some sample data in MySQL Dump format inside the “PHP Source” zip file under the “Location Tracking Processing / Display GUI” heading http://www.ns-tech.co.uk/blog/wp-content/uploads/2010/02/location_track_code.zip

  110. jaklari Says:

    Hi Nicholas,
    I have been trying to do your project.But i dont know anything about PHP or SQL.The login page appears asking for email and password,,thats it.The next page after i have entered the demo username and password, it shows an exeption error.stating “Table ‘xxx.lt_user’ doesn’t exist” in the dbmysql.php file.Please help me.Thanks in advance

  111. admin Says:

    @jaklari

    There should be a file called database.sql also in that same zip you downloaded with the PHP site code. You need to import that into your database first. There are a few ways to do this, if it is web space that came with a control panel you will usually find phpMyAdmin installed which can be used to import the file. Alternatively you can do it on the command line (e.g. via SSH) with something like:

    mysql -p -u mysqlusername databasename < database.sql

  112. jaklari Says:

    Hi,
    I have done everything you have said….but I get this message in the serial to http forwarder….
    23-Mar-14 4:34:57 PM Tag: 123456, Signal: 78, Reader: 987652
    23-Mar-14 4:34:57 PM Tag: 123456, Signal: 67, Reader: 987654
    23-Mar-14 4:34:57 PM Tag: 123456, Signal: 69, Reader: 987653
    Posting data to server
    Post Data Error: The operation has timed out

    What should I do?

  113. jaklari Says:

    Hi, In your readme file, You have said “includes/pages/clientapi_test.php” is a test script that can be used to simulate sending data to the appliaction from the “PC Serial To HTTP Data Forwarder”. To run the test script go to url http://www.example.com/locationtrack/?p=clientapi_test this will cause the application to post each data set back to the server.

    where exactly shud i enter the url..that is in the serial to http forwareder or in the browser..and what exactly should i do ?

  114. admin Says:

    @jaklari

    If you just put it in the browser that should work.

    It might appear to stall/not load depending on your server setup but behind the scenes it should be posting the sample data. Project was a while ago but taking another quick look at the code it should complete after around 34 second or so, therefore if you have two browser windows open, one with the map and one with the test script you should see the map updating in real time.

  115. admin Says:

    Can you check the server URL is correct, perhaps try visiting it in a browser and see if you at least get an error message shown e.g. “Password not specified” rather than the browser just not loading it (timing out).

    Also as per you other comment, try the test script and see if that works to try and narrow down where the issue is – the URL/data forwarder/main web application code itself.

  116. Alex Says:

    I am getting this error do you know what is the problem?

    Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in C:\xampp\htdocs\rfidmap\includes\classes\dbmysql.php on line 120

    Thank you

  117. admin Says:

    PHP is discontinuing a database function I used in the original code 4 years ago and just warning you that is what will happen in the future. Ideally the solution would be to rewrite the database class updating it to use one of the newer PHP database functions instead. An alternative in the short term would be just to turn off error reporting, i.e. set “error_reporting(0);” inside the file “includes/config.php”.

  118. Brian Smit Says:

    Great project!

    i wanted to test / play with it :) but i wondered which hardware to get (with which one do ya’all have good experience?)
    It will be for a 2 floors house

    i will probably add the tag to my keys too … so thhat i cannot lost them anymore :P

    thank you for your reply!

  119. ian Says:

    Hi,

    I have been looking for something like this for a while, but I am not sure if the location resolution is good enough for my needs. I need to accurately track a tag in a range of 10m to 20m but its moving quite quickly and I need precise location information that I can feed into a video camera tracking system. Based on the poor results you had using the signal strength I am guessing this would not work for me. Still interesting and has given me food for thought, thanks

Leave a Reply