Uploaded image for project: 'Instrument control development'
  1. Instrument control development
  2. INSTRM-1159

Document provisioning new pressure gauge.

    XMLWordPrintable

    Details

      Description

      Provisioning new gauges is a peculiar process and needs to be recorded just in case it ever needs to be done at Subaru. I'll dump the basics in this ticket just to get it down somewhere.

      We control the gauge over RS-485 connected to the "gauge" PCM port. The firmware is loaded over Ethernet, which is usually not connected. Updating firmware is moderately straightforward, but provisioning a new or reset gauge is not.

      New devices come up as 192.168.2.200 and generate gratuitous ARPs, for which we are thankful. But default Linux kernels do not record these in `ip neigh` or `/proc/net/arp`, which makes them less useful. Looking for them with tcpdump, etc. is a pain on a busy system. We can either add 192.168.2/24 on some (any) PFS machine, or likewise set `sysctl -w net.ipv4.conf.all.arp_accept=1` in sysctl.conf. The latter is what I did at JHU, partly because I think we should be able to see any stray machines on our network. For the idiot MOXAs we need 192.168.127/24 on some machine, so we might as well configure the same machine. Multicast also needs to be enabled for the bootloader.

      Once the device has been identified (use `oneCmd.py xcu_xx power cycle gauge` to trigger the ARP), change the `gauge-xx` line in /etc/dnsmasq.d/macs-$site/ file and restart the dnsmasq process. Then run the magic PCM_bootloader burner in ics_xcuActor, passing in both the identifying last two octets of the MAC address and the desired target IP address. For example: `PCM_bootloader.py --debug --hexfile /software/firmware/gauge_20190603_03.hex --macID 66:4c --host gauge-r4`.

      To update gauge firmware, run the loader without specifying the macID; this can be done from any normal PFS host, without all the ARP/network/sysctl configuration.

      The PCM_bootloader.py file was originally written just for the PCM, hence the name, and some of this logic was tacked on for the new gauges later. The macID argument should be changed to use the entire MAC address just for safety, even though the loader itself only uses the last two octets.

      Finally, there is a physical switch for RS-485 polarity on the gauge circuit board, under the gray cover. If that is set wrong you will get "NO RESPONSE" from any command sent to the gauge via the PCM (`oneCmd.py --level=d xcu_xx gauge status`, say). Pull off the cover and flip the obvious switch if you get "NO RESPONSE".

        Attachments

          Activity

            People

            • Assignee:
              cloomis cloomis
              Reporter:
              cloomis cloomis
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: