How to set usb port as default?

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

How to set usb port as default?

László Monda
Hi List,

Instead of supplying "-P usb" in the command line every time I'd like
to set it as a default.  The following directives in the configuration
file didn't do the trick:

default_serial = "usb";
default_parallel = "usb";

Any ideas?

Thanks in advance!

--
László Monda <http://Monda.hu> | <http://UltimateHackingKeyboard.com>

_______________________________________________
avrdude-dev mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/avrdude-dev
Reply | Threaded
Open this post in threaded view
|

Re: How to set usb port as default?

Joerg Wunsch
As László Monda wrote:

> Instead of supplying "-P usb" in the command line every time I'd like
> to set it as a default.  The following directives in the configuration
> file didn't do the trick:

Vor which programmer type?

The default connection type is part of the programmer definition in
avrdude.conf.  Depending on that, the following switch statement then
decides about the portname to use in absence of a -P option:

  if (port == NULL) {
    switch (pgm->conntype)
    {
      case CONNTYPE_PARALLEL:
        port = default_parallel;
        break;

      case CONNTYPE_SERIAL:
        port = default_serial;
        break;

      case CONNTYPE_USB:
        port = DEFAULT_USB;
        break;
    }
  }

--
cheers, Joerg               .-.-.   --... ...--   -.. .  DL8DTL

http://www.sax.de/~joerg/
Never trust an operating system you don't have sources for. ;-)

_______________________________________________
avrdude-dev mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/avrdude-dev
Reply | Threaded
Open this post in threaded view
|

Re: How to set usb port as default?

László Monda
I can see the following relevant programmer definitions for avrisp2 in
avrdude.conf:

programmer
  id    = "avrisp2";
  desc  = "Atmel AVR ISP mkII";
  type  =  stk500v2;
;

programmer
  id    = "stk500v2";
  desc  = "Atmel STK500 Version 2.x firmware";
  type  = stk500v2;
;

I cannot see connection type being part of these programmer definitions.

Also, default_usb = "usb"; seems to produce the
error at /etc/avrdude.conf:19 unrecognized character: "d"
error message

On Sun, Jan 19, 2014 at 1:02 PM, Joerg Wunsch <[hidden email]> wrote:

> As László Monda wrote:
>
>> Instead of supplying "-P usb" in the command line every time I'd like
>> to set it as a default.  The following directives in the configuration
>> file didn't do the trick:
>
> Vor which programmer type?
>
> The default connection type is part of the programmer definition in
> avrdude.conf.  Depending on that, the following switch statement then
> decides about the portname to use in absence of a -P option:
>
>   if (port == NULL) {
>     switch (pgm->conntype)
>     {
>       case CONNTYPE_PARALLEL:
>         port = default_parallel;
>         break;
>
>       case CONNTYPE_SERIAL:
>         port = default_serial;
>         break;
>
>       case CONNTYPE_USB:
>         port = DEFAULT_USB;
>         break;
>     }
>   }
>
> --
> cheers, Joerg               .-.-.   --... ...--   -.. .  DL8DTL
>
> http://www.sax.de/~joerg/
> Never trust an operating system you don't have sources for. ;-)



--
László Monda <http://Monda.hu> | <http://UltimateHackingKeyboard.com>

_______________________________________________
avrdude-dev mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/avrdude-dev
Reply | Threaded
Open this post in threaded view
|

Re: How to set usb port as default?

Joerg Wunsch
As László Monda wrote:

> I can see the following relevant programmer definitions for avrisp2 in
> avrdude.conf:
>
> programmer
>   id    = "avrisp2";
>   desc  = "Atmel AVR ISP mkII";
>   type  =  stk500v2;
> ;

That probably lacks a

    connection_type = usb;

statement.  (The AVRISPmkII is USB-only.)

> Also, default_usb = "usb"; seems to produce the
> error at /etc/avrdude.conf:19 unrecognized character: "d"
> error message

Yes, there's a default_serial and default_parallel, but no
default_usb.  Wouldn't make much sense anyway, since the only valid
argument to it were "usb" (except of the ability to specify a serial
number).
--
cheers, Joerg               .-.-.   --... ...--   -.. .  DL8DTL

http://www.sax.de/~joerg/
Never trust an operating system you don't have sources for. ;-)

_______________________________________________
avrdude-dev mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/avrdude-dev
Reply | Threaded
Open this post in threaded view
|

Re: How to set usb port as default?

René Liebscher
In reply to this post by László Monda
Hi,

connection_type is used from avrdude 6.x. You seem to use avrdude 5.11
or earlier? (avrdude 6.x has changed from type=stkv500v2 to type="stk500v2")

You better provide for any questions to the mailing list, the version
you use and your command line and any other relevant setup.


Kind regards

René


Am 19.01.2014 13:37, schrieb László Monda:

> I can see the following relevant programmer definitions for avrisp2 in
> avrdude.conf:
>
> programmer
>   id    = "avrisp2";
>   desc  = "Atmel AVR ISP mkII";
>   type  =  stk500v2;
> ;
>
> programmer
>   id    = "stk500v2";
>   desc  = "Atmel STK500 Version 2.x firmware";
>   type  = stk500v2;
> ;
>
> I cannot see connection type being part of these programmer definitions.
>
> Also, default_usb = "usb"; seems to produce the
> error at /etc/avrdude.conf:19 unrecognized character: "d"
> error message
>
> On Sun, Jan 19, 2014 at 1:02 PM, Joerg Wunsch <[hidden email]> wrote:
>> As László Monda wrote:
>>
>>> Instead of supplying "-P usb" in the command line every time I'd like
>>> to set it as a default.  The following directives in the configuration
>>> file didn't do the trick:
>> Vor which programmer type?
>>
>> The default connection type is part of the programmer definition in
>> avrdude.conf.  Depending on that, the following switch statement then
>> decides about the portname to use in absence of a -P option:
>>
>>   if (port == NULL) {
>>     switch (pgm->conntype)
>>     {
>>       case CONNTYPE_PARALLEL:
>>         port = default_parallel;
>>         break;
>>
>>       case CONNTYPE_SERIAL:
>>         port = default_serial;
>>         break;
>>
>>       case CONNTYPE_USB:
>>         port = DEFAULT_USB;
>>         break;
>>     }
>>   }
>>
>> --
>> cheers, Joerg               .-.-.   --... ...--   -.. .  DL8DTL
>>
>> http://www.sax.de/~joerg/
>> Never trust an operating system you don't have sources for. ;-)
>
>


_______________________________________________
avrdude-dev mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/avrdude-dev
Reply | Threaded
Open this post in threaded view
|

Re: How to set usb port as default?

Joerg Wunsch
As René Liebscher wrote:

> connection_type is used from avrdude 6.x. You seem to use avrdude
> 5.11 or earlier? (avrdude 6.x has changed from type=stkv500v2 to
> type="stk500v2")

You're probably right, yes.  I just checked, and avrdude.conf in
version 6+ already correctly has "connection_type = usb;" for the
AVRISP mkII, so it doesn't even consider a standard serial port
anymore.

Before version 6, the entire default port selection was rather twisted
in the code.
--
cheers, Joerg               .-.-.   --... ...--   -.. .  DL8DTL

http://www.sax.de/~joerg/
Never trust an operating system you don't have sources for. ;-)

_______________________________________________
avrdude-dev mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/avrdude-dev
Reply | Threaded
Open this post in threaded view
|

Re: How to set usb port as default?

Jonathan Schneider
> Before version 6, the entire default port selection was rather twisted
> in the code.

Great. My issue was somewhat related but this statement gives me some
confidence things will work a lot better with version 6.

I have a genuine ISP mkII on the way so will have more combinations of
programming software, hardware and OS to check out than you can shake a
stick at shortly.

Jon



_______________________________________________
avrdude-dev mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/avrdude-dev
Reply | Threaded
Open this post in threaded view
|

Re: How to set usb port as default?

Joerg Wunsch
As Jon Schneider wrote:

> > Before version 6, the entire default port selection was rather twisted
> > in the code.
>
> Great. My issue was somewhat related but this statement gives me some
> confidence things will work a lot better with version 6.

Yes, I think, occasionally things really change to the better. :-)

--
cheers, Joerg               .-.-.   --... ...--   -.. .  DL8DTL

http://www.sax.de/~joerg/
Never trust an operating system you don't have sources for. ;-)

_______________________________________________
avrdude-dev mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/avrdude-dev
Reply | Threaded
Open this post in threaded view
|

Re: How to set usb port as default?

László Monda
In reply to this post by Joerg Wunsch
> You better provide for any questions to the mailing list, the version
> you use and your command line and any other relevant setup.

I'm sorry about that, I should have provided that info, indeed.
Version 5.11.1 and
avrdude -p atmega88 -c avrisp2 -P usb -U flash:w:UltimateHackingKeyboard.hex

> Before version 6, the entire default port selection was rather twisted
> in the code.

So according to the above isn't there any way to make "-P usb" the
default in the config file?

--
László Monda <http://Monda.hu> | <http://UltimateHackingKeyboard.com>

_______________________________________________
avrdude-dev mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/avrdude-dev
Reply | Threaded
Open this post in threaded view
|

Re: How to set usb port as default?

Joerg Wunsch
As László Monda wrote:

> So according to the above isn't there any way to make "-P usb" the
> default in the config file?

Unfortunately, I think so, yes.

Is there any reason for you to not upgrade to version 6?
--
cheers, Joerg               .-.-.   --... ...--   -.. .  DL8DTL

http://www.sax.de/~joerg/
Never trust an operating system you don't have sources for. ;-)

_______________________________________________
avrdude-dev mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/avrdude-dev
Reply | Threaded
Open this post in threaded view
|

Re: How to set usb port as default?

Joerg Wunsch
As Joerg Wunsch wrote:

> As László Monda wrote:
>
> > So according to the above isn't there any way to make "-P usb" the
> > default in the config file?
>
> Unfortunately, I think so, yes.

Just to complete this: I just tested

default_serial = "usb";

in ~/.avrduderc for a JTAGICE mkII (which defaults to a serial port
rather than USB) with version 6.0.1.  All works fine that way.
--
cheers, Joerg               .-.-.   --... ...--   -.. .  DL8DTL

http://www.sax.de/~joerg/
Never trust an operating system you don't have sources for. ;-)

_______________________________________________
avrdude-dev mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/avrdude-dev
Reply | Threaded
Open this post in threaded view
|

Re: How to set usb port as default?

László Monda
In reply to this post by Joerg Wunsch
On Mon, Jan 20, 2014 at 1:16 PM, Joerg Wunsch <[hidden email]> wrote:
> As László Monda wrote:
>
>> So according to the above isn't there any way to make "-P usb" the
>> default in the config file?
>
> Unfortunately, I think so, yes.
>
> Is there any reason for you to not upgrade to version 6?

Apart from the upgrade hassle nothing, but I will have to upgrade
anyways as soon as my package from http://pinocc.io/ eventually
arrives.  :)

Thank you for your support!

> --
> cheers, Joerg               .-.-.   --... ...--   -.. .  DL8DTL
>
> http://www.sax.de/~joerg/
> Never trust an operating system you don't have sources for. ;-)
>
> _______________________________________________
> avrdude-dev mailing list
> [hidden email]
> https://lists.nongnu.org/mailman/listinfo/avrdude-dev



--
László Monda <http://Monda.hu> | <http://UltimateHackingKeyboard.com>

_______________________________________________
avrdude-dev mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/avrdude-dev