Errors on mesa-card selection

More
11 Jul 2020 15:45 #174308 by Reinhard
Hi,

after a harddisk failure I had to setup my linuxcnc from scratch.
Base system installed, linuxcnc compiled and xml-file created by mesaflash.
$ ls -l /lib/firmware/hm2/5i24
-rw-r--r-- 1 root root 464852 Jul 11 17:03 5i24_16_sibitest.bit
-rw-r--r-- 1 root root  19852 Jul 11 17:03 5i24.xml

On selecting 5i24 following error pops up:
LinuxCNC Version:  2.9.0~pre0

Traceback (most recent call last):
  File "/usr/local/src/linuxcnc-dev/bin/pncconf", line 1997, in on_mesa_boardname_changed
    self.fill_firmware(boardnum)
  File "/usr/local/src/linuxcnc-dev/bin/pncconf", line 2006, in fill_firmware
    self.mesa_firmware_search(title)
  File "/usr/local/src/linuxcnc-dev/bin/pncconf", line 903, in mesa_firmware_search
    self._p.FIRMDIR,boardtitle,currentfirm+".xml"))
  File "/usr/local/src/linuxcnc-dev/bin/pncconf", line 1043, in parse_xml
    tempfunc = tempfunc.upper().strip() # normalise capitalization: Peters XMLs are different from linuxcncs
AttributeError: 'NoneType' object has no attribute 'upper'

I tried to save the results anyway but did not entered enuf data, so the next error pops up:
Traceback (most recent call last):
  File "/usr/local/src/linuxcnc-dev/bin/pncconf", line 2360, in on_mesa_component_value_changed
    self.set_mesa_options(boardnum,title,firmware,numofpwmgens,numoftppwmgens,numofstepgens,numofencoders,numofsserialports,numofsserialchannels)
  File "/usr/local/src/linuxcnc-dev/bin/pncconf", line 2388, in set_mesa_options
    dbg('current firmware:\n%r'%self._p.MESA_FIRMWAREDATA[search],mtype='curfirm')
UnboundLocalError: local variable 'search' referenced before assignment

How can I proceed?

Please Log in or Create an account to join the conversation.

More
11 Jul 2020 16:40 #174312 by cmorley
You could try the discovery method (not well tested):

start pncconf and select the check box 'show advanced pages'
work your way to the mesa page.
make sure for mesa card is connected and fully powered up.
select 'discovery option' under the board name.
press the 'board discovery' button and follow the dialog prompts.

Let me know how that works.
The following user(s) said Thank You: TurBoss

Please Log in or Create an account to join the conversation.

More
11 Jul 2020 18:28 #174316 by cmorley
looking at the code this might fail do to root privledges being required for mesa flash.

here is way around that.
in a terminal run
 pkexec sh -c 'mesaflash --device 5i24;mesaflash --device 5i24 --sserial;mesaflash --device 5i24 --readhmid'
copy the output into the clipboard.
start pncconf from terminal with pncconf -d debug
again with the 'show advanced pages'
when you get to the mesa page click the help button and paste the copied output from mesaflash to the input text page.
then click the discovery button and follow the dialog.

Chris
The following user(s) said Thank You: Reinhard

Please Log in or Create an account to join the conversation.

More
12 Jul 2020 04:46 #174355 by Reinhard
Hi Chris,

thank you for your help!

I needed a while to find the discovery button - but then it worked fine.
Didn't know pkexec. Why not just use sudo? Works the same :)
I first started the command in a remote terminal session and the command failed with "no session for cookie" / not authorized ...
I had no glue about that error message so I executed it from a gui-terminal, where it worked as expected. The gui-dialog for password input makes the command fail from remote terminal.
sudo works in both cases :)

Some notes:
I noticed, that the name of axis gui gets translated. Guess, that's not a good idea.
Well axis is a keyword in linuxcnc and the name of a gui - but imho names should never be translated.

Then I would appreciate a save button (in early pages), even if you don't entered data for all pages yet. There's so much input and if you make a mistake or run out of time you loose all input and have to restart from scratch.
Therefore it would be nice, to be able to save an incomplete work and continue another day ...
You could flag the output for being incomplete.

cheers Reinhard

Please Log in or Create an account to join the conversation.

More
12 Jul 2020 05:08 #174356 by cmorley
I'm glad it worked :)
i should probably put some default firmware definitions for the 5i24 too..

I used pkexc because I copy and pasted from pncconf - pkexc is needed inside of pncconf of course.

Next time you get an update - pncconf's discovery should work properly again.

Axis was translated in the INI or just on the pncconf page? I should probably fix that.
A save button - I'll have to try that - it would be handy.

thanks for the feedback.

Please Log in or Create an account to join the conversation.

More
12 Jul 2020 05:58 #174358 by cmorley
Save data button added...Thanks for the great idea!



Chris
Attachments:

Please Log in or Create an account to join the conversation.

More
12 Jul 2020 08:07 - 12 Jul 2020 08:11 #174361 by Reinhard
Hi Chris,

thank you for your fast reaction!

I refreshed repository, but I don't get a save button.
... and my window looks quite different than yours.
What desktop are you using?
.

Axis was translated in the INI or just on the pncconf page?

In pncconf - page "Screen" in the "GUI Screen list"-combobox.

May be, you could add the save option to the window-closing dialog, when hitting the cross icon from titlebar to close application. That's the only way out, so may be good place?

cheers Reinhard
Last edit: 12 Jul 2020 08:11 by Reinhard.

Please Log in or Create an account to join the conversation.

More
12 Jul 2020 08:22 #174362 by cmorley
Yes looks like the buildbot is stuck..so no new updates till fixed.

I use Mint 13

I couldn't figure out how to get it to not translate.

Yes that could be handy to save before quit too.

Please Log in or Create an account to join the conversation.

More
12 Jul 2020 12:46 #174381 by Reinhard

Yes looks like the buildbot is stuck..

No, my fault.
Didn't was aware, that changes in python scripts require a run of make :ohmy:
.

I use Mint 13

Looks very nice in deed!
I tried xfce actually, as it seems to be new default of linuxcnc, but I can't find it usable.
May be I'm too old - I miss so many kde features, I'm used to ...
.

I couldn't figure out how to get it to not translate.

When you open screen.glade with a text-editor and search for "screen_names", then you find out, that each entry is tagged with an attribute "translatable". Turn that attributes to "no" and the problem is fixed ;)

cheers Reinhard

Please Log in or Create an account to join the conversation.

More
13 Jul 2020 05:42 #174458 by cmorley
Ahh I assumed you were using a installed version... yes some python needs 'compiled', which I think actually just moves them.

mint 13 with cinnamon; probably cinnamon is possible in other distributions.

Thanks I fixed the translation problem with your instructions.

I changed the save data button to the quit dialog and improved the quit dialog's messages

Chris
The following user(s) said Thank You: tommylight

Please Log in or Create an account to join the conversation.

Moderators: cmorley
Time to create page: 0.104 seconds
Powered by Kunena Forum