geekhack

geekhack Projects => Making Stuff Together! => Topic started by: iowaseven on Tue, 06 January 2015, 23:48:35

Title: Anyone know how to change the device name for a board using Soarer's Tennsy Mod?
Post by: iowaseven on Tue, 06 January 2015, 23:48:35
In Windows under the Devices and Printers control panel item where your monitor, keyboard and mouse are listed, my Model M using Soarer's Tennsy Mod displays as a keyboard called 'Soarer's Keyboard Converter'. I would like to change this to a name of my choosing (e.g. '1985 IBM Model M Custom', or something). Anyone know if this is possible?
No disrespect menant to the great Mr. Soarer!
Title: Re: Anyone know how to change the device name for a board using Soarer's Tennsy Mod?
Post by: suicidal_orange on Wed, 07 January 2015, 04:06:29
As the source code is not available you can't change it and recompile so your only option is to edit the .hex file directly.  To test this idea I loaded the controller firmware (should be similar enough) in a hex editor and searched for the string "Soarer" but it was not found so that's not going to work.

I would say it's not possible but nearly didn't post as someone may know better - hopefully they do as this would be a nice feature :)
Title: Re: Anyone know how to change the device name for a board using Soarer's Tennsy Mod?
Post by: Findecanor on Wed, 07 January 2015, 15:21:19
USB strings are in 16-bit Unicode. Every other byte in the string is a zero.
Title: Re: Anyone know how to change the device name for a board using Soarer's Tennsy Mod?
Post by: suicidal_orange on Wed, 07 January 2015, 15:59:21
USB strings are in 16-bit Unicode. Every other byte in the string is a zero.
Ooh thanks!  *looks again*

53 = S regardless of encoding, correct?  There is no 53 in the file so does that mean we're out of luck or must it be there somewhere?
Title: Re: Anyone know how to change the device name for a board using Soarer's Tennsy Mod?
Post by: hasu on Wed, 07 January 2015, 16:47:58
Or I guess you can overwrite with INF or regedit.
Title: Re: Anyone know how to change the device name for a board using Soarer's Tennsy Mod?
Post by: iowaseven on Wed, 07 January 2015, 17:45:23
Thanks for looking into this, guys! It's much appreciated.
Title: Re: Anyone know how to change the device name for a board using Soarer's Tennsy Mod?
Post by: fohat.digs on Wed, 07 January 2015, 18:40:46
So what the heck has happened to Soarer himself?

I almost asked him for his mailing address once, but never did. All I know is that it is England somewhere.

Does nobody here or on DT know anything about him personally?
Title: Re: Anyone know how to change the device name for a board using Soarer's Tennsy Mod?
Post by: dorkvader on Wed, 07 January 2015, 21:53:39
So what the heck has happened to Soarer himself?

I almost asked him for his mailing address once, but never did. All I know is that it is England somewhere.

Does nobody here or on DT know anything about him personally?


Hopefully we will know soon
Title: Re: Anyone know how to change the device name for a board using Soarer's Tennsy Mod?
Post by: Findecanor on Thu, 08 January 2015, 00:18:18
53 = S regardless of encoding, correct?
S = 53 hexadecimal = 83 decimal.

Title: Re: Anyone know how to change the device name for a board using Soarer's Tennsy Mod?
Post by: suicidal_orange on Thu, 08 January 2015, 02:40:05
53 = S regardless of encoding, correct?
S = 53 hexadecimal = 83 decimal.

I meant whether 8 or 16 bit hex, my terminology is rusty due to working too long in an office :-[
Title: Re: Anyone know how to change the device name for a board using Soarer's Tennsy Mod?
Post by: arakula on Thu, 08 January 2015, 06:39:32
As the source code is not available you can't change it and recompile so your only option is to edit the .hex file directly.  To test this idea I loaded the controller firmware (should be similar enough) in a hex editor and searched for the string "Soarer" but it was not found so that's not going to work.
Since the firmware is provided in a .hex file, loading that into a hex editor is a bit ... well, overkill. The .hex file is a text file containing hex strings.
You only need to know where to look ...
For example, in Soarer_at2usb_v1.12_atmega32u4.hex, it's here:

:100520000072000000380353006F00610072006524
:100530000072002700730020004B00650079006204
:10054000006F00610072006400200043006F006EC5
:1005500000760065007200740065007200000061A2


At offset 0525, you can set the length of the string (including an UTF-16 0 at the end); that's followed by 03, indicating that it's a string. After that, 56 bytes come with little-endian UTF-16 characters. If you change anything, however, ...
Title: Re: Anyone know how to change the device name for a board using Soarer's Tennsy Mod?
Post by: suicidal_orange on Thu, 08 January 2015, 17:12:37
Since the firmware is provided in a .hex file, loading that into a hex editor is a bit ... well, overkill. The .hex file is a text file containing hex strings.
You only need to know where to look ...
For example, in Soarer_at2usb_v1.12_atmega32u4.hex, it's here:

:100520000072000000380353006F00610072006524
:100530000072002700730020004B00650079006204
:10054000006F00610072006400200043006F006EC5
:1005500000760065007200740065007200000061A2


At offset 0525, you can set the length of the string (including an UTF-16 0 at the end); that's followed by 03, indicating that it's a string. After that, 56 bytes come with little-endian UTF-16 characters. If you change anything, however, ...
  • keep in mind that the last byte in the line is a checksum over the line (look up Intel Hex format for the calculation)
  • I got no idea whether Soarer's command line tools will be able to find the USB device. Presumably, they will, as they're probably only searching for VID and PID.
Very helpful - thanks!

Hopefully you're right about the tools using VID and PID, they're shorter to write out as well as that being the standard way of doing USB so I don't see why Soarer would use the text description, unless he doesn't do well at remembering numbers...

Who's going to test it?  It's too late for me today.
Title: Re: Anyone know how to change the device name for a board using Soarer's Tennsy Mod?
Post by: iowaseven on Fri, 09 January 2015, 03:08:53
I bought this up as a casual topic, and you gents are going all out on it! Thank you all so much!