D.I.Y. Laser Tag Game System

 

Home

 

CORE Module
Micro (uMT) Module
Add-Ons
Sensors
Optics
Sound Effects
Tech Stuff
MilesTag Forum
 Online Store 

 

MilesTag II Data Protocol

last update 25 July 2010

(reference Old MilesTag Protocol)

 

  Infrared Carrier Signal

The carrier frequency is selectable between 38KHz/40KHz/56KHz.  

 

The system's transmit carrier frequency must be matched to the sensor used.

 

  Data Packet

Shot Packet = Header Pulse + 14 data bits

[Header] - [8 bits] - [6 bits]

Message Packet = Header Pulse + 24 data bits (or more)  

[Header] - [8 bits] - [8 bits] - [8 bits] ...

The header pulse and data bits are encoded onto a 56KHz infrared carrier signal using pulse-length modulation.  This modulation is similar to the format used in many IR remote controls.

 

  Pulse-Length Modulation

The value of the data bits ("1" or "0") and the header pulse are represented by the length of the pulse.  Each pulse is a burst of 56 KHz infrared light lasting the period (length) of the corresponding data bit.

  • The Header Pulse is represented by a pulse (56 KHz carrier ON) with a period of 2400 uS (microseconds).

  • A bit value of "1" is represented by a pulse (56 KHz carrier ON) with a period of 1200 uS

  • A bit value of "0" is represented by a pulse (56 KHz carrier ON) with a period of 600 uS

  • The space (56 KHz carrier OFF) between each of the bit pulses is 600uS.

 

 

 

 

Shot packets consist of 2 data bytes:

[Header]-[PlayerID]-[Damage]

[Header]-[0ppppppp]-[ttdddd]

 

Header = (2.4 mS burst)

 

ID = 8 bits     0ppppppp  (First bit = "0" for shot packet)

 

ppppppp = PlayerID (7 bits)

see PlayerIDs in manual

Team/Damage = 6 bits   ttdddd

 

tt = TeamID (2 bits)

00 = Red

01 = Blue

10 = Yellow

11 = Green

dddd = Damage (4 bits)

0000 = 1

0001 = 2

0010 = 4

0011 = 5

0100 = 7

0101 = 10

0110 = 15

0111 = 17

1000 = 20

1001 = 25

1010 = 30

1011 = 35

1100 = 40

1101 = 50

1110 = 75

1111 = 100

 

Message packets consist of 3 data bytes:

[Header]-[Byte1]-[Byte2]-[0xE8]

Command packets consist of 3 data bytes:

[Header]-[0x83]-[Command]-[0xE8]

Command = see table below

System Data packets will have additional data bytes:

[Header]-[0x87]-[Type]-[0xE8]-[data]-[data]...

Type 0x01 = Cloning Data

Type 0x03 = Score Data (Part 1)

Type 0x04 = Score Data (Part 2)

Type 0x05 = Score Data (Part 3)

 

Valid Messages

Byte 1     Byte 2 Notes
0x80 Add Health   1 to 100  
0x81 Add Rounds   1 to 100  
0x82 RESERVED      
0x83 Command   0x00 Admin Kill
  0x01 Pause/Unpause
  0x02 Start Game
  0x03 Restore Defaults
  0x04 Respawn
  0x05 New Game (Immediate)
  0x06 Full Ammo
  0x07 End Game
  0x08 Reset Clock
  0x09 RESERVED
  0x0A Initialize Player
  0x0B Explode Player
  0x0C New Game (Ready)
  0x0D Full Health
  0x0E RESERVED
  0X0F Full Armor
  0x10 RESERVED
  0x11 RESERVED
  0x12 RESERVED
  0x13 RESERVED
  0x14 Clear Scores
  0x15 Test Sensors
  0x16 Stun Player
  0x17 Disarm Player
0x84 RESERVED      
0x85 RESERVED      
0x86 RESERVED      
0x87 System Data

(Long Packets)

  0x00 RESERVED
  0x01 Cloning Data
  0x02 RESERVED
  0x03 Score Data Part 1
  0x04 Score Data Part 2
  0x05 Score Data Part 3
0x88 RESERVED      
0x89 RESERVED      
0x8A Clips Pickup   0x00-0x0F Ammo Box ID (0-15)
0x8B Health Pickup   0x00-0x0F Medic Box ID (0-15)
0x8C Flag Pickup   0x00-0x0F Flag Box ID (0-15)

 

Cloning Data  (incomplete)
         

BYTE

VALUE

     
1 0x87 Message ID System Data  
2 0x01 Message Value Cloning Data  
3 0xE8 Message Term    
4 0x08 Fixed    
5 0xE8 Fixed    
6 0x21 Fixed    
7 0 to 3 Team ID    
8   RESERVED    
9 1 to 200 Ammo Box    
0 1 to 200 Medic Box    
    RESERVED    
  1 to 240 LED Timeout    
    Sounds 8  
    Overheat Limit 9  
    RESERVED 10  
    RESERVED 11  
  table values Damage 12  
  1 to 240 Clip Size 13  
  1 to 200 Clips 14  
    Fire Select 15  
  3,4,5,6 Burst Rounds 16  
  table values Cyclic Rate 17  
    Reload Delay 18  
    IR Power Hi/Lo 19  
    IR Range 20  
    --bits-- 21  
  table values Health 22  
    RESERVED 23  
    Respawn Delay 24  
    Armor 25  
    --bits-- 26  
    --bits-- 27  
    Hit Delay 28  
    Start Delay 29  
    Death Delay 30  
  5 to 240 Time Limit 31  
    Respawns 32  
    RESERVED 33  
    Checksum