convert byte to octet
-
Hello, I'm reading a MID file a nokia ringtone file and I want to convert every byte in it to octet then to hex but I don't know how? I am searching how to sen ring tones? Thanks
Dad
To convert byte -> octet and byte -> hex : byte myByte = 250; string octet = Convert.ToString(myByte, 8); string hex = Convert.ToString(myByte, 16); To send the ring tone, I think you must use the AT command from nokia, see the Manual. Search it in nokia website for AT command. Then use SerialPort class for writing AT command to phone.
-
Hello, I'm reading a MID file a nokia ringtone file and I want to convert every byte in it to octet then to hex but I don't know how? I am searching how to sen ring tones? Thanks
Dad
I am confused as why you need to convert a Byte to either octet of hex in order to send data? after all both Octet and Hex are just different was to display a byte value. If you want to convert a byte (or int) to string values for hex then...
string hex = myInt.ToString("X");//Convert to hex string
...I'm not sure of an easy way to convert an int to octet string thou sorry
Life goes very fast. Tomorrow, today is already yesterday.
-
To convert byte -> octet and byte -> hex : byte myByte = 250; string octet = Convert.ToString(myByte, 8); string hex = Convert.ToString(myByte, 16); To send the ring tone, I think you must use the AT command from nokia, see the Manual. Search it in nokia website for AT command. Then use SerialPort class for writing AT command to phone.
-
Hello, I'm reading a MID file a nokia ringtone file and I want to convert every byte in it to octet then to hex but I don't know how? I am searching how to sen ring tones? Thanks
Dad
FYI: octet is French for byte, so there is no conversion required at all. What you want is "octal" or base-8 notation. :)
Luc Pattyn
Have a look at my entry for the lean-and-mean competition; please provide comments, feedback, discussion, and don’t forget to vote for it! Thank you.
-
I was looking at the Convert Class but not familiar with it and didn't want to do too much reading for someone else ;P
Life goes very fast. Tomorrow, today is already yesterday.