I cannot upload the sketch

I have Arduino UNO R3 SMD, I connected to usb and said driver not recognized for ATMEL 16u2, so I followed instructions and using FLIP from Atmel I flashed this Arduino-usbserial-atmega16u2-Uno-Rev3.hex to Arduino.
I disconnected from USB and reconnected. It found Arduino UNO and I browsed \driver folder for loading Windows XP drivers.
Once finished I had on Device Manager on COM port 31 Arduino
I tried to open IDE, change port, compile and upload but the error avrdude: stk500_getsync(): not in sync: resp=0x00
is still there.
Green led 'ON' is on.
Yello led 'L' is on and blinks shortly (3 times) when I upload
I tried also to upload drivers, and discovered Arduino UNO R3, tried again but nothing.
What can I do?
Thanks

If this was a new board and the 16u2 was in DFU mode out of the box, then it is highly likely the 328 bootloader was not loaded either.

If it was a new board, I would return it for a replacement.

Otherwise, you will need another Arduino or an ISP to program the bootloader into the 328.

it was a new board.
But I programmed the boot loader with Flip
and I used that source code
Now how can I make it runnnig?
I cannot ask a replacement, I bought on a fair

The UNO has two processors, the 16u2 and the 328

The 16u2 is used for USB to serial conversion. This is the one you programmed.
The 328 is the main processor and this needs to be programmed with the Optiboot bootloader.

You will need another Arduino or an ISP to program the bootloader into the 328.

But it seems the problem is related to serial connection rather than the main processor itself:

avrdude: Version 5.11, compiled on Sep  2 2011 at 19:38:36
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

         System wide configuration file is "C:\Download Vari\arduino-1.0.4\hardware/tools/avr/etc/avrdude.conf"

         Using Port                    : \\.\COM31
         Using Programmer              : arduino
         Overriding Baud Rate          : 115200
avrdude: Send: 0 [30]   [20] 
avrdude: Send: 0 [30]   [20] 
avrdude: Send: 0 [30]   [20] 
avrdude: Recv: 
avrdude: stk500_getsync(): not in sync: resp=0x00

avrdude done.  Thank you.

How can I program the bootloader into 328? What is ISP?
And how can I use the other Arduino?

Here is some info about the bootloader:

Here is some info about how to use an Arduino as an ISP

now L led is blinking when I connect
I used avrdude and another arduino connected as here:
https://www.sparkfun.com/tutorials/247

but another error occurs when I program:

Copyright (c) 2007-2009 Joerg Wunsch

System wide configuration file is "C:\Download Vari\arduino-1.0.4\hardware/tools/avr/etc/avrdude.conf"

Using Port : \.\COM31
Using Programmer : arduino
Overriding Baud Rate : 115200
avrdude: Send: 0 [30] [20]
avrdude: Send: 0 [30] [20]
avrdude: Send: 0 [30] [20]
avrdude: Recv: . [11]
avrdude: stk500_getsync(): not in sync: resp=0x11

avrdude done. Thank you.

why?

Error code is different. What do you think?

I had an Arduino UNO rev3 not programmed, so I programmed the interface chip 16u2 using Atmel Flip and with another Arduino connected as here:
https://www.sparkfun.com/tutorials/247
I uploaded the bootloader

now L led is blinking when I connect to USB

but an error occurs when I upload my program to Arduino:

  Copyright (c) 2007-2009 Joerg Wunsch

         System wide configuration file is "C:\Download Vari\arduino-1.0.4\hardware/tools/avr/etc/avrdude.conf"

         Using Port                    : \\.\COM31
         Using Programmer              : arduino
         Overriding Baud Rate          : 115200
avrdude: Send: 0 [30]   [20] 
avrdude: Send: 0 [30]   [20] 
avrdude: Send: 0 [30]   [20] 
avrdude: Recv: . [11] 
avrdude: stk500_getsync(): not in sync: resp=0x11

avrdude done.  Thank you.

I searched for this error but nothing or quite nothing found.
What could be the reason? Someone can help me before I trash I arduino?
Thanks

Did you set the fuse bits when you programmed the bootloader in the 328?

I think so, I placed this command line:
avrdude -P comport -b 19200 -c avrisp -p m328p -v -e -U flash:w:hexfilename.hex -U lock:w:0x0F:m

Nope.

You didn't read the article you referenced closely:

You should have done this step before loading the firmware:

Option 1: avrdude -P comport -b 19200 -c avrisp -p m328p -v -e -U efuse:w:0x05:m -U hfuse:w:0xD6:m -U lfuse:w:0xFF:m

and now? Can I repeat the procedure?

Sure.

I tried again, this time programming the fuses as instructions but same result.
When I try to upload sketch appears that TX led blink briefly and RX is dark. L led then switch off. If I disconnect USB cable and reconnect again L led starts blinking.
May be a problem of bootloader or flash the Atmel 16u2 Serial IO processor not correctly flashed?
In this case how do I proceed?

someone can help me before trashing the Arduino UNO REV3 SMD that I own?

What do you suggest to me?
To take another one or to flash 628 firmware in another way or to flash again 16u2?

Thanks for help. Device Arduino UNO R3 SMD new trashed