Page 1 of 1

BCS Firmware

Posted: Sun Jan 11, 2009 8:31 am
by IrishBeerBaron
Out of curiosity, does ECC have any plans for open sourcing the firmware?

Re: BCS Firmware

Posted: Mon Jan 12, 2009 1:37 pm
by ECC
Currently there are no plans to open up the complete source.

However, the interface is completely open, documentation is ongoing. Users are able to reprogram the BCS-460 through the Open Interface to create their own custom GUIs.

Re: BCS Firmware

Posted: Tue Jan 13, 2009 1:21 pm
by IrishBeerBaron
Sounds good - thanks for the reply.

When you say completely open, does that mean that we will have IO level access to the different ports? i.e. Could I set my UI to poll on DIN0 to see if it was switched, and if so switch on DO0?

Re: BCS Firmware

Posted: Tue Jan 13, 2009 1:56 pm
by ECC
Yes! You will have access to every system variable. Perhaps more than you care for ;)

I took a first shot at documenting the interface.
http://www.embeddedcontrolconcepts.com/ ... _Interface

So in your example, if you want to read a Din0, simply read the file http://yourBCSipaddr/ucsysio.dat. Parse and save position 10 of the comma separated list, which is the Din0 value.

Then, to toggle Output 0, http://yourBCSipaddr/uinputo.dat?proc=0&out=0&

Re: BCS Firmware

Posted: Tue Jan 13, 2009 6:13 pm
by IrishBeerBaron
Excellent - looks pretty straight forward.

I assume that I could also toggle Output 0 via Ucsysio.dat ?

When writing a structure ( example ucsysio ), is it necessary to write the entire structure? Or is it possible to set up the POST parameters to only send those that you are interested in based on position?

Java Example ( triggering Output 0, Output 1 On )

Code: Select all

    try {
        // Construct data
        String data = URLEncoder.encode("58", "UTF-8") + "=" + URLEncoder.encode("255", "UTF-8");
        data += "&" + URLEncoder.encode("59", "UTF-8") + "=" + URLEncoder.encode("255", "UTF-8");
    
        // Send data
        URL url = new URL("http://192.168.0.20:80/ucsysio.dat?data&p=0&s=0&");
        URLConnection conn = url.openConnection();
        conn.setDoOutput(true);
        OutputStreamWriter wr = new OutputStreamWriter(conn.getOutputStream());
        wr.write(data);
        wr.flush();
        wr.close();
    } catch (Exception e) {
    }


Re: BCS Firmware

Posted: Tue Jan 13, 2009 7:11 pm
by ECC
The Output Value entries in the ucsysio[4:9] structure are read only (masked off). The reason for this (to answer your second question) is because you have to write the whole structure, not only the bits that you desire.

So I tried to make any variables that would effect a running system read only from the POST, so that you can write the whole structure without disturbing a running system.

I create facilities to access those runtime variables directly, like uinputo.dat.