I made "sensors.default.so" for arm9 dev.board - Armadillo440 (http://
www.atmark-techno.com/products/armadillo/a440)
use I2C accelerometer and magnetic filed sensors. and calculate to
orientation.
I want to save sensor calibration data to internal file at
"sensors.c". and try, but, permission error occurred.
How can I write to internal file system from "sensors.default.so" ?
On Tue, Jun 15, 2010 at 8:59 AM, namaRyo <r.ikuy...@gmail.com> wrote: > Hi, this is nama.
> I made "sensors.default.so" for arm9 dev.board - Armadillo440 (http:// > www.atmark-techno.com/products/armadillo/a440) > use I2C accelerometer and magnetic filed sensors. and calculate to > orientation.
> I want to save sensor calibration data to internal file at > "sensors.c". and try, but, permission error occurred.
> How can I write to internal file system from "sensors.default.so" ?
Thanks advice and sample code. Before, I used fputs() and fgets(). then, fputs() was not able to be done though fgets() was able to be done. filepath permission is set to 777 beforehand. Is the place of the folder path(.data/misc/cal/) bad? or should I use fwrite() ? I try by using fwrite.
> from native libraries, you can do file operations with below calls.. > fopen(filepath) > fwrite() > fclose()
> Also, you might want to make sure the filepath have write access for the > process (a simple `chmod 777 <filepath>` will suffice)
> -Deva
> On Tue, Jun 15, 2010 at 8:59 AM, namaRyo <r.ikuy...@gmail.com> wrote:
>> Hi, this is nama.
>> I made "sensors.default.so" for arm9 dev.board - Armadillo440 (http:// >> www.atmark-techno.com/products/armadillo/a440) >> use I2C accelerometer and magnetic filed sensors. and calculate to >> orientation.
>> I want to save sensor calibration data to internal file at >> "sensors.c". and try, but, permission error occurred.
>> How can I write to internal file system from "sensors.default.so" ?
On Tue, Jun 15, 2010 at 9:27 PM, RYO IKUYAMA <r.ikuy...@gmail.com> wrote: > Hi, Deva
> Thanks advice and sample code. > Before, I used fputs() and fgets(). then, fputs() was not able to be > done though fgets() was able to be done. filepath permission is set to > 777 beforehand. > Is the place of the folder path(.data/misc/cal/) bad? or should I > use fwrite() ? > I try by using fwrite.
>> from native libraries, you can do file operations with below calls.. >> fopen(filepath) >> fwrite() >> fclose()
>> Also, you might want to make sure the filepath have write access for the >> process (a simple `chmod 777 <filepath>` will suffice)
>> -Deva
>> On Tue, Jun 15, 2010 at 8:59 AM, namaRyo <r.ikuy...@gmail.com> wrote:
>>> Hi, this is nama.
>>> I made "sensors.default.so" for arm9 dev.board - Armadillo440 (http:// >>> www.atmark-techno.com/products/armadillo/a440) >>> use I2C accelerometer and magnetic filed sensors. and calculate to >>> orientation.
>>> I want to save sensor calibration data to internal file at >>> "sensors.c". and try, but, permission error occurred.
>>> How can I write to internal file system from "sensors.default.so" ?
On Wed, Jun 16, 2010 at 6:11 PM, Akash Choudhari <akas...@gmail.com> wrote: > FWRITE should work in your case
> - Akash
> On Tue, Jun 15, 2010 at 9:27 PM, RYO IKUYAMA <r.ikuy...@gmail.com> wrote: > > Hi, Deva
> > Thanks advice and sample code. > > Before, I used fputs() and fgets(). then, fputs() was not able to be > > done though fgets() was able to be done. filepath permission is set to > > 777 beforehand. > > Is the place of the folder path(.data/misc/cal/) bad? or should I > > use fwrite() ? > > I try by using fwrite.
> > On Wed, Jun 16, 2010 at 3:51 AM, Deva R <r.deva...@gmail.com> wrote: > >> There might be better ways, but to start with you can refer our sample > debug > >> code, where we dump video frame data to files in filesystem.
> >> from native libraries, you can do file operations with below calls.. > >> fopen(filepath) > >> fwrite() > >> fclose()
> >> Also, you might want to make sure the filepath have write access for the > >> process (a simple `chmod 777 <filepath>` will suffice)
> >> -Deva
> >> On Tue, Jun 15, 2010 at 8:59 AM, namaRyo <r.ikuy...@gmail.com> wrote:
> >>> Hi, this is nama.
> >>> I made "sensors.default.so" for arm9 dev.board - Armadillo440 (http:// > >>> www.atmark-techno.com/products/armadillo/a440) > >>> use I2C accelerometer and magnetic filed sensors. and calculate to > >>> orientation.
> >>> I want to save sensor calibration data to internal file at > >>> "sensors.c". and try, but, permission error occurred.
> >>> How can I write to internal file system from "sensors.default.so" ?
On Wed, Jun 16, 2010 at 9:41 PM, Akash Choudhari <akas...@gmail.com> wrote: > FWRITE should work in your case
> - Akash
> On Tue, Jun 15, 2010 at 9:27 PM, RYO IKUYAMA <r.ikuy...@gmail.com> wrote: >> Hi, Deva
>> Thanks advice and sample code. >> Before, I used fputs() and fgets(). then, fputs() was not able to be >> done though fgets() was able to be done. filepath permission is set to >> 777 beforehand. >> Is the place of the folder path(.data/misc/cal/) bad? or should I >> use fwrite() ? >> I try by using fwrite.
>>> from native libraries, you can do file operations with below calls.. >>> fopen(filepath) >>> fwrite() >>> fclose()
>>> Also, you might want to make sure the filepath have write access for the >>> process (a simple `chmod 777 <filepath>` will suffice)
>>> -Deva
>>> On Tue, Jun 15, 2010 at 8:59 AM, namaRyo <r.ikuy...@gmail.com> wrote:
>>>> Hi, this is nama.
>>>> I made "sensors.default.so" for arm9 dev.board - Armadillo440 (http:// >>>> www.atmark-techno.com/products/armadillo/a440) >>>> use I2C accelerometer and magnetic filed sensors. and calculate to >>>> orientation.
>>>> I want to save sensor calibration data to internal file at >>>> "sensors.c". and try, but, permission error occurred.
>>>> How can I write to internal file system from "sensors.default.so" ?
On Thu, Jun 17, 2010 at 5:01 AM, Deva R <r.deva...@gmail.com> wrote: > is fopen() successful or does it return errorcode?
>>if ((fp = fopen(CALIBRATION_FILE, "rw")) == NULL) { > can you try fopen(CALIBRATION_FILE, "w+")? > i dont feel "rw" is right mode to pass..
> -Deva
> On Wed, Jun 16, 2010 at 6:11 PM, Akash Choudhari <akas...@gmail.com> wrote:
>> FWRITE should work in your case
>> - Akash
>> On Tue, Jun 15, 2010 at 9:27 PM, RYO IKUYAMA <r.ikuy...@gmail.com> wrote: >> > Hi, Deva
>> > Thanks advice and sample code. >> > Before, I used fputs() and fgets(). then, fputs() was not able to be >> > done though fgets() was able to be done. filepath permission is set to >> > 777 beforehand. >> > Is the place of the folder path(.data/misc/cal/) bad? or should I >> > use fwrite() ? >> > I try by using fwrite.
>> > On Wed, Jun 16, 2010 at 3:51 AM, Deva R <r.deva...@gmail.com> wrote: >> >> There might be better ways, but to start with you can refer our sample >> >> debug >> >> code, where we dump video frame data to files in filesystem.
>> >> from native libraries, you can do file operations with below calls.. >> >> fopen(filepath) >> >> fwrite() >> >> fclose()
>> >> Also, you might want to make sure the filepath have write access for >> >> the >> >> process (a simple `chmod 777 <filepath>` will suffice)
>> >> -Deva
>> >> On Tue, Jun 15, 2010 at 8:59 AM, namaRyo <r.ikuy...@gmail.com> wrote:
>> >>> Hi, this is nama.
>> >>> I made "sensors.default.so" for arm9 dev.board - Armadillo440 (http:// >> >>> www.atmark-techno.com/products/armadillo/a440) >> >>> use I2C accelerometer and magnetic filed sensors. and calculate to >> >>> orientation.
>> >>> I want to save sensor calibration data to internal file at >> >>> "sensors.c". and try, but, permission error occurred.
>> >>> How can I write to internal file system from "sensors.default.so" ?
On Thu, Jun 17, 2010 at 11:09 AM, RYO IKUYAMA <r.ikuy...@gmail.com> wrote: > Thank you Deva,
> I'll try to fix it soon and report results again.
> -- > nama
> On Thu, Jun 17, 2010 at 5:01 AM, Deva R <r.deva...@gmail.com> wrote: >> is fopen() successful or does it return errorcode?
>>>if ((fp = fopen(CALIBRATION_FILE, "rw")) == NULL) { >> can you try fopen(CALIBRATION_FILE, "w+")? >> i dont feel "rw" is right mode to pass..
>> -Deva
>> On Wed, Jun 16, 2010 at 6:11 PM, Akash Choudhari <akas...@gmail.com> wrote:
>>> FWRITE should work in your case
>>> - Akash
>>> On Tue, Jun 15, 2010 at 9:27 PM, RYO IKUYAMA <r.ikuy...@gmail.com> wrote: >>> > Hi, Deva
>>> > Thanks advice and sample code. >>> > Before, I used fputs() and fgets(). then, fputs() was not able to be >>> > done though fgets() was able to be done. filepath permission is set to >>> > 777 beforehand. >>> > Is the place of the folder path(.data/misc/cal/) bad? or should I >>> > use fwrite() ? >>> > I try by using fwrite.
>>> > On Wed, Jun 16, 2010 at 3:51 AM, Deva R <r.deva...@gmail.com> wrote: >>> >> There might be better ways, but to start with you can refer our sample >>> >> debug >>> >> code, where we dump video frame data to files in filesystem.
>>> >> from native libraries, you can do file operations with below calls.. >>> >> fopen(filepath) >>> >> fwrite() >>> >> fclose()
>>> >> Also, you might want to make sure the filepath have write access for >>> >> the >>> >> process (a simple `chmod 777 <filepath>` will suffice)
>>> >> -Deva
>>> >> On Tue, Jun 15, 2010 at 8:59 AM, namaRyo <r.ikuy...@gmail.com> wrote:
>>> >>> Hi, this is nama.
>>> >>> I made "sensors.default.so" for arm9 dev.board - Armadillo440 (http:// >>> >>> www.atmark-techno.com/products/armadillo/a440) >>> >>> use I2C accelerometer and magnetic filed sensors. and calculate to >>> >>> orientation.
>>> >>> I want to save sensor calibration data to internal file at >>> >>> "sensors.c". and try, but, permission error occurred.
>>> >>> How can I write to internal file system from "sensors.default.so" ?