cancel
Showing results for 
Search instead for 
Did you mean: 
1 Reply
CherylO-Xerox
Valued Advisor
Valued Advisor

Re: Xerox network accounting (JBA) C70 sending accounting users

Hello Ellajohn.

 

If you have not already resolved this issue, we suggest you search our online knowledgebase for this product: Xerox Color C60/C70 Printer.

 

Alternatively, you can visit our Contact Us page for other support options.

Thanks,
CherylO-Xerox
Community Manager

Be sure to click Kudos for those who have helped you.
Select Accept as Solution for posts that have helped to solve your issue(s)!

0 Kudos
Ellajohn
New Member
New Member

Xerox network accounting (JBA) C70 sending accounting users

Product Name: Other - specify product in post

I am trying to send a list of users to the Xerox for network accounting purposes.

I successfully do this with 2 Xerox models (XEROX WorkCentre 7556 and XEROX WorkCentre 7830), following sudo code in PHP:

function SendUsersToXerox($ip,$users)
{    $url="{$ip}/acct/set_auth";    $auth='account:jbaserve';    $post="+aaav1.0\n+purge\n";

    foreach ($users as $u)
    {        $post.="+u\"{$u->login}\"\"{$u->code}\"\n";
    }    $ch = curl_init();    curl_setopt($ch, CURLOPT_URL, $url);    curl_setopt($ch, CURLOPT_USERAGENT, 'EQ Device Control Engine');    curl_setopt($ch,CURLOPT_POST, 1); 
    curl_setopt($ch,CURLOPT_POSTFIELDS,$post);    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);    curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);    curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5);    curl_setopt($ch, CURLOPT_FRESH_CONNECT, TRUE);    curl_setopt($ch, CURLOPT_TIMEOUT, 5);    curl_setopt($ch, CURLOPT_USERPWD, "$auth");    curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);    curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/xrx-acct-data']);    $data = curl_exec($ch);    $httpcode = curl_getinfo($ch, CURLINFO_HTTP_CODE);    curl_close($ch);
//  echo "HTTP CODE: {$httpcode}<br/>";
//  echo $data;
}

This code works perfectly on the above named Xerox's but fails on the C70 with a 401 error and the following message:

Invalid accounting authentication version

Network accounting is enabled on the device, and I can collect all jobs from the printer at the URL acct/get_acct

If I pass in bad post data I get a different error message:

HTTP Return 400
The Request had invalid syntax

I can't find any references to JBA or Network Accounting anywhere and am not sure how to find out if the format has changed on set_auth or if it's version difference that needs to be set.

I know there are differences in the get_acct output that does point to a different version of the accounting.

Tags (4)
0 Kudos