Author Topic: Has anybody enabled Tracking Gen on Agilent N9340B?  (Read 11567 times)

0 Members and 1 Guest are viewing this topic.

Offline Vivatspb

  • Newbie
  • Posts: 1
  • Country: uz
Re: Has anybody enabled Tracking Gen on Agilent N9340B?
« Reply #75 on: April 09, 2023, 06:18:41 pm »
Hello.
Is there any option to explain briefly how to run this code and what program is needed to open the options on my N9342C?

Best regards
 

Offline milesd969

  • Newbie
  • !
  • Posts: 5
  • Country: cs
Re: Has anybody enabled Tracking Gen on Agilent N9340B?
« Reply #76 on: April 11, 2023, 06:34:56 am »
You have to know programming, it is not easy to explain, send the ID number of the analyzer, I will open one option for free
 

Offline mickab

  • Newbie
  • Posts: 7
  • Country: fr
Re: Has anybody enabled Tracking Gen on Agilent N9340B?
« Reply #77 on: September 11, 2023, 07:15:17 pm »
Agilent N9340B and N9340C license generator

For all owners of this Agilent HSA, here is a quick vacation gift (created in less than 1 hour between some pool dives  :popcorn:).

The code is C# but should be totally self-explanatory.

Code: [Select]
        private static void calc_license_Agilent_N9340B_C(string hostID, bool is_N9340C)
        {
            string[] option = { "PA3", "TG3", "SO3", "DMA", "AMA", "DFS", "KLS", "IBC", "IBF",
                                "INM", "XDM", "BAS", "PAK", "SEM", "SPT", "PWM", "MKT", "U01" };
           
            if (hostID.Length != 8)
                Console.WriteLine("Error in hostID length!");

            for (int m = 0; m < option.Length; m++)
            {
                byte[] hash = MD5.Create().ComputeHash(Encoding.ASCII.GetBytes(hostID + option[m] + (is_N9340C ? "DFE" : "")));

                Console.Write("{0,-2}   {1}   ", m, option[m]);
                for (int i = 0; i < hash.Length; i++)
                {
                    byte c = 0;
                    for (int j = 0; j < 8; j++)
                        c += (byte)(hash[i] ^ hostID[j]);

                    c = (byte)(c % 36 + 48);
                    if (c > 57)
                        c += 7;
                    Console.Write(Convert.ToChar(c));
                }
                Console.WriteLine();
            }
        }

EDIT March 30th, 2023: Added the generation of N9340C family licenses. List of options is here.

Hello tv84,

Do you know if the script can be adapted for the N9320B ?

I have try with "is_N9340C" at "false" and "true" but both results didn't work.  |O
I don't understand why you add "DFE" when it is a N9340C.
 

Offline milesd969

  • Newbie
  • !
  • Posts: 5
  • Country: cs
Re: Has anybody enabled Tracking Gen on Agilent N9340B?
« Reply #78 on: September 14, 2023, 07:03:30 am »
Send the Host ID number of the analyzer, I can try
 

Offline tv84

  • Super Contributor
  • ***
  • Posts: 3217
  • Country: pt
Re: Has anybody enabled Tracking Gen on Agilent N9340B?
« Reply #79 on: September 15, 2023, 06:44:15 pm »
Do you know if the script can be adapted for the N9320B ?

That one is similar but a bit more complicated. You won't get there by trial and error.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf