1 (edited by ephestione 2015-12-31 11:35:15)

Topic: FreeLSS:Error saving settings (and wrong pin defaults?)

I just got my build of scanner somewhat ready, everything is connected and wired, freelss is running and it corretly shows the image from camera in the Camera webpage.
Neither motor rotation (which is "noisy" as soon as I power up the system, is it normal?) nor laser activation work, since I need to change the pins (default ones, as per WiringPI schematics, are not the same as the FreeLSS perfboard schematics which I followed), anyway I cannot seem to make the program save the settings.
Either from the main settings configuration (number of lasers used, resolution and such) or from the Setup page (laser position, pins settings etcetera) when I press the Save button I get a blank page with a big Times New Roman text saying:
___________
ERROR
Error opening properties file for writing:
___________

And nothing more, and in fact the settings don't get saved.


BTW (this is the second issue) as per these:
https://s3.amazonaws.com/freelss/bb.png
https://www.raspberrypi.org/documentati … nd-raspi2/
https://www.raspberrypi.org/documentati … /README.md
http://wiringpi.com/pins/

Left laser in wiringpi should be pin0 instead of the default 4.
Right laser should be 4 instead of 5
Motor enable should be 1 instead of 7
and so on

Am I missing something?
I cannot set those anyway, since settings don't get saved sad

2 (edited by C_D 2015-12-31 12:23:09)

Re: FreeLSS:Error saving settings (and wrong pin defaults?)

I have exactly the same problems as you. Thankfully my electronics are still on prototyping board so I could change my pins to suit, but not saving settings is a pain.

I notice if I run freelss as root I can save settings without the error, however they don't seem to actually get saved. When I restart the program they are not available to reload.

Edit:
Should add I am using the most recent version from github, I will buy a licence as soon as they are available to get the latest version but currently only complete scanner kits are available. It would be nice to get this version working so I can get scanning though!

3 (edited by ephestione 2015-12-31 14:18:30)

Re: FreeLSS:Error saving settings (and wrong pin defaults?)

Exactly! I just noticed they get saved "in session", even with the error, but get lost after a reboot. FreeLSS must be run as root in any case, even if that doesn't seem to allow the settings file to be written to, for some reason.

Alas, I have everything soldered from start on a raspberry prototyping board big_smile Very short lived as a decision, but I didn't have a proper perfboard anyway since it hasn't arrived yet, and I was in a hurry to get it up and working.

I did change the pins correctly now, as per official GPIO reference vs wiringpi vs freelss schematics, and now I get some kind of response from the lasers, even though they are erratic (sometimes one laser responds to the toggle function, the other does not, when I retoggle the first one the second turns off/on as well for no apparent reason... no idea what is happening), but still no response at all from the motor, which is buzzing the whole time.

Maybe downgrading FreeLSS to the version that was used by Bill Owens would get me a working device?

4

Re: FreeLSS:Error saving settings (and wrong pin defaults?)

I confirm default pins on freelss are wrong as per official perfboard schematics: in fact leaving the default associations, right laser is toggled when I toggle left laser, and left laser is turned on when I press disable motor.
Correct associations are as follows:

Right laser: 4
Left laser: 0
Motor enable: 1
Motor step: 2
Motor direction: 3

But these do NOT get saved sad
Or you could rewire pins according to default associations in freelss, but you still wouldn't be able to save presets between reboots sad

5

Re: FreeLSS:Error saving settings (and wrong pin defaults?)

Ok, as a very final strand of willpower, being it the last day of the year and just a few hours away from 2016, I rewired everything from the female pin connectors on the raspi protoboard to make it fit the "hardcoded" values in FreeLSS, and I do get a responsive scanner in that everything works, lasers are correctly activated and turntable is correctly rotated.
Overall, tho, it's still unuseable, since even "in session" I cannot save the settings (running as root), because they may show as having been saved (reloading the settings screens, they "stick") but the scanner still doesn't act on them.
For example, before I rewired according to hardcoded values, the correct pin settings were indeed saved into the user interface, but the signals were still being sent to the hardcoded pins (right laser toggled instead of left, motor disabling turning on left laser).
Now, since I have a 0.9° step motor, I tried setting 6400 steps per revolution instead of the default 3200, and like before, these values are saved into the user interface even if the "ERROR" message shows after I press save (I get the error message, but then I reload the settings screen and the values I put there are still at their place), but by instructing the software to do a 360° degree rotation of the turntable in the camera pane, I only get a 180° rotation, which means the software is still acting on the hardcoded value of 3200 steps per revolution, no matter what's showing in the settings dialogue.

So, like this, with settings not being saved, I cannot use the scanner, or I need to manually change the settings file (where is it located?)

Also, as someone else reported in another thread, the preview during the scan doesn't show sad

HAPPY NEW YEAR PEOPLE! MAY 2016 BE FULL OF FAST, HIGH DETAIL SCANS!

6 (edited by C_D 2015-12-31 21:05:27)

Re: FreeLSS:Error saving settings (and wrong pin defaults?)

It appears running freelss with 'sudo freelss' allows me to save settings between reboots. However the daemon which is created with 'make start' doesn't save settings so I'm guessing is not running as root.

My settings file was saved under /root/.freelss.properties the daemon however doesn't see this settings file, its obviously looking for it somewhere else because its not running as root.

7

Re: FreeLSS:Error saving settings (and wrong pin defaults?)

FreeLSS must be ran as root.  This occurs automatically when executing the daemon but when executing via command line you must use sudo.

sudo ./freelss

FreeLSS will create a properties file at the users home directory which will be /.freelss.properties when running as a daemon but running from the command line will create it at /root/.freelss.properties.  This issue has been resolved in later versions of the ATLAS 3D software by defaulting to /var/lib/freelss instead of the users home directory.

I will look into the Error Saving Properties error that you are seeing.  Are you running the latest version of the code available on Github?  Does the software stop running when you receive this error, or can you hit the back button and continue to operate?

- Uriah

8 (edited by C_D 2016-01-01 20:35:19)

Re: FreeLSS:Error saving settings (and wrong pin defaults?)

I am running the latest github version, built a week or so ago. Runs fine from the command line with sudo freelss but the daemon won't save or load settings.

For me the software keeps running and I can go back, just no settings are saved.

9 (edited by ephestione 2016-01-02 13:18:20)

Re: FreeLSS:Error saving settings (and wrong pin defaults?)

Interesting find C_D, after I ran "make startup" I never went back to starting it manually so I really didn't have the opportunity to confront running it manually with sudo and having it autostart at boot.
I may just as well remove the autostartup and see.

Thank you Uriah, here it's the same as C_D, got freelss fresh off github on 31st dec, and I can continue using the software no matter how many times the error shows up.

EDIT: I can confirm: after removing freelss from startup and starting it manually, it still had the "correct" pin settings I had saved from the very first run (reading the file it could save back then), so this time I had to save the "old and wrong" pin settings since I didn't want to reset the connections on the protoboard.
I can now save both the general settings and the setup details, and maybe I can re-enable the startup by adding myself a "run as" command with sudo. Who knows?

In the meantime I'll be having "fun" calibrating everything.

EDIT 2: IT LIVES!!!! I didn't calibrate s**t and didn't even input measurements of the camera and laser position but I launched a low resolution test scan of a vase, and it produces shapes! Also the preview works!
I mean, not that I was expecting anything less, but having built everything myself now I feel enthusiast by witnessing the result smile

10

Re: FreeLSS:Error saving settings (and wrong pin defaults?)

Haha, pleased to hear you got it working. Can you use the high resolution camera modes? Mine currently fails to load the camera if I try the 5MP mode, I'm about to start a new thread for that...

11

Re: FreeLSS:Error saving settings (and wrong pin defaults?)

I am testing a 5MP scan right now, and it indeed works, even if several times slower... not yet totally calibrated, but I'll get there, in the end I'll feed it a plaster dental model which is the original intended use.

12

Re: FreeLSS:Error saving settings (and wrong pin defaults?)

All my problems are sold removing freelss form statup .

i confirm it works with "sudo freelss" manualy

any solution for an automated start working ?

13

Re: FreeLSS:Error saving settings (and wrong pin defaults?)

I second that, I never got automated start working properly either.

14

Re: FreeLSS:Error saving settings (and wrong pin defaults?)

Hey Guys,

  My name is Philip Hiatt;  I piddle and mess around with Linux quite often, and I am just now getting into this 3D thing.  If you want FreeLSS to autostart at boot just like you typed "sudo freelss" in the command line.  Do not create "make startup"; if you have then Do this from shell prompt;

sudo update-rc.d freelss remove

Otherwise Do this:

1- Create a shell script in the home directory(/home/pi), ie. $ nano freelss.sh
2- Add these lines;

#!/bin/bash
sudo freelss

3- If you haven't done this already;

$ cd /home/pi
$ cd .config
$ mkdir autostart
$ cd autostart
$ nano freelss.desktop

Enter this in the new file created; "freelss.desktop"

[Desktop Entry]
Type=Application
Exec=/home/pi/freelss.sh
Terminal=false
Notify=false

Save, close, then restart.

After restart, then FreeLSS should start with sudo privileges.

It works for me, I think I got the instructions correct; any question or problems, I will try to help or correct them.  Hope this helps!

15

Re: FreeLSS:Error saving settings (and wrong pin defaults?)

Thank you Phiatt. This solved our problem also.