Please login or register.

Login with username, password and session length

Author Topic: Connecting RS232 adapter to USB port  (Read 4507 times)

balanga

  • Jr. Member
  • **
  • Helpful Post Rating: 0
  • Posts: 18
Connecting RS232 adapter to USB port
« on: March 05, 2018, 11:57:10 AM »

I've recently stumbled upon my X10 kit which I bought 20 years ago and am trying to get it connected up, but failing hopelessly...

I have a USB/Serial connector but don't know if it's the right sort and I don't know how each of my three USB ports should be addressed.

The original software has disappeared although I have downloaded various programs to try to get my CM12U unit working, but to no avail.

Do I need a specific Serial port driver for Windows? I'm using W7 64bit but have access to other versions, although I would prefer to use Linux. I've looked at Heyu www-heyu-org but haven't managed to get it woking so far....

Any guidance would be appreciated.
Logged

Brian H

  • Community Organizer
  • Hero Member
  • ***
  • Helpful Post Rating: 305
  • Posts: 13295
Re: Connecting RS232 adapter to USB port
« Reply #1 on: March 05, 2018, 08:28:15 PM »

This web site has some information on the CM12U.
It mentions the Active Home Software in the sales pages information.
https://www.letsautomate.com/10075.cfm

This web site has the original Active Home software.
https://thex10shop.com/pages/Software-Downloads

I believe the CM12U is the European version of the CM11A serial port controller that uses the Active Home Software.

As for the USB to Serial Port adapter. You need to find the manufacturers drivers for it.
When you install the adapter and driver. It will give it a Comm Port number to use with the software to access the CM12U.
It should not matter which USB port you use but the operating system may remember which port it was installed in. If you move it to a different USB port it may again be installed for that port.

The driver should be for the chip inside the adapter. If it is not the optional one supplied with the CM12U. The driver on the above link maybe incorrect.
Logged

balanga

  • Jr. Member
  • **
  • Helpful Post Rating: 0
  • Posts: 18
Re: Connecting RS232 adapter to USB port
« Reply #2 on: March 06, 2018, 05:08:19 AM »

Thanks for the reply. I've now dowloaded software from the link you provided.

When I insert my USB/Serial adapter into a system ruuning FreeBSD, it tells me:


ugen2.2: <vendor 0x1a86 USB2.0-Ser> at usbus2
uchcom0 on uhub3
uchcom0: (vendor 0x1a86 USB2.0-Ser, rev 1.10/2.54, addr 2) on usbus2.
uchcom0: CH341 detected

Not sure if this tells me if the adapter is suitable for use with the CM12U. Whe

So I'm not sure if this is a drver issue or an unsuitable adapter.

When I connect the adapter to a Windows 7 (x32) system, Device Manager says that
I found some drivers but was unable to install them



« Last Edit: March 06, 2018, 05:10:59 AM by balanga »
Logged

dhouston

  • Advanced Member
  • Hero Member
  • ******
  • Helpful Post Rating: 37
  • Posts: 2547
    • davehouston.org
Re: Connecting RS232 adapter to USB port
« Reply #3 on: March 06, 2018, 05:21:24 AM »

Not sure if this tells me if the adapter is suitable for use with the CM12U.
ANY USB-Serial adapter is suitable for the CM12U.

For Windows, try here http://www.driverscape.com/download/usb-serial-ch341
Logged
This message was composed entirely from recycled letters of the alphabet using only renewable, caffeinated energy sources.
No twees, wabbits, chimps or whales died in the process.
https://www.laser.com/dhouston

Brian H

  • Community Organizer
  • Hero Member
  • ***
  • Helpful Post Rating: 305
  • Posts: 13295
Re: Connecting RS232 adapter to USB port
« Reply #4 on: March 06, 2018, 05:49:34 AM »

Active Home software is for older Windows systems. May even work with Seven and above but I have no solid information on that. It may run on your Windows 7 system but you will have to find the needed driver for the chip set in the adapters.

It probably will not work with FreeBSD. Unless it can run Windows programs.
You may want to ask in their Forums if anyone has a program that will work with a CM12U and a USB driver. If it is not supported already.

There are some users here. That have some Linux systems and X10. They may post some names of X10 programs for Linux or FreeBSD.
« Last Edit: March 06, 2018, 06:14:13 AM by Brian H »
Logged

dhouston

  • Advanced Member
  • Hero Member
  • ******
  • Helpful Post Rating: 37
  • Posts: 2547
    • davehouston.org
Re: Connecting RS232 adapter to USB port
« Reply #5 on: March 06, 2018, 06:51:12 AM »

Active Home software is for older Windows systems.

Active Home Vista from the same site Brian recommended works with most versions of Windows although I've not tried it with Windows 10.

The CM12 is the 220V European version of the CM11A. The CM12U was merely the CM12 supplied with a USB-Serial adapter.
« Last Edit: March 06, 2018, 06:53:48 AM by dhouston »
Logged
This message was composed entirely from recycled letters of the alphabet using only renewable, caffeinated energy sources.
No twees, wabbits, chimps or whales died in the process.
https://www.laser.com/dhouston

balanga

  • Jr. Member
  • **
  • Helpful Post Rating: 0
  • Posts: 18
Re: Connecting RS232 adapter to USB port
« Reply #6 on: March 06, 2018, 07:42:54 AM »


It probably will not work with FreeBSD. Unless it can run Windows programs.

I was hoping to use heyu on FreeBSD....

For some reason the board does not allow me post URLs...
Logged

Brian H

  • Community Organizer
  • Hero Member
  • ***
  • Helpful Post Rating: 305
  • Posts: 13295
Re: Connecting RS232 adapter to USB port
« Reply #7 on: March 06, 2018, 08:15:02 AM »

There are some posting restriction for members with a Newbie rating.
After you get enough posts. The Newbie rating and restrictions will be removed.

I checked the HEYU top page. The CM12U is listed as supported.
Logged

petera

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 27
  • Posts: 1751
Re: Connecting RS232 adapter to USB port
« Reply #8 on: March 07, 2018, 11:45:33 PM »

Thanks for the reply. I've now dowloaded software from the link you provided.

When I insert my USB/Serial adapter into a system ruuning FreeBSD, it tells me:


ugen2.2: <vendor 0x1a86 USB2.0-Ser> at usbus2
uchcom0 on uhub3
uchcom0: (vendor 0x1a86 USB2.0-Ser, rev 1.10/2.54, addr 2) on usbus2.
uchcom0: CH341 detected

Not sure if this tells me if the adapter is suitable for use with the CM12U. Whe

So I'm not sure if this is a drver issue or an unsuitable adapter.

When I connect the adapter to a Windows 7 (x32) system, Device Manager says that
I found some drivers but was unable to install them

Now that your controller has been detected try following this link step by step to verify that your CM12 is working. I haven't tried it on BSD but have in Debian and its variants, Ubuntu and Raspbian. The first part of this link will build and install Heyu and the second part will help you get it running in Domoticz

https://www.domoticz.com/wiki/X10_with_CM11a
Logged

balanga

  • Jr. Member
  • **
  • Helpful Post Rating: 0
  • Posts: 18
Re: Connecting RS232 adapter to USB port
« Reply #9 on: March 08, 2018, 05:57:04 AM »

I did manage to run heyu -v info  succesfully today and did see some download info, but that has only happened once.

Most of the time it ends up with:-

****
xread() returning 0 bytes
Invalid status response (was 0 bytes intead of 14)
HEYU: No response from the CM11A on /dev/cuaU0
Program exiting
****

Further to your link, I'll give it a try on Debian and will report back.
Logged

balanga

  • Jr. Member
  • **
  • Helpful Post Rating: 0
  • Posts: 18
Re: Connecting RS232 adapter to USB port
« Reply #10 on: March 09, 2018, 07:48:25 PM »

I did manage to run heyu -v info  succesfully today and did see some download info, but that has only happened once.

Most of the time it ends up with:-

****
xread() returning 0 bytes
Invalid status response (was 0 bytes intead of 14)
HEYU: No response from the CM11A on /dev/cuaU0
Program exiting
****

Further to your link, I'll give it a try on Debian and will report back.

Here's what I got on Debian when running 'heyu -v info':-

heyu -v info
Version:2.11-rc3
Searching for '/home/jp/.heyu/x10config'
Searching for '/usr/local/etc/heyu/x10.conf'
Found configuration file '/usr/local/etc/heyu/x10.conf'
Heyu directory /usr/local/etc/heyu/ is writable.
Reading Heyu configuration file '/usr/local/etc/heyu/x10.conf'
lockpid: Checking for file '/usr/local/var/lock/LCK..heyu.write.ttyUSB0'
Trying to lock (/usr/local/var/lock/LCK..heyu.write.ttyUSB0)
lockpid: Checking for file '/usr/local/var/lock/LCK..heyu.write.ttyUSB0'
/usr/local/var/lock/LCK..heyu.write.ttyUSB0 is locked
Alert acks are 0x52, 0x12, 0x42
lockpid: Checking for file '/usr/local/var/lock/LCK..heyu.relay.ttyUSB0'
lockpid: Checking for file '/usr/local/var/lock/LCK..heyu.relay.ttyUSB0'
There was already a relay running (pid = 1668)
xwrite() called, count=1
xread() called, count=14, timeout = 3
Alarm - timeout
xread() returning 0 bytes
re checking for poll
xread() called, count=1, timeout = 2
Alarm - timeout
xread() returning 0 bytes
re entering get status
xwrite() called, count=1
xread() called, count=14, timeout = 3
Alarm - timeout
xread() returning 0 bytes
re checking for poll
xread() called, count=1, timeout = 2
Alarm - timeout
xread() returning 0 bytes
re entering get status
xwrite() called, count=1
xread() called, count=14, timeout = 3
Alarm - timeout
xread() returning 0 bytes
Invalid status response (was 0 bytes instead of 14)
HEYU: No response from the CM11A on /dev/ttyUSB0
Program exiting.
lockpid: Checking for file '/usr/local/var/lock/LCK..heyu.write'
Logged

Brian H

  • Community Organizer
  • Hero Member
  • ***
  • Helpful Post Rating: 305
  • Posts: 13295
Re: Connecting RS232 adapter to USB port
« Reply #11 on: March 11, 2018, 01:27:12 AM »

If memory serves me.
A CM11A will not do much until its clock is set. The CM12U maybe the same.
Logged

balanga

  • Jr. Member
  • **
  • Helpful Post Rating: 0
  • Posts: 18
Re: Connecting RS232 adapter to USB port
« Reply #12 on: July 05, 2018, 12:51:20 PM »

After a break of a few months - managed to make some progress:-

Quote
root@Debian:~# heyu -v info
Version:2.11-rc2
Searching for '/root/.heyu/x10config'
Searching for '/etc/heyu/x10.conf'
Found configuration file '/etc/heyu/x10.conf'
Heyu directory /etc/heyu/ is writable.
Reading Heyu configuration file '/etc/heyu/x10.conf'
lockpid: Checking for file '/var/lock/LCK..heyu.write.ttyUSB0'
Trying to lock (/var/lock/LCK..heyu.write.ttyUSB0)
lockpid: Checking for file '/var/lock/LCK..heyu.write.ttyUSB0'
/var/lock/LCK..heyu.write.ttyUSB0 is locked
Alert acks are 0x52, 0x12, 0x42
lockpid: Checking for file '/var/lock/LCK..heyu.relay.ttyUSB0'
lockpid: Checking for file '/var/lock/LCK..heyu.relay.ttyUSB0'
There was already a relay running (pid = 6218)
xwrite() called, count=1
xread() called, count=14, timeout = 3
xread() returning 14 byte(s). The first is 0xff
xwrite() called, count=1
xread() called, count=1, timeout = 1
xread() returning 1 byte(s). The first is 0xeb
Checksum confirmed
xwrite() called, count=1
xread() called, count=1, timeout = 1
xread() returning 1 byte(s). The first is 0x55
Interface is ready.
The battery usage is unknown.
00:50:57 is the interface time
187 is the julian date
Sat (40) is the interface day of the week
Heyu version 2.11-rc2
Configuration at /etc/heyu/x10.conf
Powerline interface on /dev/ttyUSB0
Firmware revision Level = 8
Interface battery usage = Unknown
Raw interface clock: Sat, Day 187, 00:50:57
Searching for /etc/heyu/x10record
File /etc/heyu/x10record is absent
(--> Civil Time: Sat 07 Jul 2018   01:50:57 BST)
No schedule has been uploaded by Heyu.
Housecode = A
0 = off, 1 = on,               unit  16.......8...4..1
Last addressed device =       0x0040 (0000000000000001)
Status of monitored devices = 0x4000 (0000000000000010)
Status of dimmed devices =    0x0000 (0000000000000000)
lockpid: Checking for file '/var/lock/LCK..heyu.write.ttyUSB0'
munlock: Unlink file '/var/lock/LCK..heyu.write.ttyUSB0'

Looks promising... so I'll try and become familiar with what it can do.

Is there a tutorial on how to make the most of it?
Logged
 

X10.com | About X10 | X10 Security Systems | Cameras| Package Deals
© Copyright 2014-2016 X10.com All rights reserved.