Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Rs232 connection
#11
This is the default setting for arduino.... speed 9600, data 8bits, NO parity bits, stop bits 1.
Reply

#12
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?





Reply

#13
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
Reply

#14
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\"); 




Reply

#15
that is corrrect
Reply

#16
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?
Reply

#17
yes you need to add 0x03 to the start of each command as stated in Comfort Protocol
Reply

#18
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});
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

Powered By MyBB, © 2002-2026 Melroy van den Berg.