Re: [Tinyos-help] I need Help! I can't compile apps with TOSSIM
On Aug 21, 2006, at 11:28 PM, Lajos Lange wrote: Hello, I have some problems with TinyOS 2. I installed TinyOS 2 on Linux kubuntu 2.6.15-26-386 distribution. When I make the tos-check-env everything looks fine exept some warnings with graphviz but I guess this is not the problem. It's hard to tell what the problem is. How did you install TinyOS 2? What are your TOSDIR and MAKERULES variables set to? My guesses would be: 1) Something is wrong with your TOSDIR, so that it's getting confused between TinyOS 1.x and 2.x code. 2) It looks like the problems stem from uint8_t, but uint32_t works OK; maybe there is something wrong with inttypes.h? It might be that uint8_t is defined somewhere else on your distro? The RPMs weren't build with ubuntu in mind, although I've been able to use them just fine: I assume you transformed them to deb packages? Phil ___ Tinyos-help mailing list Tinyos-help@Millennium.Berkeley.EDU https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
[Tinyos-help] MTS420 and Taos Photo sensor
Hi all,I am working with MTS420 sensors to get Light readings. I have made a small app that will send the photo values when request is received. But the photo values received are weired.e.g (0, 3 FF etc). Most of the times it is zero. I amunable to track the problem. I am attaching a code files.can anyone help me?ThanksMohanincludes TinyDBCmd; #include Util.h #ifdef MULTIHOP includes MultiHop; #endif configuration TinyDBCmd { } implementation { components Main, TinyDBCmdM, GenericCommPromiscuous as Comm, MicaWbSwitch, LedsC, ADCC #ifdef MULTIHOP ,MultiHopRouter as multihopM, QueuedSend #endif ,IntersemaPressure ,SensirionHumidity ,Accel ,TaosPhoto ,Voltage , TestMTS400 ; Main.StdControl- TinyDBCmdM; Main.StdControl- TestMTS400; TinyDBCmdM.GetGPS - TestMTS400; TinyDBCmdM.CommControl- Comm; TinyDBCmdM.ReceiveRequest - Comm.ReceiveMsg[AM_QUERY_REQUEST]; #ifdef MULTIHOP TinyDBCmdM.SendResponse - multihopM.Send[AM_QUERY_RESPONSE]; Main.StdControl - multihopM.StdControl; Main.StdControl - QueuedSend.StdControl; multihopM.ReceiveMsg[AM_QUERY_REQUEST] - Comm.ReceiveMsg[AM_QUERY_REQUEST]; #else TinyDBCmdM.SendResponse - Comm.SendMsg[AM_QUERY_RESPONSE]; #endif TinyDBCmdM.Leds - LedsC; //Pressure TinyDBCmdM.PressureControl - IntersemaPressure; TinyDBCmdM.IntersemaPressure - IntersemaPressure.Pressure; TinyDBCmdM.IntersemaCal - IntersemaPressure; TinyDBCmdM.IntersemaTemp - IntersemaPressure.Temperature; //Humidity TinyDBCmdM.HumidControl - SensirionHumidity; TinyDBCmdM.Humidity - SensirionHumidity.Humidity; TinyDBCmdM.Temperature - SensirionHumidity.Temperature; TinyDBCmdM.HumidityError- SensirionHumidity.HumidityError; TinyDBCmdM.TemperatureError - SensirionHumidity.TemperatureError; //Accelerometer TinyDBCmdM.AccelControl - Accel.StdControl; TinyDBCmdM.AccelCmd - Accel.AccelCmd; TinyDBCmdM.AccelX - Accel.AccelX; TinyDBCmdM.AccelY - Accel.AccelY; //Photo TinyDBCmdM.PhotoControl - TaosPhoto; TinyDBCmdM.TaosCh0 - TaosPhoto.ADC[0]; TinyDBCmdM.TaosCh1 - TaosPhoto.ADC[1]; //Battery Ref TinyDBCmdM.BattControl - Voltage; TinyDBCmdM.ADCBATT - Voltage; } includes TinyDBCmd; includes gps; #include Util.h module TinyDBCmdM { provides interface StdControl; uses { interface Leds; //interface Timer; //Comm interface StdControl as CommControl; interface ReceiveMsg as ReceiveRequest; #ifdef MULTIHOP interface Send as SendResponse; #else interface SendMsg as SendResponse; #endif // Battery interface ADC as ADCBATT; interface StdControl as BattControl; //Pressure interface ADC as IntersemaTemp; interface ADC as IntersemaPressure; interface Calibration as IntersemaCal; interface SplitControl as PressureControl; //Humidity interface ADC as Humidity; interface ADC as Temperature; interface SplitControl as HumidControl; interface ADCError as HumidityError; interface ADCError as TemperatureError; //Accels interface StdControl as AccelControl; interface I2CSwitchCmds as AccelCmd; interface ADC as AccelX; interface ADC as AccelY; //Photo interface SplitControl as PhotoControl; interface ADC as TaosCh0; interface ADC as TaosCh1; //GPS interface GetGPS; } } implementation { TOS_Msg reqmsg, gpsmsg; TOS_MsgPtr request,gps; uint8_t cmd[12]; uint8_t qid; uint8_t epochid; int8_t radiobusy; //Sensor Attributes data char count; uint16_t calibration[4]; //intersema calibration words uint8_t nodeid; uint16_tvref; uint16_thumidity; uint16_ttemperature; uint16_tintersematemp; uint16_tpressure; uint16_ttaosch0; uint16_ttaosch1; uint16_taccel_x; uint16_taccel_y; TOS_Msg resmsg; TOS_MsgPtr response; enum { BATTERY=3, PRESSURE=4, PRESSTEMP=5, HUMIDITY=6, HUMTEMP=7, ACCEL_X=8, ACCEL_Y=9, PHOTO=10, GPSDATA=11 }; uint8_t hour; uint8_t minute; uint8_t lat_deg; uint8_t long_deg; uint32_t dec_sec; uint32_t lat_dec_min; uint32_t long_dec_min; uint8_t nsewind; uint8_t fixed; char gga_fields[GGA_FIELDS][GPS_CHAR_PER_FIELD]; void startAttribute(int); void checkAttribute(); void clearAttributes(); task void SendGPSData() { GPSMsg *pack; #ifdef MULTIHOP uint16_t length; #endif if(!radiobusy) { #ifdef MULTIHOP pack = (GPSMsg *) call SendResponse.getBuffer(gps,length); #else pack = (GPSMsg *)gps-data; #endif atomic { pack-nodeid = TOS_LOCAL_ADDRESS; pack-restype = 1; pack-qid = qid; pack-epochid = epochid; pack-lat_deg = call GetGPS.getLatDeg(); pack-long_deg = call GetGPS.getLongDeg();
Re: [Tinyos-help] Serial Forwarder Problem
Hello, All the messages to and from your 50 re-Motes go through one TOSBase mote on the MIB adapter to get to the host computer where SerialForwarder (or any other client program) is running. The messages are distinguished by a destination address (e.g., the addr field in the TOS_Msg struct in ...tos/types/AM.h), and sometimes contain a source address so you can tell where they came from. To send a message to a specific mote you put it's moteID in the destination address. Was that the question? MS For the case of using a single mote with TOSBase which forwards messages it is clear. But, say we got two motes connected per USB to the computer. We would need two instances of SerialForwarder, each associated to one of the motes, and if a program on the computer wants to communicate with one of the motes, it would have to know which SerialFowarder to connect to. How would I have to do that? And going a bit further. The ideal case would be to have a program which automatically checks USB ports, gets the mote address of each mote connected and creates a SerialForwarder association with each mote, so that if a program wants to send a message to a mote, it only needs to know its local address. I am sure something similar already exists. I would like to know is it done. Thanks, - J. ___ Tinyos-help mailing list Tinyos-help@Millennium.Berkeley.EDU https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
[Tinyos-help] Query about the hardware interrupt ......... in CC1000
hello guys i have few things to be cleared. 1) i am in to mica2 under windows XP was trying to communicate two motes via radio. As of now am using timer module as the interrupt. and am succeeding in making them communicate.But then i could feel its ineffectiveness.. the drawbacks are itstaking arround 150ms to transmit one byte of data without any errors if i give time interval less than that am loosing packets. can any body let me know about the hardware interrupt being generated when a transmission or receive is being done by the radio. i feel there should be some command or some inbuilt function regarding this. could anyone guide me in doing so..:-). 2) i got one more doubt to be cleared.. in Nesc language is there any roles played by while or for statements as in C . coz when i use these statements am not able to use it as generally its known to be (for infinite loops and for a definite loop). Regards Primalfear ___ Tinyos-help mailing list Tinyos-help@Millennium.Berkeley.EDU https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
Re: [Tinyos-help] how to link library to NesC code
On Aug 24, 2006, at 12:59 AM, Ravi Prasad wrote: Hi all, I need to link a library (object code) to my NesC application. I found one mail(https://mail.millennium.berkeley.edu/pipermail/ tinyos-help/2005-April/009109.html) in the archive asking same question but with no answer. Can anyone help me on the issue? You're just linking at the C compilation stage. So pass -l/-L. Phil ___ Tinyos-help mailing list Tinyos-help@Millennium.Berkeley.EDU https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
RE: [Tinyos-help] Howto use InternalFlash on Tmote
FYI - I just uploaded an msp430f1611 FlashBridge implementation to TinyOS 1.x CVS under /contrib/rincon/apps/FlashBridge. This will let your applications read, write, erase segments, and calculate CRC's on data stored in the msp430's internal flash. Similar to InternalFlashC in a way, but with more control over the flash and access to the full 256 bytes instead of 128 bytes. A demo that lets you interact with various flash types from your computer is located in /contrib/rincon/apps/FlashBridge/apps/FlashBridgeViewer. You'll need parts of the /contrib/rincon directory to get this demo app to compile, so just download the whole /contrib/rincon directory. Make sure you edit the Makefile to select the flash type you want to interact with. I'll probably upload another implementation soon that provides the same interface to the avr's internal flash. -david -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Joe Polastre Sent: Tuesday, August 22, 2006 3:50 PM To: Chong Hui Kim Cc: tinyos-help@Millennium.Berkeley.EDU Subject: Re: [Tinyos-help] Howto use InternalFlash on Tmote Programs like Deluge allow you to upload new programs without completely erasing the internal flash. if you use the BSL, your only option is to erase all flash, including internal flash. You may want to read the MSP430x1xx User's Guide for more data. -Joe On 8/22/06, Chong Hui Kim [EMAIL PROTECTED] wrote: Thank you for your comments. I understand what was wrong. Then how can I download program without erasing of internal flash? - Original Message - From: Joe Polastre [EMAIL PROTECTED] To: Chong Hui Kim [EMAIL PROTECTED] Cc: tinyos-help@millennium.berkeley.edu Sent: Wednesday, August 23, 2006 1:14 AM Subject: Re: [Tinyos-help] Howto use InternalFlash on Tmote Did you Mass Erase between programs (ie, type 'make tmote install')? That erases all of the internal flash. -Joe On 8/22/06, Chong Hui Kim [EMAIL PROTECTED] wrote: I want to write some data in Flash of MSP430 and read them. For this, I used InternalFlashC component and InternalFlash interface. However, data did not been stored in Flash. In single program, it works well. (I conducted write and read. Then stored data was read exactly same.) In separated write and read program, however, data did not been stored. I conducte write data into Flash in one program. After doing this, I conduct read data of Flash from same address in another program. Then wrong value is read. In my thought, Flash may be erased. I used information memory of Flash in MSP430. (Address is from 01000h to 010FFh with 256 Byte.) Just write code is call InternalFlash.write((uint8_t *)0x00, dataarray, sizeof(data)); read code is call InternalFlash.read((uint8_t *)0x00, dataarray, sizeof(data)); Plz, help me. ___ Tinyos-help mailing list Tinyos-help@Millennium.Berkeley.EDU https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help ___ Tinyos-help mailing list Tinyos-help@Millennium.Berkeley.EDU https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help ___ Tinyos-help mailing list Tinyos-help@Millennium.Berkeley.EDU https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
Re: [Tinyos-help] Serial Forwarder Problem
Jose, To connect to multiple motes you would write something along the lines of: import net.tinyos.packet.BuildSource; //connect to the mote source identified by sfString1, e.g. [EMAIL PROTECTED]:tmote mote_if1 = new MoteIF(BuildSource.makePhoenix(sfString1, (Messenger) null); mote_if1.registerListener(new MsgType(), this); mote_if1.start(); // connect to the other Tmote connected to the local machine, e.g. [EMAIL PROTECTED]:tmote mote_if2 = new MoteIF(BuildSource.makePhoenix(sfString2, (Messenger) null); // need to register the listeners for every MoteIF started mote_if2.registerListener(new MsgType(), this); On 8/24/06, José L. Ponce [EMAIL PROTECTED] wrote: (Sorry, forgot to click on reply all!) Original Message Subject: Re: [Tinyos-help] Serial Forwarder Problem From:José L. Ponce [EMAIL PROTECTED] Date:Thu, August 24, 2006 7:06 pm To: Shane B. Eisenman [EMAIL PROTECTED] -- [...] however, the simpler approach (though less transparent) is to define a mapping of moteID to SF exported TCP port in a file on your PC, and use a script to scroll through that file and launch N sessions of SF. I've done this for a testbed of 35 mica2/MIBs i've used at Columbia and it is convenient for me. I've used an easy-to-remember mapping (e.g., moteID 1 is mounted on the MIB600 whose associated SF instance exports port 9001, etc.) so that i don't have to ever look at that mapping file. [...] Shane, I think this approach is the logical and simpler solution to this issue. However, my problem is that I am using USB: My motes are connected to a number of USB Hubs which are connected to the computer (A Laptop). Every time I connect the computer to this testbed, the USB port number of a given mote is different. Now that I think about it, I guess I could use the mote identifier that appears when calling motelist and build a table according to that... Any suggestions regarding a scripting language? (I haven't really made many scripts, I just modify them :)) Second question: Suppose I have two motes and two instances of SerialForwarder running, one for each mote. If I have a program which wants to communicate with one of the motes, how does the program know which of the SerialForwarders to use? For the case of a single SerialForwarder, I have always done: mote_if = new MoteIF((Messenger)null); mote_if.registerListener(new MsgType(), this); mote_if.start(); mote_if.send(mote_id, message); But I'd guess that if I have multiple instances of SerialFowarder it should be done in some other way. - Jose. ___ Tinyos-help mailing list Tinyos-help@Millennium.Berkeley.EDU https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help ___ Tinyos-help mailing list Tinyos-help@Millennium.Berkeley.EDU https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
[Tinyos-help] Re: Tinyos-help Digest, Vol 40, Issue 97
Second question: Suppose I have two motes and two instances of SerialForwarder running, one for each mote. If I have a program which wants to communicate with one of the motes, how does the program know which of the SerialForwarders to use? For the case of a single SerialForwarder, I have always done: On this testbed: http://enl.usc.edu/projects/tutornet/index.html We maintain a mapping of USB port and mote ID (that you can get from motelist). Then you can maintain either an explicit (another mapping file) or an implicit mapping (lookup the mote/usbport mapping file and always make sure a given serial forwarder is always launched for mote x) of serial forwarder instance and moteID. These two mapping can be merged into a single file if you wish. Your program can figure out the serial forwarder to which it needs to connect by looking at these mappings. Make sure you rerun mapping scripts (potentially restart serial forwarder depending on your configuration) every time port assignment changes. ___ Tinyos-help mailing list Tinyos-help@Millennium.Berkeley.EDU https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
[Tinyos-help] Serial Forwarder Problem
Jose, To connect to multiple motes you would write something along the lines of: [...] Thanks a lot for that. I had been trying to use these phoenix sources a while ago but didn't get to make my program work. This means that when I start a java program that wants to talk to different motes through different SerialForwarders, it needs also needs to read from a table for each mote id in which USB port it is connected. What's more, if I want to send a message to mote 100, for example, using mote_if_of_mote100.send(100, message); and mote_if_of_mote100.send(TOS_BCAST_ADDRESS, message); will give the same result. But this would also mean that it is not possible to send a message to _all_ motes simultaneously, right? This would be a big problem... - J. ___ Tinyos-help mailing list Tinyos-help@Millennium.Berkeley.EDU https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
Re: [Tinyos-help] Serial Forwarder Problem
2006/8/24, Robert Szewczyk [EMAIL PROTECTED]: Sure -- I could see a solution where you use some method to synchronize all motes to a common time base (perhaps using any of the proposed radio time sync protocols) and then you use USB to transmit messages of the form: at time X do Y,where time X is sufficiently far in the future. Well, I was thinking more along the lines of using USB if only one mote were to be contacted and using radio if a message had to be sent to all motes simultaneously. Thanks for your help. - J. ___ Tinyos-help mailing list Tinyos-help@Millennium.Berkeley.EDU https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
Re: [Tinyos-help] Serial Forwarder Problem
On 8/24/06, Jose L. Ponce [EMAIL PROTECTED] wrote: Jose, To connect to multiple motes you would write something along the lines of: [...] Thanks a lot for that. I had been trying to use these phoenix sources a while ago but didn't get to make my program work. This means that when I start a java program that wants to talk to different motes through different SerialForwarders, it needs also needs to read from a table for each mote id in which USB port it is connected. What's more, if I want to send a message to mote 100, for example, using mote_if_of_mote100.send(100, message); and mote_if_of_mote100.send(TOS_BCAST_ADDRESS, message); will give the same result. Right. But this would also mean that it is not possible to send a message to _all_ motes simultaneously, right? This would be a big problem... That's correct. Simultaneous transmission to all motes over usb would be difficult over a point to point link such as USB . USB host schedules transmissions to individual endpoints on a 1 ms granularity, and depending on the precise timing of requests you may observe as much as 2 ms between requests. It sounds like if you want motes to receive a message simultaneously, a radio broadcast channel may be appropriate. Cheers, Rob ___ Tinyos-help mailing list Tinyos-help@Millennium.Berkeley.EDU https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
[Tinyos-help] nesc code generation from ncxml
Hi everyone, Is there anyone who know about ncxml that generated by ncc with special options. What I want to do is generating nesc code from ncxml if possible. When ncxml is changed by directly editing , I want to generate new nesC code that refect the change in ncxml. ___ Tinyos-help mailing list Tinyos-help@Millennium.Berkeley.EDU https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
Re: [Tinyos-help] Serial Forwarder Problem
2006/8/24, Robert Szewczyk [EMAIL PROTECTED]: But this would also mean that it is not possible to send a message to _all_ motes simultaneously, right? This would be a big problem... That's correct. Simultaneous transmission to all motes over usb would be difficult over a point to point link such as USB . USB host schedules transmissions to individual endpoints on a 1 ms granularity, and depending on the precise timing of requests you may observe as much as 2 ms between requests. It sounds like if you want motes to receive a message simultaneously, a radio broadcast channel may be appropriate. Mmmm... Perhaps a better solution would be to use both USB and radio... I have used SerialForwarder Multiplexer but I am not getting very good results and I am thinking that using multiple instances of SerialForwarder and mapping might be more work but in the end the computer-mote communication should be more reliable this way... - J. ___ Tinyos-help mailing list Tinyos-help@Millennium.Berkeley.EDU https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
Re: [Tinyos-help] Serial Forwarder Problem
Sure -- I could see a solution where you use some method to synchronize all motes to a common time base (perhaps using any of the proposed radio time sync protocols) and then you use USB to transmit messages of the form: at time X do Y,where time X is sufficiently far in the future. Rob On 8/24/06, Jose L. Ponce [EMAIL PROTECTED] wrote: 2006/8/24, Robert Szewczyk [EMAIL PROTECTED]: But this would also mean that it is not possible to send a message to _all_ motes simultaneously, right? This would be a big problem... That's correct. Simultaneous transmission to all motes over usb would be difficult over a point to point link such as USB . USB host schedules transmissions to individual endpoints on a 1 ms granularity, and depending on the precise timing of requests you may observe as much as 2 ms between requests. It sounds like if you want motes to receive a message simultaneously, a radio broadcast channel may be appropriate. Mmmm... Perhaps a better solution would be to use both USB and radio... I have used SerialForwarder Multiplexer but I am not getting very good results and I am thinking that using multiple instances of SerialForwarder and mapping might be more work but in the end the computer-mote communication should be more reliable this way... - J. ___ Tinyos-help mailing list Tinyos-help@Millennium.Berkeley.EDU https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
[Tinyos-help] Tmote static profiler
Hi Is there are a static profiler/analyzer for Tmotes ? I need to find how much RAM is used by each nesC component.Regards,Harish ___ Tinyos-help mailing list Tinyos-help@Millennium.Berkeley.EDU https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
Re: [Tinyos-help] Tmote static profiler
There is a script called module_memory_usage in tinyos-1.x/contrib/SystemC/scripts/ that you can use to report the static ROM and RAM used by nesC components. (Download it from the TinyOS CVS repository if you do not have it.) Note this does not report anything about stack usage. Cory On 8/24/06, harish prabhu [EMAIL PROTECTED] wrote: Hi Is there are a static profiler/analyzer for Tmotes ? I need to find how much RAM is used by each nesC component. Regards, Harish ___ Tinyos-help mailing list Tinyos-help@Millennium.Berkeley.EDU https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help ___ Tinyos-help mailing list Tinyos-help@Millennium.Berkeley.EDU https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
Re: [Tinyos-help] Tmote static profiler
Thanks a lot Cory !I tried it out and it is pretty useful.Regards,HarishOn 8/25/06, Cory Sharp [EMAIL PROTECTED] wrote:There is a script called module_memory_usage intinyos-1.x/contrib/SystemC/scripts/ that you can use to report the static ROM and RAM used by nesC components.(Download it from theTinyOS CVS repository if you do not have it.)Note this does notreport anything about stack usage.CoryOn 8/24/06, harish prabhu [EMAIL PROTECTED] wrote: Hi Is there are a static profiler/analyzer for Tmotes ? I need to find how much RAM is used by each nesC component. Regards, Harish ___ Tinyos-help mailing list Tinyos-help@Millennium.Berkeley.EDU https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help ___ Tinyos-help mailing list Tinyos-help@Millennium.Berkeley.EDU https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help