arduino yun using git through putty

I'm definitely a noob to arduino and the linux world. I recently bought an arduino yun mainly so I can run autobahn on it to connect to it through wifi and a web interface. I'm using this tutorial: http://tavendo.com/blog/post/arduino-yun-with-autobahn/ and I've gotten all the way down to "Running the Demo" which uses git. The "Get the Demo" instructions says "The full demo code resides under examples/wamp/serial2ws in the AutobahnPython Git repository here." and to run "git clone git@github.com:tavendo/AutobahnPython.git" which I'm trying to do through putty. Of course, when I try to run that in putty, it's telling me "-ash: git: not found" .

Can someone tell me how I get putty to see a git repository? and/or if I'm suppose to install something else, and if so instructions on how to do that?

Many thanks in advance!

Did you install git?

opkg update opkg install git

@bjarne - when i try to install git, I’m getting the following:

root@Arduino:~# opkg install git
Unknown package ‘git’.
Collected errors:

  • opkg_install_cmd: Cannot install package git.

Did you first do the opkg update

I did, and I thought it worked cause it started downloading but looking closer, it failed:

root@Arduino:~/.ssh# opkg update Downloading http://download.linino.org/dogstick/all-in-one/latest/packages//Packages.gz. Updated list of available packages in /var/opkg-lists/barrier_breaker. Downloading http://download.linino.org/dogstick/all-in-one/latest/packages//Packages.sig. Signature check failed. Remove wrong Signature file.

OK, I think I have seen somebody else having the problem with updating, but I think you need somebody smarter than me to help you :frowning:

I searched for 'opkg update failed' and got a few hits. Only one claimed to have fixed his issue:

http://forum.arduino.cc/index.php?topic=199167.0

Maybe I don't have SSH setup correctly on the Yun? Does anyone know how to get that setup? I don't think I even have public or private keys loaded on it.

That link might help regarding DNS, but I have no idea how to edit that particular setting. any ideas?

Thanks everyone for your help!

Did you upgrade your Yun per http://forum.arduino.cc/index.php?topic=235360.0 If not, that might be a good start.

@bjarne - Good find for updating the Yun! I went to try and follow the instructions. I'm just unsure how to get the .bin file to the SD card. I tried to just insert back into my PC so it shows up as a drive, and I just pasted it there, but when I went back to the Yun, put the SD Card back in it, it couldn't find the .bin file. My apologies for being such a NOOB but any help would be most appreciated! Thanks!

It has been a while since I upgraded, but I don't remember any problems following the instructions, and I believe I just copied the .bin file to the root of the microSD card. What was the exact name of the .bin file? Can you see the card and the file on the Yun with ls /mnt/sd/

The name of the file is: openwrt-ar71xx-generic-yun-16M-squashfs-sysupgrade.bin

Here's what it looks like when i run, ls /mnt/sda1/:

root@Arduino:/mnt/sda1# ls /mnt/sda1/ arduino sda1 root@Arduino:/mnt/sda1#

So it looks like he's reading the SD card ok, yea?

Yes, but it does not look like the upgrade file is there in the root !

But it looks like there is also a subdirectory sda1 there, what is in there? It should not be there, so I think your directory structure is messed up, maybe your .bin file is one level to far down.

Do you have any instructions on how I can just start over completely? Like format the card through putty, move the bin file (somehow) from my PC to the card through putty, and then run the upgrade? I've been googleing for a way to do this, but haven't found anything yet.

OK, I don't think there is any reason to completely start over since you can read your SD card. Since you are using PuTTY I am assuming that you are on Windows (I am on Mac), so I see two ways to go ahead:

  1. The easiest is to mount the SD card in Windows and make sure the upgrade file is in the root, NOT in a subdirectory called sda1.

OR,

  1. I f you haven't already, download pscp.exe from the same place you got PuTTY. Put it in the same directory where you have the upgrade file, cd to that directory, and issue the following command: pscp openwrt-ar71xx-generic-yun-16M-squashfs-sysupgrade.bin root@10.0.10.26:/mnt/sda1/ substitute the IP address of your Yun for 10.0.10.26

Let me know how it goes, good luck.

Again, my apologies for being such a NOOB. Thank you for all of your assistance.
So, for the first option, when I take the SD card out of the Yun and put it into my laptop directly to have windows see it, it asks me if I want to format it (more specifically that it needs to format it). If I click cancel and try to get to the drive through explorer, I get the attached error.

I also tried to make sure to unmount it from the Yun before taking it out, but it couldn’t find “unmount”, so I just did a cold-boot (unplugged power) and took it out.

I know you’re a mac guy but, Any ideas to get to it without having to format it?

That is strange, I thought you copied files to the card in Windows earlier?

If you don't have anything important on the card, I would format it FAT32 in Windows (and put an empty arduino subdirectory on it for use with sketches). Then copy the upgrade file to the root of the sd card.

Or, since you could read the card in Yun, you could try the second option I listed.

The first time I got the same error but just said to format it. Then did what you suggested. But without the arduino subdir. and copied the .bin file to the directory.

I just tried the second option, but now I’m just getting a “Failure” …see attached screenshot

6-2-2014 1-59-03 PM.png

Can you still see the SD card with ls /mnt/sda1/

I don't see the trailing '/' on the command line in your image, I am not sure it matters, though.

Are you sure the card is not write-protected? Can you copy any file to it on the Yun?

What Speed Class is your SD card?

Yeah, looks like it’s still there, see attached image.

Dumb question, how to I write a file to it from the Yun?

I’m not sure what speed class it is. I thew the packaging away and it doesn’t say on the card.

6-2-2014 2-29-12 PM.png