Problems with connecting to a USB serial port using MacOS

Hi, all,
Now, I have a a z-wave device USB controller, and a z-wave device. I want to use my computer to send commands to the USB controller , and then USB controller can control that z-wave device....Im sure that my USB controller has been already configured on my laptop (macBook), and the device is in the z-wave network.
I use the codes below:
s1=serial('/dev/tty.SLAB_USBtoUART','BaudRate',9600,'Parity','none','Stopbits',1,'Terminator','CR','Databits',8);
fopen(s1);
command='N,OFF';% switch off the z-wave device..
fprintf(s1,command);
fclose(s1);
BUT.....nothing happened.....the device is still working.. not switched off...
Any idea???
Thank you soooo much!!!!

Answers (0)

Categories

Asked:

on 5 Aug 2012

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!