avrdude has the option p
which permits you to determine which port should be used.
By checking the USB settings of my USBASP, it says it is connected through the port#0002.hub#0001. So I tried the following:
avrdude -p m168p -c avrisp -P com2 -b 19200
Unfortunately it didn't work:
avrdude: warning: cannot set sck period. please check for usbasp firmware update.
avrdude: error: programm enable: target doesn't answer. 1
avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.
USBASP has been updated to the latest version and the -F option doesn't work either.
Am I referencing the USB port correctly by calling is COM2? Any ideas on how to make it work?