This guide will help you flash the new firmware onto your Arduino Mega 2560 board. The update is necessary if you want to make your arduino a HID (eg: emulate as a Keyboard, Mouse).

You should consult the guide available already at Arduino's website at http://arduino.cc/en/Hacking/DFUProgramming8U2.

Device Firmware Update (DFU) Mode[edit]

The Arduino guide does not go into detail on how to get your mega board into DFU mode. Fortunately, there is no soldering required as we only need to short two things:

  1. The MEGA8U2 Reset pin
  2. HWB pin

Refer to the image below from http://gebloggendings.wordpress.com/category/elektronik/arduino/

Mega dfu.jpeg

Flashing the Update Firmware[edit]

Download FLIP from Atmel's website (http://www.atmel.com/tools/flip.aspx).

Get the file at https://github.com/arduino/Arduino/blob/master/hardware/arduino/firmwares/atmegaxxu2/arduino-usbserial/Arduino-usbserial-mega.hex

The contents of the update is available below:

  1 :10000000A2C00000BBC00000B9C00000B7C0000023
  2 :10001000B5C00000B3C00000B1C00000AFC0000018
  3 :10002000ADC00000ABC00000A9C000005AC4000071
  4 :100030001EC40000A3C00000A1C000009FC00000BB
  5 :100040009DC000009BC0000099C0000097C0000048
  6 :1000500095C0000093C0000091C0000014C10000D2
  7 :100060008DC000008BC0000089C0000087C0000068
  8 :1000700085C0000083C0000081C000007FC0000078
  9 :100080007DC000007BC0000079C0000077C0000088
 10 :1000900075C0000073C000001201100102000008CA
 11 :1000A0004123100001000102DC0109023E000201AF
 12 :1000B00000C0320904000001020201000524000111
 13 :1000C0001004240206052406000107058203080027
 14 :1000D000FF09040100020A000000070504024000B5
 15 :1000E00001070583024000010403090432034100B3
 16 :1000F00072006400750069006E006F002000280027
 17 :100100007700770077002E006100720064007500B0
 18 :1001100069006E006F002E0063006300290000007C
 19 :100120002403410072006400750069006E006F00D6
 20 :1001300020004D006500670061002000320035009E
 21 :1001400036003000000011241FBECFEFD2E0DEBF2A
 22 :10015000CDBF11E0A0E0B1E0E0EDFFE002C005900E
 23 :100160000D92A631B107D9F712E0A6E1B1E001C0C6
 24 :100170001D92AF32B107E1F7F1D028C741CF9C0102
 25 :10018000DC01AE57BF4FED91FC9111974191119653
 26 :10019000FC93EE9380589F4FE817F90711F42D93C5
 27 :1001A0003C939FB7F894F901EC57FF4F8081815041
 28 :1001B00080839FBF842F0895DF92EF92FF920F9369
 29 :1001C0001F93FC018489813019F0823021F405C02D
 30 :1001D00040E3D42E04C0DD2402C030E2D32E838954
 31 :1001E000823011F488E0D82A8589873031F0883050
 32 :1001F00031F0863031F482E003C084E001C086E053
 33 :10020000D82A1092C9001092C8001092CA00E78440
 34 :10021000F0880189128980E0E81681EEF80680E016
 35 :10022000080780E0180719F420E130E00FC0C8018A
 36 :10023000B701969587957795679560587B47814E6E
 37 :100240009F4FA8019701A0D6215030403093CD0098
 38 :100250002093CC00D092CA0080E0E81681EEF80628
 39 :1002600080E0080780E0180711F082E001C080E01C
 40 :100270008093C80088E98093C9001F910F91FF9077
 41 :10028000EF90DF9008951F920F920FB60F921124F6
 42 :100290002F938F939F93EF93FF939091CE008EB304
 43 :1002A0008430F1F4E0919901F0919A019083E0910A
 44 :1002B0009901F0919A01CF01019690939A01809350
 45 :1002C00099018959914021F489E191E092838183D8
 46 :1002D0009FB7F89480919D018F5F80939D019FBF90
 47 :1002E000FF91EF919F918F912F910F900FBE0F90E3
 48 :1002F0001F901895FC01858580FF02C05F980895C6
 49 :100300005F9A089580E091E0D5C580E091E088C5CE
 50 :1003100084B7877F84BF28E10FB6F89420936000EC
 51 :10032000109260000FBE87E690E09093CD0080931E
 52 :10033000CC0086E08093CA001092C8002093C900C8
 53 :10034000539A5A9A8AB180638AB98BB180638BB908
 54 :1003500083D284E085BD5F9A579A08950F931F93C7
 55 :10036000CF93DF93D5DF2FB7F8948EE991E0909388
 56 :100370001F0280931E0290932102809320022FBFC0
 57 :100380002FB7F89489E191E090939A0180939901B5
 58 :1003900090939C0180939B012FBF7894CEE9D1E08C
 59 :1003A00003E08FB7F894909122028FBF903809F143
 60 :1003B00080E091E0ABD497FD1CC0E0911E02F0916B
 61 :1003C0001F028083E0911E02F0911F02CF0101966F
 62 :1003D00090931F0280931E028E51924011F4D2839B
 63 :1003E000C1839FB7F894809122028F5F809322028D
 64 :1003F0009FBF8FB7F89410919D018FBFA89902C03D
 65 :10040000113678F1A89A80919D01882361F05D985A
 66 :100410000093160108C089E191E0B1DE682F80E009
 67 :1004200091E0DAD411501123B1F78091160188239D
 68 :1004300051F0809116018150809316018091160130
 69 :10044000882309F45D9A80911701882351F08091E7
 70 :10045000170181508093170180911701882309F4B7
 71 :100460005C9A8FB7F894909122028FBF992369F01C
 72 :100470008EE991E084DE982F8091C80085FFFCCF43
 73 :100480009093CE005C980093170180E091E095D4A2
 74 :100490002AD487CFDA01923049F0933061F091305D
 75 :1004A000F9F4E8E9F0E022E130E01EC0EAEAF0E029
 76 :1004B0002EE330E019C0813049F0813018F08230ED
 77 :1004C00079F408C0E8EEF0E0849107C0ECEEF0E0CB
 78 :1004D000849103C0E0E2F1E08491282F30E004C071
 79 :1004E000E0E0F0E020E030E0ED93FC93C9010895F6
 80 :1004F00028E030E040E003C04F5F220F331F281791
 81 :100500003907D0F3842F8295807F08958093E90086
 82 :100510008091EB0081608093EB001092ED0060937E
 83 :10052000EC004093ED008091EE00881F8827881F23
 84 :1005300008951092F40090E09093E9001092F0007A
 85 :100540001092E8001092ED008091EB008E7F809376
 86 :10055000EB009F5F953081F70895809127028823F3
 87 :100560008CF403C08EB38823B1F08091E80082FF41
 88 :10057000F9CF8091E8008B778093E80008958EB3DF
 89 :10058000882349F08091E80080FFF9CF8091E8004E
 90 :100590008E778093E800089594E68091EC0080FFC8
 91 :1005A00005C08091E80080FF05C023C08091E8006D
 92 :1005B00082FD1FC08EB3882311F482E008958EB3AC
 93 :1005C000853011F483E008958091EB0085FF02C02F
 94 :1005D00081E008958091E10082FFDFCF8091E1000A
 95 :1005E0008B7F8093E100992311F484E0089591506A
 96 :1005F000D4CF80E008959C0140912D0250912E02AD
 97 :100600004617570718F4F90120E038C06115710545
 98 :1006100011F0AB01F8CF8091E8008E778093E8006D
 99 :1006200040E050E0F0CF8091E80083FF02C081E01D
100 :1006300008958091E80082FD2DC08EB3882381F15A
101 :100640008EB3853079F18091E80080FF17C09091DA
102 :10065000F20006C081918093F100415050409F5FAD
103 :100660004115510511F09830A8F320E0983009F4B5
104 :1006700021E08091E8008E778093E80041155105D4
105 :1006800091F6222381F606C08EB3882349F08EB3FB
106 :10069000853041F08091E80082FFF6CF80E0089538
107 :1006A00082E0089583E008959C0140912D025091CD
108 :1006B0002E024617570710F490E03BC061157105F4
109 :1006C00011F0AB01F9CF8091E8008E778093E800BC
110 :1006D00040E050E0F1CF8091E80083FF02C081E06C
111 :1006E00008958091E80082FD30C08EB3882399F18F
112 :1006F0008EB3853091F18091E80080FF1AC080911F
113 :10070000F20009C0F9012F5F3F4FE491E093F1003F
114 :10071000415050408F5F4115510511F0883090F3E2
115 :1007200090E0883009F491E08091E8008E77809322
116 :10073000E8004115510579F6992369F606C08EB394
117 :10074000882349F08EB3853041F08091E80082FF24
118 :10075000F6CF80E0089582E0089583E008959C013B
119 :100760006115710529F48091E8008B778093E8008A
120 :10077000F90120C08091E80083FF02C081E0089564
121 :100780008EB3882339F18EB3853031F18091E80042
122 :1007900082FFF0CF06C08091F100819361507040DC
123 :1007A00021F08091F2008823B1F78091E8008B77E7
124 :1007B0008093E80061157105E9F606C08EB38823C1
125 :1007C00049F08EB3853041F08091E80080FFF6CF8C
126 :1007D00080E0089582E0089583E0089542D044D0F7
127 :1007E0001EBA10922502109224021092230284E075
128 :1007F00089BD89B5826089BD09B400FEFDCF8091B5
129 :10080000D800982F9F779093D80080688093D80065
130 :10081000809163008E7F809363008091D8008F7DEC
131 :100820008093D8008091E0008E7F8093E0008091DB
132 :10083000E1008E7F8093E1008091E20081608093EF
133 :10084000E2008091E100877F8093E1008091E200E7
134 :1008500088608093E2000895C1DF81E080932602E2
135 :1008600008951092E20008951092E10008951F92F9
136 :100870000F920FB60F9211241F932F933F934F9314
137 :100880005F936F937F938F939F93AF93BF93EF93F8
138 :10089000FF93E9EEF0E0108117701082E0EFF0E0D6
139 :1008A0008081877F80837894C3D0F894A9EEB0E0EC
140 :1008B0001C92E0EFF0E08081886080831C93FF91C0
141 :1008C000EF91BF91AF919F918F917F916F915F91C8
142 :1008D0004F913F912F911F910F900FBE0F901F903E
143 :1008E00018951F920F920FB60F9211242F933F93DA
144 :1008F0004F935F936F937F938F939F93AF93BF9328
145 :10090000EF93FF938091E10080FF1BC08091E20094
146 :1009100080FF17C08091E1008E7F8093E10080917D
147 :10092000E2008E7F8093E2008091E20080618093FC
148 :10093000E2008091D80080628093D80019BC1EBA72
149 :10094000D1D18091E10084FF29C08091E20084FF31
150 :1009500025C084E089BD89B5826089BD09B400FEE7
151 :10096000FDCF8091D8008F7D8093D8008091E100E9
152 :100970008F7E8093E1008091E2008F7E8093E20081
153 :100980008091E20081608093E200809125028823BB
154 :1009900011F481E001C084E08EBBA4D18091E1001C
155 :1009A00083FF27C08091E20083FF23C08091E10094
156 :1009B000877F8093E10082E08EBB109225028091B8
157 :1009C000E1008E7F8093E1008091E2008E7F809332
158 :1009D000E2008091E20080618093E200AADD80E085
159 :1009E00060E042E093DD8091F00088608093F00049
160 :1009F00079D18091E10082FF0AC08091E20082FFFC
161 :100A000006C08091E1008B7F8093E1006BD1FF9164
162 :100A1000EF91BF91AF919F918F917F916F915F9176
163 :100A20004F913F912F910F900FBE0F901F901895EF
164 :100A30001F93DF93CF93CDB7DEB7AC970FB6F89483
165 :100A4000DEBF0FBECDBFE7E2F2E08091F1008193FF
166 :100A500022E0EF32F207C9F7809127023091280295
167 :100A6000353009F487C0363040F43130C9F13130C7
168 :100A700070F0333009F01DC133C0383009F4EFC0D5
169 :100A8000393009F4FEC0363009F013C192C0803805
170 :100A900021F0823809F00DC108C0909123028091A5
171 :100AA0002402882399F0926011C080912B028770F4
172 :100AB0008093E9008091EB0090E025E09695879582
173 :100AC0002A95E1F7982F91701092E9008091E80043
174 :100AD000877F8093E8009093F1001092F100CAC0E4
175 :100AE000882319F0823009F0E4C090E08F71907093
176 :100AF000009721F0029709F0DDC00CC08091290217
177 :100B0000813009F0D7C010922402333069F5809308
178 :100B100024022AC080912902882331F520912B02DA
179 :100B2000277009F4C7C02093E9008091EB0080FF93
180 :100B3000C1C0333021F48091EB00806213C08091FA
181 :100B4000EB0080618093EB0081E090E002C0880FB1
182 :100B5000991F2A95E2F78093EA001092EA008091AB
183 :100B6000EB0088608093EB001092E9008091E80030
184 :100B7000877F83C0882309F09CC01091290280914F
185 :100B8000E800877F8093E800E8DC04C08EB3882308
186 :100B900009F490C08091E80080FFF8CF812F8F7713
187 :100BA00011F492E001C093E09EBB80688093E30063
188 :100BB00081C08058823008F07CC0809129029091D9
189 :100BC0002A0223E08C3D920799F55FB7F894DE0185
190 :100BD00015964EE020E030E061E2E42FF0E0609313
191 :100BE0005700849120FF03C082958F704F5F982F2C
192 :100BF0009F70892F805D8A3308F0895F8C931196EE
193 :100C00001C9211972F5F3F4F12962431310529F71F
194 :100C10005FBF8AE28B8383E08C838091E800877FCB
195 :100C20008093E800CE0103966AE270E0E4DC11C034
196 :100C300060912B02AE014F5F5F4F2CDCBC0100972F
197 :100C4000C9F18091E800877F8093E80089819A81CB
198 :100C50002BDD8091E8008B778093E8002BC08038F3
199 :100C600041F58091E800877F8093E800809125021C
200 :100C70008093F1008091E8008E778093E8006DDC2E
201 :100C800019C08823B1F490912902923098F4809190
202 :100C9000E800877F8093E800909325025EDC8091D6
203 :100CA0002502882311F483E001C084E08EBB2DDB94
204 :100CB00001C028DB8091E80083FF0AC08091EB002F
205 :100CC00080628093EB008091E800877F8093E8004A
206 :100CD000AC960FB6F894DEBF0FBECDBFCF91DF91BB
207 :100CE0001F91089508951F938EB3882361F010918A
208 :100CF000E9001092E9008091E80083FF01C098DECE
209 :100D000017701093E9001F9108950895FC018EB3A8
210 :100D1000843021F587859089A189B2890097A10542
211 :100D2000B105E1F085818093E9008091E80082FFC0
212 :100D300015C08091F200882319F42FEF3FEF04C013
213 :100D40008091F100282F30E08091F200882341F457
214 :100D50008091E8008B778093E80002C02FEF3FEF8F
215 :100D6000C9010895FC018EB3843011F587859089FF
216 :100D7000A189B2890097A105B105D1F08181809345
217 :100D8000E9008091F2008823A9F09091E800809119
218 :100D9000E8008E778093E80095FD0CC0FDDB982F6E
219 :100DA000882349F48091E8008E778093E80003C09F
220 :100DB00092E001C090E0892F0895FC018EB3843049
221 :100DC00051F487859089A189B2890097A105B10561
222 :100DD00011F0CF01C7CF08951F93FC01162F8EB3DA
223 :100DE0008430D9F487859089A189B2890097A105BB
224 :100DF000B10599F081818093E9008091E80085FD3B
225 :100E000008C08091E8008E778093E800C5DB8823D6
226 :100E100029F41093F10080E001C082E01F91089551
227 :100E20000F931F93CF93DF93EC010D96FC0189E0A4
228 :100E3000DF011D928A95E9F72A813B8109818C8126
229 :100E4000882311F410E001C014E0C90151DB182B14
230 :100E50001260802F61E8412F59DB882329F12E8110
231 :100E60003F810D818885882311F410E001C014E0D2
232 :100E7000C9013EDB182B1260802F60E8412F46DB52
233 :100E8000882391F02A853B8509858C85882311F478
234 :100E900010E001C014E0C9012BDB182B1260802F79
235 :100EA00061EC412F33DB01C080E0DF91CF911F91D6
236 :100EB0000F910895CF93DF93EC018091E80083FFB9
237 :100EC00060C0888190E020912B0230912C0228177D
238 :100ED000390709F056C080912802813261F08232D0
239 :100EE00020F4803209F04DC019C0823269F183329A
240 :100EF00009F047C038C080912702813A09F041C00B
241 :100F00008091E800877F8093E800CE010F9667E02C
242 :100F100070E071DB8091E8008B7713C0809127022D
243 :100F2000813279F58091E800877F8093E800CE01D7
244 :100F30000F9667E070E013DCCE013ED98091E800A7
245 :100F40008E778093E8001DC0809127028132C9F41A
246 :100F50008091E800877F8093E800809129028D8747
247 :100F6000CE01C8D90DC080912702813251F4809101
248 :100F7000E800877F8093E800CE0160912902C5DEFA
249 :100F8000ECDADF91CF910895A1E21A2EAA1BBB1BC8
250 :100F9000FD010DC0AA1FBB1FEE1FFF1FA217B30745
251 :100FA000E407F50720F0A21BB30BE40BF50B661F5B
252 :100FB000771F881F991F1A9469F76095709580951F
253 :100FC00090959B01AC01BD01CF010895F894FFCF2E
254 :100FD0000003400000044000000208000000000080
255 :060FE0000000000000000B
256 :00000001FF

Ensure that your arduino is in DFU mode and has the DFU drivers installed (available from the FLIP's install directory). Open Flip. Flip should be able to see that you have a AT90USB82 device. Load the .hex file and connect FLIP with your arduino via USB. Then click on 'Run' to apply the update.

See also: http://noquest.com/electronics/arduino-uno-firmware-update/


HID Keyboard[edit]

Refer to http://www.freebsddiary.org/APC/usb_hid_usages.php