avrdude icon indicating copy to clipboard operation
avrdude copied to clipboard

[patch #9565] Patch for WiFi AVR Programmer, uPDI support for jtagmkII, and serial-over-network improvements

Open avrs-admin opened this issue 3 years ago • 5 comments

Wed 14 Feb 2018 04:29:49 PM UTC

Here are a set of patches against trunk which add the following features:

  • support for my WiFi-enabled AVR programmer which I’ve just started selling commercially,
  • support for uPDI in the jtagmkII protocol (used by the above programmer),
  • tweak serial timeout in ser_posix.c/ser_win32.c to be more network-friendly.

The programmer supports ISP, PDI and uPDI using the jtagmkII protocol using the "-p net::" option. It also supports ISP and PDI over stk500v2, and I may extend that to uPDI later.

Steve

file #43314: avrdude-wavr-jtag2-updi.diff.gz

This issue was migrated from https://savannah.nongnu.org/patch/?9565

avrs-admin avatar Dec 13 '21 21:12 avrs-admin

Joerg Wunsch <joerg_wunsch> Tue 09 Nov 2021 09:32:45 PM UTC

I reviewed the patch, and mostly like it.

What I don't understand is why this SERIAL_ETHERNET_TIMEOUT is needed. The basic idea behind that serial_recv_timeout variable is that individual drivers might override the default. Why can't that also be used for the network traffic here?

avrs-admin avatar Dec 13 '21 21:12 avrs-admin

Steve Woodford Wed 10 Nov 2021 08:06:52 AM UTC

Thanks for looking over the patch.

From memory, I think the fixed ethernet timeout was required because round-trip times for TCP over WiFi can exceed the low values set by some drivers.

For instance, jtag3.c sets serial_recv_timeout to 100 mS, which is cutting it fine on a moderately congested WiFi connection.

Steve

avrs-admin avatar Dec 13 '21 21:12 avrs-admin

Joerg Wunsch <joerg_wunsch> Sun 21 Nov 2021 09:22:30 PM UTC

Well, all that timeout handling is a mess. A lot of that is probably just heritage from AVRDUDE's 22-year old history.

I wonder whether there's a better way than introducing just another timeout hack^H^H^H^Hsetting though.

The jtagmkII.c code tries to implement a kind of adaptive timeout setting, by doubling the value on missed transactions. Doesn't that already help in your case?

Short of that, maybe we should implement a kind of per-programmer notion of a short vs. long timeout (defaulting to 100 ms / 5 s) that is subsequently be used to toggle between both values. Then, the wavr programmer driver could establish a longer "short" timeout than those 100 ms.

How does that sound?

avrs-admin avatar Dec 13 '21 21:12 avrs-admin

Well, all that timeout handling is a mess. A lot of that is probably just heritage from AVRDUDE's 22-year old history.

Since this is targeted for avrdude 7.1 milestone, maybe the timeout improvement can be seperated into a general improvement.

Ref: existing enhancement request related to timeout.

  • https://github.com/avrdudes/avrdude/issues/332
  • https://github.com/avrdudes/avrdude/issues/336

mcuee avatar Jul 28 '22 00:07 mcuee

By the way, the info about the WiFI AVR programmer is here. https://www.maverick-embedded.co.uk/?page_id=20

mcuee avatar Aug 28 '22 00:08 mcuee

@dl8dtl and @stefanrueger

I think we can defer this one and remove the 7.1 milestone flag.

jtag2updi has already been added to support UPDI parts. Serialupdi has also been added. So there is no high priority to add this paticular programmer which does not seem to be popular yet.

mcuee avatar Nov 10 '22 13:11 mcuee

Well, I do have the hardware here, and we've got a patch. So I think it would be fair to at least have it in 7.1 (after it didn't make it into 7.0). The patch just doesn't apply anymore, alas. It needs a bit of care now, but the longer we keep it back, the harder it's going to be.

dl8dtl avatar Nov 10 '22 22:11 dl8dtl

Well, I do have the hardware here, and we've got a patch. So I think it would be fair to at least have it in 7.1 (after it didn't make it into 7.0). The patch just doesn't apply anymore, alas. It needs a bit of care now, but the longer we keep it back, the harder it's going to be.

Good to hear that you have the hardware and intend to merge it before 7.1 release.

mcuee avatar Nov 10 '22 22:11 mcuee

Will do my best …

dl8dtl avatar Nov 10 '22 22:11 dl8dtl

Will do my best …

Thanks. I think no need for you to feel the pressure as this is not a paid work. It is perfectly fine if this is pushed further to a date after the 7.1 release, as it is an enhancement.

I tend to think it is good to have a release as the Christmas present as there are enough good changes in avrdude already.

mcuee avatar Nov 11 '22 09:11 mcuee

A Christmas release would be fine with me, too.

dl8dtl avatar Nov 11 '22 22:11 dl8dtl

@dl8dtl I shifted this to AVRDUDE 7.2 milestone. But I think we can always delay it if necessary.

mcuee avatar Mar 27 '23 02:03 mcuee

So, what should we do with this patch?

The Mavericks Embedded company closed down in March 2022, and their website is also down. The programmer itself is also marked as retired on Tindie.

I suggest we close this one as "Not planned".

MCUdude avatar Jun 20 '23 07:06 MCUdude

@MCUdude

I agree with you.

@dl8dtl

Any objections?

mcuee avatar Jun 20 '23 08:06 mcuee

The company is a Brexit victim. :-( He donated me one of those programmers for tests, so I feel a bit guilty … I tried to fix up those patches before, but the codebase has changed quite a bit since (even before the move to Github), so it's not so easy. I still think the idea of a WiFi-attached programmer has some merit.

dl8dtl avatar Jun 20 '23 20:06 dl8dtl

I still think the idea of a WiFi-attached programmer has some merit.

I think there are already WiFi and Bluetooth enabled Arduino compatible board already.

For Bluetooth, they just expose a serial port so there is no need to change anything on avrdude side.

I am not so sure about WiFi side. Arduino Uno WiFi Rev 1 supports OTA. https://docs.arduino.cc/retired/getting-started-guides/ArduinoUnoWiFi (Rev 1, retired)

Arduino Uno WiFi Rev 2 does not seem to support OTA.

mcuee avatar Jun 21 '23 02:06 mcuee

Close this for now and convert it into a discussion.

mcuee avatar Feb 07 '24 12:02 mcuee