Go Down

Topic: Warning: Problem accessing board folder /www/sd (Read 10341 times) previous topic - next topic

bill-lancaster

Went through the micro SD formatting business again, re-loaded the project and it all works.

Thanks mikeruss I discovered that fairly recently!

I also saw a post that suggested that the REST API access in the settings panel be set to 'open' (i.e. not password protected), but don't know if that made the the difference.

Thanks everyone for your help, I'm really pleased to get this up & running.

Bill

jessemonroy650

in case you dont know - if you place the www folder containing your php / html files in the same directory as your sketch, the IDE will upload them to the correct place on the SD card
mikeruss,
Can you start a new thread, and be a bit more verbose as to this comment. I am working on documentation for the Yun. I'd like to add your knowledge as a thread. In box me, I will send you the link to the documentation so far.

TIA
Jesse

bill-lancaster

Yes, Jesse.  I'm happy to to help.
Can you be more specific?

jessemonroy650

Yes, Jesse.  I'm happy to to help.
Can you be more specific?
Well, either this is documented somewhere, or somehow you guys discovered it.
What exactly do I have to do? What exactly are the results?
Please remember, I'm documenting this, and possibly quoting you, or  pointing to the documentation.
I'm not looking to write instructions, per se.

TIA
Jesse

bill-lancaster

To start with, setting up the Yun was so easy.  Following the instruction at "Configuring the onboard WiFi" in
Code: [Select]
http://arduino.cc/en/Guide/ArduinoYun was straight forward.

Then following the instructions at
Code: [Select]
http://arduino.cc/en/Tutorial/TemperatureWebPanel things start to go wrong.

The first instruction is:-
Quote
Prepare your SD card with an empty folder in the SD root named "arduino" and a subfolder of that named "www". This will ensure that the Yún will create a link to the SD to the "/mnt/sd" path.
but having just re-formatted the micro SD I didn't realise that these folders had already been created.

The project notes say to connect the tmp36 to pin 1 on the Yun.  tmp36 has three pins but It didn't take too long to find out what to with them.

Eventually, I was surprised to learn that the Arduino IDE manages the reproduction of key folders from pc to Yun.  At the moment I can't find the source of this information.

Sometimes references to certain folders is ambiguous since they may me pc or Yun based..

I don't know if this is what you're looking for but I hope it helps.

Bill

ShapeShifter

The first instruction is:-  but having just re-formatted the micro SD I didn't realise that these folders had already been created.
Like I said before, you didn't just format the card: you ran the Yun disk expander sketch which does a heck of a lot more than format the card - it creates two partitions, formats the first as a Linux volume, copies the system to it, and sets it up to boot from there; then it formats the second partition as a data volume, and creates key folders. If you had simply formatted the card, the folders wouldn't be there. Please understand the difference here: if you simply tell people to format their card, they are not likely to run the disk expander sketch, so they won't automatically get those folders, and they will be confused.

Quote
Eventually, I was surprised to learn that the Arduino IDE manages the reproduction of key folders from pc to Yun.  At the moment I can't find the source of this information.
It is in the next paragraph of the page you quoted:
Quote
In this sketch folder is a basic webpage and a copy of zepto.js, a minimized version of jQuery. When you upload your sketch, these files will be placed in the /arduino/www/TemperatureWebPanel folder on your SD card.

bill-lancaster

Thank you ShapeShifter, perhaps with your useful additions this will be enough information for Jesse

jessemonroy650

Thank you ShapeShifter, perhaps with your useful additions this will be enough information for Jesse
Sorry bill-lancaster,
I was half-asleep when I responded. I was writing to mikeruss on how to put the www folders in the sketch folders. Not to belittle your problem, but it's fairly typical.

Jesse

poocho93

I have a noob question, what part of the code or file sets the url to be labeled "TemperatureWebPanel/"??

How can i change it if i want it to called "Temp1" for example? I dont see any part of the code that would define that

ShapeShifter

I have a noob question, what part of the code or file sets the url to be labeled "TemperatureWebPanel/"??

How can i change it if i want it to called "Temp1" for example? I dont see any part of the code that would define that
For that example, the general URL is http://<arduino_name>/sd/<sketch_name>/<page_name> where:
  • <arduino_name> is the name or address of the Yun
  • <sketch_name> is the name of the sketch (set when it was saved)
  • <page_name> is the name of the page (index.html is assumed if blank)

This is the format when you use the "automatic" upload over the WiFi option. Anything on your computer in <sketch_name>/www gets uploaded to the SD card at sd/<sketch_name>

So, using this automatic method, you set that name by saving the sketch.

pellumb

That doesn't really mean anything. The arduino folder (with the www folder) needs to be at the root level of the SD card, not at the system root level.

You can create the folder in the SD card root when it is mounted on another computer. Or if the SD card is mounted on the Yun, and you SSH to it, you need to create the folders:
  • /mnt/sda1/arduino
  • /mnt/sda1/arduino/www


you need not create:  mnt/sda1/arduino[/li]
[li]/mnt/sda1/arduino/www[/li][/list]  is wrong!

one only needs create arduino folder and inside it the www and it works;  I have no idea why some people confuse others!!!

ShapeShifter

is wrong!

one only needs create arduino folder and inside it the www and it works;  I have no idea why some people confuse others!!!
I think the confusion arises when one doesn't state what system they are using when they create the folders. We are both saying the same thing (you need to create a www folder inside an arduino folder) but we are probably describing it from different viewpoints.

It may be that you are talking about creating the SD card folders on your PC. In that case, the arduino folder is at the root of the SD card, and the www folder is inside it. One could say that the folders are \arduino and \arduino\www, but that is ambiguous because it does not specify the SD card, it could just as easily be any on any disk in the system. A more explicit way of specifying it would be f:\arduino and f:\arduino\www, or whatever drive letter is the SD card on your system if not f:. (I'm guessing you are on Windows, because a Linux or Mac system would be using something more like the path described in my next paragraph, although the mount point might be something other than sda1.)

On the other hand, what I'm describing is the procedure when the SD card is inserted into the Yun, and you are creating the folders on the Yun. I think this is reasonable because if the SD card was in the computer, you could just as easily copy the necessary files over and wouldn't need the automatic upload features of the IDE: if you are trying to automatically transfer the files with the IDE, the SD card needs to be in the Yun. With the card in the Yun, and typing commands from the Yun's SSH command line, the required folders are indeed /mnt/sda1/arduino and /mnt/sda1/arduino/www. Since the root of the SD card is mounted at /mnt/sda1, this puts the arduino folder at the root of the SD card, where it needs to be.

If, while working at the Yun, one creates the folders /arduino and /arduino/www, they will be at the root of the overall system, and not on the SD card. They will not have the desired functionality there: the arduino folder won't trigger the recognition of the SD card to be mounted at /mnt/sd and allow automatic file uploads by the IDE; and the arduino/www folder will not be accessible by the web server.

It is confusing when the assumptions behind a statement are not stated (like how i didn't say that the /mnt/sda1/arduino path is as it would appear on the Yun, I assumed that was clear from the path format) but it is just as confusing (if not more) when the assumptions are misunderstood by someone who claims the information is wrong when they make different assumptions.

What you claim to be wrong is most certainly correct - the only error was not explaining the context clearly enough.

ShapeShifter

#27
Dec 16, 2015, 02:46 pm Last Edit: Dec 16, 2015, 02:47 pm by ShapeShifter
pellumb: I just read through this old thread again, and re-read your last post, and noticed that in the post you quoted, I did explicitly state that the folders I mention are when the SD card is mounted on the Yun. I take back my comment in the last post where I say I didn't give proper context - I did. I'm not sure why it's confusing.

On the other hand, I really have no idea what you are trying to communicate here, I find that it's your post which is confusing:

you need not create:  mnt/sda1/arduino
/mnt/sda1/arduino/www  is wrong!

one only needs create arduino folder and inside it the www and it works;  I have no idea why some people confuse others!!!
I say you need to create two folders. You say that's wrong, and then say you need to create this same two folders. Where are you creating those folders if not in /mnt/sda1? If they are anywhere else they won't have the desired effect.

jonahn2

Hey guys. Figured it out...

You need to use this line of code
Code: [Select]
ln -s /mnt/sda1/arduino/www /www/sd

and you cant have a folder sd in /www/
It will create a symbolic link which looks like this...

Go Up