We wrote a crude data scope.
(The freeware terminal programs we found were unable to keep up with Bluetooth speeds)
The results are okay, and we are writing
"X" is a format specifier. It converts a number to a string of hexadecimal digits.
int _abc = 123456;
Console.WriteLine(_abc.ToString("X"));
This will give you '1E240' as output
( 1E240 is the hexadecimal value of 123456 )
Use a composite format string:
pass += b[i].ToString("X2") + " ";
The documentation on MSDN, Standard Numeric Format Strings has examples.