BCS Firmware

Suggestions, Problems, Availability, etc. Everything is up for discussion.
Post Reply
IrishBeerBaron
Posts: 11
Joined: Sat Jan 03, 2009 2:12 pm

BCS Firmware

Post by IrishBeerBaron »

Out of curiosity, does ECC have any plans for open sourcing the firmware?
User avatar
ECC
Posts: 676
Joined: Fri Sep 12, 2008 12:29 pm
Bot?: No
Contact:

Re: BCS Firmware

Post 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.
IrishBeerBaron
Posts: 11
Joined: Sat Jan 03, 2009 2:12 pm

Re: BCS Firmware

Post 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?
User avatar
ECC
Posts: 676
Joined: Fri Sep 12, 2008 12:29 pm
Bot?: No
Contact:

Re: BCS Firmware

Post 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&
IrishBeerBaron
Posts: 11
Joined: Sat Jan 03, 2009 2:12 pm

Re: BCS Firmware

Post 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) {
    }

User avatar
ECC
Posts: 676
Joined: Fri Sep 12, 2008 12:29 pm
Bot?: No
Contact:

Re: BCS Firmware

Post 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.
Post Reply