Re: Wrting to a text file in N800 /media/mmc1

2008-07-06 Thread nisha jain
Hi All,

Thanks alot for all your comments and help It finally worked I am not sure
cause of problem but I guess it is due the mini-usb cable issue when I copy
through it and keep it plug in i guess memory card is always in read mode
but i have to still dig into it.. I also did unlock of memory card and now
it is working perfectly fine even with lock mode it worked... I am not sure
what is the issue I will send once complete this checking...


Thanks and Regards,
Nisha

On Sun, Jul 6, 2008 at 1:52 PM, Chris Dobbs <[EMAIL PROTECTED]>
wrote:

> Should that not be
> fopen(/, "wt");
>
> i.e
>
> fopen("/media/mmc2/myfile.txt", "wt");
>
>
> ?
>
>
> -Chris
>
>
> On 5 Jul 2008, at 19:54, nisha jain wrote:
>
>   hi All,
>>
>> I wrote a program which is collecting some data and creating text file to
>> write into.
>>
>> I am successfully able to run and execute it in the VmWare maemo
>> enviornment without any problem.
>>
>> When i deployed it into N800 I am getting segmentation fault this
>> application I checked in ARMEL compiled
>>
>> mode on VmWare... I am not sure how to debug it as it is working fine in
>> the Maemo enviornment but crashes
>>
>> on the actual N800 device... Only change is the file created in
>>
>> using like fopen ("filename", "wt");
>>
>> in the Maemo and in case of N800 fope("/media/mmc1", "wt")
>>
>> I tired checking if file gets created to /media/mmc1 or not but it doesn't
>> get created their at all.
>>
>> Let me know if some one has idea?
>>
>> Regards,
>> Nisha
>> ___
>> maemo-developers mailing list
>> maemo-developers@maemo.org
>> https://lists.maemo.org/mailman/listinfo/maemo-developers
>>
>
>
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Wrting to a text file in N800 /media/mmc1

2008-07-06 Thread Kees Jongenburger
On Sat, Jul 5, 2008 at 11:09 PM, nisha jain <[EMAIL PROTECTED]> wrote:
> Hi All,
>
> I just checked in N800 the following program for writing into a file which
>
> doesn't work Any clues what is going wrong? I neither get any error not
> it is
>
> creating a file and writing into it.
>
> #include
>
> void main()
> {
> FILE *Gfile;
> if ((Gfile = fopen("/media/mmc1/test.txt", "wt+")) == NULL)
> {
> printf("Error in file creation");
> }
>
> if(Gfile)
> fprintf(Gfile,"%02x",0x10);
> fclose(Gfile);
> }

Hi Nisha
try printing the error using perror
add include 
and replace the printf with perror("fopen").

The "t" in the fopen is not documented in my man pages what is it used for?
Do you know what happens when you call fclose on a NULL  handle?


Also remember you might be writing to a FAT file system that will not
support setting all file attributes.

>
> Regards,
> Nisha
>
> On Sat, Jul 5, 2008 at 5:34 PM, nisha jain <[EMAIL PROTECTED]> wrote:
>>
>> Hi Gray,
>>
>> I checked the file pointer if it is NULL I am printing error message and
>> returning too.
>>
>> Also i am checking while writing into a file that file pointer is not
>> NULL.
>>
>> I have tested it on mameo (ARMEL) enviornment and it is working absolutely
>> fine
>>
>> I am not able to understand while after porting to N800 it doesn't show up
>> any file created on flash
>>
>> at least it should create an empty file..Does there is some
>> restriciton in writing into flash?
>>
>> Regards,
>> Nisha
>>
>> On Sat, Jul 5, 2008 at 2:29 PM, gary liquid <[EMAIL PROTECTED]> wrote:
>>>
>>> nisha,
>>>
>>> check you have included appended the filename on the end of the path in
>>> your adjusted program.
>>> Check the return values of all functions called and do not assume success
>>> for anything.
>>> Most importantly, put printf("fn msg/n");  calls around your program at
>>> relevant points.
>>> The printfs will help you debug by showing you where your software got to
>>> and optionally whatever additional information you want to display.
>>>
>>> Gary (lcuk on maemo)
>>>
>>> On Sat, Jul 5, 2008 at 6:54 PM, nisha jain <[EMAIL PROTECTED]> wrote:

 hi All,

 I wrote a program which is collecting some data and creating text file
 to write into.

 I am successfully able to run and execute it in the VmWare maemo
 enviornment without any problem.

 When i deployed it into N800 I am getting segmentation fault this
 application I checked in ARMEL compiled

 mode on VmWare... I am not sure how to debug it as it is working fine in
 the Maemo enviornment but crashes

 on the actual N800 device... Only change is the file created in

 using like fopen ("filename", "wt");

 in the Maemo and in case of N800 fope("/media/mmc1", "wt")

 I tired checking if file gets created to /media/mmc1 or not but it
 doesn't get created their at all.

 Let me know if some one has idea?

 Regards,
 Nisha

 ___
 maemo-developers mailing list
 maemo-developers@maemo.org
 https://lists.maemo.org/mailman/listinfo/maemo-developers

>>>
>>
>
>
> ___
> maemo-developers mailing list
> maemo-developers@maemo.org
> https://lists.maemo.org/mailman/listinfo/maemo-developers
>
>
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Wrting to a text file in N800 /media/mmc1

2008-07-05 Thread nisha jain
Hi Ed,

I just checked too I got this suggestion and tried, it is also not working
:(

I am very amazed why it is not working?  So i am trying following now--

#include
>>
>> void main()
>> {
>> FILE *Gfile;
>> if ((Gfile = fopen("/media/mmc1/test.txt", "w+")) == NULL)
>> {
>> printf("Error in file creation");
>> }
>>
>> if(Gfile)
>> fprintf(Gfile,"%02x",0x10);
>> fclose(Gfile);
>> }

Regards,
Nisha

On 7/5/08, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> Nisha,
>
> Try changing the mode flags to "w+", I don't think "wt+" is valid.  If you
> do a `man fopen` on a linux machine you will see there is no "t" option
> for mode flags.
>
> Ed Okerson
>
> > Hi All,
> >
> > I checked permission issue I also tried locking/ unlocaking the memory
> > card
> > but program below is not working..
> >
> > I have permission of writing but it is not generating a simple text file
> > from the following c program which works
> >
> > perfectly fine into maemo ARMEL enviornment so called N800 replica.. What
> > could be the issue?
> >
> > Any inputs will be highly appreciated...
> >
> > Regards,
> > Nisha
> >
> >
> > On 7/5/08, nisha jain <[EMAIL PROTECTED]> wrote:
> >>
> >> Hi All,
> >>
> >> I just checked in N800 the following program for writing into a file
> >> which
> >>
> >> doesn't work Any clues what is going wrong? I neither get any error
> >> not
> >> it is
> >>
> >> creating a file and writing into it.
> >>
> >> #include
> >>
> >> void main()
> >> {
> >> FILE *Gfile;
> >> if ((Gfile = fopen("/media/mmc1/test.txt", "wt+")) == NULL)
> >> {
> >> printf("Error in file creation");
> >> }
> >>
> >> if(Gfile)
> >> fprintf(Gfile,"%02x",0x10);
> >> fclose(Gfile);
> >> }
> >>
> >> Regards,
> >> Nisha
> >>
> >> On Sat, Jul 5, 2008 at 5:34 PM, nisha jain <[EMAIL PROTECTED]> wrote:
> >>
> >>> Hi Gray,
> >>>
> >>> I checked the file pointer if it is NULL I am printing error message
> >>> and
> >>> returning too.
> >>>
> >>> Also i am checking while writing into a file that file pointer is not
> >>> NULL.
> >>>
> >>> I have tested it on mameo (ARMEL) enviornment and it is working
> >>> absolutely
> >>> fine
> >>>
> >>> I am not able to understand while after porting to N800 it doesn't show
> >>> up
> >>> any file created on flash
> >>>
> >>> at least it should create an empty file..Does there is some
> >>> restriciton in writing into flash?
> >>>
> >>> Regards,
> >>> Nisha
> >>>
> >>>
> >>> On Sat, Jul 5, 2008 at 2:29 PM, gary liquid <[EMAIL PROTECTED]> wrote:
> >>>
>  nisha,
> 
>  check you have included appended the filename on the end of the path
>  in
>  your adjusted program.
>  Check the return values of all functions called and do not assume
>  success
>  for anything.
>  Most importantly, put printf("fn msg/n");  calls around your program
>  at
>  relevant points.
>  The printfs will help you debug by showing you where your software got
>  to
>  and optionally whatever additional information you want to display.
> 
>  Gary (lcuk on maemo)
> 
>    On Sat, Jul 5, 2008 at 6:54 PM, nisha jain <[EMAIL PROTECTED]>
> wrote:
> 
> 
> >  hi All,
> >
> > I wrote a program which is collecting some data and creating text
> > file
> > to write into.
> >
> > I am successfully able to run and execute it in the VmWare maemo
> > enviornment without any problem.
> >
> > When i deployed it into N800 I am getting segmentation fault this
> > application I checked in ARMEL compiled
> >
> > mode on VmWare... I am not sure how to debug it as it is working fine
> > in
> > the Maemo enviornment but crashes
> >
> > on the actual N800 device... Only change is the file created in
> >
> > using like fopen ("filename", "wt");
> >
> > in the Maemo and in case of N800 fope("/media/mmc1", "wt")
> >
> > I tired checking if file gets created to /media/mmc1 or not but it
> > doesn't get created their at all.
> >
> > Let me know if some one has idea?
> >
> > Regards,
> > Nisha
> >
> >
> > ___
> > maemo-developers mailing list
> > maemo-developers@maemo.org
> > https://lists.maemo.org/mailman/listinfo/maemo-developers
> >
> >
> 
> >>>
> >>>
> >>
> >>
> > ___
> > maemo-developers mailing list
> > maemo-developers@maemo.org
> > https://lists.maemo.org/mailman/listinfo/maemo-developers
> >
>
>
>
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Wrting to a text file in N800 /media/mmc1

2008-07-05 Thread nisha jain
Hi All,

I checked permission issue I also tried locking/ unlocaking the memory card
but program below is not working..

I have permission of writing but it is not generating a simple text file
from the following c program which works

perfectly fine into maemo ARMEL enviornment so called N800 replica.. What
could be the issue?

Any inputs will be highly appreciated...

Regards,
Nisha


On 7/5/08, nisha jain <[EMAIL PROTECTED]> wrote:
>
> Hi All,
>
> I just checked in N800 the following program for writing into a file which
>
> doesn't work Any clues what is going wrong? I neither get any error not
> it is
>
> creating a file and writing into it.
>
> #include
>
> void main()
> {
> FILE *Gfile;
> if ((Gfile = fopen("/media/mmc1/test.txt", "wt+")) == NULL)
> {
> printf("Error in file creation");
> }
>
> if(Gfile)
> fprintf(Gfile,"%02x",0x10);
> fclose(Gfile);
> }
>
> Regards,
> Nisha
>
> On Sat, Jul 5, 2008 at 5:34 PM, nisha jain <[EMAIL PROTECTED]> wrote:
>
>> Hi Gray,
>>
>> I checked the file pointer if it is NULL I am printing error message and
>> returning too.
>>
>> Also i am checking while writing into a file that file pointer is not
>> NULL.
>>
>> I have tested it on mameo (ARMEL) enviornment and it is working absolutely
>> fine
>>
>> I am not able to understand while after porting to N800 it doesn't show up
>> any file created on flash
>>
>> at least it should create an empty file..Does there is some
>> restriciton in writing into flash?
>>
>> Regards,
>> Nisha
>>
>>
>> On Sat, Jul 5, 2008 at 2:29 PM, gary liquid <[EMAIL PROTECTED]> wrote:
>>
>>> nisha,
>>>
>>> check you have included appended the filename on the end of the path in
>>> your adjusted program.
>>> Check the return values of all functions called and do not assume success
>>> for anything.
>>> Most importantly, put printf("fn msg/n");  calls around your program at
>>> relevant points.
>>> The printfs will help you debug by showing you where your software got to
>>> and optionally whatever additional information you want to display.
>>>
>>> Gary (lcuk on maemo)
>>>
>>>   On Sat, Jul 5, 2008 at 6:54 PM, nisha jain <[EMAIL PROTECTED]> wrote:
>>>
>>>
  hi All,

 I wrote a program which is collecting some data and creating text file
 to write into.

 I am successfully able to run and execute it in the VmWare maemo
 enviornment without any problem.

 When i deployed it into N800 I am getting segmentation fault this
 application I checked in ARMEL compiled

 mode on VmWare... I am not sure how to debug it as it is working fine in
 the Maemo enviornment but crashes

 on the actual N800 device... Only change is the file created in

 using like fopen ("filename", "wt");

 in the Maemo and in case of N800 fope("/media/mmc1", "wt")

 I tired checking if file gets created to /media/mmc1 or not but it
 doesn't get created their at all.

 Let me know if some one has idea?

 Regards,
 Nisha


 ___
 maemo-developers mailing list
 maemo-developers@maemo.org
 https://lists.maemo.org/mailman/listinfo/maemo-developers


>>>
>>
>>
>
>
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Wrting to a text file in N800 /media/mmc1

2008-07-05 Thread nisha jain
How I can check if the mmc set is read only or not?

Regards,
Nisha


On 7/5/08, gary liquid <[EMAIL PROTECTED]> wrote:
>
>
> sounds more like a permissions issue?
> can you write to a file in that location from the terminal and as the same
> user, or is the entire mmc set to read only?
> I have heard rumours that such a thing is possible but never encountered it
> myself (ive got an 810)
>
> Gary
>
> On Sat, Jul 5, 2008 at 9:09 PM, nisha jain <[EMAIL PROTECTED]> wrote:
>
>> Hi All,
>>
>> I just checked in N800 the following program for writing into a file which
>>
>>
>> doesn't work Any clues what is going wrong? I neither get any error
>> not it is
>>
>> creating a file and writing into it.
>>
>> #include
>>
>> void main()
>> {
>> FILE *Gfile;
>> if ((Gfile = fopen("/media/mmc1/test.txt", "wt+")) == NULL)
>> {
>> printf("Error in file creation");
>> }
>>
>> if(Gfile)
>> fprintf(Gfile,"%02x",0x10);
>> fclose(Gfile);
>> }
>>
>> Regards,
>> Nisha
>>
>>
>> On Sat, Jul 5, 2008 at 5:34 PM, nisha jain <[EMAIL PROTECTED]> wrote:
>>
>>> Hi Gray,
>>>
>>> I checked the file pointer if it is NULL I am printing error message and
>>> returning too.
>>>
>>> Also i am checking while writing into a file that file pointer is not
>>> NULL.
>>>
>>> I have tested it on mameo (ARMEL) enviornment and it is working
>>> absolutely fine
>>>
>>> I am not able to understand while after porting to N800 it doesn't show
>>> up any file created on flash
>>>
>>> at least it should create an empty file..Does there is some
>>> restriciton in writing into flash?
>>>
>>> Regards,
>>> Nisha
>>>
>>>
>>> On Sat, Jul 5, 2008 at 2:29 PM, gary liquid <[EMAIL PROTECTED]> wrote:
>>>
 nisha,

 check you have included appended the filename on the end of the path in
 your adjusted program.
 Check the return values of all functions called and do not assume
 success for anything.
 Most importantly, put printf("fn msg/n");  calls around your program at
 relevant points.
 The printfs will help you debug by showing you where your software got
 to and optionally whatever additional information you want to display.

 Gary (lcuk on maemo)

   On Sat, Jul 5, 2008 at 6:54 PM, nisha jain <[EMAIL PROTECTED]> wrote:


>  hi All,
>
> I wrote a program which is collecting some data and creating text file
> to write into.
>
> I am successfully able to run and execute it in the VmWare maemo
> enviornment without any problem.
>
> When i deployed it into N800 I am getting segmentation fault this
> application I checked in ARMEL compiled
>
> mode on VmWare... I am not sure how to debug it as it is working fine
> in the Maemo enviornment but crashes
>
> on the actual N800 device... Only change is the file created in
>
> using like fopen ("filename", "wt");
>
> in the Maemo and in case of N800 fope("/media/mmc1", "wt")
>
> I tired checking if file gets created to /media/mmc1 or not but it
> doesn't get created their at all.
>
> Let me know if some one has idea?
>
> Regards,
> Nisha
>
>
> ___
> maemo-developers mailing list
> maemo-developers@maemo.org
> https://lists.maemo.org/mailman/listinfo/maemo-developers
>
>

>>>
>>>
>>
>>
>>
>
>
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Wrting to a text file in N800 /media/mmc1

2008-07-05 Thread nisha jain
Hi All,

I just checked in N800 the following program for writing into a file which

doesn't work Any clues what is going wrong? I neither get any error not
it is

creating a file and writing into it.

#include

void main()
{
FILE *Gfile;
if ((Gfile = fopen("/media/mmc1/test.txt", "wt+")) == NULL)
{
printf("Error in file creation");
}

if(Gfile)
fprintf(Gfile,"%02x",0x10);
fclose(Gfile);
}

Regards,
Nisha

On Sat, Jul 5, 2008 at 5:34 PM, nisha jain <[EMAIL PROTECTED]> wrote:

> Hi Gray,
>
> I checked the file pointer if it is NULL I am printing error message and
> returning too.
>
> Also i am checking while writing into a file that file pointer is not NULL.
>
> I have tested it on mameo (ARMEL) enviornment and it is working absolutely
> fine
>
> I am not able to understand while after porting to N800 it doesn't show up
> any file created on flash
>
> at least it should create an empty file..Does there is some restriciton
> in writing into flash?
>
> Regards,
> Nisha
>
>
> On Sat, Jul 5, 2008 at 2:29 PM, gary liquid <[EMAIL PROTECTED]> wrote:
>
>> nisha,
>>
>> check you have included appended the filename on the end of the path in
>> your adjusted program.
>> Check the return values of all functions called and do not assume success
>> for anything.
>> Most importantly, put printf("fn msg/n");  calls around your program at
>> relevant points.
>> The printfs will help you debug by showing you where your software got to
>> and optionally whatever additional information you want to display.
>>
>> Gary (lcuk on maemo)
>>
>> On Sat, Jul 5, 2008 at 6:54 PM, nisha jain <[EMAIL PROTECTED]> wrote:
>>
>>> hi All,
>>>
>>> I wrote a program which is collecting some data and creating text file to
>>> write into.
>>>
>>> I am successfully able to run and execute it in the VmWare maemo
>>> enviornment without any problem.
>>>
>>> When i deployed it into N800 I am getting segmentation fault this
>>> application I checked in ARMEL compiled
>>>
>>> mode on VmWare... I am not sure how to debug it as it is working fine in
>>> the Maemo enviornment but crashes
>>>
>>> on the actual N800 device... Only change is the file created in
>>>
>>> using like fopen ("filename", "wt");
>>>
>>> in the Maemo and in case of N800 fope("/media/mmc1", "wt")
>>>
>>> I tired checking if file gets created to /media/mmc1 or not but it
>>> doesn't get created their at all.
>>>
>>> Let me know if some one has idea?
>>>
>>> Regards,
>>> Nisha
>>>
>>> ___
>>> maemo-developers mailing list
>>> maemo-developers@maemo.org
>>> https://lists.maemo.org/mailman/listinfo/maemo-developers
>>>
>>>
>>
>
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Wrting to a text file in N800 /media/mmc1

2008-07-05 Thread nisha jain
hi All,

I wrote a program which is collecting some data and creating text file to
write into.

I am successfully able to run and execute it in the VmWare maemo enviornment
without any problem.

When i deployed it into N800 I am getting segmentation fault this
application I checked in ARMEL compiled

mode on VmWare... I am not sure how to debug it as it is working fine in the
Maemo enviornment but crashes

on the actual N800 device... Only change is the file created in

using like fopen ("filename", "wt");

in the Maemo and in case of N800 fope("/media/mmc1", "wt")

I tired checking if file gets created to /media/mmc1 or not but it doesn't
get created their at all.

Let me know if some one has idea?

Regards,
Nisha
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers