Yes, when programming over wifi the AR9331 acts like a ICSP. /usr/bin/run-avrdude uses the linuxgpio programmer and the circuitry is on the lower right of page 4 in the schematics for the Yun.
You should be able to program through wifi if you deselect both the lcd and sd card reader with their slave selects, but I can't confirm this without a screen.
I have this same problem trying to program via ethernet connection. Is there workaround that will allow remote programming?
@NoblePepper.. are you suggesting that the running code have a "quiesce" state to de-assert all slave selects before initiating re-programming via the network?
mdoan7:
I have this same problem trying to program via ethernet connection.
Yes, it is the same problem. So much of the Yun documentation talks about doing things over "WiFi" but unless it is specifically related to associating with a wireless access point, it's a pretty safe bet that the Ethernet connection will have the same abilities and limitations. Whever the Yun documentation says "WiFi" it's a pretty safe bet you can read it as "network" (meaning wirelsss or Ethernet.) It's definitely true in this case.
are you suggesting that the running code have a "quiesce" state to reassert all slave selects before initiating re-programming via the network?
That may not be enough. You need to make sure that nothing is interfering with the ICSP lines. That means nothing driving the lines, and nothing loading down the lines too much.
Having the sketch software put any slave selects idle won't buy you much, because as soon the programming process starts the processor has been reset and is no longer running your code. All processor I/O lines should go to a high impedance state during programming, and any drivers connected to the ICSP lines will probably need a pullup to make the chip select inactive when there is nothing driving the line.
However, in the case of the LCD board mentioned in the initial post, the MISO line is always driven by the line driver IC3, pin 4. In that circuit, there is no way to disable that output, because even though it is a tri-state driver, they have hard grounded the enable line rather than connecting it to the chip select line. So that means the only way to program a sketch over the network when using that board is to physically disconnect it. That also means that the display won't play nicely with other SPI devices that one might want to use. How unfortunate.
@ShapeShifter, thanks. I was just noodling the reset issue and came to the same conclusion. My spi components (lcd and nfc reader) play nicely together so perhaps I'll try adding pull-up to their SS lines and see if that fixes this particular setup.
Yes, it's sad that something so advertised doesn't actually work (been scratching my head and living with it for nearly a year now... thought I was going bonkers).