06-22-2024, 08:59 AM
(This post was last modified: 06-22-2024, 09:00 AM by emabonacchi.)
This is the default setting for arduino.... speed 9600, data 8bits, NO parity bits, stop bits 1.
|
Rs232 connection
|
|
06-22-2024, 08:59 AM
(This post was last modified: 06-22-2024, 09:00 AM by emabonacchi.)
This is the default setting for arduino.... speed 9600, data 8bits, NO parity bits, stop bits 1.
06-22-2024, 03:14 PM
Now i have a little suspect. I try to explain (it\'s difficult because my bad english):
When Ucm is connected via rs232 to my pc running Homeseer, i can open or close a window and pc \"hear\" data via rs232.So, i disconnect Pc and connect Arduino. Opening and closing the window, no data receive. If i reconnect Pc, data ok. I have read on \"comfort protocol\": Before the UCM can accept and commands or send status, it needs a valid login. This is done using the LI login command LIxxxxxx where xxxxxx is a 4 to 6 digit numerical code. If the code is valid, UCM reports LUnn where nn is a user number 1 to 16 or 254 for Engineer. If invalid LU00 is seen. E.g. LU09 means Login by User 9. Once the UCM is logged in commands are accepted and events are reported by the UCM Well, maybe this can be the problem? I think no, because when i reconnect Pc, ucm continues to send data correctly even without doing a new login. So, i think it means data continue to way along the rs232. Am i in wrong?
06-23-2024, 01:22 AM
Some data like alarms can go from UCM to PC without a log in. But you need to log inm before the PC can send commands to UCM
06-24-2024, 04:11 PM
(This post was last modified: 06-24-2024, 04:12 PM by emabonacchi.)
Finally i have had a working result!!
The problem, was only me.... I was in confusion with rear and front, male or female, tx and rx connections.Now, i can easily receive for example \"IP0200\" when i close a window and \"IP0201\" when i open the same window as a set of charachters. Next step, is to send to Ucm some messages.I am not sure about the format i have to send this.I have understood i need to send a STX, a message and a CR. Maybe i need to send 3 different strings? Or a single string? Or a charachter at time? In the example <STX>O!1501<CR>, do i need to go in this way?: Serial1.write(\"03\"); Serial1.write(\"O!1501\"); Serial1.write(\"0D\");
06-25-2024, 01:00 AM
that is corrrect
06-27-2024, 08:56 AM
(This post was last modified: 06-27-2024, 09:00 AM by emabonacchi.)
All ok in receiving data from Ucm, but unfortunaterly no success in sending.
I am doing something wrong, but i don\'t understand what. I think something about string i send. Maybe something like \"0x03\" is what i need?
06-28-2024, 04:47 AM
yes you need to add 0x03 to the start of each command as stated in Comfort Protocol
06-28-2024, 02:42 PM
Ok, finally everything seems to works fine!
I want to thank you very very very much. Your help was great! For who wants to use Arduino, the way to send something via serial port is this: Serial1.write({0x03}); Serial1.write(\"M?\"); Serial1.write({0x0D}); |
| Users browsing this thread: |
| 2 Guest(s) |