10-02-2019 04:04 PM
Hi all,
I am using a IC-3120 with a Linux RT environment. In its BIOS, one can choose between two different serial communication protocols RS232 and RS485.
Is there any other (programmatic) way of setting this communication protocol at boot-time or at run-time? Ideally I would like this to be part of the firmware image that will get deployed to the IC-3120 controllers during manufacturing of our products.
Thanks a lot in advance!
10-03-2019 10:52 AM
I've got some good news and some bad news.
The good news is that there may be a way to do this.
The bad news is that it might cause your hair to fall out.
Still interested?
10-03-2019 11:07 AM
Luckily we have Hay-Soos to deal with the hair problem:
https://dilbert.com/strip/2008-03-10
Bring it on!
10-03-2019 12:25 PM - edited 10-07-2019 09:42 AM
So here's the deal. RS232 vs RS485 mode control is not exposed in a documentable way. However, it IS exposed through an EFI variable that can be written to — but in a giant blob of configuration shared by a bunch of other BIOS configuration variables. You can't edit the settings in isolation, but you CAN save different values of the entire configuration variable, and one of them will have the port in 232 mode, while another could have it in 485 mode. Any of this could be discovered by a customer by tweaking BIOS settings and looking at what changed in the EFI variable store, so that's why I'm pretty comfortable disclosing all of this.
Let me describe the downsides to this approach a little more clearly than "your hair will fall out". Obviously, this is very unsupported, but there's a little more to it than that. If this configuration variable (which includes the port setting) gets screwed up, your controller is probably hosed. This can happen if, for instance, you lose power while updating the configuration. But it could also happen if you restore a different controller's configuration by accident. Or if you restore a config from the SAME controller, but a DIFFERENT firmware version. If you're lucky, you might be able to recovery reset the firmware configuration settings. More likely, you're looking at an RMA. All that said: if this works for you, on your controller, under a controlled execution environment, it is likely to continue working.
With that out of the way: see attached for a script I cobbled together to automate most of this. I would describe the testing of this utility as "loose". I wish to repeat that this utility is completely unsupported. You must understand shell script programming in order to effectively deploy this utility. Usage is going to go something like this:
(EDIT: Utility updated to require opt-in for restore to work, and to abort if config was saved with a different BIOS version or model.)
10-08-2019 06:23 PM
Thanks a lot for this suggested solution.
Given other boundary conditions, this solution will be too risky in production, so we will have to stick to the old fashioned way...
10-09-2019 10:42 PM
I think you made the right choice. (I suppose Hay-Soos saves those who save themselves.)
I did reach out to the BIOS team and ensured that they are tracking this as a feature request.