Mesa firmware update {install} on linuxcnc load

More
13 May 2022 13:37 - 13 May 2022 13:39 #242874 by robertspark
I've got a copy of the pathpilot install usb (not the firmware one the other one)

I had a go at installing pathpilot as when I was new and glossey eyed to linuxcnc it looked like eye candy

What I obviously noticed was that when the pc booted, and pathpilot detected the 7i92 it automatically flashed it to the correct pathpilot hardware firmware.

I know no one is going to answer questions on pathpilot and how it works.... however ...

I was wondering how mesaflash had been set to automatically read the attached hardware device and flash the right firmware on boot?

I was also wondering if this was done at every boot..... (I didn't think that would be very good but that is simply from my understanding of EEPROM's and write cycles)

What I'm trying to do is set up a PC for someone with their correct firmware for their hardware and I'm trying to make it as idiot proof (sorry, I'll use the Windows Phrase :) "Plug and Play" as possible)

So I thought I may be able to use this same {or similar} hardware detection and flash process to get mesaflash to load the custom firmware.

I did have a look at the hostmot2 man page and saw (whilst reading other things ) that there was a 'firmware' option for loadrt hm2 and I did wonder if that was how pathpilot was doing it or was there something else that they are doing that allows mesaflash to detect the board and load the right firmware (and prevent flashing the wrong firmware to the wrong board..... say flashing a 7i76e with 7i92 firmware).

linuxcnc.org/docs/devel/html/man/man9/hostmot2.9.html

I'm probably trying to be too smart for my own good here.... as I know how to obviously upload the firmware...... but I know that setup being "idiot proof" {sorry >> "plug and play"} would probably help new users with recieving a pre-configured PC and just plugging it in to all the peripherals (including a mesa card via ethernet).

Thanks for any guidance, much appreaciated.
Last edit: 13 May 2022 13:39 by robertspark.

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

More
13 May 2022 14:39 #242884 by PCW
You can use mesaflash to verify the EEPROM contents against the desired bitfile
in a script and if verify fails (non-zero return code), program the desired bitfile

I think Pathpilot does something similar
The following user(s) said Thank You: robertspark

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

More
13 May 2022 14:56 #242888 by robertspark
Thanks Peter, I'll give it a go

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

More
13 May 2022 15:29 - 13 May 2022 15:33 #242893 by snowgoer540
Somewhere in the pathpilot section there I swear I've seen a post regarding how to disable the firmware check. 

But the easier method is to just move the .bit file to the mesa folder for the configuration, and then change the line in the tormach_mill_base.ini file:

From:
BITFILE0=mesa/tormach_mill3.bit

To:
BITFILE0=mesa/<your_new_firmware>.bit

It will then use that bit file to do it's checking, and will flash the firmware once and then it will stick. 

Note that if you change any of the other stuff, like number of encorders, stepgens, etc.  You'll have to change the DRIVER_PARAMS portion to match.

That's what I do on my 1100S3 that I added an encoder to.  CliveS helped me work all of that out at the time :)
Last edit: 13 May 2022 15:33 by snowgoer540.
The following user(s) said Thank You: Clive S, robertspark

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

More
13 May 2022 15:44 #242894 by robertspark
Thanks snowgoer,

Note, I'm not trying to do it on a pathpilot setup (or change it) but do something similar with a default linuxcnc setup so that I could install linuxcnc on a PC for someone else and then just send them the PC and they can plug in all the devices and it will just load the firmware at time of linuxcnc starting.

I've got pathpilot set up on a virtual machine so I'll take a look at the detail / files.

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

More
13 May 2022 15:46 #242895 by snowgoer540
Oh, sorry about that definitely missed that part somehow 

But definitely a good place to look for their script to borrow from :)

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

More
13 May 2022 15:46 #242896 by robertspark
Thanks for the tip as I found this and am off to have a look at my virtual PP setup now at the script
forum.linuxcnc.org/forum/pathpilot/30214...on-tormach-bit-files
The following user(s) said Thank You: snowgoer540

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

Moderators: PCWjmelson
Time to create page: 0.174 seconds
Powered by Kunena Forum