Unable to reset USB LTE modem after -EPROTO error











up vote
1
down vote

favorite












BLUF



I can no longer toggle the power of an LTE Modem via sysfs because it is now being removed from sysfs after an error occurs. How can I get it back into the usb sysfs and toggle the power?



Background



I am using an USB LTE modem with the qmi-based drivers that infrequently experiences an error that requires a reset. In the past I have been able to fix it by toggling power to it via the sysfs as seen below:



echo "0" > /sys/bus/usb/devices/usb2/2-1/power/autosuspend_delay_ms
echo "auto" > /sys/bus/usb/devices/usb2/2-1/power/control
sleep 1
echo "0" > /sys/bus/usb/devices/usb2/2-1/power/autosuspend
sleep 1
echo "2-1" > /sys/bus/usb/drivers/usb/unbind
sleep 1
echo "2-1" > /sys/bus/usb/drivers/usb/bind
sleep 1


Not ideal, but workable. The problem is that that after migrating to the 4.14 kernel, I cannot find the device in the sysfs after an error, /sys/bus/usb/devices/usb2/2-1 does not exist, and therefor I cannot reset the modem with it. The dmesg output at the time of the error is the following:



[1889271.903016] qmi_wwan 2-1:1.8: nonzero urb status received: -71
[1889271.903039] qmi_wwan 2-1:1.8: wdm_int_callback - 0 bytes
[1889274.174239] usb 2-1: USB disconnect, device number 2
[1889274.185873] qcserial ttyUSB0: Qualcomm USB modem converter now disconnected from ttyUSB0
[1889274.186457] qcserial 2-1:1.0: device disconnected
[1889274.188294] qcserial ttyUSB1: Qualcomm USB modem converter now disconnected from ttyUSB1
[1889274.188916] qcserial 2-1:1.2: device disconnected
[1889274.206507] qcserial ttyUSB2: Qualcomm USB modem converter now disconnected from ttyUSB2
[1889274.211120] qcserial 2-1:1.3: device disconnected
[1889274.220564] qmi_wwan 2-1:1.8 wwan0: unregister 'qmi_wwan' usb-ci_hdrc.1-1, WWAN/QMI device
[1889274.263106] qmi_wwan 2-1:1.10 wwan1: unregister 'qmi_wwan' usb-ci_hdrc.1-1, WWAN/QMI device


The error 71 corresponds to an EPROTO error, which from what i read triggers the kernel to disable the port. I'd like to know how to re-enable to port so it appears back in the USB section of sysfs so I can toggle its power.










share|improve this question






















  • It’s not a programming question, what you need to do is to take Linux kernel sources from Git, compile enough times to bisect down to the changing commit and report to corresponding developers. Not easy for newbie, unfortunately.
    – 0andriy
    Nov 21 at 8:13










  • I’m not so concerned about the EPROTO error coming from the device driver, which would require the debug method you outlined to fix, but the core mechanism of a USB node being removed from the sysfs (for whatever reason) and how to at least attempt to re-add it to sysfs. If I just had access to the VBUS enable pin for a moment, I can force the client device to reset.
    – Liam Kelly
    Nov 25 at 15:01















up vote
1
down vote

favorite












BLUF



I can no longer toggle the power of an LTE Modem via sysfs because it is now being removed from sysfs after an error occurs. How can I get it back into the usb sysfs and toggle the power?



Background



I am using an USB LTE modem with the qmi-based drivers that infrequently experiences an error that requires a reset. In the past I have been able to fix it by toggling power to it via the sysfs as seen below:



echo "0" > /sys/bus/usb/devices/usb2/2-1/power/autosuspend_delay_ms
echo "auto" > /sys/bus/usb/devices/usb2/2-1/power/control
sleep 1
echo "0" > /sys/bus/usb/devices/usb2/2-1/power/autosuspend
sleep 1
echo "2-1" > /sys/bus/usb/drivers/usb/unbind
sleep 1
echo "2-1" > /sys/bus/usb/drivers/usb/bind
sleep 1


Not ideal, but workable. The problem is that that after migrating to the 4.14 kernel, I cannot find the device in the sysfs after an error, /sys/bus/usb/devices/usb2/2-1 does not exist, and therefor I cannot reset the modem with it. The dmesg output at the time of the error is the following:



[1889271.903016] qmi_wwan 2-1:1.8: nonzero urb status received: -71
[1889271.903039] qmi_wwan 2-1:1.8: wdm_int_callback - 0 bytes
[1889274.174239] usb 2-1: USB disconnect, device number 2
[1889274.185873] qcserial ttyUSB0: Qualcomm USB modem converter now disconnected from ttyUSB0
[1889274.186457] qcserial 2-1:1.0: device disconnected
[1889274.188294] qcserial ttyUSB1: Qualcomm USB modem converter now disconnected from ttyUSB1
[1889274.188916] qcserial 2-1:1.2: device disconnected
[1889274.206507] qcserial ttyUSB2: Qualcomm USB modem converter now disconnected from ttyUSB2
[1889274.211120] qcserial 2-1:1.3: device disconnected
[1889274.220564] qmi_wwan 2-1:1.8 wwan0: unregister 'qmi_wwan' usb-ci_hdrc.1-1, WWAN/QMI device
[1889274.263106] qmi_wwan 2-1:1.10 wwan1: unregister 'qmi_wwan' usb-ci_hdrc.1-1, WWAN/QMI device


The error 71 corresponds to an EPROTO error, which from what i read triggers the kernel to disable the port. I'd like to know how to re-enable to port so it appears back in the USB section of sysfs so I can toggle its power.










share|improve this question






















  • It’s not a programming question, what you need to do is to take Linux kernel sources from Git, compile enough times to bisect down to the changing commit and report to corresponding developers. Not easy for newbie, unfortunately.
    – 0andriy
    Nov 21 at 8:13










  • I’m not so concerned about the EPROTO error coming from the device driver, which would require the debug method you outlined to fix, but the core mechanism of a USB node being removed from the sysfs (for whatever reason) and how to at least attempt to re-add it to sysfs. If I just had access to the VBUS enable pin for a moment, I can force the client device to reset.
    – Liam Kelly
    Nov 25 at 15:01













up vote
1
down vote

favorite









up vote
1
down vote

favorite











BLUF



I can no longer toggle the power of an LTE Modem via sysfs because it is now being removed from sysfs after an error occurs. How can I get it back into the usb sysfs and toggle the power?



Background



I am using an USB LTE modem with the qmi-based drivers that infrequently experiences an error that requires a reset. In the past I have been able to fix it by toggling power to it via the sysfs as seen below:



echo "0" > /sys/bus/usb/devices/usb2/2-1/power/autosuspend_delay_ms
echo "auto" > /sys/bus/usb/devices/usb2/2-1/power/control
sleep 1
echo "0" > /sys/bus/usb/devices/usb2/2-1/power/autosuspend
sleep 1
echo "2-1" > /sys/bus/usb/drivers/usb/unbind
sleep 1
echo "2-1" > /sys/bus/usb/drivers/usb/bind
sleep 1


Not ideal, but workable. The problem is that that after migrating to the 4.14 kernel, I cannot find the device in the sysfs after an error, /sys/bus/usb/devices/usb2/2-1 does not exist, and therefor I cannot reset the modem with it. The dmesg output at the time of the error is the following:



[1889271.903016] qmi_wwan 2-1:1.8: nonzero urb status received: -71
[1889271.903039] qmi_wwan 2-1:1.8: wdm_int_callback - 0 bytes
[1889274.174239] usb 2-1: USB disconnect, device number 2
[1889274.185873] qcserial ttyUSB0: Qualcomm USB modem converter now disconnected from ttyUSB0
[1889274.186457] qcserial 2-1:1.0: device disconnected
[1889274.188294] qcserial ttyUSB1: Qualcomm USB modem converter now disconnected from ttyUSB1
[1889274.188916] qcserial 2-1:1.2: device disconnected
[1889274.206507] qcserial ttyUSB2: Qualcomm USB modem converter now disconnected from ttyUSB2
[1889274.211120] qcserial 2-1:1.3: device disconnected
[1889274.220564] qmi_wwan 2-1:1.8 wwan0: unregister 'qmi_wwan' usb-ci_hdrc.1-1, WWAN/QMI device
[1889274.263106] qmi_wwan 2-1:1.10 wwan1: unregister 'qmi_wwan' usb-ci_hdrc.1-1, WWAN/QMI device


The error 71 corresponds to an EPROTO error, which from what i read triggers the kernel to disable the port. I'd like to know how to re-enable to port so it appears back in the USB section of sysfs so I can toggle its power.










share|improve this question













BLUF



I can no longer toggle the power of an LTE Modem via sysfs because it is now being removed from sysfs after an error occurs. How can I get it back into the usb sysfs and toggle the power?



Background



I am using an USB LTE modem with the qmi-based drivers that infrequently experiences an error that requires a reset. In the past I have been able to fix it by toggling power to it via the sysfs as seen below:



echo "0" > /sys/bus/usb/devices/usb2/2-1/power/autosuspend_delay_ms
echo "auto" > /sys/bus/usb/devices/usb2/2-1/power/control
sleep 1
echo "0" > /sys/bus/usb/devices/usb2/2-1/power/autosuspend
sleep 1
echo "2-1" > /sys/bus/usb/drivers/usb/unbind
sleep 1
echo "2-1" > /sys/bus/usb/drivers/usb/bind
sleep 1


Not ideal, but workable. The problem is that that after migrating to the 4.14 kernel, I cannot find the device in the sysfs after an error, /sys/bus/usb/devices/usb2/2-1 does not exist, and therefor I cannot reset the modem with it. The dmesg output at the time of the error is the following:



[1889271.903016] qmi_wwan 2-1:1.8: nonzero urb status received: -71
[1889271.903039] qmi_wwan 2-1:1.8: wdm_int_callback - 0 bytes
[1889274.174239] usb 2-1: USB disconnect, device number 2
[1889274.185873] qcserial ttyUSB0: Qualcomm USB modem converter now disconnected from ttyUSB0
[1889274.186457] qcserial 2-1:1.0: device disconnected
[1889274.188294] qcserial ttyUSB1: Qualcomm USB modem converter now disconnected from ttyUSB1
[1889274.188916] qcserial 2-1:1.2: device disconnected
[1889274.206507] qcserial ttyUSB2: Qualcomm USB modem converter now disconnected from ttyUSB2
[1889274.211120] qcserial 2-1:1.3: device disconnected
[1889274.220564] qmi_wwan 2-1:1.8 wwan0: unregister 'qmi_wwan' usb-ci_hdrc.1-1, WWAN/QMI device
[1889274.263106] qmi_wwan 2-1:1.10 wwan1: unregister 'qmi_wwan' usb-ci_hdrc.1-1, WWAN/QMI device


The error 71 corresponds to an EPROTO error, which from what i read triggers the kernel to disable the port. I'd like to know how to re-enable to port so it appears back in the USB section of sysfs so I can toggle its power.







linux usb linux-device-driver embedded-linux sysfs






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 19 at 19:08









Liam Kelly

1,513816




1,513816












  • It’s not a programming question, what you need to do is to take Linux kernel sources from Git, compile enough times to bisect down to the changing commit and report to corresponding developers. Not easy for newbie, unfortunately.
    – 0andriy
    Nov 21 at 8:13










  • I’m not so concerned about the EPROTO error coming from the device driver, which would require the debug method you outlined to fix, but the core mechanism of a USB node being removed from the sysfs (for whatever reason) and how to at least attempt to re-add it to sysfs. If I just had access to the VBUS enable pin for a moment, I can force the client device to reset.
    – Liam Kelly
    Nov 25 at 15:01


















  • It’s not a programming question, what you need to do is to take Linux kernel sources from Git, compile enough times to bisect down to the changing commit and report to corresponding developers. Not easy for newbie, unfortunately.
    – 0andriy
    Nov 21 at 8:13










  • I’m not so concerned about the EPROTO error coming from the device driver, which would require the debug method you outlined to fix, but the core mechanism of a USB node being removed from the sysfs (for whatever reason) and how to at least attempt to re-add it to sysfs. If I just had access to the VBUS enable pin for a moment, I can force the client device to reset.
    – Liam Kelly
    Nov 25 at 15:01
















It’s not a programming question, what you need to do is to take Linux kernel sources from Git, compile enough times to bisect down to the changing commit and report to corresponding developers. Not easy for newbie, unfortunately.
– 0andriy
Nov 21 at 8:13




It’s not a programming question, what you need to do is to take Linux kernel sources from Git, compile enough times to bisect down to the changing commit and report to corresponding developers. Not easy for newbie, unfortunately.
– 0andriy
Nov 21 at 8:13












I’m not so concerned about the EPROTO error coming from the device driver, which would require the debug method you outlined to fix, but the core mechanism of a USB node being removed from the sysfs (for whatever reason) and how to at least attempt to re-add it to sysfs. If I just had access to the VBUS enable pin for a moment, I can force the client device to reset.
– Liam Kelly
Nov 25 at 15:01




I’m not so concerned about the EPROTO error coming from the device driver, which would require the debug method you outlined to fix, but the core mechanism of a USB node being removed from the sysfs (for whatever reason) and how to at least attempt to re-add it to sysfs. If I just had access to the VBUS enable pin for a moment, I can force the client device to reset.
– Liam Kelly
Nov 25 at 15:01

















active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53381106%2funable-to-reset-usb-lte-modem-after-eproto-error%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53381106%2funable-to-reset-usb-lte-modem-after-eproto-error%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Costa Masnaga

Fotorealismo

Sidney Franklin