Our new official repo is on github
LCD Smartie version 5.6 is released!
Download it now: https://github.com/LCD-Smartie/LCDSmartie/releases

working on a CFA-635 LED plugin for Smartie

Discussing issues that occur during plugin development.

Moderators: _X7JAY7X_, caesar, IFR, mattcro, limbo

Post Reply
Shadowhawk
Posts: 9
Joined: September 27th, 2005, 2:28 pm
Location: Milford, CT USA
Contact:

working on a CFA-635 LED plugin for Smartie

Post by Shadowhawk »

Branching off from my earlier topic in this forum, "Trapping code activity re: CF-635 LEDs":

I found the command code and the values needed to access and change colors on the 4 LEDs on this display.

Using suggestions from _X7JAY7X_, poring over code from CF and from other plugins, and playing around with CF's utilities, I got it blocked out rough what I want it to do using 5 functions (1 for each LED and 1 to turn off a specified LED). I'll clean up and actually fix the syntax of the functions when I get home, but I think I'm on a fool's errand...

The problem I've hit is I can't figure a way to get Smartie to send a command packet to a crystalfontz display. This means I'd have to build something to send out the packet directly from my dll (which I'm not even sure can be done), and that is way out of my league. I looked at the code CF uses in the wintest app to do that, but it's written in C, and doesn't make much sense to me. :oops:

I'm going to keep plugging at it and see what I can figure out; I appreciate any input, however; This is mostly for myself so it's not a huge priority, but I know others were asking about such a thing so it would be nice if we can get it to work.

_X7JAY7X_
Hardware Genie - Plugin Author
Posts: 374
Joined: February 16th, 2005, 10:24 pm
Location: Michigan

Post by _X7JAY7X_ »

What is the cf-635? a usb or serial? If you are writing a plugin, the problem you are going to have is "sharing" ports. As far as I know it cannot be done for the serial port. Maybe it can, but I dont know how and have not found any code online about it. As far as sharing the usb port, I am not sure, I have done no usb programming.

J

Shadowhawk
Posts: 9
Joined: September 27th, 2005, 2:28 pm
Location: Milford, CT USA
Contact:

Post by Shadowhawk »

it's a USB device, the crystalfontz driver emulates a COM port.

Shadowhawk
Posts: 9
Joined: September 27th, 2005, 2:28 pm
Location: Milford, CT USA
Contact:

Post by Shadowhawk »

To clarify my question and my thinking:

CF's software for the 635 controls the LEDs via a packet sent with command 34, the LED # (0-3), and percentage levels for the red and green elements of the bi-color LED as it's data.

What I'm trying to figure out is if Smartie can also do this; my guess is it would have to work like the brightness/contrast setting, or like changing a line of text on the screen - same principle, different command #. I have the algorithm worked out and the function necessary to format the data to be sent via DLL, but how to send it escapes me.

I already know I can't send a packet with CF's software while Smartie is running (I tried this weekend); it sees the emulated COM port (this is USB, again) as being in use, and vice-versa - so JAY's right, I can't share the port.

Shadowhawk
Posts: 9
Joined: September 27th, 2005, 2:28 pm
Location: Milford, CT USA
Contact:

Post by Shadowhawk »

Something just occurred to me, reading limbo's answer to another post in the Discussion forum regarding the "test driver" - if Init and Fini are used in the test driver's .ini file to send commands to the display, can Smartie (or a plugin) do this with the driver designed for supported displays? in other words, could I use that to send my command to the LED on the 635, and if so how would I call it (and can it be called as an action?)? If anyone has any info, please reply or better yet PM me.

pushing ever onward... :wink:

Clipperjay
Posts: 1
Joined: October 31st, 2005, 12:13 pm
Location: U.K

Found your problem very interesting!

Post by Clipperjay »

Shadowhawk I'm looking for the same solution I need some sort of plugin driver via USB from one mobo to another displaying temps and fans speeds on windows. Have you found anyone who knows how to send packets of data via USB yet? I don't mind if I end up using smartie software or C++ wintest as long as its via USB.
My main problems is very simular to yours but mine being comunication from mobo to mobo.
What kind of hardware are you using from crystalfontz?

You can emulate a USB to interface with a RS-232 com port and assign to it. The main problem is making the CF a device and you pc a host if your using windows net. This might work. But I'm out of my depth here as well.

penjuin
Hardware Genie - Plugin Author
Posts: 42
Joined: June 28th, 2005, 3:42 am
Location: Australia

Post by penjuin »

Does smartie also use driverlinx to send data out the serial port? I'm sorry if this is a dumb question, but I have never used driverlinx before. I know for a fact that the parallel port can be shared using this, just try running two different smarties!

hydrolisk1792
Site Admin
Posts: 305
Joined: July 23rd, 2010, 8:32 pm
Location: Las Vegas, NV USA
Contact:

Re: working on a CFA-635 LED plugin for Smartie

Post by hydrolisk1792 »

It would be great if someone could get this to work because my idea with the CFA 635 is to have the LED's removed and use the GPO pins for somethign completely different and all I need is for the pins to either go High when some special event happeneds, and go low when something else happeneds. .. Also it would be nice to read and display the temperature data from the temperature sensors that can be used with the CFA 635's SCAB (System cooling accessory board). Maybe on top of all that, be able to actually control the fan outputs and read the tac data from those said fans whilst using the SCAB with it. Any help would be greatly appreciated in this project. . . Even a plugin that makes this happen would be awsome because that would still make it to where we can directly control the GPO pins for the LEDs on the front of the device in the Actions tab of smartie :D

dperrow
Plugin Author
Posts: 276
Joined: May 27th, 2011, 2:13 pm
Location: Stirling, Scotland

Re: working on a CFA-635 LED plugin for Smartie

Post by dperrow »

Having had a look at the Crystalfontz driver in smartie it does not have the GPO functions in it. I believe it's written in Pascal and I don't have the skills or ide to change it. If you have the commands required and there's some kind soul out there with the time and ability then I don't believe it would be very hard to do.

hydrolisk1792
Site Admin
Posts: 305
Joined: July 23rd, 2010, 8:32 pm
Location: Las Vegas, NV USA
Contact:

Re: working on a CFA-635 LED plugin for Smartie

Post by hydrolisk1792 »

dperrow wrote:Having had a look at the Crystalfontz driver in smartie it does not have the GPO functions in it. I believe it's written in Pascal and I don't have the skills or ide to change it. If you have the commands required and there's some kind soul out there with the time and ability then I don't believe it would be very hard to do.
What kind of programming language is Pascal? I can't say that I have ever heard of that before lol. Yeah I have the datasheet on the CFA 635 and all the packet information required to run the display and all the other functions of the display and SCAB board. . .

hydrolisk1792
Site Admin
Posts: 305
Joined: July 23rd, 2010, 8:32 pm
Location: Las Vegas, NV USA
Contact:

Re: working on a CFA-635 LED plugin for Smartie

Post by hydrolisk1792 »

Would there maybe be a way to code it into smartie directly for use with the GPO output commands in the actions tab?

dperrow
Plugin Author
Posts: 276
Joined: May 27th, 2011, 2:13 pm
Location: Stirling, Scotland

Re: working on a CFA-635 LED plugin for Smartie

Post by dperrow »

The whole of Smartie was created in Pascal but you can develop dll's in any language you like (within reason)

I'm fairly sure the GPO commands in the actions just call functions in the display dll.

hydrolisk1792
Site Admin
Posts: 305
Joined: July 23rd, 2010, 8:32 pm
Location: Las Vegas, NV USA
Contact:

Re: working on a CFA-635 LED plugin for Smartie

Post by hydrolisk1792 »

dperrow wrote:The whole of Smartie was created in Pascal but you can develop dll's in any language you like (within reason)

I'm fairly sure the GPO commands in the actions just call functions in the display dll.
Oh, that makes sence now. That is how it is able to work with the Matrix Oribital Displays with the GPO pins. . .

Post Reply