-
Notifications
You must be signed in to change notification settings - Fork 85
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
hwmon devices are not auto-detected #622
Comments
The I2C adapter drivers on the EV3 are set to I2C_CLASS_LEGOEV3. We could add a new For now, you will have to manually set the driver using the |
At the moment the docs say it should be auto-detected. Maybe this could be clarified.
|
Thanks. |
Setting the device does not appear to work. With the temperature sensor attached to port in4:
Is there something I'm missing? It seems that this device requires the Other/I2C sensor approach. |
No, that appears not to work either (again device in port in4 lm75 still loaded):
The contents of
|
This is wrong. It runs
This is the I2C adapter. The actual hwmon device will look like |
Thanks that has got it working. This bites me more often that I care to admit.
Thanks for the clarification. I was really meaning that it is being seen as physically present by the ev3 - always good to let people know the device is plugged in when reporting an issue :) If I were to express an interest in getting this to work in the |
This is an unfortunate case where an official LEGO product doesn't follow the quasi-official LEGO specification for I2C sensors. I think what I would like to see is a On the other hand, you are the only person that has asked about the LEGO temperature sensor or any other hwmon sensor in 2.5 years, so maybe we leave it as-is and let advanced users figure it out. And on the 3rd hand, since this is an official LEGO device, maybe we add a hack to make it work with the At the moment, I am leaning towards continuing to use existing Linux drivers and maybe having a better way to auto-detect them. There are a number of 3rd party sensors that fit this category as well. A couple examples... |
Yes, it's unfortunate. The reason I'm interested in this is that I would like to use some of the LEGO science curriculum material. LEGO officially support this device for that use, so making the libraries I am writing work with the hardware already available makes it more likely that my code has the potential for adoption (this is the 3rd hand argument). The 'other hand' argument makes this use very difficult - I'm looking at using this kind of thing as extension for kids that find LabVIEW too trivial, but expecting them to sort out drivers might be a step too far. At the moment my next major task is to build something so I can have proper automated testing of ev3go, but after that I'd be very happy to try my hand at helping out with this. |
For the specific case of the temperature sensor, I'm sure I could be persuaded any which way if you are willing to make it work. So, going with the assumption that we are making it fit the
|
Thanks. I think the only other thing I need is a pointer to where I hook into to get the code started - I can dig to find out, but a pointer would save a huge amount of time. |
We need to add the address 0x4C here so that it is probed. Then in nxt_i2c_sensor_detect, we need to add a special case for I would like to add the temperature sensor detection as a separate function to keep things clean. Maybe something like this just before
The rest should be very similar to the last patch that you fixed up. |
Hi diech and kortschak. I am also working with the temperature sensor on the ev3. I have followed your recommendations and now I can read the temperature from the file /sys/class/hwmon/hwmon0/temp1_input |
What sort of polling rate are you getting? What sort of polling rate do you want? Looking at the driver, it looks like this rate is fixed. The hwmon subsystem is not designed for fast polling. |
I'm going to leave this issue open for automatic detection of hwmon sensors in general. The NXT temperature sensor is now a |
For reference, if we decide we need hwmon sensors to be detected, we can add an |
There doesn't seem to be any interest in hwmon stuff, so calling this wontfix for now. We can always open the issue again if needed. |
System information:
About my issue:
What led up to the situation?
Connect LEGO 9749 and
modprobe lm75
What exactly did you do (or not do) that was effective (or ineffective)?
Attempt to insert module to allow auto-detection of the temperature sensor as described here. Also try
modprobe lm75
and then attach sensor.What was the outcome of this action?
lsmod show lm75 to be loaded, but nothing in the way of sensor auto-detection.
What outcome did you expect instead?
A temperature sensor device in brickman device browser or a sensor directory in
/sys/class/lego-sensor
.The text was updated successfully, but these errors were encountered: