Powering Down

Home Forums General Powering Down

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #6359
    Justyn Bell
    Participant

    I’m deploying a few MultiConnect OCG devices ‘in the field’, which means they’re sitting in portable boxes that are powered by a battery.

    Given that we’re handing devices off to users to sort of ‘crowd source’ experiments using these devices in a portable enclosure, what is the best way to power the devices off without gaining command line access and issuing a halt command.

    Is it safe to hard power-off these devices. I’ve noticed that in doing so (cutting power to the device), the ppp0 interface does not show up when the device comes back up. I have to issue a ‘pppd call gsm’ command. After issuing a ‘halt’ then powering off the devices, everything comes up fine after power up.

    I see two options:

    1) Write code that polls a gpio input pin, and upon receiving a signal, halts the device. That way it can be powered off gracefully.
    2) Write a daemon that monitors the ppp0 device, and brings it up on boot if it is not already up.

    The problem with the first is that it does not solve the scenario in which a battery can drain and power off the device. Any suggestions?

    #6411
    Justyn Bell
    Participant

    After tracing logs, it seems like the ppp daemon fails at

    ^MScript /usr/sbin/chat -v -t 90 -f /etc/ppp/peers/gsm_chat finished (pid 405), status = 0x7

    Increasing the TIMEOUT in gsm_chat from 120 to 240 solved my problem, AFAICT.

    #6648
    Jesse Gilles
    Blocked

    Justyn,

    In general, it is safe to power off the device without fear of filesystem corruption. If you have an application that is writing to the flash before the power off, data can certainly be lost, but the filesystem itself should not be corrupted. Only the file being written to could be lost/damaged.

    I’m not sure why you had issues with pppd not starting when performing a power off versus a halt. How did you have pppd configured to started on boot?

    Jesse

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.