Re: [Tinyos-help] help needed on uint64_t type

2009-02-06 Thread BAI LI
Hi,

Thanks for your solution. It is a method. But when you use UNION structure,
every time you only can store one varialbe in that UNION structure. You have
to overwrite that memory address Which made it a bit inconvenience. BUt it
is a good method when you break a 64 bits message into two 32 bits messages
though. Thanks. :)

Regards,
Bai
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] help needed on uint64_t type

2009-02-05 Thread BAI LI
Hi All,

I just tested it. I guess prinf couldn't print 64 bits variables but low 32
btis instead. By moving the  variable 32 bits left, it can print the high 32
bits. such as a32. it made the debugging work a bit harder but still ok.
Anyone kowns how to print the whole variable instead breaking it into two
parts. Let me know. Thanks.

Regards,
Bai

On Thu, Feb 5, 2009 at 5:56 PM, kiseop Lee aco...@gmail.com wrote:

 Hi,
 This is tested in Visual C++ in the Windows. but I don't know it in tinyos
 compiler.
 Only refer to your work...

  char sql[100];

 __int64 var1=0x12345678ABCDABCD;
  sprintf(sql,%I64x,var1);   //not L. Upper case of i[ai]...
 sprintf(sql,%I64d,var1);

 Best regards,
 K.S.Lee

  2009/2/5 BAI LI libai0...@gmail.com

 Hi All,

 I have defined a uint64_t type variable as follows:

 uint64_t a;
 a=0x;
 printf(a= %lld /n,a);
 printf(a= %llx /n,a);

 the result displayed as follows:

 a= -1
 a= 

 The compilation didn't show any error. What is the problem? Does printf
 support to display the uint64_t type? Any help would be appreciated!

 Regards,
 Bai


 ___
 Tinyos-help mailing list
 Tinyos-help@millennium.berkeley.edu
 https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help



___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] help needed on uint64_t type

2009-02-05 Thread BAI LI
Hi Andrey,

I just tested it. it didn't work though. What the flag you used in printf?
Is that llx? Right? It still displayed low 32 bits. Confusing.

Regards,
Bai

On Fri, Feb 6, 2009 at 3:27 AM, Andrey Gursky andrey.gur...@online.uawrote:

 Bai, you should explicit write ULL at the end of the such big number
 (tested in C):
 a=0xULL;

 Best wishes,
 Andrey

  Hi All,

 I have defined a uint64_t type variable as follows:

 uint64_t a;
 a=0x;
 printf(a= %lld /n,a);
 printf(a= %llx /n,a);

 the result displayed as follows:

 a= -1
 a= 

 The compilation didn't show any error. What is the problem? Does printf
 support to display the uint64_t type? Any help would be appreciated!

 Regards,
 Bai



___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] help needed on uint64_t type

2009-02-05 Thread Eric Decker
I don't think the tinyos printf handles 64 bit objects.

eric


On Thu, Feb 5, 2009 at 1:32 PM, BAI LI libai0...@gmail.com wrote:

 Hi All,

 I just tested it. I guess prinf couldn't print 64 bits variables but low 32
 btis instead. By moving the  variable 32 bits left, it can print the high 32
 bits. such as a32. it made the debugging work a bit harder but still ok.
 Anyone kowns how to print the whole variable instead breaking it into two
 parts. Let me know. Thanks.

 Regards,
 Bai

 On Thu, Feb 5, 2009 at 5:56 PM, kiseop Lee aco...@gmail.com wrote:

 Hi,
 This is tested in Visual C++ in the Windows. but I don't know it in tinyos
 compiler.
 Only refer to your work...

  char sql[100];

 __int64 var1=0x12345678ABCDABCD;
  sprintf(sql,%I64x,var1);   //not L. Upper case of i[ai]...
 sprintf(sql,%I64d,var1);

 Best regards,
 K.S.Lee

  2009/2/5 BAI LI libai0...@gmail.com

 Hi All,

 I have defined a uint64_t type variable as follows:

 uint64_t a;
 a=0x;
 printf(a= %lld /n,a);
 printf(a= %llx /n,a);

 the result displayed as follows:

 a= -1
 a= 

 The compilation didn't show any error. What is the problem? Does printf
 support to display the uint64_t type? Any help would be appreciated!

 Regards,
 Bai


 ___
 Tinyos-help mailing list
 Tinyos-help@millennium.berkeley.edu
 https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help




 ___
 Tinyos-help mailing list
 Tinyos-help@millennium.berkeley.edu
 https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help




-- 
Eric B. Decker
Senior (over 50 :-) Researcher
Autonomous Systems Lab
Jack Baskin School of Engineering
UCSC
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] help needed on uint64_t type

2009-02-05 Thread Andrey Gursky
Hi Bai!  I've tried it only in pure C (not nesC) with %lld and %llx.Regards,Andrey  Hi Andrey,  I just tested it. it didn't work though. What the flag you used in printf? Is that llx? Right? It still displayed low 32 bits. Confusing.  Regards, Bai On Fri, Feb 6, 2009 at 3:27 AM, Andrey Gursky andrey.gur...@online.ua wrote: Bai, you should explicit write ULL at the end of the such big number (tested in C):a=0xULL; Best wishes,Andrey  Hi All,  I have defined a uint64_t type variable as follows:  uint64_t a; a=0x; printf("a= %lld /n",a); printf("a= %llx /n",a);  the result displayed as follows:  a= -1 a=   The compilation didn't show any error. What is the problem? Does printf support to display the uint64_t type? Any help would be appreciated!   Regards,Bai   
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] help needed on uint64_t type

2009-02-05 Thread ivi610
Hello
i had the same problem with uint64_t on zigbit modules which include an 
atmega1281 mcu.
i did it with an union :
something like that just check the union type in c language!
union {

uint32 a[2];
uint64 a64;
} aunion;

print( a[0])
print(a[1])

something like that sould work.
it's pseudo code but it did it for me in C.

 Cyril





De : tinyos-help-requ...@millennium.berkeley.edu 
tinyos-help-requ...@millennium.berkeley.edu
À : tinyos-help@millennium.berkeley.edu
Envoyé le : Vendredi, 6 Février 2009, 0h51mn 13s
Objet : Tinyos-help Digest, Vol 70, Issue 12

Send Tinyos-help mailing list submissions to
tinyos-help@millennium.berkeley.edu

To subscribe or unsubscribe via the World Wide Web, visit
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

or, via email, send a message with subject or body 'help' to
tinyos-help-requ...@millennium.berkeley.edu

You can reach the person managing the list at
tinyos-help-ow...@millennium.berkeley.edu

When replying, please edit your Subject line so it is more specific
than Re: Contents of Tinyos-help digest...


Today's Topics:

   1. Deluge T2 dissemination problem on XubunTOS-2.1.0
  (Mehmet Akif Antepli)
   2. Re: help needed on uint64_t type (BAI LI)
   3. Re: help needed on uint64_t type (BAI LI)
   4. Re: help needed on uint64_t type (Eric Decker)
   5. tossim acknowledgement when TOS_NODE_ID is differentfrom AM
  address (Jung Woo Lee)
   6. Re: tossim acknowledgement when TOS_NODE_ID isdifferent from
  AM address (Philip Levis)
   7. Mote-PC serial communication and SerialForwarder (Andrew C. Jung)


--

Message: 1
Date: Thu, 5 Feb 2009 22:55:00 +0200
From: Mehmet Akif Antepli akifante...@gmail.com
Subject: [Tinyos-help] Deluge T2 dissemination problem on
XubunTOS-2.1.0
To: tinyos help tinyos-help@millennium.berkeley.edu
Message-ID:
f7db91190902051255y55edbdc7rccda4ff5c0248...@mail.gmail.com
Content-Type: text/plain; charset=ISO-8859-1

Hi,

Could anybody help me with the following? I got stuck with the
dissemination problem below!


I am working on XubunTOS-2.1 and using two motes; one is a MICAz and
the other is a TelosB mote.

I am using MICAz as base-station and trying to program TelosB using
Deluge T2 with the following steps:

1-) In order to load GoldenImage into MICAz, I use the following
command on the console opened in the GoldenImage directory;

CFLAGS+=DDELUGE_BASESTATION make micaz install,0 mib520,/dev/ttyUSB0

2-)  Then I load GoldenImage into TelosB, also. I use the following
command on the console opened in the GoldenImage directory;

CFLAGS+=DDELUGE_LIGHT_BASESTATION make telosb install,1 bsl,/dev/ttyUSB2

3-) After loading GoldenImage to both motes, I build
/opt/tinyos-2.1.0/apps/tests/deluge/Blink application for Telosb
whom I will insert into MICAz's flash and try to disseminate it
so that I hope I would reboot TelosB with that Blink image. I use the
following command on the console opened in the Blink directory;

make telosb

3-) Then, I load Blink application image (build for TelosB) as 1st
image into MICAz's flash with the following command;

tos-deluge /dev/ttyUSB1 micaz -i 1
/opt/tinyos-2.1.0/apps/tests/deluge/Blink/build/telosb/tos_image.xml

4-) Then I ping MICAz base-station with the following command;

tos-deluge /dev/ttyUSB1 micaz -p 1

and i see that MICAz is loaded with  GoldenImage and Blink application
image is on its flash as the 1st image.

Also pinging TelosB with tos-deluge /dev/ttyUSB2 telosb -p 0 command
shows that GoldenImage is loaded.

Therefore, upto now, all the steps work. However, the problem is in
the last step!

5-) Finally, I try to disseminate Blink image and reboot telosB. I run
the following two commands;

tos-deluge /dev/ttyUSB1 micaz -d 1
tos-deluge /dev/ttyUSB1 micaz -dr 1

For both command, it got the following message,

Command is sent

Then, I assume that dissemination is finished and TelosB would reboot
itself. However, nothing happens on TelosB (It does not blink!)

Then, I ping TelosB and see nothing more than GoldenImage! Disseminate
does not work. Blink application image did not loaded to TelosB

I couldn't figure out the wrong thing here.

Any suggestions?

Thanks in advence,

Mehmet Akif Antepli
Graduate Student
Dept. of Electrical-Electronics Eng.
METU


--

Message: 2
Date: Fri, 6 Feb 2009 07:32:18 +1000
From: BAI LI libai0...@gmail.com
Subject: Re: [Tinyos-help] help needed on uint64_t type
To: kiseop Lee aco...@gmail.com
Cc: Tinyos-Help tinyos-help@millennium.berkeley.edu
Message-ID:
1254364b0902051332q63b3d89au924f312c9f4a2...@mail.gmail.com
Content-Type: text/plain; charset=iso-8859-1

Hi All,

I just tested it. I guess prinf couldn't print 64 bits variables but low 32
btis instead. By moving the  variable 32 bits left, it can print the high 32
bits. such as a32. it made the debugging work

Re: [Tinyos-help] help needed on uint64_t type

2009-02-04 Thread kiseop Lee
Hi,
This is tested in Visual C++ in the Windows. but I don't know it in tinyos
compiler.
Only refer to your work...

char sql[100];

__int64 var1=0x12345678ABCDABCD;
 sprintf(sql,%I64x,var1);   //not L. Upper case of i[ai]...
sprintf(sql,%I64d,var1);

Best regards,
K.S.Lee

2009/2/5 BAI LI libai0...@gmail.com

 Hi All,

 I have defined a uint64_t type variable as follows:

 uint64_t a;
 a=0x;
 printf(a= %lld /n,a);
 printf(a= %llx /n,a);

 the result displayed as follows:

 a= -1
 a= 

 The compilation didn't show any error. What is the problem? Does printf
 support to display the uint64_t type? Any help would be appreciated!

 Regards,
 Bai


 ___
 Tinyos-help mailing list
 Tinyos-help@millennium.berkeley.edu
 https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help