Need remove and put device to work (SOLVED)

  • I have a Afatech AF9013 (device to view TV with tvheadend), and every time that I restart libreleec I have to remove and put the device so that it works.

    There are times I need to restart it but I'm not at home, how can I reproduce the command that is executed when I take out and put a device without physically having to do it?

    It is not problem of tvheadend since this happens even though this is disabled.

    External Content pastebin.com
    Content embedded from external sources will not be displayed without your consent.
    Through the activation of external content, you agree that personal data may be transferred to third party platforms. We have provided more information on this in our privacy policy.

    I have also tried it in ALPHA_kodi_18_leia2018.03.23 and I have the same problem

    Edited 3 times, last by jose383 (March 24, 2018 at 10:39 PM).

  • I thought I could turn on and off the USB ports, but I would need write access to the system files, would that be possible?

    Code
    service networking stop
    sleep 5
    echo 0 > /sys/devices/platform/soc/3f980000.usb/buspower
    sleep 10
    echo 1 > /sys/devices/platform/soc/3f980000.usb/buspower
    sleep 5
    service networking start
  • These is the solution, I put it in case someone has the same problem:
    To view modules use lsmod
    The module is dvb_usb_af9015
    And then write:
       modprobe -r dvb_usb_af9015 to disable
       modprobe dvb_usb_af9015 to enable again

    And device is working!!

    I have created a script for the process to be automatic:

    cd /storage/.config

    nano autostart.sh

    write in file autostart.sh:

    Code
    (
    sleep 10
    modprobe -r dvb_usb_af9015
    modprobe dvb_usb_af9015
    ) &
    
    nohup script.sh &

    Autostart.sh [LibreELEC.wiki]

    Edited 3 times, last by jose383 (March 25, 2018 at 11:23 PM).

  • Hello,

    I don't know if you're using it the same that I do, but my installation is recording 7/7, 24/24, so I had to use a cron to relaunch that script every one minute.