Author Topic: MilesTag Protocol Cloning Question  (Read 785 times)

ezio

  • Full Member
  • **
  • Posts: 76
    • View Profile
MilesTag Protocol Cloning Question
« on: February 24, 2018, 10:15:38 AM »
Does anyone have the most current MilesTag protocol information?  I've got a document produced by Christopher Malton in April 2011, but many of the values are marked "Reserved," and I'm wondering how much of those have been used in the past nearly 7 years of development, and I'm wondering if anything has been changed.  Any information would be greatly appreciated!  Thanks!

berk

  • Veteran
  • *****
  • Posts: 387
    • View Profile
    • funwithelectrons.blogspot.com
Re: MilesTag Protocol Cloning Question
« Reply #1 on: February 24, 2018, 04:49:36 PM »
I'm pretty sure Chris decoded the latest clone packet. He's on this forum. PM him.

ezio

  • Full Member
  • **
  • Posts: 76
    • View Profile
Re: MilesTag Protocol Cloning Question
« Reply #2 on: February 24, 2018, 10:52:43 PM »
Thanks.  Will do.

ezio

  • Full Member
  • **
  • Posts: 76
    • View Profile
Re: MilesTag Protocol Cloning Question
« Reply #3 on: April 07, 2018, 06:47:19 PM »
I've tried reaching out to Chris Malton in PM and on Twitter with no luck.  I guess he's not working on MilesTag right now, and I'm still stuck trying to get the cloning command to work with an Arduino-based IR emitter.  Using Chris' manual, I was able to figure out the series of bytes I need to send.  The gun is responding to the signal, but it's just coming back with "Error" on the screen.  Here is the function I'm using to fire a clone signal with the values I'm trying to set included (I'm using a case command because I'm going to be adding multiple player "classes"):

Code: [Select]
void MT5_TX_clone(int playerClass) {
  switch(playerClass) {
    case 1:
      MT5_TX_header();    // header
      MT5_TX_byte(0x87);  // message
      MT5_TX_byte(0x01);  // message data
      MT5_TX_byte(0xE8);  // message terminator
      MT5_TX_byte(0x00);  // byte 4
      MT5_TX_byte(0x00);  // byte 5
      MT5_TX_byte(0x00);  // byte 6
      MT5_TX_byte(0x00);  // Team ID (red)
      MT5_TX_byte(0x00);  // reserved
      MT5_TX_byte(0x0A);  // Clips added with ammo box (10)
      MT5_TX_byte(0x19);  // Health added with medic box (25)
      MT5_TX_byte(0x00);  // reserved
      MT5_TX_byte(0x00);  // LED timeout
      MT5_TX_byte(0x00);  // Sounds
      MT5_TX_byte(0x00);  // Overheat limit
      MT5_TX_byte(0x00);  // reserved
      MT5_TX_byte(0x00);  // reserved
      MT5_TX_byte(0x09);  // Damage per shot (as per table, 0x09 means 25hp)
      MT5_TX_byte(0x28);  // Clip size (40 rounds per clip)
      MT5_TX_byte(0x08);  // Number of clips (8 clips total)
      MT5_TX_byte(0x02);  // Fire select (as per table, 0x02 means full-auto)
      MT5_TX_byte(0x00);  // Burst rounds (0 since full-auto)
      MT5_TX_byte(0x04);  // Cyclic rate (as per table 0x04 means 450)
      MT5_TX_byte(0x00);  // Reload delay
      MT5_TX_byte(0x00);  // IR power hi/lo (as per table 0x00 means indoor)
      MT5_TX_byte(0x02);  // IR range (as per table 0x02 means 10%)
      MT5_TX_byte(0x01);  // Tagger Settings -- (as per table, selected values OR'd together.  Only 0x01 is on for muzzle flash, so 0x01)
      MT5_TX_byte(0x24);  // Player health value (100) (as per table 0x24 means 100hp)
      MT5_TX_byte(0x00);  // reserved
      MT5_TX_byte(0x00);  // Respawn delay
      MT5_TX_byte(0x00);  // Armor
      MT5_TX_byte(0x7E);  // Game on/off settings 1 -- (as per table, setting hit LED on, medics on, boxes reset on respawn on, and boxes not used up to on, or 0x7E when OR'd together)
      MT5_TX_byte(0x7A);  // Game on/off settings 2 -- (as per table, setting respawn on, tagger nicks on, and full ammo on reset on, or 0x7A when OR'd together)
      MT5_TX_byte(0x00);  // Hit delay
      MT5_TX_byte(0x00);  // Start delay
      MT5_TX_byte(0x00);  // Death delay
      MT5_TX_byte(0x00);  // Time limit in minutes
      MT5_TX_byte(0x00);  // Maximum respawns
      MT5_TX_byte(0x00);  // reserved
      MT5_TX_byte(0x81);  // Checksum -- Sum of bytes 4 to 38 modulo 256. 
    break;
    default:
    break;
  }
}

Maybe someone can see something wrong with my math, or maybe they understand the cloning message enough to know where I'm going wrong? 

berk

  • Veteran
  • *****
  • Posts: 387
    • View Profile
    • funwithelectrons.blogspot.com
Re: MilesTag Protocol Cloning Question
« Reply #4 on: April 11, 2018, 10:13:00 AM »
What version of software and what platform and you sending the clone packet to. Chris and I looked at this some time ago and the packet format was changed around V5.5 if I remember rightly.

Chris decoded the new packet format and sent it to me but I don't know if he updated the document.

ezio

  • Full Member
  • **
  • Posts: 76
    • View Profile
Re: MilesTag Protocol Cloning Question
« Reply #5 on: April 11, 2018, 11:01:47 AM »
To be honest, I don't really know.  I'm doing testing with some 2nd hand guns I bought online that had RevJ boards in them.  They seem to have been custom-flashed for the company, as well, because I get a branded logo when I start them up.  I can't really tell how old they are, but I wouldn't doubt that they're using V5.5 or earlier, although from the documentation it looks like V6.4 is the standard for RevJ.  However, I'll eventually need to know the differences between the two, because I may be working with either.

berk

  • Veteran
  • *****
  • Posts: 387
    • View Profile
    • funwithelectrons.blogspot.com
Re: MilesTag Protocol Cloning Question
« Reply #6 on: April 12, 2018, 09:15:31 AM »
I found the original email I had from Chris:

Hi Tony,

It's there in byte 43 - same calculation as before I believe.

Full listing as follows:

IDX   Setting Name
1   
2   
3   
4   *** RESERVED ***
5   Volume (Mapped)
6   Field ID (0x00 = A, 0x01 = B)
7   *** RESERVED ***
8   *** RESERVED ***
9   Kill LED (Seconds)
10   Sound Set
11   SRK Damage (Mapped)
12   SRK Range (Mapped)
13   FlagView ENABLE = 0x01
FlagRept ENABLE = 0x02
Team Display MILITARY = 0x08
Main Display PLAYER = 0x10
14   Damage (Mapped)
15   Magazine Size
16   Magazines
17   Fire Select
18   *** RESERVED ***
19   Rounds/Min (Mapped)
20   Reload Delay
21   IR Power Mode (In/Out)
22   Range
23   Muz Flash ENABLE = 0x10
Short Range Kill ENABLE = 0x02
Hit Flash ENABLE = 0x08
24   Life (Mapped)
25   Body Armour Min
26   *** RESERVED ***
27   Body Armour Max
28   Zombie Mode ENABLE = 0x02
Friendly Fire ENABLE = 0x04
Unlimited Ammo ENABLE = 0x08
Respawn Flash ENABLE = 0x10
Flag Flash ENABLE = 0x20
Game Box RoR ENABLE = 0x40
Game Box Stay ENABLE = 0x80
29   Body Armour ENABLE = 0x02
Zombie Flash ENABLE = 0x08
Near Miss ENABLE = 0x10
Flag End ENABLE = 0x20
Ammo RoR ENABLE = 0x40
30   Hit Delay
31   Start Delay (Seconds)
32   Bleedout (Seconds)
33   Game Length (Minutes)
34   *** RESERVED ***
35   Zombie Life (Mapped)
36   Zombie Damage (Mapped)
37   Body Armour Heal Pts/sec
38   Medic Box Health (Raw Value)
39   Ammo Box Clips (Raw Value)
40   Armour Box Points (Raw Value)
41   Weapon RoR ENABLE = 0x08
Zombie Sounds = 0x40
Dual Muzzle ENABLE = 0x80
42   *** RESERVED ***
43   Checksum

Note: if it says it's "Mapped", it means that there's a mapping stored somewhere for it (i.e. 1 is not necessarily 1!)

Opening 3 bytes are 0x87, 0xD4, 0xE8 on this edition.

Regards,

Chris

ezio

  • Full Member
  • **
  • Posts: 76
    • View Profile
Re: MilesTag Protocol Cloning Question
« Reply #7 on: May 04, 2018, 02:26:11 PM »
Hey berk, do you know if this set would work for the MAGIC board?  I'm going to have to buy one of the boards for testing, and I want to make sure the one I get will work. 

berk

  • Veteran
  • *****
  • Posts: 387
    • View Profile
    • funwithelectrons.blogspot.com
Re: MilesTag Protocol Cloning Question
« Reply #8 on: May 05, 2018, 06:26:28 PM »
Hi ezio
  Afraid to say I don't know. I've had no contact with the magic boards. However, if they support the latest protocol then they should be ok.