[Message Prev][Message Next][Thread Prev][Thread Next][Message Index][Thread Index]

Re: Wil I be able to use a Z-Wave controller



Neil Cherry <njc@xxxxxxxxxxx> wrote:

>On Fri, 12 Oct 2007 14:45:16 GMT, Dave Houston wrote:
>
>> BTW, I found a reliable source for the 64KB EEPROM and am again actively (if
>> slowly) working on roZetta. I've decided to switch to PureBasic for the PC
>> side so I can supply interfaces for Windows and Linux (and Mac when there's
>> an Intel Mac release of PB). I'm gradually grasping PB and hope to be trying
>> to figure out how to enumerate the COM ports (USB->serial included) with PB
>> under Linux sometime next week. Tibbo has virtual serial port drivers for
>> Linux so I need to learn how to detect those as well.
>
>I've loaded PureBasic Demo but see no libraries to access the
>serial ports. I suspect that the easiest solution is to access
>a specific name (such as /dev/roZetta) and let the Linux user
>link the serial port to that name. This will simplify you coding
>This would hold true for any Unix. You can then run an external
>command to such as 'stty -F /dev/roZetta speed 9600' to set the
>port for your use. Of course twiddling the lines won't be possible
>without libraries so that may not be a good solution to everything.
>
>The command to link is:
>
>ln -sf /dev/ttyM0 /dev/roZetta
>
>Unix will access it correctly. In Unix everything is a file.

PB doesn't do any serial comms. Under Windows that's not much of a problem
as I have VB code that uses Win32 API functions to enumerate the ports and
handle comms. PB treats the Win32 API as if its functions were native PB
functions so it's even easier than under VB.

I haven't looked at Linux serial I/O in detail yet as I want to finish the
Windows app first. I do need to twiddle DTR to put the ZX40a chip into
command (i.e. bootloader) mode.

Charles Sullivan suggested the same thing as you (I think - Linux is new to
me) but I was hoping that, since the DeviceManager in Ubuntu shows all the
hardware and "dmesg | grep tty" will also list the ports, there might be a
way to enumerate them using PB so I can just list them in a menu.

I plan to make the source available (except where license restrictions
prohibit it) so I may just leave this for the Linux users to do themselves.


comp.home.automation Main Index | comp.home.automation Thread Index | comp.home.automation Home | Archives Home