Update programmatically value of field collection item I want to update a field collection

I have the following:

function pdf_app_node_presave($node) {
    if (!$node-&gt;is_new) {
        global $base_url;
        if($node-&gt;type == 'article') {
            $node_wrapper = entity_metadata_wrapper('node', $node);


            foreach ($node_wrapper-&gt;field_chapitres-&gt;value() as $library) {
                $library_wrapper = entity_metadata_wrapper('field_collection_item', $library);

                  $books = $library_wrapper-&gt;field_subchapters-&gt;value();
                  foreach($books as $book){
                    $book_wrapper = entity_metadata_wrapper('field_collection_item', $book);
                    $title ='sfsdfsd';
                    $book_wrapper-&gt;field_pdf_title2-&gt;set($title); 
                    $book_wrapper-&gt;save();

                  }
            }


            field_attach_update('node', $node);





        }

    }

}


But i get an error i think i should use something like 

    $values[0]['field_title'][LANGUAGE_NONE][0] = $title;


but it is also not working.
If you want to Update value of field collection item use Set Something like:

$book_wrapper-&gt;field_title-&gt;set($title); 


For more info See Entity metadata wrappers Docs Example using field collections Section.