Detector carbon dioxide MT8057S. Not review with participation of a non-emulator

    - Hi, Habr! Look!



    - Man, what are you? With this detector, without you, the entire resource is far and wide ... And then there you are. How much can one and the same topic waste?

    - Chill out, boys! Of course, I am not going to repeat already existing reviews. What it is, why it is, how it works, how to use it, what's inside ... And organically these reviews will complement what the previous reviewers did not do. Namely, I will check if the software for this detector will run in one well-known NE-emulator (the one that is “is not an emulator”) and see the device hanging on the port. It turns out - well, it will not work - a negative result in science is also considered a result.

    Spoiler: I'm Krivoruk, so the file, but found another solution, for which a non-emulator was not useful.

    Well, the non-emulator in our country is swinging vigorously:



    For now, let's first see the output of lsusb:

    $ lsusb
    Bus 002 Device 004: ID 138a:0011 Validity Sensors, Inc. VFS5011 Fingerprint Reader
    Bus 002 Device 005: ID 0cf3:3004 Atheros Communications, Inc. AR3012 Bluetooth 4.0
    Bus 002 Device 002: ID 0438:7900 Advanced Micro Devices, Inc. 
    Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 001 Device 004: ID 5986:0652 Acer, Inc 
    Bus 001 Device 003: ID 89e5:1001  
    Bus 001 Device 002: ID 0438:7900 Advanced Micro Devices, Inc. 
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
    <b>Bus 003 Device 002: ID 04d9:a052 Holtek Semiconductor, Inc.</b>
    Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

    This is what Holtek is about. When disconnected disappears. Now let's download the software that we “feed” Wine as soon as it is installed: the



    software has downloaded, NOT the emulator too, we will try to start one of the programs:



    No installers, the program is “portable”. It works immediately, but does not see the stuck device. Let's try to configure:



    You can try to select USB and eight different COM ports. At first, I bought it and tried the well-known USB-COM forwarding methods in Wine. When the device is connected, the device / dev / usb / hiddev0 appears, which I took for such a port. But it did not work out, for ... Let's not get ahead of ourselves. First we check another program.



    Almost twin. Only the menu is slightly different. We climb in settings:



    And the result, of course, is similar. And no wonder: the very name hiddev0 says that this is not a USB-COM, but a USB-HID device. Searching the forums has shown that those in a stable Wine are not supported. In addition, if chmod provides access to hiddev0 to unprivileged users, then after each disconnection and connection of the detector, the device again becomes accessible only to the root. But even when it is available to everyone, Wine thinks that it is not.

    Run Wine from root? Not recommended, but let's say these two programs I trust. I try ... Bummer, NEemulyator generally refuses to run under the root. The .wine folder is not yours, it says. It turns out that one should not sudo wine, but first sudo su, then make wine, and it will create a folder in the / root folder too. Only this has not changed anything.

    Well, there is also a native Linux co2mon. Only I decided to download it in another place - where it has already been compiled.

    Here

    , after the RPM was deflated, I installed it in my favorite way. Namely, he took up the mc and pens under the root scattered the files from the CONTENTS.cpio folder in the archive for the folders of the file system where they should be.

    Run co2mond, but it wants libhidapi-libusb0. A little googling-Yandex, and it turns out that for this you need to feed him the package libhidapi-dev:

    $ sudo apt-get install libhidapi-dev

    The package is put up cheerfully, I start and see:

    $ co2mond
    hid_open: error
    Unable to open CO2 device
    hid_open: error
    hid_open: error
    hid_open: error
    hid_open: error
    hid_open: error
    hid_open: error
    hid_open: error
    hid_open: error
    hid_open: error

    Oh, yes, I also poked the device. Again, I do chmod'om, so that hiddev0 was accessible by an unprivileged user, I start and see the same thing. Then I run co2mond from the root, and - success!

    $ sudo co2mond
    [sudo] пароль для username: КОШКА
    Tamb	25.1000
    Tamb	25.1000
    Tamb	25.1000
    Tamb	25.0375
    CntR	1617
    Tamb	25.0375
    CntR	1617
    Tamb	25.1000
    CntR	1617
    Tamb	25.1000
    CntR	1617
    Tamb	25.0375
    CntR	1617
    Tamb	25.1000
    CntR	1617
    Tamb	25.0375
    CntR	1617
    Tamb	25.1000
    CntR	1617
    Tamb	25.1000
    CntR	1617
    Tamb	25.1000

    While the sensor is not warmed up, only the Tamb - temperature ambient is displayed, as I understand it. How to warm up - also CntR (content of something on R, I don’t know the synonyms of carbon dioxide on R).

    If on the built-in display the device shows the temperature with one decimal place, then it displays as many as four in the computer! Is there really so accurate temperature sensor? I do not know. Well, the carbon dioxide readings come with the same accuracy as on the integrated display, only overestimated by several units.

    Well, I think, once in the process of installing Linux software, the file 99-co2mon.rules with the specified data that matches the ones seen in lsusb turned out to be in its place, maybe those programs that I tried to run in Wine will work. No, not in this file case. Still not like that, nor under the root does not want. It seems that an experimental Wine with USB-HID support or some patches is indispensable.

    That's all. It worked, but not in the way we would like: the program that started up does not display graphs. Is it a negative result, or not, because you managed to get the data out of the device? And Wine over the years of its existence is very "matured". Compared to what it was several years ago, it is simply not recognizable, many programs work in it as if written specifically for it. Only it turned out to be an introvert - it is afraid to communicate with some glands. Ten percent discount on the device - click on the link with promo code TORMOZ CO2.

    Thus, the average Linux-user, savvy at the level of the basics of working with the command line, but not able or unwilling to mess around with patches and experimental builds of programs, will be able to pair this device with a computer. But the program that can establish a dialogue with the device will be minimalistic. All of the above applies to other devices of the same purpose on the same Holtek chip.

    PS Through the ventilation holes you can see how the Ilyich light bulb flashes periodically in the device case. I read about it in the old reviews, but I thought that I had a newer version of the device where the LED was used. Not. So, this is important - you need a spectrum without “humps”.

    Thank you all for your attention!

    Also popular now: