-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot read firmware identifier from device #9
Comments
I am also having this issue. It will work once, then not work 3 or 4 times, then work again. Sometimes I get this: Sometimes this: |
Hi, Did anyone found a solution to this issue? I'm having the exact same behaviour as @1024jon Thanks |
@1024jon @Toorr Are both of you also using a Raspberry Pi? I've had the Temper device for a while and used it previously on a desktop PC install of Ubuntu and never had any issues. But now when I try to use it with a Raspberry Pi 2 I am having the same firmware identifier issue. Sometimes the temper script reads the temperature successfully but I will then get errors 10 times in a row. I figured it might be a power supply issue so I tried a couple of different ones (1.8A, and an Anker multi USB port power supply with 2.8A per outlet) with the same issue. I still think it could be limited to the RPI but not sure, just trying to help narrow down the issue. |
Hey, I am using it on a Pi 3 B+. Ive tried multiple all with the same result. I couldn't seem to find a correlation or a reliable way to make it work every time. |
Hey, I'm using a Pi 3 as well. I monitor the temperature with Zabbix and then to a graph and I get the error every 3-4min approximately for like one minute then I receive the actual value again, really strange. |
Yep I am doing the same thing. These temper things worked fine until they changed the internals or whatever they did a few months ago. |
I think I'm seeing something similar, but on a Linux PC, and only on the USB3 port.
Looking at usbmon it appears that sometimes we get back 8 bytes + 8 bytes for "TEMPerX_V3.3"
..but otherwise we only get the second 8 bytes for "V3.3"
Perhaps for 413d:2107 we should expect 16-bytes in total and retry a few times? |
I implemented retrying up to ten times and filed #16 Feedback welcome, please include specifics of devices that work or not. |
I don't think you should use #16. I think there are effectively two separate bugs here: Bug 1: The hardware is slow as heck, or has some other issue that causes a very slow response. My fixes are this:
|
I have created PR #19 to address the two issues with the following:
This prevents both the "Cannot read firmware identifier from device" issue and the "Unknown firmware: ..." issue. However, the workaround for the latter could later be determined to be weak, if we find out that other versions of the hardware/firmware also produce "V3.3" instead of the proper string. In that case, it may just be better to retry instead of producing an error or assuming the firmware ID based on the presence of the bug. |
Indeed, that was the rationale for #16, it does respond appropriately around half of the time, retrying a few times seems fine in practice. |
#16 simply doesn't address the "Cannot read firmware identifier" issue. It does, however, address the "unknown firmware" issue which you mentioned. If you're trying to reproduce the original issue, the 'Cannot read firmware identifier' issue is very prevalent when using 1-second polling. With your PR, use the following script in Xonsh to run it every second: import time
while True:
python3 ./temper.py
time.sleep(1) ..I consistently get the "Cannot read device firmware identifier" issue -- more than 50% of the time. I do not get the alternating firmware identifiers issue, so your pull does seem to address that issue. I do think you're right that retrying is better for the "unknown firmware" issue. My PR previously warned and assumed the version, but a simple retry isn't enough to warn about. In light of that, I've switched #19 to use a simple recursive retry. |
Tried today with 0c45:7401 TEMPer2_M12_V1.3 (white plastic case) and with/without your retry implementation. Here is the result:
before retry-implementation:
after retry-implementation:
|
Interesting. I also have an RPi1 and a 3B+ which I will also try for 413d:2107.
|
For a second round of testing of both #16 and #19 on Raspberry Pi model B.
I found that PR #16 is stable for select >= 0.2 I agree that both easing the select timeout and retrying seem necessary for 413d:2107 to work on slower hardware platforms. I've updated PR #16 accordingly. In a nutshell #16 is being more generous about retrying and #19 is being more generous about timing out on the select. Being generous "enough" for both of these seems appropriate to me. Comment: Perhaps it would be better to test again with the system under CPU and/or IO load. |
I'll retry #16 and see if it works for me -- thanks for your work, @nigels-com. |
#16 works for me now, I'm good with it. I think this bug can be counted as fixed -- excepting perhaps the possibility, as @nigels-com said, that it fails under high load, which I haven't tested. I'll withdraw my PR as #16 works fine now. |
No response for 15 days, and this looks fixed by #16 to me. |
This issue can be closed. |
Sorry for the late reply :( Still the same with the latest temper.py
|
@tmo26 Are you using master, or the version on PyPI? Edit: Actually, that version isn't even supported. I mean, the traceback shouldn't occur, which is a recurrence of the issue, but the latter three tries are an indicator that the device isn't supported. You should open a separate issue for that device. |
@tmo26 will you open an issue on ccwienk/temper? |
Master of urwen/temper produced the output shown above
I would like to, but how do I create an Issue when there is no "Issues" button visible? |
Good point. I'll talk to the repo's owner, I'm just a maintainer.
…On Mon, Nov 30, 2020 at 12:34 PM tmo26 ***@***.***> wrote:
@tmo26 <https://github.com/tmo26> Are you using master, or the version on
PyPI?
Master of urwen/temper produced the output shown above
@tmo26 <https://github.com/tmo26> will you open an issue on ccwienk/temper
<https://github.com/ccwienk/temper>?
I would like to, but how do I create an Issue when there is no "Issues"
button visible?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#9 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAS4PT5VKD52PZ7SV7AVCJ3SSPJTXANCNFSM4G7AGCLQ>
.
|
@tmo26 There you go. |
Add support for TEMPerGold_V3.4 and TEMPer2_V3.9
root@raspberrypi:/home/pi/temper/# ./temper.py
Bus 001 Dev 005 413d:2107 TEMPerX_V3.2 Error: Unknown firmware TEMPerX.V3.2: b'80800a534e200000800109dd4e200000'
root@raspberrypi:/home/pi/temper# ./temper.py -l
Bus 001 Dev 006 413d:2107 * ['hidraw3', 'hidraw4']
Bought this "TEMPer2" off Amazon a few months back and finally got around to attempting setup. Been a bit of a headache as most software solutions don't seem to support this model. Any thoughts on resolving this issue?
The text was updated successfully, but these errors were encountered: