Thermiq installation on Ubuntu 11.10

Shop Forums Allmänt Thermiq installation on Ubuntu 11.10

Tagged: , ,

Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #5535
    slaitio
    Participant

    Hi,

    I am trying to install Thermiq on a Ubuntu 11.10 system. I just plugged in the USB cable and I came across the first problem. The device is recognized immediately, but as a “/dev/ttyACM0” device and not as “/dev/ttyUSB0”. Using ttyACM0 as my com port does not work.

    I have a SDHC card attached to Thermiq and it is also being mounted automatically and I can access VP.log.

    Any ideas on how to get these ports configured ?

    – Sami

    #5875
    slaitio
    Participant

    Output of usb-devices:

    T: Bus=01 Lev=02 Prnt=02 Port=00 Cnt=01 Dev#= 4 Spd=12 MxCh= 0

    D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1

    P: Vendor=04d8 ProdID=fdeb Rev=00.01

    S: Manufacturer=Ask Me Electronics

    S: Product=ThermIQ Composite port

    C: #Ifs= 2 Cfg#= 1 Atr=80 MxPwr=400mA

    I: If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage

    I: If#= 1 Alt= 0 #EPs= 3 Cls=02(commc) Sub=02 Prot=01 Driver=cdc_acm

    lsusb:

    Bus 001 Device 004: ID 04d8:fdeb Microchip Technology, Inc.

    The red led on the Thermiq board is flashing 5 times.

    – Sami

    #5876
    slaitio
    Participant

    I have no idea what I did or what happened, but now Thermiq is being recognized as ttyUSB0. Last night I upgraded the Ubuntu kernel to the latest one, but at that time it did not seem to help. Today I changed Thermia logging interval from 2M back to 1M. After this I noticed it was recognized ok… strange…

    Thermiq software is still giving me issues and is not working (check_install.php says serial port is not working). I managed to set up communication to the Themiq board with taloLogger (http://olammi.iki.fi/sw/taloLogger/).

    – Sami

    #5877
    admin
    Participant

    I don’t have any own experience running ubuntu but for the serial port, have you entered the correct information in the settings pages?

    There shouldn’t be anything not able to run in ubuntu.

    Glad to hear that you found the taloLogger, it’s an alternative gui to our own.

    #5878
    slaitio
    Participant

    I think that my issues with Thermiq and Ubuntu are a result of access rights issues. I need to run the scripts manually to get all error messages visible and then try to fix any issues. If I figure something out I will post it here.

    I have noticed some other strange behavior with the USB serial port on my Ubuntu machine. The serial port had changed from ttyUSB0 to ttyUSB1 yesterday (noticed after taloLogger crashed) and today it switched back to ttyUSB0. I assume that this is a Ubuntu 11.10 issue.

    Also as I have an 8Gb SDHC card attached to thermiq. There seem to be issues with that also. It gathered information for a while and then I manually downloaded it and renamed the VP.log file. It started to create a new VP.log file, but then some strange issues appeared:

    ls: cannot access MapLoader: Input/output error

    total 292

    drwx


    3 sami sami 32768 1970-01-01 02:00 ./

    drwxr-xr-x 5 root root 4096 2012-01-31 23:39 ../

    d????????? ? ? ? ? ? MapLoader/

    -rw-r–r– 1 sami sami 2889 2005-05-16 15:20 VP.LOG

    -rw-r–r– 1 sami sami 198671 2005-05-16 15:19 VP.LOG.old

    The row with “MapLoader” is a big question. It cannot be deleted. Trying to delete will result in the I/O error and the VP.log file has not been updated.

    – Sami

    #5879
    tapani
    Participant

    Hi,

    I tried to install ThermIQ to my DreamPlug (Debian 6.0.4) and encountered the same problem as you did at the beginning. The device is recognized and the memory card mounted, but usbserial does not create ttyUSB0 or any other tty port for the device. My brother tried my ThermIQ in his Linux laptop (ArchLinux) and the result was exactly the same. usb-devices shows about the same output as the one you posted here.

    I also tried with Windows where the device is recognized and drivers install without erros, but check_install.php page loads forever when I change the COM port from the default COM2 to COM5, which according to Device Manager is ThermIQ Composite Port.

    How did you changed the loggin interval from 2M to 1M if the device was not recognized?

    -Tapani

    #5880
    tapani
    Participant

    Worked this out with Anders last night. Thank you Anders, awesome hands-on support for ThermIQ indeed!

    Cdc-acm and usbserial kernel modules both support the same device and since cdc-acm runs first and creates ttyACM0, usbserial is not able to create ttyUSB0.

    The fix sequence goes something like this:

    1. Blacklist the cdc-acm kernel module by adding the following line to /etc/modprobe.d/blacklist:

    blacklist cdc-acm

    2. rmmod cdc_acm (not sure if really needed)

    3. modprobe usbserial vendor=0x4d8 product=0xfdeb

    (also add to /etc/modules:

    usbserial vendor=0x04d8 product=0xfdeb)

    4. Unplug the usb and plug it again.

    5. chmod 0666 /dev/ttyUSB0

    (add this to some startup script)

    -Tapani

    #5881
    slaitio
    Participant

    Hi,

    Thanks for this info! I blacklisted the cdc-acm module.

    I changed the logging interval from the heatpump. Before I had thermiq I wanted to see at least some history so I “doubled” what the Thermia LCD showed me by changing it there. So it really should not have had anything to do with Thermiq, but it was something I did and after that I managed to get it connected. No idea if these are related in any way.

    After chmod 0666 check_install recognized the thermiq board. Some other issues still remain.

    – Sami

    #5882
    slaitio
    Participant

    Found some issues why Thermiq interface was not working. The /sur/sbin/ scripts assume that PHP is located in “/opt/bin/”, but in Ubuntu 11.10 it is “/usr/bin/”.

    Also there are some rights issues remaining as the create database scripts cannot run unlink or chmod.

    – Sami

    #5883
    tapani
    Participant

    I had to create a symbolic link from /opt/bin to /usr/bin in Debian. But the db creation, dummy_poll etc scripts still don’t work. They work when started from the command line, but not from the php pages. I’m not sure if it does not find the script or if there is some error in running the script. It would be nice to have a log file to tell what happened. I have given rx rights to all users to all script, but that didn’t help.

    I tried to add some echo at the beginning of the script, but it does not appear to the web page. I have copied the scripts both to /usr/sbin and /usr/share/php, but that does not help. I haven’t used php before so it’s a bit hard to tell what’s wrong. Wish this were Java code and one simple war package.

    #5884
    slaitio
    Participant

    It seems I managed to get Thermiq running, but I only get logs collected if I manually push “real poll”. I have added /usr/sbin/poller to crontab, but so far I have not gotten that to work.

    – Sami

    #5885
    admin
    Participant

    There is a path variable in Thermiq_Linux.ini that gets prepended for all commands that could be used instead of symlink but either should work.

    Have you checked permissions and paths when cron is running? Sounds like i plausible fault.

    #5886
    tapani
    Participant

    I set the variable in the .ini file and checked that both php5 and the scripts in /usr/sbin have execute permission for all users. Still does not work. What other files can have wrong permissions?

    When I run the dummy_poll from command line /usr/bin/php5 dummy_poll I get the following warnings:

    PHP Warning: Invalid argument supplied for foreach() in /usr/sbin/dummy_poll on line 50

    PHP Notice: Undefined variable: regnamary in /usr/sbin/dummy_poll on line 55

    PHP Warning: implode(): Invalid arguments passed in /usr/sbin/dummy_poll on line 55

    PHP Notice: Undefined variable: regvalary in /usr/sbin/dummy_poll on line 56

    PHP Warning: implode(): Invalid arguments passed in /usr/sbin/dummy_poll on line 56

    PHP Warning: Invalid argument supplied for foreach() in /usr/sbin/dummy_poll on line 76

    PHP Notice: Undefined variable: COMPR_STARTS in /usr/sbin/dummy_poll on line 79

    PHP Notice: Undefined variable: KOMPR_H in /usr/sbin/dummy_poll on line 80

    PHP Notice: Undefined variable: T_UTE in /usr/sbin/dummy_poll on line 81

    PHP Notice: Undefined variable: T_VATTEN in /usr/sbin/dummy_poll on line 82

    #5887
    admin
    Participant

    Could be that the databases are faulty.

    * Start with check_install and see that all files are found and permissions are right

    * Create permanent and temporary databases

    * do dummy_poll to populate databases

    #5888
    slaitio
    Participant

    I also received these same php errors. If I recall correctly the issue was related to wrong PHP path in the /usr/sbin/ scripts. Atleast for Ubuntu and Centos #!/opt/bin/php

    does not work (should be /usr/bin/php).

    Also access rights gave me some problems.

    I managed to get Thermiq interface running on ubuntu, but since Ubuntu 11.10 is rubbish (needed a reboot almost every day…). I have now changed to Centos 6.2 and I have not had the time to set up Thermiq. taloLogger is gathering information for now.

Viewing 15 posts - 1 through 15 (of 15 total)
  • You must be logged in to reply to this topic.