[Tinyos-help] telosb with windows 8
Has anyone used serial port communication to a telosb mote under Windows 8? I have a program that works fine under XP but I don't seem to be able to get the right FTDI driver magic under 8. We, may have, followed the instructions for loading their VCP driver. When the program starts it detects that there are devices on COM3 and COM5, but neither of those port names actually connect to the mote. To make matters worse I am debugging this over the phone with someone who knows nothing about Windows on the other end, I do not have any of the hardware to test...and its all TOS1.x thx MS ___ Tinyos-help mailing list Tinyos-help@millennium.berkeley.edu https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
Re: [Tinyos-help] Z1 High speed i2c accelerometer sampling
There are some intriguingly named files containing Stream and DMA in the ...tinyos-2.x_main/tos/chips/msp430/adc12 directory. Some of them even have comments which reference TEP documents that might explain what they are trying to do. Maybe one of them will allow you to run the ADC at higher rates... In T1 with the mica's (what I know) one could free-run a single ADC at low audio rates by bypassing most of TOS. MS On 4/15/2013 1:27 PM, Martín René wrote: We are currently using the Z1 Motes and sampling at 200Hz without problems, but we can't raise the sampling speed above said speed without starting to have problems. We need to sample at 1000Hz and we can't get there. I know that the resources of the platform are scarse, but i know that the ADC can manage those speeds, and as we don't have a analog accelerometer we neee to speed up all we can the ADXL. Is it possible to sample the accelometer at those speeds? If it is, ¿how? Thanks! and saludos --- Martín René Vilugrón San Carlos de Bariloche Patagonia Argentina ___ 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] Packet contents
I'm just starting to deal with T2's Listen and ListenRaw (under Ubuntu) and found that ListenRaw has some kind of timing and error issues. If I run it in a shell window it just hangs around and prints no message data, but if I step through it in Eclipse I get a few lines of output before (it appears) that the read() returns a -1 and the main loop exits. However the internal read thread is still running so the process just hangs at that point. I don't think I have the patience to compare its operation to Listen which seems to work OK, so I'm probably going to just drink the kool-aide and move on. I did run across a mention of an extra byte in the message header when using some kind of secure messaging protocol, probably in one of the TEPs (111, 113, 116 seem to deal with messaging). That would offset your payload start, and maybe even mess up the length calculation. In the course of putzing with this I found that the tinyos.jar contains the net/tinyos/packet/Serial.class which is used by Packetizer, but the Serial.java file is missing from my source tree. I can re-compile the source I have if I include the given tinyos.jar but can't actually reconstruct the jar itself. I found a couple of instances on this list of previous complaints about this file being missing, but no offered solutions. I got my source tree from here: git clone -v git://github.com/tp-freeforall/prod tinyos-2.x as per E.Decker's instructions at: https://github.com/tp-freeforall/prod/blob/tp-master/00b_Development_Environment MS On 02/06/2013 02:59 AM, Jan Hauer wrote: The java listen app should display all bytes. For debugging you could use the printf library (see apps/tests/TestPrintf) on the BaseStation and make a hexdump of your entire message_t. Maybe also make sure message_t payload is big enough (e.g. for cc2420 put CFLAGS += -DTOSH_DATA_LENGTH=X, where X is max payload, in Makefile), and, of course, message_t definition must be the same on sender and basestation. Jan On Tue, Feb 5, 2013 at 7:04 PM, Filip Jurnečka filip.jurne...@gmail.com wrote: Thanks, i've already seen that tutorial and yes, it works fine. The problem I am having is most likely somewhere deeper. I am using the hardware in-line security. I have specified the requested parameters for the SECCTRL registers so that they would add 4-byte CBC-MAC (using some specified key) to the message, but when I catch the message with the BS app, it overrides the last byte. I was thinking about deeper examination with the ListenRaw tool, but didn't get it working as expected. Is the BS/Listen app displaying all the received bytes? Oh and I am specifying the the length of the message to send (via the AMSend.send()) to be the size of my payload data. Filip On Tue, 05 Feb 2013 18:11:36 +0100, Jan Hauer ha...@tkn.tu-berlin.de wrote: Hi Filip, the structure of serial AM packets is explained here: http://docs.tinyos.net/tinywiki/index.php/Mote-PC_serial_communication_and_SerialForwarder#BaseStation_and_net.tinyos.tools.Listen About the last byte: check once more that you pass the correct payload length, because in the example it seems that msg len field is 3 (not 4). Jan On Tue, Feb 5, 2013 at 3:05 PM, Filip Jurnečka filip.jurne...@gmail.com wrote: Ok, I did that. I know the byte 80 is in fact my defined AM type. Now it is still an open question for me why does the CBC-MAC override the last byte in the packet? Best, Filip Jurnecka On Tue, 05 Feb 2013 14:58:18 +0100, wasif masood rwmas...@gmail.com wrote: Checkout the CC2420 datasheet for details regarding the 802.15.4 header strucutre. On Tue, Feb 5, 2013 at 2:17 PM, Filip Jurnečka filip.jurne...@gmail.comwrote: Hi there. I wonder how the packet delimiters work. Say I have two packets. If sent normally, the BS app displays them as: 00 FF FF 00 01 00 22 80 00 FF FF 00 01 01 22 80 00 Now I don't know what the first 00 is, but the next is the broadcast address, the 0001 should be my address, the next 00/01 defines the length of the packet data. What is the 22? What is the 80? Is it the delimiter of the data to follow? Obviously, the last 00 is the data sent. Now it gets more interesting, if I enable the in-line CBC-MAC with 4 bytes output, I get the following. 00 FF FF 00 01 03 22 B7 E2 4C FB 00 FF FF 00 01 04 22 80 71 36 57 EE The question is mainly about the fact that the output is overriding the last byte of the unauthenticated message, i.e. the delimiter or the payload byte. Any ideas why and how to fix it? Best regards, Filip Jurnecka ___ 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] how Many Telosb/z1 nodes can be serially connected to one PC!
I have a vague memory that there was a problem getting more than 16 serial COM ports under Windows, and in some cases the device numbers kept incrementing even though devices were not attached... it's been a while since I tried though. MS On 1/14/2013 3:12 PM, wasif masood wrote: Dear All, Does any of you have ever experienced about how many sensor nodes we can attach to a PC. In my experience, using external powered USB hubs, one can get as many connections as could but when it comes to serial logging, not all the nodes can get their data to the BaseStation via serial connection. Yesterday, I tired upto 10 and they worked just fine, but if I try to increase them beyond 10 some nodes just meteriously can't log any thing. Please share your experieces! Regards! Wasif Masood ___ 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] questions about MIG, JAR and Eclipse
It sounds like you've done everything right with Java and Eclipse. Since the error is from GUI.java calling a javax.swing class I expect it has nothing to do with TOS. I don't know what GWB is or does or how it is implicated in this, but I would start by googling the error text Unsupported drop mode for text to see what it means. MS On 1/1/2013 11:28 AM, Luis TWIPS.COM wrote: First, happy new year. I am finishing a little project and I am learning this step by step. First with a virtual machine with ubuntu and now with Debian. I have develop a little system to show temperature, and VCC in 1 mote. I have developed the nesc code, Now I have 3 java files (.java and .class ) all with the first line package work I have created a .jar file called work.jar with this sentence jar -cf work.jar file1.class file2.class file3.class ( I don't see manifest file) I added that file to my Eclipse workspace importing it. I think it's all OK until here… If you think that I do something wrong, please tell me… === Now I have created a new project with 2 files, Engine.java (the engine of the app) and Gui.java (the gui of the app), and I imported work.jar and tinyos.jar None error in the Eclipse. I had to add the Google Window Builder (GWB) But when I try to run as java app, I get these errors…. I don't know if it's a problem with tinyos or with GWB. I was without programming for 5-6 years, and I don't remember nothing about java and eclipse. Perhaps I am not doing the right way. Thanks in advance Exception in thread main java.lang.IllegalArgumentException: ON: Unsupported drop mode for text at javax.swing.text.JTextComponent.setDropMode(JTextComponent.java:745) at GUI.initialize(GUI.java:111) at GUI.init(GUI.java:60) at Engine.main(Engine.java:38) ___ 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] PC to Mote Serial Communication
Almost...Unfortunately all my information is based on reverse engineering Tinyos 1.x and I think there may have been some changes in 2.x, so YMMV. I think there is a TEP document on the docs.tinyos.net site that might be clearer than me... I have a package of Java code for host side reading and writing of messages, but it is targeted at a platform that I added (USBPIC) so {may,is} be a bit more confusing than necessary. Here: http://www.etantdonnes.com/DOC/USBPIC/JavaCommCode.zip Also there is an old document that _almost_ describes the format, but I notice that it is not quite correct either (...it's missing the seqno field...) here: http://web.archive.org/web/20060627154751/http://www.octavetech.com/pubs/TB5-01+Deciphering+TinyOS+Serial+Packets.pdf Specifics that I notice right away... First you are using the old mica2 AM.h format which will not fly with the telosb. Look in the telos platform directories for an AM.h file that specs the correct header format, mostly just adding some number of useless fields that can be set to 0. (This may be hidden in T2, I'm not sure if the basestation code translates telosb headers or not). Second there are hidden message type and sequence number fields immediately following the first 0x7E frame byte: Each message sent or received has this raw format: -- added by Packetizer.java framer protocol byte frame=0x7E;// framing byte...gets escaped in body byte mtype=0x42;// TOS message type -- used for status byte seqno; // incremented sequence number -- user message with appropriate tinyos Header byte data[MAX_LEN];// header and user payload -- added by Packetizer.java framer protocol byte frame=0x7E; Then the tinyos header Length field is the _payload_ length not including hidden stuff and the other header fields. In your case it would be 2. And finally you need to deal with the escaping of 0x7E and 0x7D values in the message body and calculating the CRC value correctly. It does _not_ include the frame or escaping bytes...See the two links above for info... MS On 10/1/2012 8:08 AM, Sean Dekker wrote: Hi, I just want to make packets in C# and send to a TelosB mote. As simple as that but I couldn' make this packet yet. Can you please check what I am doing wrong? Here is the struct that I have defined and programmed into TelosB mote: typedef nx_struct pc_serial_msg { nx_uint8_t sequenceNumber; nx_uint16_t controlCommand; } pc_serial_msg; And here is the code that responsible to make the packet: private Byte[] MakePacket(byte command) { //Increment the sequence _sequenceNumber++; var pkt = new byte[10]; //START FLAG pkt[0] = 0x7E; //HEADER pkt[1] = 0xf; //Destination pkt[2] = 0xf; //Source pkt[3] = 0xf; //Length ??? pkt[4] = 0x1; //Group pkt[5] = 0x1; //Type //PAYLOAD pkt[6] = _sequenceNumber; pkt[7] = command; //Generating CRC pkt[8] = 0x1; //END pkt[9] = 0x7E; //END return pkt; } Can you tell me what I have to put in Destination, Source, Group and Type bytes? What is Length? is it the length of the packet that is going to be transmitet and equals number of bytes in the packet? Am I atleast in the right track or this is totaly wrong? Thanks, Sean. ___ 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] Fwd: errors casting int64_t to float on MSP430
With a 32 bit float you get 24 bits of value and 8 bits of sign so converting from an integer of larger than 24 bits will entail some resolution truncation. MS On 9/18/2012 2:45 PM, Eric Decker wrote: try using the 4.6.3 compiler. 3.2.3 is really old. It isn't clear what level of support for floating point exists. Peter (the current msp430 gcc maintainer) will have more information. But do try 4.6.3 first. You can get it in the msp430-46 package at http://tinyprod.net/repos/debian/README-46.html Thanks for taking the time to look at this. On Tue, Sep 18, 2012 at 12:13 PM, Flemming Nyboe flemm...@rocketscience.eu mailto:flemm...@rocketscience.eu wrote: Hello, On the MSP430, all floating points types are 32 bit. A cast from int64_t to float produces strange results: Negative values are rounded to multiples of -256 (tested for -1 to 0) Positive numbers smaller than 8725651e09 (8.7e15) are converted correctly, tested at 0.1% intervals. Above this number, it sometimes, but not always, goes wrong by many orders of magnitude. Example: 8725651e09 casts to 8725651e09 (OK) 8725738e09 casts to 837068800 (extremely wrong) Some larger values still cast correctly. According to standard, the cast is legal, right? 32-bit float does cover the range of int64_t, although with some inaccuracy for large values. Or would this have been fixed in a later msp430-gcc? As has been pointed out before https://www.millennium.berkeley.edu/pipermail/tinyos-help/2010-November/048878.html FTSP TimeSyncP.nc calculateConversion() uses this cast, and it results in wrong skew values if the points in the timesync table are spaced enough for int64_t localSum to reach the faulty range. Setup msp430tools-gcc-3.2.3-20050607 nescc: 1.3.4 Best Regards Flemming Nyboe www.rocketscience.eu http://www.rocketscience.eu ___ Tinyos-help mailing list Tinyos-help@millennium.berkeley.edu mailto:Tinyos-help@millennium.berkeley.edu https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help -- Eric B. Decker Senior (over 50 :-) Researcher ___ 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] Fill first 8 bytes with memcpy
There's a number of strange and inexplicable things here, but probably the problem is that you have not set pointer to point to anything. Try something like: uint8_t* pointer; uint8_t buffer[8]; pointer = buffer; call interface.function(pointer); or even just: uint8_t buffer[8]; call interface.function(buffer); Also, unless you insist on using memcpy(), you could make your fill loop like this: for(i=0; i8; i++) { pointer[i] = i+1; } MS Felipe Cruz Martínez wrote: Hi all, i want to fill the first 8 bytes of a uint8_t* pointer with the values 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08, and send it by radio (micaz motes): This is the code of my app (App.nc): /uint8_t* pointer; / /call interface.function(pointer);/ - In other module/file, i have got the implementation of that function: /command void interface.function(uint8_t* pointer) / /{/ /uint8_t x = 1;/ // /memset(pointer, 0, 8*sizeof(uint8_t)); //For security, fill the first 8 bytes of the pointer with ‘0x00’ / /for(i=0; i8; i++) {/ // /memcpy(pointer+i, x, sizeof(uint8_t));/ /printf(pointer[%d]: 0x%02X \n, i, pointer[i]);/ /x++;/ /}/ / }/ /Output: / /pointer[*1614823456ð*]: *0x00 */ /pointer[1]: *0x00 */ /pointer[2]: 0x03 / /pointer[3]: 0x04 / /pointer[4]: 0x05 / /pointer[5]: 0x06 / /pointer[6]: 0x07 / /pointer[7]: 0x08 / // As you can see, first two bytes of the pointer are wrong. First byte of pointer got a wrong index: ‘1614823456ð’, and his value should be pointer[0] = 0x01 Second byte got a correct index, but a value of ‘0x00’, when it should be pointer[1] = 0x02 What i’m doing wrong? I hope that someone can help me, i took several days without solving this problem. Thanks for your time, Felipe. ___ 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] I2C problem in micaz and MDA300
Try to compare the low level I2C code and see what's different between T1 and T2. I think the last version of T1 had the atmega code in: tinyos-1.x/tos/platform/avrmote/HPLI2CM.nc If you search for schip tinyos I2C you'll find some help list discussion of my battles with the Moteworks all-in-software bit banging code used by the iris in: MoteWorks/tos/platform/atm128/I2CM.nc Specifically the spec calls for a wait state mechanism driven by the slave device which was not implemented in the software. I would hope that a hardware impl does this correctly, but who knows... I found this datasheet to have a good description of I2C operation if you need to start poking an oscilloscope or logic analyzer at it: http://www.nxp.com/acrobat_download/usermanuals/UM10204_3.pdf MS francodipersio wrote: Hi, I am using Micaz and Tinyos-2.1.1 together with the MDA300 sensorboard. Taking as base the code from http://tinyos.cvs.sourceforge.net/viewvc/tinyos/tinyos-2.x-contrib/uoit/mda300ca/ , I am actually trying to complete the driver for controlling the 8-Channel Digital I/O. On MDA300 the hardware component proposed for the 8-Channel Digital I/O is the PCF8574A and its work via the I2C interface. Two of the 8 channels are used for controlling two Relays. In order to control the I2C bus I am using the codes from …tos\chips\atm128\i2c (by the way, I have downloaded the last version from the trunk). At power on, the 8 channel ports on the PCF8574A are high (value 0xFF) I have no problem in reading the data from the device, once an Interrupt change from high to low the correspondent pin on the 8 channel ports, but the problems arise when I try to write on the device in order to control the two relays. In this case the PCF8574A stop to work. I am sure is not a hardware problem, because with the Tinyos-1.x everything is working properly. In order to debug the problem I check the Atm128I2CMasterPacketP.nc file, but apparently everything goes smoothly being the status codes called by I2C.status the proper ones (table 88 – Status Codes for Master Transmitter Mode in the ATmega128 Manual) along the writing process. So, I presume that something wrong is happening after data has been transmitted and ACK has been received, thus during and after the STOP condition is sent. Also I have noted that the data is reaching the device, because I verified that the correspondent bit on the PCF8574A port is effectively changed, but after that the device become irresponsive. Also, if I try to write the default value (0xFF) and in this case everything go fine and the device keep working. Somebody has any idea how to solve the problem? There is a way with the Atm128I2CMasterPacketP to check the status just before and after the STOP condition is sent? I should check with an oscilloscope the I2C behaviour, but I am not so familiar with them, so I hope to solve the problem in other way. Thank you in advance Franco Di Persio ___ 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] Signal processing
And let me just add: Good Luck With That. Most of the tinyos controllers have very little RAM -- 4-8Kb at most, and no math support beyond an integer multiply -- but sometimes it's a whopping 16 bit MUL. If you can send your raw data to a real computer you will probably have better results. MS Sergio Valcarcel wrote: Hi, Assuming you have followed all the tutorials, I understand your question is how to implement a wavelet transform that can process some data out of the regular modules, available in TinyOS, right? Then you have two options: 1) implement your own module in nesC 2) use regular C functions (or even libraries) and call them from the nesC modules (you can find how to do it in earlier posts of this list) Cheers! Sergio On Fri, Jun 15, 2012 at 4:10 PM, Nahr Elk nahr...@gmail.com mailto:nahr...@gmail.com wrote: Hi, I would like to process signals received from telosb motes using signal processing techniques. How can I do this please. Which features shall I use? My purpose is to apply a wavelet transform on the received signal. Please help me. Best regards, Nahr Elk ___ Tinyos-help mailing list Tinyos-help@millennium.berkeley.edu mailto: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 ___ Tinyos-help mailing list Tinyos-help@millennium.berkeley.edu https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
Re: [Tinyos-help] cannot download Blink to a mica2 or a mica2dot
The Windows emulation of Unix leaves some things to be desired At some past point the required naming scheme changed such that one needs to use the /dev/...n-1 syntax instead of COMn. But of course that is only needed for the MIB programmer...MOTECOM still uses the COMn syntax... MS Li, Haixia-OSU Stillwater wrote: Hello, After I restart my computer, new problem appears. I cannot download a program to any nodes. I still use command make mica2dot install mib510,com1 but it says it should use /dev/ttyS0. However, yesterday I used com1, it works. Can anyone help me? Thanks a lot. Haixia From: tinyos-help-boun...@millennium.berkeley.edu [tinyos-help-boun...@millennium.berkeley.edu] on behalf of Li, Haixia-OSU Stillwater [hai...@ostatemail.okstate.edu] Sent: Thursday, May 10, 2012 10:32 AM To: András Bíró; Michael Schippling Cc: tinyos-help@millennium.berkeley.edu Subject: Re: [Tinyos-help] cannot download Blink to a mica2 or a mica2dot Hello, I updata the cygwin in my computer. The version of DLL is changed from 1.5.25 to 1.7.14. Now it works. Thanks. Haixia From: tinyos-help-boun...@millennium.berkeley.edu [tinyos-help-boun...@millennium.berkeley.edu] on behalf of Li, Haixia-OSU Stillwater [hai...@ostatemail.okstate.edu] Sent: Tuesday, May 08, 2012 3:41 PM To: András Bíró; Michael Schippling Cc: tinyos-help@millennium.berkeley.edu Subject: Re: [Tinyos-help] cannot download Blink to a mica2 or a mica2dot thanks everyone. I'm using cygwin in window xp. I don't know what uisp is. I used the same MIB510 for IRIS. I'll check my cygwin version and try again. Haixia From: András Bíró [andras.b...@unicomp.hu] Sent: Tuesday, May 08, 2012 1:09 PM To: Michael Schippling Cc: Li, Haixia-OSU Stillwater; tinyos-help@millennium.berkeley.edu Subject: Re: [Tinyos-help] cannot download Blink to a mica2 or a mica2dot Hi, If it's an uisp related problem, you can try to use avrdude for the older avr platforms as well with this command: export PROGRAMMER=avrdude After that, make should use avrdude instead of uisp. Micheal: Iris uses avrdude by default, so it's not really a platform dependent bug. Andris On Tue, May 8, 2012 at 6:11 PM, Michael Schippling sc...@santafe.edu wrote: There's a long history of this one in the help archives: https://www.millennium.berkeley.edu/pipermail/tinyos-help/2010-November/048721.html This is the first time I've heard of it being Mote dependent though...I presume that you use the same MIB510 for the Iris as well? Unfortunately I don't think anyone ever figured out what and why. My last suspicion was that it was an internal cygwin error coming from UISP (the download program itself) -- (sometimes) upgrading cygwin or just moving to Linux fixed it. MS Li, Haixia-OSU Stillwater wrote: Hello everyone, I cannot download Blink to a mica2 or mica2dot, but it can be downloaded to a IRIS. I used, make mica2 install mib510,com1 it shows, make: *** [program] Error 57 Can anyone tell me how to fix this problem? Thanks, Haixia ___ 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 ___ 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 ___ Tinyos-help mailing list Tinyos-help@millennium.berkeley.edu https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
Re: [Tinyos-help] cannot download Blink to a mica2 or a mica2dot
There's a long history of this one in the help archives: https://www.millennium.berkeley.edu/pipermail/tinyos-help/2010-November/048721.html This is the first time I've heard of it being Mote dependent though...I presume that you use the same MIB510 for the Iris as well? Unfortunately I don't think anyone ever figured out what and why. My last suspicion was that it was an internal cygwin error coming from UISP (the download program itself) -- (sometimes) upgrading cygwin or just moving to Linux fixed it. MS Li, Haixia-OSU Stillwater wrote: Hello everyone, I cannot download Blink to a mica2 or mica2dot, but it can be downloaded to a IRIS. I used, make mica2 install mib510,com1 it shows, make: *** [program] Error 57 Can anyone tell me how to fix this problem? Thanks, Haixia ___ 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] [Tinyos-hlep] CLASSPATH new problem
You need quotes around the actual paths to make the shell ignore the semi-colon: export CLASSPATH=C:\...\java\tinyos.jar;. MS Li, Haixia-OSU Stillwater wrote: Hello all, I used to set the CLASSPAHT without any problem, but I have not use it for one year. Recently, when I want to use tinyos, and set the CLASPATH, it shows a problem. $export CLASSPATH=C:\cygwin\opt\tinyos-2.x\support\sdk\java\tinyos.jar;. bash: . filename argument required .: usage: . filename [arguments] Could anyone tell me how I can do to set the environment variables? Last year, I can use it, but now, I cannot. Thanks. Haixia ___ 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] Config ADC for Mica2 (Urgent Please help)
I'm going to assume that you mean receiving an analog signal... Look at the code for the light or temp modules. It will take a little digging but you should be able to get down to the raw ADC level. Then copy it, probably all you need to do is change the ADC channel used. MS Hasib1 wrote: Dear all, I want to configure a ADC channel for sending analog signal. My temperature and light sensor is working. now i want to connect an analog signal of voltage level 0-3 V to any one of the ADC port provided in MDA100. I am using MIB520 as Base station. If any one can help e in configuring that i would be really really grateful. I have not used this before so ay help would be of great value. Regards, Hasib ___ Tinyos-help mailing list Tinyos-help@millennium.berkeley.edu https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
Re: [Tinyos-help] Location task structure
In one of the few improvements ever made to UNIX the -R makes grep recurse through directories. Or so the man page says MS Eric Decker wrote: On Mon, Apr 30, 2012 at 11:19 AM, Maycon Maia Vitali maycon.ppgi.u...@gmail.com mailto:maycon.ppgi.u...@gmail.com wrote: $ grep -nHiR TOSH_sched_entry_t $TOSROOT No that won't work. grep will only look in the top level of the $TOSROOT directory. Using find like I said below will feed every file starting in $TOSROOT to grep. eric *Maycon Maia Vitali* (aka 0ut0fBound) Offensive Security Certified Expert (OSCE) Security Researcher @ Hack'n Roll http://maycon.hacknroll.com http://maycon.hacknroll.com/ Hack'n Roll 2012/4/30 Eric Decker cire...@gmail.com mailto:cire...@gmail.com When I'm looking for things in the sources, here is what I use... cd ${TOSROOT} find . -exec grep -nHi thing I'm looking for '{}' \; In your case... find . -exec grep -nHi TOSH_sched_entry_t '{}' \; But when I search the current development sources, that string is not found. Why are you looking for it? What are you doing? On Mon, Apr 30, 2012 at 7:31 AM, Omkar raiker omkarraika...@gmail.com mailto:omkarraika...@gmail.com wrote: please help he in finding the structure defined below in tinyos 2.x source code.. typedef struct { void (*tp)(); }TOSH_sched_entry_t; regards Omkar Raikar ___ Tinyos-help mailing list Tinyos-help@millennium.berkeley.edu mailto:Tinyos-help@millennium.berkeley.edu https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help -- Eric B. Decker Senior (over 50 :-) Researcher ___ Tinyos-help mailing list Tinyos-help@millennium.berkeley.edu mailto:Tinyos-help@millennium.berkeley.edu https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help -- Eric B. Decker Senior (over 50 :-) Researcher ___ 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] Project Query
If I remember correctly the source for all the real components of Moteworks are behind a license wall. All you get in the free world is a link library. I remember this because I could find no documentation for the router code and they seem to have followed TOS the-code-is-the-documentation tradition... MS Aravind Ramesh wrote: Hi Sir/Madam I am doing my final year project in Tiny-os. For hardware implementation, i am using Moteworks. But i am unable to locate the MULTIHOP ROUTER component in the Moteworks. Can u please help me with this sir..Awaiting for your reply sir. Regards Aravind Ramesh ___ 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] Random.Rand16() problem
I would assume that rand16() returns a 16 bit random number so you will have to do some calculating to range it to 0-1. But I recommend avoiding floating point on the controller side whenever possible because there is no hardware support for it. I don't know why you get the same number on each call as I would expect the float cast to just give you the int16 values themselves. Maybe try making your random variable an int and see what... Also look at the Random interface, there should be some kind of seed() call which would allow starting the pseudo sequence from a different point on each of your motes. The easiest would be to use the moteID as the seed on each device. MS Hanen Rekik wrote: Hi, I use TOS 2.1.1 and I am trying to generate rando*m* numbers between 0 and 1, also I want to have different random numbers at the different motes. I am using Random interface, RandomC component and float random = call Random.rand16(); but I didn't get a value between 0 and 1, and always I get the same random number. How should I write the code. Please help. // ___ 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] Need help with Tinyos-1.x TOSSIM
It looks like you have put something like this in apit.h: #include mymote.h If that's the case, mymote.h should be found if it is in the source or include search path. The current directory (.../apps/testingtinysec) should work. Another way to try it is to find where apit.h is included in your application source code and put a mymote.h include on the line before it. Notice that, for some reason I haven't fathomed, in NESCC usage out side of the module{} block is: include mymote without the s,.h, and 's ... If that doesn't help we'll need to see your source files and makefile to try to figure it out. Also...you don't need to screen grab. You can redirect text output in the bash shell into a file like this: make pc error.txt MS shruti wrote: Hello all Sir I am working on cygwin tinyos and I am nt able to run make pc command properly. Can u help me please asap I want to know how should I include my “mote.h”header file in nesc code.. ___ 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 lesson 4 - The java class is not found: TestSerial
I don't use TOS2 so I can't easily look it up, but it may be that you need to include the full package name on the command line which might be something like: java net.tinyos.tools.TestSerial Java wants the fully specified package name for all classes it uses, even if you are in the directory that contains the class itself. And it treats package and directory trees identically, so you can imagine a jar file as an extension of the directory structure. MS tifenn.ra...@etu.utc.fr wrote: Dear all, I try to follow the tinyos-2.x tutorial in lesson 4: Mote-PC serial Communication. I successfully compiled and installed the TestSerial application on telosb mote. However, when I type in the TestSerial directory: java TestSerial I get: The java class is not found: TestSerial The current directory and the tinyos.jar are included in the CLASSPATH as it points to: .:C:/cygwin/opt/tinyos-2.x/support/sdk/java/tinyos.jar:C:/cygwin/opt/tinyos-2.x/support/sdk/java The TestSerial.class and TestSerialMsg.class were generated in the TestSerial directory. I am using Cygwin on Windows 7. I hope someone can help me. Thanks a lot in advance. Tifenn This message was sent using IMP, the Internet Messaging Program. ___ 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] Turn off AVcc pin on Telosb
AVcc is, unfortunately, exactly what it says: the Vcc power supply pin. So, nope. Can't shut it off without shutting off the whole telos board. You will need to use one of the other digital I/O pins. Your problem is that a motor draws more current than can be supplied by a regular output pin. If you just want to run your DC motor in one direction you can use a common-emitter transistor driver to boost the current. E.g. look for it here: http://www.williamson-labs.com/480_xtor.htm mshrehm...@gmail.com has also given you another option, using a Hobby Servo motor, which contains a driver of it's own and is operated using variable width pulses from a digital I/O pin. Along with the ease of hardware interface you also get speed and direction control, but you have somewhat more complicated software in making the right pulses. Here's some more info: http://www.horrorseek.com/home/halloween/wolfstone/Motors/svoint_RCServos.html http://www.junun.org/MarkIII/Manual/kevin/servohack.html Where the second site actually sells some of the motors. Usually hobby servos are used for setting rudders and flaps and such where you want to go to a specific angle, but they can be modified for continuous rotation (I think there are some that are continuous, but it's been a while since I looked). I have posted code for ATMEGA timers and hobby servo control here: http://www.etantdonnes.com/Motes/AVR128timers.zip I don't know how easy it would be to port the timer code to MSP chips. Also, should you actually need speed control, I've hacked the servo back into the hacked servos by adding an encoder: http://www.etantdonnes.com/ROBOCAR/encoder/ MS Imene Boudellioua wrote: Hi, Is there a ways to set the AVcc pin in Telosb (Pin 1 in the 10-[in expansion connector U2) to low, or clear it? I want to be able to turn it on and off to control a DC motor. I need this for my project to control a small DC motor. I tried connecting the DC motor to pin 9 (Gnd) and any pin set to 1 but it was not working for some reason. However, when I connect it to Gnd and AVcc, it works perfectly. Is there a way to turn the AVcc pin manually in tinyos? if not, what will be the solution to my problem? Thank you in advance. Amy ___ 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 with float operation and printf
You are not using floating point variables. Also printf uses a %f for flat format. MS Abdullah wrote: Hi there, This code gives me wrong output. I don't know why! event message_t* Receive.receive(message_t *msg, void *payload, uint8_t len) { int32_t p = getRssi(msg); // t1 = p - c, where c = -67.03 int32_t t1 = p + 67.03; // t2 = t1 / a, where a = -15.73 int32_t t2 = t1 / -15.73; // d = 10^t2, where d is the distance in meters. int32_t d = powf( 10.0, t2 ); printf(%d dBm , %d m\n, p , d); //printf(Rssi Message received from node %d: %d dBm\n, call Ieee154Packet.source(msg), getRssi(msg)); printfflush(); return msg; } I cannot add/div float numbers, and I cannot print float numbers in printf !! I'm using iris mote and tinyos, nc. Cheers, ___ 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 us to solve this parse error in tinyos1.x
it would be a bit of a help to include the errant source file. MS priya wrote: help us to solve this parse error in tinyos1.x $ make pc compiling MHLeachPSC to a pc binary ncc -o build/pc/main.exe -g -O0 -board=micasb -pthread -target=pc -Wall -Wshado w -DDEF_TOS_AM_GROUP=0x7d -Wnesc-all -fnesc-nido-tosnodes=1000 -fnesc-cfile=buil d/pc/app.c MHLeachPSC.nc -lm MHLeachPSC.nc:25: parse error before `components' dummy: `RouteSelect.selectRoute' not implemented dummy: `RouteSelect.isActive' not implemented dummy: `RouteSelect.initializeFields' not implemented dummy: `StdControl.init' not implemented dummy: `StdControl.start' not implemented dummy: `StdControl.stop' not implemented make: *** [build/pc/main.exe] Error 1 ___ 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] Vanderbilt AcousticLocalization java.lang.ClassNotFoundException
To get to the actual TOS release for the nescc builds under T1, I think what you need is something like this in your environment (on Windows): # Set main pointers used by TOS build system to find files # TOSROOT is for external programs, TOSDIR for makefiles TV=tinyos-1.x ## I use this to select specific TOS versions export TOSROOT=C:/cygwin/opt/$TV export TOSDIR=/opt/$TV/tos I believe TOSDIR gets transliterated into a %T variable in the Makefiles, i.e.: /opt/tinyos-1.x/tos This is also required, but you probably already have it set: export MAKERULES=/opt/$TV/tools/make/Makerules Then, if there are extra bits of added TOS goodness in other directories you can include them in the Makefile with PFLAGS (this is probably what the VUTOS variable is trying to do) like this: EXTRATOS=../tos ## or some %T/../contrib... directory PFLAGS += -I$(EXTRATOS)/platform/mica2 \ -I$(EXTRATOS)/interfaces \ -I$(EXTRATOS)/system By figuring out where the files that the compiler is whining about actually are you should be able to add the right directories. Another option is to put it all together in your main tos and apps directory structure, so you don't need the contrib searching... For the Java problem you need to add the jar or root directory tree that contains the classes of interest to your CLASSPATH, something like this: export CLASSPATH=$CLASSPATH;C:/whevever/your/files/are; Search for CLASSPATH for more info than you will ever need... MS giacomo_gioacch...@libero.it wrote: Dear all, I am using the AcousticLocalization app from the Vanderbilt University. I am trying to run the java app AcousticLocalization as is described in the README.txt file in: tools/java/net/tinyos/acousticlocalization/ I get stuck at the point LAUNCHING THE ACOUSTICLOCALIZATION MODULE. In the AppLoader I enter the following command: net.tinyos.acousticlocalization.AcousticLocalization but I got the following error: Could not Found module: java.lang.ClassNotFoundException: net.tinyos. acousticlocalization.AcousticLocalization Any ideas on how to fix the problem? I'm quite newbbie in this subject, any help is greatly appreciated!! Thanks in advance, Giacomo Messaggio originale Da: sal...@isis.vanderbilt.edu Data: 21/03/2012 17.39 A: giacomo_gioacch...@libero.itgiacomo_gioacch...@libero.it Ogg: Re: Re: [Tinyos-help] Vanderbilt AcousticLocalization This code is for tinyos-1.x, so that should not be the issue. Janos On Wed, Mar 21, 2012 at 10:30 AM, giacomo_gioacch...@libero.it giacomo_gioacch...@libero.it wrote: Hi Janos, thanks for your answer. Actually the mote I am using is exactly the mica2 and I compile with the command make mica2. I am using TinyOS-1.x, could that be the problem? Thanks, Giacomo Messaggio originale Da: sal...@isis.vanderbilt.edu Data: 21/03/2012 14.57 A: giacomo_gioacch...@libero.itgiacomo_gioacch...@libero.it Cc: tinyos forumtinyos-help@millennium.berkeley.edu Ogg: Re: [Tinyos-help] Vanderbilt AcousticLocalization Giacomo: The code in contrib/vu/apps/AcousticLocalization does compile for mica2. If you need to get it work on another platform, you'll have to figure how the makefiles need to be adapted to include the required interfaces. Please note that this code was written 10 years ago, that is, it predates micaz and iris. Janos On Wed, Mar 21, 2012 at 8:28 AM, giacomo_gioacch...@libero.it giacomo_gioacch...@libero.it wrote: Dear all, I downloaded from sourceforge all the minitasks\02\vu\ CVS folder to try the AcousticLocalization application of ISIS Vanderbilt University. I have put the folder vu in : cygwin\opt\tinyos-1.x\contrib\vu\ and I have set the environment variable VUTOS as explained in the ReadMe file with the command: export VUTOS=/opt/tinyos-1.x/contrib/vu/tos but when I try to compile the applications in the apps folder the system is unable to search interfaces and components in the correct folders. Has someone else faced the same problem? Hope to see some answers, thanks in advance Giacomo ___ 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 ___ Tinyos-help mailing list Tinyos-help@millennium.berkeley.edu https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
Re: [Tinyos-help] Vref to Read ADC port
I believe the Vref is permanently attached to the battery. There may be ways to use an internal ref or another input via software, but I'm not that familiar with the MSP chip. MS Alex FP wrote: Dear all. In order to read a ADC channel i.e. ADC6 (Port6.6) using a Vref external,needed for proper ADC quantization, is necessary connect a battery source to the port 1.2 in a telosb mote? or Is possible to use an other port? .. new Msp430GpioC() as VoltageRef; .. VoltageRef - HplMsp430GeneralIOC.Port12; Thanks in advance. Yours faithfully, Alex. ___ 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] RSSI with tinyos-1.x and mica2
Here's the battery section right out of the MPR/MIB User’s Manual: -- 6.4 MICA2 Battery Voltage Monitor The MICA2 units have an accurate voltage reference that can be used to measure battery voltage (Vbatt). Since the eight-channel, ATMega128L ADC uses the battery voltage as a full scale reference, the ADC full scale voltage value changes as the battery voltage changes. In order to calibrate the battery voltage a precision external voltage reference is required. The MICA2 uses an LM4041 (Mfg: National Semiconductor) 1.223 V reference (Vref) attached to ADC channel 7. NOTE: ADC channel 7 is also used for JTAG debugging on the Atmega128 processor. MICA2s and MICA2DOTs ship with the JTAG fuse enabled. When this fuse is enabled the input impedance of channel 7 is lowered which affects the voltage reference measurement. The fuse must be disabled if ADC channel 7 is used. See below for information on setting ATMega128L fuses. To compute the battery voltage: 1. Set the BAT_MON processor pin (PA5/AD5) to HI. 2. Program the application code to measure ADC Channel 7. 3. Compute battery voltage, Vbatt, from Channel 7’s data by: Vbatt = Vref × ADC_ FS ADC_Count where: Vbatt = Battery voltage ADC_FS = 1024 Vref = External voltage reference = 1.223 V ADC_Count = Data from the ADC measurement of Channel 7 -- So it looks like you have it mostly right. And, yes, the final result is the power at the receiver. Make sure you notice that the Battery Voltage calculation is inverted from what you'd expect: Full-Scale/Count because what you are measuring is a fixed voltage using the battery as the ADC reference...It does actually work once you puzzle it out... I think you can probably ignore the NOTE about Jtag and maybe just add a fudge factor to the battery calculation. Or even just ignore the whole battery thing and use 3.0... Also, if you are just measuring the RSSI of received messages, a measurement is appended to each message in TOS_Msg.strength. However I forget if this is the raw count from ADC-0 or if it has been massaged into Vrssi or even RSSI. Searching the radio code for strength should elucidate this. Note that floating point calculations are rather costly as they are done in software so you might want to use some other methodology, or just the raw Vrssi... MS giacomo_gioacch...@libero.it wrote: Hi, I am using the mica2 motes with tinyos-1.x. I want measure the RSSI value at the receiver. My motes emit at 433MHz. From the datasheets I have been reading I think that everytime a packet is received the following should be done: -read the ADC_Count value from chan[7] of the ADC and use it to obtain Vbatt in: Vbatt= Vref x ADC_FS / ADC_Count -read the ADC_Count value from chan[0] of the ADC and use it to obtain Vrssi in: Vrssi= Vbatt x ADC_Count / ADC_FS -in the end obtain the RSSI value in dBm in this way: RSSI (dBm)=-51.3 x Vrssi - 49.2 Is this process correct? If so, is there a way to make the calculation of the RSSI (dBm) on the mote? And last can I assume the RSSI value computed to be the received power at the receiver or there is a conversion I need to do? Thanks in advance, Giacomo ___ 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] syntax error (easy)
That looks ok to me syntactically so maybe there's something else wrong. You might have a hidden character in your text, if you can use a hexdump utility to look at the file you could find something amiss, or, unlikely, also in the FrameControl file too... Also try moving the lines and elements around to see if the error moves with them. If there were errors in definitions and such you probably would get something besides syntax error. Hopefully someone with better eyes will spot something. MS Felipe Cruz Martínez wrote: Hello, I’m sure that it is an error very easy to resolve... /_Code:_/ /__/ / [...]/ /[110]typedef frameCtrl_t* frmCtrl_rx;/ /[111]ieee802155cmd_t* WNRx = (ieee802155cmd_t*)payload;/ /*[112] * frmCtrl_rx = call FrameControl._getFrmCtrlFields_((nx_uint16_t)WNRx-FrmCtrl);/ /[...]/ // /(Function _getFrmCtrlFields_ returns a frameCtrl_t*)/ // /_Error:_/ /In component `WakeupExampleC':/ // ///WakeupExampleC.nc: In function `Receive.receive':/ /WakeupExampleC.nc:*112*: *syntax error before `='*/ // //opt/tinyos-2.x/tos/chips/cc2420/lpl/DummyLplC.nc:39:2: warning: #warning *** L/ /OW POWER COMMUNICATIONS DISABLED ***/ /make: *** [exe0] Error 1/ /--/ // /frmCtrl_rx is a pointer to a type structure frameCtrl_t:/ // /typedef nx_struct frameCtrl {/ // /nx_uint16_t FrmCtrl;//Este va a ser el famoso campo de 2 bytes. / /nx_uint8_t protocolVersion; / /nx_bool frameType;/ /nx_bool destAddMode;/ /nx_bool srcAddMode;/ /nx_uint8_t txOptions;/ // /}frameCtrl_t;/ // I don’t understand why compiler gives me an error. I hope someone can help me, thanks very much. // // // ___ 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] UART sending series of commands to PC
Also I would recommend eliminating the busy-wait delay() by splitting the whole sending sequence into multiple calls driven by a timer. It's not much of a delay, but long-running tasks may end up blocking other tasks which need resources. MS Eric Decker wrote: It is very strange to be sending modem commands to a pc but okay if you must. You are using UartStream which is split phase. You need to be catching the completion event (signal) from UartStream.sendDone. When the sendDone comes in you can then start up the next string you want to send. The way you have UartStream.sendDone right now doesn't make a whole lot of sense. If you don't know how this works you need to read the basic TinyOS documents and tutorials. Start with Phil's book. On Mon, Feb 13, 2012 at 12:13 AM, #BHARTI GOEL# bhar0...@e.ntu.edu.sg mailto:bhar0...@e.ntu.edu.sg wrote: Hi, I am trying to send a series of commands to the PC hyperterminal using UART interface. Now when I send a single command it works fine. But when I send a series of commands it stops working. I have tried to create delays after each command but still it does not work. Can anyone tell me what I can possibly do? Here is my code : module GSMmodemC @safe() { uses interface Boot; uses interface Init as UartInit; uses interface StdControl as UartControl; uses interface UartStream; uses interface Leds; uses interface TimerTMilli; } implementation { // COMMANDS TO BE SENT char* uartsendBuf1 = AT\n; char* uartsendBuf2 = AT+CMGF=1\n; char* uartsendBuf3 = AT+CMGS=; char* uartsendBuf4 = +6590140252 tel:%2B6590140252; char* output = Hello; char* input; uint16_t inputlen; uint8_t recevedByte; event void Boot.booted() { call UartInit.init(); call Timer.startPeriodic(3000); call UartControl.start(); } static void delay(uint32_t cycles) { while (--cycles 0) { //nop(); } } event void Timer.fired() { call UartControl.start(); call UartStream.send(uartsendBuf1, 3); /*call Leds.led1Toggle(); // This part does not work delay(5000); call UartControl.start(); call UartStream.send(uartsendBuf2, 10); call Leds.led1Toggle(); delay(5000); call UartControl.start(); call UartStream.send(uartsendBuf3, 8); call Leds.led1Toggle(); delay(5000); call UartControl.start(); call UartStream.send(uartsendBuf4, 11); call Leds.led1Toggle(); delay(5000); */ } async event void UartStream.sendDone( uint8_t* buf, uint16_t len, error_t error ) { call Leds.led0Toggle(); call UartStream.enableReceiveInterrupt(); } async event void UartStream.receivedByte( uint8_t byte ) { if( (char* )byte == a) { call Leds.led1Toggle(); } call Leds.led2Toggle(); recevedByte = byte; call UartControl.stop(); } async event void UartStream.receiveDone( uint8_t* buf, uint16_t len, error_t error ) { } } ___ Tinyos-help mailing list Tinyos-help@millennium.berkeley.edu mailto:Tinyos-help@millennium.berkeley.edu https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help -- Eric B. Decker Senior (over 50 :-) Researcher ___ 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] need help about installing and checking JAVA for Mote-PC communication !
Just try make without the intelmote2 part. I don't think there is any platform specific code in the Java tools. MS Mashal al-shboul wrote: Hi All, I need help about checking Java installation in UBUTNU for communication between the PC and iMote2 sensor mote. i have the directory tinyos-2.1.1/support/sdk/java correctly,should i compile it?. However when i compile it (by make intelmote2), i get make: *** No rule to make target `intelmote2'. Stop. although there is a make file in the directory and mostly the makerules are specified correctly in it. and i have noticed in Synaptic Package Manager that JDK is installed , but i am not sure that it works properly. I AM WAITING FOR YOUR HELP, THANKS IN ADVANCE. Regards, Mash'al ___ 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] ADC0 in (10-pin expansion) of Telosb is I/O?
I believe it can be configured as either digital or analog, probably using that generalIO interface. MS aca...@correo.ugr.es wrote: Hello. Someone know if ADC0 (The pin 3) in the 10-pin expansion of Telosb mote is a GeneralIO? I've seen according to the tmotesky and telosb data-sheet (http://www.eecs.harvard.edu/~konrad/projects/shimmer/references/tmote-sky-datasheet.pdf) ADC0 appears as Analog input, but in some implementations in TinyOS this is taken account as a GeneralIO. This finally is correct? e.g.: Msp430GpioC.HplGeneralIO - HplMsp430GeneralIOC.ADC0; in: https://www.millennium.berkeley.edu/pipermail/tinyos-2-contrib-commits/2008-September/001871.html Thanks in advance for your suggestions. Regards, Alejandro. ___ 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 Set-up
Oh Eric, Eric, Eric... Java is not that hard. At least compared to something like the TOS build system. It even {used to be} a rather rationalized and simple alternative to most egregious C++ shenanigans. But anyway... There was one more question in the complaint list: WARNING: CLASSPATH environment variable doesn't exist. Your classpath should contain and a pointer to the cwd (a dot) Add '.' to your CLASSPATH... See if you can find a place where CLASSPATH is actually set, in files like .bahsrc or .profile, and add the dot to the list using a semi-colon ';' as a separator. Or else do this: export CLASSPATH=$CLASSPATH;. I explicitly set PATH and CLASSPATH in my .bashrc so I know what I'm getting and {think that} I have some control over my world... And any Java above and beyond 1.4 is fine for TOS, at least until Oracle destroys the backward compatibility feature. I forget exactly what went in at 1.4, maybe generics, but some TOS code won't compile with previous versions. Someone should fix tos-check-env, no? MS Eric Decker wrote: On Mon, Jan 16, 2012 at 11:25 PM, Varun Agrawal varagra...@gmail.com mailto:varagra...@gmail.com wrote: Hello, I have recently installed TinyOS on my Ubuntu machine and on running tos-check-env I got the following errors: tos-check-env hasn't been updated in quite a while. on my system I have java 1.6 and tos-check-env checks for 1.4 or 1.5. It bitches. Your 1.7 will also cause a bitch. I don't know why tos-check-env insists that version 1.4 or 1.5 is required for TinyOS. I personally ignore it. But I don't use the Java programs.The ones I have used seem to work. The problem I have is I've never bothered to learn Java so if something goes wrong they seem much too complex to figure out. Fairly opaque. I'm using graphviz 2.20.2 and that seems to work fine and toe-check-env is looking for 1.10. I would suggest you move on and don't worry about it. tos-check-env completed with errors: -- WARNING: CLASSPATH environment variable doesn't exist. Your classpath should contain and a pointer to the cwd (a dot) -- WARNING: The JAVA version found first by tos-check-env may not be version 1.4 or version 1.5one of which is required by TOS. Please ensure that the located Java version is 1.4 or 1.5 -- WARNING: The graphviz (dot) version found by tos-check-env is not 1.10. Please update your graphviz version if you'd like to use the nescdoc documentation generator. I have Java 1.7, graphviz is showing version 2.26.3 and I have a feeling the Classpath problem is due to Java. Any useful links or help?? -- Yours faithfully, Varun Agrawal B.Tech-III Computer Science and Engineering National Institute of Technology Surat, India. About Me http://www.about.me/varunagrawal computerCalledVarun() http://computercalledvarun.wordpress.com/ ___ Tinyos-help mailing list Tinyos-help@millennium.berkeley.edu mailto:Tinyos-help@millennium.berkeley.edu https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help -- Eric B. Decker Senior (over 50 :-) Researcher ___ 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] URGENT: NesC renames all internal functions?!
Search this list and the doc site http://docs.tinyos.net/ for advice on calling C functions and libraries from TOS. That's the opposite of what you want, but you may find something in the various described approaches for getting around the name mangling. MS Anna Förster wrote: Hi all, I am trying to implement a tinyos interface to a software library. The problem I am currently facing is that the NesC compiler re-names all functions like this: in BlinkC.nc I define for example MY_FUNCTION And then it is converted to BLINKC_MY_FUNCTION Well, what I am actually trying to do is the following simple scenario: An external C file uses an interface function, which needs to be defined in Tinyos, let's say interface_function(). To compile the C file, I have defined a INTERFACE.H file, where I only declare the function, but do not impelment it. Then, in the tinyos code, I want to implement it by putting exactly this fucntion into the implementation of the TinyOS component. What happens is that the linker cannot find the implementation of this fucntion, because NesC has renamed its implementation to BlinkC__interface_function(). Any ideas of how to handle this?! Any other possibilities of how to implement a tinyos function and call it from an external file? Thanks a lot, Anna -- Dr. Anna Förster PostDoctoral Researcher Networking Laboratory, SUPSI Via Cantonale, Galleria 2 Manno, Switzerland Tel. + 41 58 666 6597 http://www.dti.supsi.ch/~afoerste/ ___ 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] missing address-of operator?
It's legal and sleazy enough that I might have done it... I'd almost say it's doing nothing, because message_t* already includes the message header. But a serial_header may be a different size (hopefully smaller...). msg-data is an array of chars and thus already a pointer (I'm not sure, but putting an in front of it might just be a noop in this case anyway...). sizeof() is returning something that is the moral equivalent of an int, and subtracting that from a char* just backs the pointer up that number of bytes. The whole thing is counting on data[] being chars because pointer arithmetic is done with an implicit sizeof(element) multiplier. Of your other suggested options, this might be one way to do it: (uint8_t *)msg + offsetof(message_t, data) That gets you to the msg-data pointer again and enforces that you are working with bytes. But you might as well go whole hog and subtract the serial_header size at the same time: (uint8_t *)msg + offsetof(message_t, data) - sizeof(serial_header_t); Isn't C fun? MS Flemming Nyboe wrote: Hello, Is this legal: --- 8 serial_header_t* getHeader(message_t* msg) { return (serial_header_t*)(msg-data - sizeof(serial_header_t)); } --- 8 … or is the (msg-data) missing an address-of operator? The construct is found (at least) in TEP111 and CC2420TimeSyncMessageP.ncf BR Flemming Nyboe ___ 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] Ultrasonic Sensor with telosB
What fails? Have you made it past the hardware interfacing? Having trouble accessing GPIO? Not getting a good signal? Not able to time the signals correctly? One problem may be that the Ping-thing runs on 5v and the telsob runs on 3.3v. I think you can ignore the over-voltage on the telos pin at low currents (even though the specs say you shouldn't), but the telos may not pull high enough to trigger the Ping. You'll need an oscilloscope to see what's happening at that level. For GPIO there is some kind of GeneralIO component and there used to be a 32Khz timer (and might even be a micro-sec timer now), but I don't use T2 so I don't know what they are. MS Mukesh Miraculous wrote: Hi everyone, Kindly help me. I am using Ping))) ultrasonic sensor from parallax. I am trying to connect it through GPIO but it fails. I require code urgenlty . kindly help me people. ___ 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] Change adc prescaler for accelerometer sampling operation
Sorry I can't help any further as I don't use ReadStream or any other TOS2 interfaces... You are probably on the right track in looking at Microphone sampling apps. MS Kushal Sarkara wrote: Michael, Thank you for your response. In keeping with the topic of our original conversation, I am still trying to implement the ReadStream interface to sample the MicaZ accelerometer. After sampling at the prescaler setting that guarantees full precision (which is ATM128_ADC_PRESCALE_64 for the MicaZ, according to my calculations) and reading up on the SoundLocalizer application in the TinyOS Programming Manual, I was wondering if there was any way to alter the prescaler and use ReadStream (necessary, in my opinion, because I want to append samples to the log as they are obtained and ReadStream provides this facility). The plethora of ADC configuration interfaces makes it confusing for a TinyOS 2.x and programming novice such as myself to figure out where the prescaler is altered but I think that I've managed to figure out how this can be done. What I am having a lot more trouble doing is figuring out how the ReadStream interface configures the ADC. There must be a point at which the ReadStream interface specifies what prescaler it wants to use, right? This led me to search for a module for the ReadStream interface but I have had no luck. So, * Is there a module for the ReadStream interface where the prescaler etc is set? * Is it possible to modify the prescaler for ReadStream at all or is it perpetually set to ATM128_ADC_PRESCALE? * Is it a good idea to try to mimic the ReadStream operation by using something like Atm128AdcSingle.getData (like the SoundLocalizer does) and then trying to store each sample in a buffer, which would then be appended to the log? My opinion is that this will result in a lot of processing overheads (and make it really tough to program, but I don't see just that being a problem). I apologize for the lengthy post. Kushal On Mon, Nov 14, 2011 at 12:04 PM, Michael Schippling sc...@santafe.edu mailto:sc...@santafe.edu wrote: Changing the return value will have no effect on the ADC. There used to be an interface for this that was actually documented in the code: ADCControl.setSamplingRate(__uint8_t rate); The name may have changed to setPrescaler() or something more obvious. MS Kushal Sarkara wrote: Hello, I am using TinyOS 2.1.1 on Ubuntu 9.10 with MicaZ motes. I am looking to alter the value of the prescaler while sampling the X axis of the accelerometer on the mts300 sensorboard. After doing some digging, I found the file /tos/sensorboards/mts300/__AccelP.nc which returns the value of the prescaler for configuring the Adc, the getdata() function for which leads me back to the /tos/chips/atm128/adc/__Atm128AdcP.nc file. The code in the AccelP.nc file that I am referring to is as follows: / / / async command uint8_t ConfigX.getPrescaler() {/ /return ATM128_ADC_PRESCALE;/ / }/ / / Will it suffice to change the returned value to, for example, /ATM128_ADC_PRESCALE_32 (/as provided in the /tos/chips/atm128/adc/__Atm128Adc.h) if I want to use the adc prescaler (32)? Thanks in advance, Kushal --__--__ _ Tinyos-help mailing list Tinyos-help@millennium.__berkeley.edu mailto:Tinyos-help@millennium.berkeley.edu https://www.millennium.__berkeley.edu/cgi-bin/mailman/__listinfo/tinyos-help 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] Sending array to the PC
This looks like a structure assignment which should copy between two pointers: nmsg-neighbors = tableOfNeighbors; but I think it might not work correctly with arrays. You probably need to do a memcpy() to get the contents of your table into the message. I'm a little rusty on my C pointers (too much Java lately) so you may have to fiddle with *'s and 's to get the two sides to be pointers to the beginning of each array...as written I think they should both be pointers, but obviously the compiler doesn't agree... MS Martin Stehlik wrote: Hello! In my application, I have defined following structure: typedef nx_struct neighbors { nx_uint16_t id; // id of the neighbor nx_uint8_t rssi; // rssi of the signal received from neighbor } neighbors_t; Then, I have following array: neighbors_t tableOfNeighbors[MAX_NEIGHBORS]; I need to send the array to the PC for analyzing in my Java application. I would like to send following message using SerialActiveMessageC: typedef nx_struct neighborsMsg { neighbors_t neighbors[MAX_NEIGHBORS]; } neighborsMsg_t; but this assignment did not work: neighborsMsg_t* nmsg = (neighborsMsg_t*)(call SerialPacket.getPayload(pkt, sizeof(neighborsMsg_t))); nmsg-neighbors = tableOfNeighbors; resulting in: invalid lvalue in assignment Could anyone write me what is the best way how we can transfer arrays from the nodes to the PC? Is it possible to send arrays in messages? I would really appreciate any answer! I spent time searching google and mailinglist. Regards, Martin ___ 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] Tinynode reading from serial port
You might be able to use basestation as a basis for your re-Mote node, but I expect it would be easier to hack up a demo app that reads from an internal sensor like O'scope. The serial messages that basestation expects are the whole TOS Message struct and your wind sensor probably doesn't format it's data that way. You are one the right track with the architecture, but you should use the low level Uart component to read your sensor, replacing the O'scope DemoSensor components. Unfortunately there's not a lot of example code for that...but you can try searching back on this list for discussions of Uart usage. MS Victoria Pimentel wrote: Hello. I have a wind sensor with an RS232 output cable. I want to connect this cable to a tinynode 1 serial port. The wind sensor will send readings to its RS232 output cable and the tinynode 1 will read the sensor readings from the tinynode 1 serial port. Then, I want this tinynode 1 to send to the radio all the messages that it is receiving from the serial port to a tinynode 2 that is connected to a computer. Basically I need to install in the tinynode 1 a base station app that reads from the serial port and sends to the radio, and in the tinynode 2 a base station app that reads from the radio and send through the serial port. I thought I could do this by installing BaseStation on both tinynodes because BaseStation is supposed to be a bridge between the serial and radio channel in any direction. However, the tinynode 1 is not reading from the serial port the messages that the wind sensor is sending. I also thought that I could change the Oscilloscope application to read sensor readings from the serial port instead of the light, voltage or temperature sensors. But I could not find how to change it. Any help would be appreciated. Regards, Victoria Pimentel Sensor Networks Lab Assistant Faculty of Computer Science University of New Brunswick Fredericton, Canada ___ 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] How to store data collected by a telosb network in a db?
By printf() I guess you're using C, here's the first hit I got for mysql C api: http://dev.mysql.com/doc/refman/5.0/en/c.html If your TOS interface is in Java, look into JDBC. MS Geo Gkolfin wrote: Hello! I have a telosb network that sends data periodically to a telosb basestation connected with a pc (via usb). I need to store the data that the basestation receives in a database. So far, I simply use printf in order to see the received data. I have mysql installed, and I could create a database, but I do not know how to use the data received by the basestation in order to create an INSERT query that will be performed automatically. Can someone explain the general idea? (I use xubuntos) Thank you all in advance! Georgia ___ 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] Telosb light sensor specification
Check to see that the O'scope program is configured to sample the light sensor. It may be using something else. I remember one less than spectacular demo that used the battery voltage... MS Baudry Arthur wrote: Good afternoon to both of you, Thanks for your answer, I was away for a few days and I'm just seeing it now. About the sensor type, I have no idea my mote is supposed to be a telosb, if I do a motelist the reference is M4AP1122 and the description is Sensilla tmote sky. I don't know what exactly is the type of the sensor, this a light sensor mounted on the telosb node. I am seeing anything changing when I cover the sensor with my finger, that's why I know that there is a problem but I don't know how to fix it, I'm using oscilloscope to send the data to another node equipped with basestation and the value displayed after conversion are around 3900 just like the values I can observe when I run the Java GUI for Oscilloscope. If you have any ideas, they are welcome :) Have a good day On Fri, Nov 25, 2011 at 12:26 AM, Urs Hunkeler u...@gmx.ch mailto:u...@gmx.ch wrote: Hi, I remember getting values close to 0 ( 50) when it is dark and values just slightly greater than 1000 when it is very bright (without any conversion). If your values don't change much, I think there is a problem with the sensor. You should see a clear drop (50%?) when you cover the light sensor with your finger. Cheers, Urs On 11/24/11 7:37 PM, Baudry Arthur wrote: Good afternoon everyone, I use a telosb node equipped with a light sensor, I have succeeded in receiving data from the node on my laptop, but for me the data are talking non sense because I always get a value next to 4000 (when I convert the readings to a decimal value) even if it is dark in my place. Is there a way to treat those data, I know that for example for temperature data we have to apply a formula to get the real temperature value. Does anyone know how to interpret the light data ? Have a good day, regards, -- Arthur Baudry ESEO _ Tinyos-help mailing list Tinyos-help@millennium.__berkeley.edu mailto:Tinyos-help@millennium.berkeley.edu https://www.millennium.__berkeley.edu/cgi-bin/mailman/__listinfo/tinyos-help https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help -- Arthur Baudry ESEO ___ 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] Telosb light sensor specification
The tutorials may help in understanding this, but... There should be a config file, in TOS1 mine is Oscilloscope.nc It has these lines: components Main, , DemoSensorC as Sensor, OscilloscopeM.SensorControl - Sensor; OscilloscopeM.ADC - Sensor; Then you need to dig through the ratholes of platform directories to find _which_ DemoSensorC file is being used. Sometimes doing make tmote docs will generate some nice diagrams, but they are about as hard to decipher as the directory structure itself. The DemoSensorC I found for tmotes, again in the last T1 release, is: \tos\platform\msp430\DemoSensorC.nc and it uses InternalTemp as it's sensor... The Oscope supplied with moteiv -- the original commercial tmote -- uses a set of sensors, none of which is Light... MS Baudry Arthur wrote: Ok but I am still a beginner, how do I check that ? On Sun, Nov 27, 2011 at 3:03 PM, Michael Schippling sc...@santafe.edu mailto:sc...@santafe.edu wrote: Check to see that the O'scope program is configured to sample the light sensor. It may be using something else. I remember one less than spectacular demo that used the battery voltage... MS Baudry Arthur wrote: Good afternoon to both of you, Thanks for your answer, I was away for a few days and I'm just seeing it now. About the sensor type, I have no idea my mote is supposed to be a telosb, if I do a motelist the reference is M4AP1122 and the description is Sensilla tmote sky. I don't know what exactly is the type of the sensor, this a light sensor mounted on the telosb node. I am seeing anything changing when I cover the sensor with my finger, that's why I know that there is a problem but I don't know how to fix it, I'm using oscilloscope to send the data to another node equipped with basestation and the value displayed after conversion are around 3900 just like the values I can observe when I run the Java GUI for Oscilloscope. If you have any ideas, they are welcome :) Have a good day On Fri, Nov 25, 2011 at 12:26 AM, Urs Hunkeler u...@gmx.ch mailto:u...@gmx.ch mailto:u...@gmx.ch mailto:u...@gmx.ch wrote: Hi, I remember getting values close to 0 ( 50) when it is dark and values just slightly greater than 1000 when it is very bright (without any conversion). If your values don't change much, I think there is a problem with the sensor. You should see a clear drop (50%?) when you cover the light sensor with your finger. Cheers, Urs On 11/24/11 7:37 PM, Baudry Arthur wrote: Good afternoon everyone, I use a telosb node equipped with a light sensor, I have succeeded in receiving data from the node on my laptop, but for me the data are talking non sense because I always get a value next to 4000 (when I convert the readings to a decimal value) even if it is dark in my place. Is there a way to treat those data, I know that for example for temperature data we have to apply a formula to get the real temperature value. Does anyone know how to interpret the light data ? Have a good day, regards, -- Arthur Baudry ESEO ___ Tinyos-help mailing list Tinyos-help@millennium.__berke__ley.edu http://berkeley.edu mailto:Tinyos-help@__millennium.berkeley.edu mailto:Tinyos-help@millennium.berkeley.edu https://www.millennium.__berke__ley.edu/cgi-bin/mailman/listinfo/tinyos-help http://berkeley.edu/cgi-bin/mailman/__listinfo/tinyos-help https://www.millennium.__berkeley.edu/cgi-bin/mailman/__listinfo/tinyos-help https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help -- Arthur Baudry ESEO --__--__ _ Tinyos-help mailing list Tinyos-help@millennium.__berkeley.edu mailto:Tinyos-help@millennium.berkeley.edu https://www.millennium.__berkeley.edu/cgi-bin/mailman/__listinfo/tinyos-help https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help -- Arthur Baudry ESEO ___ Tinyos-help mailing list Tinyos-help@millennium.berkeley.edu https://www.millennium.berkeley.edu/cgi-bin/mailman
Re: [Tinyos-help] Problems with Atmel128 I2C-Components (iris) with slow I2C sensors
Yes, TOS 1.x, which underlies Moteworks. Although I just noticed that the last release of T1 has a hardware impl for I2C in mica128. Here is what I used, including my small patch to I2CM.nc: http://www.etantdonnes.com/Motes/T1_I2C.zip But I imagine that it will be fairly pointless to try to use it as all the bit access methodology was changed in T2, so there'd be a bunch of porting to do. I also put the spec that I used to debug my problem here, where the section of interest is 3.7 Clock synchronization: http://www.etantdonnes.com/Motes/NXPI2Cspec_UM10204_3.pdf My symptom was that I missed the first bit of the second byte of data from the slow device and thus lost bit sync and failed to complete that byte (if memory serves correctly...). I found this by looking at the data line with a scope and counting the bits... If you really think your problem is the clock stretching issue then it might be better to see how the ATmega hardware thinks it should be dealing with it. MS Sebastian Dölker wrote: Unfortunately I have never worked with moteworks and T1 (T1 = tinyos 1.X ?) I work with tinyos-2.1.1 and the standard i2c component of atmle128L (iris) which uses the under laying twi (two wire interface) of the atmel128L chip but it seems that with this special co2-sensor (with long reaction times and the “clock synchronization mechanism”) this doesn’t work well. I guess I have to do bitbanging.. Is it possible to use the sources that you mentioned as a starting point? Where can I find them? ___ Tinyos-help mailing list Tinyos-help@millennium.berkeley.edu https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
Re: [Tinyos-help] (no subject)
If by open you mean edit or view, and you are doing that by double clicking on the file in a GUI file manager, then it looks like the .nc file type is associated with some other kind of document. I don't know how Ubuntu's file manager works, but there should be some way to change that association to be your favorite programming text editor -- On Widows you right click and find an Open With menu entry that often has an option to select a program. Failing that you can open a shell window and try vi [file] or emacs [file]. MS Rakshitha GB wrote: hi, i am installing Tinyos on Ubuntu using VMware. if i open Blink or any .nc files, it gives error saying There is no application installed for Unidata NetCDF document files i need guidence. ___ 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] Problems with Atmel128 I2C-Components (iris) with slow I2C sensors
I'm not sure what you mean by slow, but here's something to check... The T1 version of I2C for the ATmega used bit banging on the TOS side rather than the controller's I2C hardware -- go figure I found that it didn't recognize a wait-state-request from external devices and would lose a bit when reading -- for the particular device I was using, an SC18 SPI-I2C converter -- which would make it lose message sync and fail. I don't remember the details, I think the external device can hold one of the lines to signal that it's not ready -- I made up the name above but that's what it's doing -- digging through the I2C spec should turn it up. I fixed it by putting a short busy wait at the end of each i2c_ack() which slows everything down but makes it work. If you think this is what you have I can try to find more details. MS Sebastian Dölker wrote: Hello! I have a problem with the Atmel128 i2c environment. I want to read out the k30 co2-sensormodul from senseair. On this sensor the i2c communication is implemented in software. Because of that there is an advice in the datasheet that it might come to problems during the i2c communication caused by the long response time of the sensor. The problem was that after an undetermined time the atmel128 i2c components got in an incorrect state out of which the software can’t recover.The bus lines stayed high and the return value was EBUSY. The only way to make the software run fine again was to reset the node with the watchdog. However this solution is inadequately. I analyzed the Atm128I2CMasterPacketP Component and found out that while the node was in the incorrect state the Atm128I2CMasterPacketP returned with EBUSY in the else-block at line 220 in the I2CPacket.read() command. To solve the problem I added the i2c_abort(EBUSY) call in the else-block. (1,2) (same for the I2C.write() command, see software snippet below (2,3)) After that it seemed to work fine. Now the software recovers out of the incorrect state. Had somebody else this problem or tested the atmel128 i2c components with slow i2c sensors? Is it possible that in this else-Block should be a call to the i2c_abort(EBUSY)-function? However there seems to be another bad state, which fortunately occurs more rarely. In this state the return value is EOFF and the bus lines also are in high state. I tried to add the i2c_abort-function in the else if block above, but this seemed not to solve the problem. (see the software snippet below) Has anyone an idea how to solve that problem? Best regards! Sebastian Modified Atm128I2CMasterPacketP.nc: async command error_t I2CPacket.read(i2c_flags_t flags, uint16_t addr, uint8_t len, uint8_t* data) { atomic { if (state == I2C_IDLE) { state = I2C_BUSY; } else if (state == I2C_OFF) { i2c_abort(EOFF); //added...1 return EOFF; } else { i2c_abort(EBUSY); //added...2 return EBUSY; } } ... async command error_t I2CPacket.write(i2c_flags_t flags, uint16_t addr, uint8_t len, uint8_t* data) { atomic { if (state == I2C_IDLE) { state = I2C_BUSY; } else if (state == I2C_OFF) { i2c_abort(EOFF); //added...3 return EOFF; } else { i2c_abort(EBUSY); //added...4 return EBUSY; } } ___ Tinyos-help mailing list Tinyos-help@millennium.berkeley.edu https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
Re: [Tinyos-help] Problems with Atmel128 I2C-Components (iris) with slow I2C sensors
I don't know if what you are working with uses hardware or software (since I've only used T1) -- if you have started with Moteworks you probably have T1... Look at the low level driver and see. If it uses ATmega hardware I would hope that it supports the so called clock synchronization mechanism. Otherwise I put this in I2CM.nc to stretch the period between bytes received a bit: void i2c_ack() { MAKE_DATA_OUTPUT(); CLEAR_DATA(); pulse_clock(); SET_DATA(); // schip 8/12/09 TOSH_uwait(10); // -- to fix SC18 wait-state non-detect } MS Sebastian Dölker wrote: Thank you for your quick reply! Yes I see my workaround isn’t such a good idea. With other I2C-Sensors (tsl2561 light sensor) I also hadn’t any problems and all worked fine. But with the k30 co2 sensor in particular something doesn’t work. I also tried to slow down the i2c clock but it didn’t help. The co2 sensor uses the so called clock synchronization mechanism. Is it what you mean Michael? This is described as follows in the I2C- Specification: “On the bit level, a device such as a microcontroller with or without limited hardware for the I2C-bus, can slow down the bus clock by extending each clock LOW period. The speed of any master is thereby adapted to the internal operating rate of this device.” Equally it is described in the atmel datasheet: “The slave can extend the SCL low period by pulling the SCL line low. This is useful if the clock speed set up by the master is too fast for the slave, or the slave needs extra time for processing between the data transmissions” Because of that I concluded that the Atml128-I2C components support this mechanism but now I’m not sure if it works fine. Have anybody successfully communicated with an i2c sensor that slows down the master clock with this mechanism? @michael Yes I think it is a related problem. If I don’t get it to work with the standard tinyos components I think bit banging will be the next step. Are there any sources? Can you give a hint? Best regards Sebastian ___ 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] undefined reference to `sqrt'
Look carefully in math.h, there may be an #ifdef around the double math functions. I thought that the telosb used doubles rather than floats (the ATMEGA uses float math) but it sounds like I'm wrong... MS ys...@lifc.univ-fcomte.fr wrote: Hi Manjunath, Yes it compiled, thanks a lot. And I'll check if the result is correct. Still don't know why sqrt function is declared in math.h but unusable. Maybe it's declared but not implemented. Anyway I really appreciate your help. Best regards. Hi, Can you please try sqrtf() ? Manjunath D *** On Wed, 16 Nov 2011, ys...@lifc.univ-fcomte.fr wrote: Hello, I'm working with telosb mote, and I need to use sqrt function in my program, but I can't compile it. === mkdir -p build/telosb compiling TestMulAppC to a telosb binary ncc -o build/telosb/main.exe -Os -O -mdisable-hwmul -Wall -Wshadow -Wnesc-all -target=telosb -fnesc-cfile=build/telosb/app.c -board= -DDEFINED_TOS_AM_GROUP=0x22 -DIDENT_APPNAME=\TestMulAppC\ -DIDENT_USERNAME=\xubuntos\ -DIDENT_HOSTNAME=\xubuntos-tinyos\ -DIDENT_USERHASH=0x00f95284L -DIDENT_TIMESTAMP=0x4ec2f4a5L -DIDENT_UIDHASH=0xb186c6f2L TestMulAppC.nc -lm LM here TestMulC.nc: In function `TestMulC$Boot$booted': TestMulC.nc:22: warning: unused variable `m' /tmp/ccIJqAuN.o: In function `EllipticCurveP$mtIsPrime': app.c:(.text+0x6c0): undefined reference to `sqrt' make: *** [exe0] Error 1 === I have included math.h in my program, and I've noticed that the -lm switch is turned on, and I have even found the function declaration at ligne 62 in file /usr/msp430/include/math.h === extern double sqrt _PARAMS((double)); === I don't understand why it cannot find sqrt function. So can anyone help me out? Best regards -- Yanbo SHOU Ph.D student Cartoon Team Computer Science Laboratory of Franche-Comté Office 420C 16 route de Gray 25 000 Besançon, France ___ 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] Change adc prescaler for accelerometer sampling operation
Changing the return value will have no effect on the ADC. There used to be an interface for this that was actually documented in the code: ADCControl.setSamplingRate(uint8_t rate); The name may have changed to setPrescaler() or something more obvious. MS Kushal Sarkara wrote: Hello, I am using TinyOS 2.1.1 on Ubuntu 9.10 with MicaZ motes. I am looking to alter the value of the prescaler while sampling the X axis of the accelerometer on the mts300 sensorboard. After doing some digging, I found the file /tos/sensorboards/mts300/AccelP.nc which returns the value of the prescaler for configuring the Adc, the getdata() function for which leads me back to the /tos/chips/atm128/adc/Atm128AdcP.nc file. The code in the AccelP.nc file that I am referring to is as follows: / / / async command uint8_t ConfigX.getPrescaler() {/ /return ATM128_ADC_PRESCALE;/ / }/ / / Will it suffice to change the returned value to, for example, /ATM128_ADC_PRESCALE_32 (/as provided in the /tos/chips/atm128/adc/Atm128Adc.h) if I want to use the adc prescaler (32)? Thanks in advance, Kushal ___ 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] request for help about tinyos compilation and jdk1.5
Amazingly enough the ROM/RAM message you got is what's supposed to happen! So your compile environment is setup right... For the checkenv messages -- If you are not familiar with Java there's a good wikibook and Oracle has a fine tutorial. Then look around here for classpath advice: http://docs.tinyos.net/tinywiki/index.php/Special:Search?search=classpathgo=Go The version complaints are just old news, if you have Java SDK 1.5 or greater installed you are fine. The Graphviz is probably newer too, and it's only used when making documentation pages. MS Mashal al-shboul wrote: Hi All, i am new member in the list,i am happy to be here. actually, i installed tinyos-2.1.1 and its compiler packages,and now i'm trying to check the environment ; so, when i compile an application in the shell no error appears but it ends at: ... compiled BlinkAppC to build/intelmote2/main.exe 7452 bytes in ROM 70 bytes in RAM IS THIS WHAT THE SHELL SHOULD DISPLAY WHEN THE ENVIRONMENT IS CORRECT? another wounder, when i write check-tos-env it tells : WARNING: CLASSPATH may not include /opt/tinyos-2.1.1/support/sdk/java/tinyos.jar. Please ensure that /opt/tinyos-2.1.1/support/sdk/java/tinyos.jar is in your CLASSPATH or you may experience configuration problems -- WARNING: CLASSPATH may not include '.' (that is, the symbol for the current working directory). Please add '.' to your CLASSPATH or you may experience configuration problems. -- WARNING: The JAVA version found first by tos-check-env may not be version 1.4 or version 1.5one of which is required by TOS. Please ensure that the located Java version is 1.4 or 1.5 -- WARNING: The graphviz (dot) version found by tos-check-env is not 1.10. Please update your graphviz version if you'd like to use the nescdoc documentation generator. how can i install jdk 1.5?, i can't find 1.5 version...and what about the warnings?.. i would be grateful if you help me, i am waiting . Mashal, ___ 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] Reading the usb port without the java Listen (what is the byte RSSI)
The message header, kinda by definition, is at the beginning of the message packet before the payload. So trying to get the header out of the payload is a non-starter... There may be a Packet.getHeader() or some such method -- I don't use that module so I don't know. Or you could probably get away with a cast and structure copy like this: btrpkt-header = (ieee154_header_t) pkt; I'm not sure what pkt is usually it would already be a pointer passed in to your function from the message receive code, so the '' may be superfluous. MS sai manoj wrote: Hi, I want to copy the message header into payload by creating my own payload format This is the Msg format I like to transmit typedef nx_struct Msg { nx_uint16_t hdr; ieee154_header_t header_t; nx_uint16_t val; nx_uint16_t type; }Msg; And in the implementation part I tried 3 different Msg* btrpkt = (Msg*)(call Packet.getPayload(pkt, sizeof(Msg))); btrpkt-header_t=getheader(btrpkt); or btrpkt-header=ieee154_header_t; or btrpkt-header_t.fcf=getFCF(btrpkt); I need to do copy the header of the data into payload -- SAI MANOJ P D (M.Tech) International Institute of Information Technology,Bangalore ___ Tinyos-help mailing list Tinyos-help@millennium.berkeley.edu https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
Re: [Tinyos-help] Error while running net.tinyos.tools.Listen -- URGENT
ahha I guess you are using a network base-station/programming adapter. I'm afraid you'll have to find documentation for that adapter. If you send the name and number of that beast maybe someone will know how to use it correctly. I only use serial or USB devices. It will probably boil down to figuring out the network address and port number to use with the -comm argument. I notice that the value you sent: network@192.168.**.***:10002 has those wild-card *'s which is probably not correct. 192.168... is usually a locally routed net, so that part could be right. Presuming that you used it for programming you should have the right IP address someplace, I just don't know about the :port #. MS Modi, Jenis Ashokkumar wrote: Hi Michael, Thanks for the reply. I have installed both my motes using RJ 45(or say using IP address) cable only. I cannot use the Serial cable connection to my motes as it can be just connected using RJ 45 cable. I am confused about the below lines which is there on http://docs.tinyos.net/tinywiki/index.php/Mote-PC_serial_communication_and_SerialForwarder#BaseStation_and_net.tinyos.tools.Listen . which says that, BaseStation is receiving your BlinkToRadio packets and sending them to the serial port, so if it is plugged into a PC we can view these packets. The Java tool Listen is a basic packet sniffer: it prints out the binary contents of any packet it hears. So, my question is that, is it necessary for me to have my mote connected to PC (via serial com port) ? or Is there any mechanism via which I can sniff this packets as I am using RJ 45 cable to connect to my motes? I don't have serial port connection to my motes. Waiting for your kind reply. Thanks Regards, Jenis -Original Message- From: Michael Schippling [mailto:sc...@santafe.edu] Sent: Wednesday, November 02, 2011 9:08 AM To: Modi, Jenis Ashokkumar Cc: tinyos-help@millennium.berkeley.edu Subject: Re: [Tinyos-help] Error while running net.tinyos.tools.Listen -- URGENT It's a little unclear, but I'm going to assume that your point 2 means that you have installed Basestation on the mica2 that is plugged into the host computer. And further that you are seeing leds blink as one would hope... Then, the error you are getting indicates that Listen is expecting to connect to a network port, usually the SerialForwarder. This is the default behavior, but I always recommend just forgetting about SF and going direct, as it were. To connect Listen to the actual input port you need to set use something like -comm serial@COM1:mica2 where COM1 is the I/O port your mica2 is plugged into. You can also set the same string in a MOTECOM environment variable and not have to bother with it on the command line. Probably searching for MOTECOM will turn up some better advice. MS Modi, Jenis Ashokkumar wrote: Hi All, Could you please help me for this part? I want to run Listen application and want to see the packet it sees. These are the steps which I am following. This is what I did in steps. 1. Install mica2 motes on apps/tutorials/BlinkToRadio. (on 2 different motes) 2. Install mica2 mote (one of the mote where BlinkToRadio is installed) on apps/Basestation application. 3. java net.tinyos.tools.Listen -comm network@192.168.**.***:10002 This throws me Error on network@192.168.**.***:10002:java.net.ConnnectException: Connection refused. Please let me know If I am following wrong steps. I am following this link for getting output. http://docs.tinyos.net/tinywiki/index.php/Mote-PC_serial_communication_and_SerialForwarder Thanks Regards, Jenis ___ 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] Reading the usb port without the java Listen (what is the byte RSSI)
One of the features of the Mote-PC communication is that the RSSI value is not included... On one hand it makes sense because that channel doesn't have a radio strength, but on the other, it causes lots of grief because folks want to see the strength of the signal received at the base-station, which is I presume what you are trying to do. The age-old solution was to reserve a spot in your messages and modify the base-station code to stuff its RSSI into that slot. MS Jorge R. Beingolea G. wrote: Hi all, I'm working on an application to process the Telosb, using Oscilloscope application. I started by collecting and reading data through the USB port, and realized that the process of reading directly from USB port, without the use of command java Listen, 2 bytes are added to the beginning of the frame and 3 to end. In the package (Oscilloscope application = 36 bytes), I could not identify any byte that corresponds to the RSSI. What I wonder is if some of the additional bytes (2 before and 3 bytes at end) may be of RSSI and are abstracted when using the command java Listen could you help me? Jorge ___ 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] Error while running net.tinyos.tools.Listen -- URGENT
Sorry, but I can't help much further. My assumption is that Listen should be able to connect to external network ports, because it can do that with SerialForwarder. I know that SF has a quirky message format that needs a preamble character of some kind -- I think more like Telnet. First I would make sure that the leds are blinking on both your motes. Blink does exactly that, and most basestations blink when sending or receiving. Then I'd look for _something_ supplied by your net adapter that reads messages to see if you get anything. MS Modi, Jenis Ashokkumar wrote: Hi Michael, I am trying to find stuff on internet, but it seems there are very few places( or say application's document e.g. Readme.txt) where I can get answer for my query. Most of the readme.txt in application folder specifies syntax for serial/USB device. For the value which I sent which I specified as 192.168.**.***:10002, I am not putting that as a wild card, I am just specifying * here( in the e-mail). When I install application on mote, I am specifying the actual IP address. For example, 192.168.10.23 . If you know the Lantronix device installer, it says that 10001 port is for input and 10002 is for output. Again, you can modify the port number. I have set my port numbers as 10001 and 10002 respectively for i/p and o/p, but it does not show me output on that port. :( FYI: I am using mica2 motes, and trying to install basestation and blinktoradio application on motes. I am installing application using this kind of command : make mica2 install.1 eprb,192.168.10.50 Thanks Regards, JEnis -Original Message- From: Michael Schippling [mailto:sc...@santafe.edu] Sent: Thursday, November 03, 2011 9:30 AM To: Modi, Jenis Ashokkumar Cc: tinyos-help@millennium.berkeley.edu Subject: Re: [Tinyos-help] Error while running net.tinyos.tools.Listen -- URGENT ahha I guess you are using a network base-station/programming adapter. I'm afraid you'll have to find documentation for that adapter. If you send the name and number of that beast maybe someone will know how to use it correctly. I only use serial or USB devices. It will probably boil down to figuring out the network address and port number to use with the -comm argument. I notice that the value you sent: network@192.168.**.***:10002 has those wild-card *'s which is probably not correct. 192.168... is usually a locally routed net, so that part could be right. Presuming that you used it for programming you should have the right IP address someplace, I just don't know about the :port #. MS Modi, Jenis Ashokkumar wrote: Hi Michael, Thanks for the reply. I have installed both my motes using RJ 45(or say using IP address) cable only. I cannot use the Serial cable connection to my motes as it can be just connected using RJ 45 cable. I am confused about the below lines which is there on http://docs.tinyos.net/tinywiki/index.php/Mote-PC_serial_communication_and_SerialForwarder#BaseStation_and_net.tinyos.tools.Listen . which says that, BaseStation is receiving your BlinkToRadio packets and sending them to the serial port, so if it is plugged into a PC we can view these packets. The Java tool Listen is a basic packet sniffer: it prints out the binary contents of any packet it hears. So, my question is that, is it necessary for me to have my mote connected to PC (via serial com port) ? or Is there any mechanism via which I can sniff this packets as I am using RJ 45 cable to connect to my motes? I don't have serial port connection to my motes. Waiting for your kind reply. Thanks Regards, Jenis -Original Message- From: Michael Schippling [mailto:sc...@santafe.edu] Sent: Wednesday, November 02, 2011 9:08 AM To: Modi, Jenis Ashokkumar Cc: tinyos-help@millennium.berkeley.edu Subject: Re: [Tinyos-help] Error while running net.tinyos.tools.Listen -- URGENT It's a little unclear, but I'm going to assume that your point 2 means that you have installed Basestation on the mica2 that is plugged into the host computer. And further that you are seeing leds blink as one would hope... Then, the error you are getting indicates that Listen is expecting to connect to a network port, usually the SerialForwarder. This is the default behavior, but I always recommend just forgetting about SF and going direct, as it were. To connect Listen to the actual input port you need to set use something like -comm serial@COM1:mica2 where COM1 is the I/O port your mica2 is plugged into. You can also set the same string in a MOTECOM environment variable and not have to bother with it on the command line. Probably searching for MOTECOM will turn up some better advice. MS Modi, Jenis Ashokkumar wrote: Hi All, Could you please help me for this part? I want to run Listen application and want to see the packet it sees. These are the steps which I am following. This is what I did in steps. 1
Re: [Tinyos-help] Reading the usb port without the java Listen (what is the byte RSSI)
Sorry, that was the extent of my ideas... maybe someone smarter and more up-to-date has some better ones. MS Jorge R. Beingolea G. wrote: Hi Michael, There is no other way? in my case only installed the application of the oscilloscope, but I'm reading directly from the USB port without the aid of some other application like: MOTE-PC or java Listen. when I read the USB port have a few additional bytes, I thought some of them could be the RSSI? you have any idea how can I include the RSSI in the frame? Thanks.. Jorge Em 11/3/2011 5:21 PM, Michael Schippling escreveu: One of the features of the Mote-PC communication is that the RSSI value is not included... On one hand it makes sense because that channel doesn't have a radio strength, but on the other, it causes lots of grief because folks want to see the strength of the signal received at the base-station, which is I presume what you are trying to do. The age-old solution was to reserve a spot in your messages and modify the base-station code to stuff its RSSI into that slot. MS Jorge R. Beingolea G. wrote: Hi all, I'm working on an application to process the Telosb, using Oscilloscope application. I started by collecting and reading data through the USB port, and realized that the process of reading directly from USB port, without the use of command java Listen, 2 bytes are added to the beginning of the frame and 3 to end. In the package (Oscilloscope application = 36 bytes), I could not identify any byte that corresponds to the RSSI. What I wonder is if some of the additional bytes (2 before and 3 bytes at end) may be of RSSI and are abstracted when using the command java Listen could you help me? Jorge ___ 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] Error while running net.tinyos.tools.Listen -- URGENT
It's a little unclear, but I'm going to assume that your point 2 means that you have installed Basestation on the mica2 that is plugged into the host computer. And further that you are seeing leds blink as one would hope... Then, the error you are getting indicates that Listen is expecting to connect to a network port, usually the SerialForwarder. This is the default behavior, but I always recommend just forgetting about SF and going direct, as it were. To connect Listen to the actual input port you need to set use something like -comm serial@COM1:mica2 where COM1 is the I/O port your mica2 is plugged into. You can also set the same string in a MOTECOM environment variable and not have to bother with it on the command line. Probably searching for MOTECOM will turn up some better advice. MS Modi, Jenis Ashokkumar wrote: Hi All, Could you please help me for this part? I want to run Listen application and want to see the packet it sees. These are the steps which I am following. This is what I did in steps. 1. Install mica2 motes on apps/tutorials/BlinkToRadio. (on 2 different motes) 2. Install mica2 mote (one of the mote where BlinkToRadio is installed) on apps/Basestation application. 3. java net.tinyos.tools.Listen -comm network@192.168.**.***:10002 This throws me Error on network@192.168.**.***:10002:java.net.ConnnectException: Connection refused. Please let me know If I am following wrong steps. I am following this link for getting output. http://docs.tinyos.net/tinywiki/index.php/Mote-PC_serial_communication_and_SerialForwarder Thanks Regards, Jenis ___ 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] Information general
There's a lot of, probably mostly correct, info here: http://www.tinyos.net/tinyos-2.1.0/doc/html/tep111.html and in general looking around in: http://docs.tinyos.net will turn up answers to lots of questions. MS Javier Vázquez Villodres wrote: Hello, I need information general of the frames that receive the tmotes. The information I need is the following and more extensive please!: * *Destination address* (2 bytes) * *Link source address* (2 bytes) * *Message length* (1 byte) * *Group ID* (1 byte) * *Active Message handler type* (1 byte) * *Payload* (up to 28 bytes): o *source mote ID* (2 bytes) o *sample counter* (2 bytes) *dest addr* *link source addr* *msg len* *groupID* *handlerID* *source addr* *counter* ff ff 00 00 04 22 06 00 02 00 0B ___ 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] Data conversion in Listen.java
Assuming that you were getting good packets before making your changes, then you changed the wrong thing. If Listen is like the T1 version there is a Dump.java class that does the output to the console: Dump.printPacket() is what you want to change...this should not affect any of the packet I/O handling. Also look at how other programs do their message handling using a utility called MIG. MS Ashish Sharma wrote: Hi all, I want to convert the hex data printed by Listen.java to decimal. Has anyone tried such thing? I made some modifications in the java (Listen.java) program but it seems the decimal data is being ignored.. I am always getting 'Packet too long' or 'Bad packet', 'Ignoring unknown packet', etc... error. Some help in this regard would be appreciated. Thanks,, Ashish Sharma, Communication Information Technology, Universität Bremen. ___ 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] [TinyOS-Help] size of code in ram or flash?
A message at the end of compilation should tell you how many bytes of RAM and ROM are used by the program. RAM is the declared variables and (I think) a fixed size stack. ROM is the program code and constant variables. It is stored in the flash memory when downloading. Note that initialized variables are included in this and some startup code copies them to RAM. MS João Gonçalves wrote: Hello, can someone clarify me if the msp430 compiler (mspgcc) can or does automatically, load some part or maybe all of an application code to the flash memory of an msp430, when the total size of the compiled aplication is bigger than the RAM size of the uC? Thanks João ___ 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] Question regarding interrupt in Tinyos
Just for reference Moteworks uses TOS1 which has different functions than TOS2 for doing everything useful. That's one reason I stayed out of the fray... but it is interesting that the interrupt number seems to be mixed up between major versions. I wonder if it has to do with the mica boards using a different numbering scheme than the actual atmega manual for their hardware interrupts? MS dong bo wrote: Hi, What I found in the tos/sensorboards/sensorboard.h is a TOSH_ALIAS_PIN(TONE_DECODE_ SIGNAL, INT3) Hi Antonio, I did not find what you mentioned in that file. Is it under tos/sensorboards ? Thanks! Shawn On Wed, Oct 19, 2011 at 12:11 PM, antonio rosa antoniorosarodrig...@gmail.com mailto:antoniorosarodrig...@gmail.com wrote: Hi, Moteworks provides a function that management the interrupts: TOSH_SIGNAL(SIG_INTERRUPT) { } when SIG_INTERRUP is a label defined on a sensorboard.h 2011/10/19 dong bo shawndon...@gmail.com mailto:shawndon...@gmail.com Hi Micheal, Thanks for your reply. Actually, I am working on the tone detection part, and the interrupt response seems very strange. The following is my original code for this part, and I can see that the interrupt is coming continuously. But when I probe the INT3 pin using an oscilloscope, I found the hardware is working fine. I suspect the interrupt part is not working fine. By the way, I am using the environment of Moteworks downloaded from Xbow website. Thanks a lot! command result_t StdControl.init() { call RadioControl.init(); call HPLUART.init(); call Leds.init(); call Serial.SetStdoutSerial(); call MicControl.init(); call Mic.muxSel(1); call Mic.gainAdjust(64); return SUCCESS; } command result_t StdControl.start() { call RadioControl.start(); call MicControl.start(); call MicInterrupt.enable(); return SUCCESS; } command result_t StdControl.stop() { call RadioControl.stop(); call MicControl.stop(); return SUCCESS; } async event result_t MicInterrupt.toneDetected() { call MicInterrupt.disable(); call Leds.redToggle(); TOSH_uwait(5000); call MicInterrupt.enable(); __nesc_enable_interrupt(); return SUCCESS; } On Tue, Oct 18, 2011 at 12:46 PM, Michael Schippling sc...@santafe.edu mailto:sc...@santafe.edu wrote: We would have to look at your code, but most likely you are not returning from the interrupt correctly. MS dong bo wrote: I am trying to implement the tone detector software in a Mica2 motes with MTS310 sensor cards. The current problem is that as soon as the interrupt is triggered, the system would crash. I triggered green LED to toggle every a while and red LED will be toggled in the interrupt callback function. As soon as there is a sound, red LED will be toggled, and green LED will not be blinking at more, and there will be no more response from the system. Does anyone know about this? Thanks in advance! Shawn --__--__ _ Tinyos-help mailing list Tinyos-help@millennium.__berkeley.edu mailto:Tinyos-help@millennium.berkeley.edu https://www.millennium.__berkeley.edu/cgi-bin/mailman/__listinfo/tinyos-help https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help ___ Tinyos-help mailing list Tinyos-help@millennium.berkeley.edu mailto: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 ___ Tinyos-help mailing list Tinyos-help
Re: [Tinyos-help] Question regarding interrupt in Tinyos
We would have to look at your code, but most likely you are not returning from the interrupt correctly. MS dong bo wrote: I am trying to implement the tone detector software in a Mica2 motes with MTS310 sensor cards. The current problem is that as soon as the interrupt is triggered, the system would crash. I triggered green LED to toggle every a while and red LED will be toggled in the interrupt callback function. As soon as there is a sound, red LED will be toggled, and green LED will not be blinking at more, and there will be no more response from the system. Does anyone know about this? Thanks in advance! Shawn ___ 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] Global Variables
I was never able to get the names to resolve... Instead I have an interface method that passes a pointer to the global around to everyone else. Do you have a good trick to avoid that? thx MS Manjunath Doddavenkatappa wrote: I used use a separate component that allocates global variables. I am not sure whether there is more appropriate way... Manjunath D *** On Mon, 17 Oct 2011, wasif masood wrote: Hi all, I am wondering is it possible to define a global variable in nesC which is to be visible to all components in the project? If not, what are other good approaches against that? BR, Wasif Masood ___ 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] Custom modules.
The doc/tutorial describes how to do this with the config file. For a simple example, I think the Blink demo app has a config file that links in a couple of external modules. Or look for an app that has multiple .nc files (in T1 SimpleCmd has more than one source file) and see how it works. MS Jude Allister wrote: I have created a module that provides 3 interfaces. It is called LEDModuleC.nc and it includes a .h file containing things that module needs. I am having trouble testing it in a different application now. Is there a specific file-name format I must give it instead of LEDModuleC.nc? How do I tell my test application where to find it? Do I just #include LEDModuleC.nc ?? I was under the impression that if I put them all in the same folder, the uses statements in the test application would make nesC look for the stuff in LEDModuleC.nc. I guess this isn't the case? also, I am a bit confused either way about what would go in my TestAppC.nc and TestC.nc files to use the new module. I looked at a bit of the TinyOS examples/library files and I'm still not quite getting it. Right now: TestC.nc: // 3 interfaces provided by LEDModuleC.nc uses interface LEDCycler; uses interface LEDBlinker; uses interface LEDPulser; TestAppC.nc // can't exactly figure this part out. Hopefully this is something quick/minor to work out. Thank you ___ 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] TelosB Digital Output
Once again, here's my cheatsheet for the TELOSB I/O: http://www.etantdonnes.com/Motes/TMOTEpins.txt You can use any of the I/O pins for digital output, but avoid the I2C ones as they are shared with the radio. If you need to drive more than 10 or 20mA you should use a common emitter transistor follower, or if you've got a few outputs, chips like the ULN2803, google will be your friend there... They complicated the methodology of accessing the I/O in T2 and I only use T1. I think there is a component called MSP430GeneralIO or something like that for such uses. MS Eric Decker wrote: You need to find the telosb schematic and see what pins are brought out to a header. then find the msp430f1611 manual and bone up on how to use the digital i/o pins. To kick a switch you need to figure out how to wire the h/w for that kind of usage. I don't know about that kind of stuff. I go to my h/w guy for that kind of stuff. eric On Tue, Oct 4, 2011 at 5:02 AM, Orestis Evangelatos orestis.evangela...@unige.ch mailto:orestis.evangela...@unige.ch wrote: Hello everybody! I am using some TelosB sensors together with tinyos2.1.1 and i want to drive some switches via the DC output of the mote. How could i access the DC output of the sensor? Are there any examples anywhere that i could have an idea on that? Thank you! Orestis Evangelatos -- Orestis Evangelatos, TCS and Sensors Lab, University of Geneva, Switzerland ___ Tinyos-help mailing list Tinyos-help@millennium.berkeley.edu mailto:Tinyos-help@millennium.berkeley.edu https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help -- Eric B. Decker Senior (over 50 :-) Researcher ___ 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] cant debug the CLASSPATH errors
Widows and Linux probably use different directory separators so you may be following the worng instructions. Look for CLASSPATH on this page: http://docs.tinyos.net/tinywiki/index.php/Xubuntu_10.04%2C_SVN_T2.1%2C_Step_by_step If that doesn't work, post your actual settings. MS hamna anwar wrote: ive installed tinyos in windows vista through vmware, followed the procedure present on wikipedia. im getting the following errors. have tried almost all the ways to remove them, went through the help archives as well. im new to linux , so please explain how can i debug the problem in simple and easy steps -- WARNING: CLASSPATH may not include /opt/tinyos-2.1.0/support/sdk/java/tinyos.jar. Please ensure that /opt/tinyos-2.1.0/support/sdk/java/tinyos.jar is in your CLASSPATH or you may experience configuration problems -- WARNING: CLASSPATH may not include '.' (that is, the symbol for the current working directory). Please add '.' to your CLASSPATH or you may experience configuration problems. -- WARNING: The graphviz (dot) version found by tos-check-env is not 1.10. Please update your graphviz version if you'd like to use the nescdoc documentation generator. ___ 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] env setting for the tinyos
TOSROOT and TOSDIR are especially not right. They shouldn't be defined as lists in terms of themselves. All non-PATH variables should not have the second copy of their name or any dangling ;. stuff: export MAKERULES=$MAKERULES $TOSROOT/support/make/Makerules;. should be export MAKERULES=$TOSROOT/support/make/Makerules And I'm not sure that having spaces in PATH and CLASSPATH will work right either. The separators should all be ';' on ubuntu I think. Of course cygWidows uses a mix, ':' for PATH and ';' CLASSPATH... I have multiple installed versions through which I switch so my setup is a bit more complicated, but here goes. What you really want is the last two lines with $TV set to your version directory name: --- ### appropriate version/directory name and define ### MAKERULES and TOSMAKE_PATH as needed below TV=tinyos-1.1.7 ### various back-revs, use 1.1.7 for RoboCar #TV=tinyos-1.1.10 #TV=tinyos-1.x### for MOTEIV/tmote #TV=MoteWorks ### for MOTEWORKS ### set this for MOTEIV and back-revs export MAKERULES=/opt/$TV/tools/make/Makerules ### set these only for MOTEIV (!not back-revs!) #export TOSMAKE_PATH=/opt/moteiv/tools/make #export MOTEIV_DIR=/opt/moteiv ### set this only for MOTEWORKS -- xbow put their Makerules ### file in a slightly different place ### and doesn't use TOSMAKE_PATH #export MAKERULES=/opt/MoteWorks/make/Makerules # Set main pointers used by TOS build system to find files # TOSROOT is for external programs, TOSDIR for makefiles export TOSROOT=C:/cygwin/opt/$TV export TOSDIR=/opt/$TV/tos --- I may be overly superstitions, but on Windows I believe that TOSROOT needs to use the _real_ windows path -- and be used for CLASSPATH and any other external tool settings -- and the TOSDIR needs to use the cygwin relative path. This shouldn't matter on a real OpSys. MS if you are on Windows TOS should be defined using the cygwin Indtiny s wrote: Hi, I have done the following environment setup on ubuntu , but still i'm not able to do the $make mica2 sim // i'm trying in the led blink demo I get the error is ***No rules to make the target mica2 . stop . export TOSROOT=$TOSROOT:/opt/tinyos-2.x export TOSDIR=$TOSDIR:$TOSROOT/tos export CLASSPATH=$CLASSPATH C:\tinyos\cygwin\opt\tinyos-2.x\support\sdk\java\tinyos.jar;. $TOSROOT/support/sdk/java/tinyos.jar:. export MAKERULES=$MAKERULES $TOSROOT/support/make/Makerules;. export PATH=$PATH: /opt/msp430/bin pls help to fix the bug ___ 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] about micaz
This seemed a little crazy to me too, but the explanation I got was that microwave frequency receivers have to overcome a lot of (relative to frequency) capacitance and thus need more power. MS Mohamed Maalej wrote: Hi all, Concerning the Micaz mote, when I take a look on its datasheet I read that the receive mode (19.7 mA) consumes more energy than the transmit mode (17.4 mA) thing that is unusual (see datasheet of mica2 mote for example). Can you explain to me what is the reason, or if I'm missing something ? -- Mohamed Maâlej Tél: 96481112 ___ 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] Problem ADC with MSP430 in tinyos 2.1
There may be an overloading of AMSend names going on... In the congig file try, instead of TestAdcC.AMSend - AM.AMSend[AM_TEST_SERIAL_MSG]; something like: TestAdcC.TestMessage - AM.AMSend[AM_TEST_SERIAL_MSG]; And then in the program file use: call TestMessage.send(AM_BROADCAST_ADDR, ... and event void TestMessage.sendDone(message_t* ... That's how I would do it with the old and moldy TOS1.x code anyway. MS Juan Verdu wrote: Hello everyone, I am working with a MSP430F2617 microcontroller and a radio CC2420 under the Zolertia driver. I am making an application to read the internal temperature of the microcontroller, and later I will send the information to a base station under the Basestation application. My application performs Send () correctly but this application fails AM.sendDone (), if I change the component SerialActiveMessageC by ActiveMessageC, the same problem will happen. In this case, I do not use a radio. I use the serial port and I wouldn´t use the BaseStation application. The code is as follows: _Makefile_ COMPONENT=TestAdcAppC CFLAGS += -DADC12_TIMERA_ENABLED CFLAGS += -DADC12_ONLY_WITH_DMA include $(MAKERULES) CFLAGS += -DCC2420_DEF_CHANNEL=20 _TestAdc.h_ #ifndef TEST_SERIAL_H #define TEST_SERIAL_H typedef nx_struct test_serial_msg { nx_uint16_t counter; } test_serial_msg_t; enum { AM_TEST_SERIAL_MSG = 0x89, }; #endif _TestAdcC.nc _ #include Timer.h #include TestAdc.h module TestAdcC { uses interface Boot; uses interface Leds; uses interface TimerTMilli as Timer0; uses interface Msp430Adc12Overflow as overflow; uses interface Msp430Adc12SingleChannel as adc; uses interface Resource; uses interface SplitControl as Control; uses interface Packet; uses interface AMSend; } implementation { #define BUF_SIZE 100 uint16_t buf[BUF_SIZE]; message_t packet; uint16_t counter = 0; uint16_t Data; void configureSingle(); msp430adc12_channel_config_t adcconfig = { inch: SUPPLY_VOLTAGE_HALF_CHANNEL, sref: REFERENCE_VREFplus_AVss, ref2_5v: REFVOLT_LEVEL_1_5, adc12ssel: SHT_SOURCE_ACLK, adc12div: SHT_CLOCK_DIV_1, sht: SAMPLE_HOLD_4_CYCLES, sampcon_ssel: SAMPCON_SOURCE_SMCLK, sampcon_id: SAMPCON_CLOCK_DIV_1 }; event void Boot.booted() { call Resource.request(); } async event void overflow.conversionTimeOverflow(){ } async event void overflow.memOverflow(){ } async event uint16_t *adc.multipleDataReady(uint16_t *buffer, uint16_t numSamples){ return buffer; } task void send(){ test_serial_msg_t* rcm = (test_serial_msg_t*)call Packet.getPayload(packet, sizeof(test_serial_msg_t)); // call Resource.release(); call Leds.led0Toggle(); rcm-counter = Data; if( call AMSend.send(AM_BROADCAST_ADDR, packet, sizeof(test_serial_msg_t)) == SUCCESS) call Leds.led1Toggle(); } async event error_t adc.singleDataReady(uint16_t data){ Data = data; post send(); return SUCCESS; } event void Resource.granted(){ configureSingle(); call Timer0.startPeriodic(2048); } void configureSingle(){ error_t e; e = call adc.configureSingle(adcconfig); } event void Timer0.fired() { call adc.getData(); } event void AMSend.sendDone(message_t* bufPtr, error_t error) { call Leds.led2Toggle(); } event void Control.startDone(error_t err) { } event void Control.stopDone(error_t err) { } } _TestAdcAppC.nc_ #include TestAdc.h configuration TestAdcAppC { } implementation { components MainC, TestAdcC, LedsC; components ActiveMessageC as AM; components new TimerMilliC() as Timer0; components new Msp430Adc12ClientAutoDMAC() as Lectura; TestAdcC.overflow - Lectura; TestAdcC.adc - Lectura; TestAdcC.Resource - Lectura; TestAdcC - MainC.Boot; TestAdcC.Leds - LedsC; TestAdcC.Timer0 - Timer0; TestAdcC.Control - AM; TestAdcC.AMSend - AM.AMSend[AM_TEST_SERIAL_MSG]; TestAdcC.Packet - AM; } Could someone help me? Escribe texto o la dirección de un sitio web, o bien, traduce un documento http://translate.google.es/?tr=fhl=es. Cancelar http://translate.google.es/?tr=thl=es traducción del español al inglés A greeting and thank you very much ___ 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] temperature and humidity help!!!
Look through the doc/tutorial materials. Then find a demo app that reads one of those sensors and sends the data over the radio. There might even be a demo that reads them all, but you should be able to find a starting place. MS Javier Vázquez Villodres wrote: Hello, I am new to TinyOS and need help urgently. I have to make a program that collects temperature and humidity with a TMOT sky and not how. Someone could help me?. My email address is *jvazquez.bcn@**gmail.com http://gmail.com*. Thanks! Quizás quisiste decir: Hola, Soy nuevo en esto de TinyOS y */necesita/* ayuda urgentemente. Tengo que realizar un programa que recoja temperatura y humedad con una Escribe texto o la dirección de un sitio web, o bien, traduce un documento http://translate.google.es/?tr=fhl=es. Cancelar http://translate.google.es/?tr=thl=es traducción del español al inglés ___ 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] Debugging Java using Eclipse under Cygwin?
Create an Eclipse project for your app and link it to the TOS source tree, and/or, create a project for the TOS source itself. Strangely enough there is no magic TOSmake foo for the host side Java code. Just get all the classpaths and MOTECOM variables set right and make sure you have the comm JNI libs and jars installed in the JRE that Eclipse uses. MS Zhen Song wrote: Dear All Any one have suggestions on how to debug Java using Eclipse under Cygwin? I'm working on TinyOS development under Windows. I'm looking for something more efficient than JDB. It will be super if I can debug the Makefile generated .class files under Eclipse. Regards Zhen ___ 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] Sensing humans?
What you probably want is a PIR sensor (Passive InfraRed) like those used in motion sensitive porch light fixtures. Here's one example: http://www.sparkfun.com/products/8630 Note that they detect low-freq IR (around 10nm) which is what mammal bodies radiate, and they need a differential signal from motion so if you stand still (or wear a heavy parka) they may not fire. MS Geo Gkolfin wrote: Hello everybody! I am using tinyOS -2.1.0 and telosb motes. I need to detect human presence, so I wonder if there is something like an occupancy sensor. Thanks in advance! Best regards, Georgia ___ 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] Porting c code with nc one
I don't know of any micro-controller that has floating point hardware support. Are there such? The telosb MSP chip doesn't even have int multiply or divide instructions. The mica Atmega has an 8-bit multiply but no divide. With you, I always recommend fixed-point math. MS Sergio Valcarcel wrote: Hi Malissa, Depending on the platform you are using, your CPU may accept float or even double numbers. Also, depending on the architecture float computations might be accelerated with dedicated hardware or not. So the main points you have to verify is whether the extensively use of float operations will decrease the overall performance of your system. Of course, it is not the same to compute a numerical integration than to average two numbers... Another main point is the memory footprint. Float numbers typically could use 4 bytes. So you must take care of how much available RAM you have for your application. A final concern is that you can not use network data types (i.e. nx_struct) for communications since there is not defined a nx_float type. The other option, instead of using floats, could be to convert to integer, scaling as many decimals you want. For instance, 165.32 could be converted to 16532 (remembering that it is multiplied by 1e2). I hope it helps! Sergio On Sat, Sep 10, 2011 at 10:30 AM, Maissa Ben Jamaa maisa.benja...@gmail.com mailto:maisa.benja...@gmail.com wrote: Hello sir, Please can I ask you a question: does using float number in a nc code for real compilation matter? Thank you Best regards, Maissa Ben Jamaa 2011/9/9 Maissa Ben Jamaa maisa.benja...@gmail.com mailto:maisa.benja...@gmail.com Hello sir, I am very thankful for your answer, I tried to do something similar to blip code but I got the following error: gcc: cannot specify -o with -c or -S and multiple languages. Noting that I am now testing my code with Tossim. Best regards, Maissa Ben Jamaa 2011/9/8 Sergio Valcarcel serteck...@gmail.com mailto:serteck...@gmail.com Dear Maissa, Please, check this thread: http://www.mail-archive.com/tinyos-help@millennium.berkeley.edu/msg36375.html It is pretty straight forward, but do not hesitate to mail me if you need further help. Cheers! Sergio On Thu, Sep 8, 2011 at 5:12 PM, Maissa Ben Jamaa maisa.benja...@gmail.com mailto:maisa.benja...@gmail.com wrote: Hello sir, I saw your interaction in tinyos help about porting c code with nc code. here is the link: http://www.mail-archive.com/tinyos-help@millennium.berkeley.edu/msg38966.html Please can you tell me the steps to follow in order to make this porting. Thanks. Best ragards, Maissa Ben Jamaa ___ 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] Telosb image processing
rupesh vishwakarma wrote: yes I am working in 16 MHZ what can i do to make it fast process Well...The MSP chip doesn't have a Multiply instruction (I'm a little surprised because the ATMEGA does and I never bothered to look). But it does do 16 bit integer Add and Sub so that's something... Therefore you need to be very careful with your math, and possibly hand-asm-code the inner loops. Also access to the external EEPROM may be rather slow, you should look into comparing the speed with the internal Flash memory for your image storage. Probably transferring larger blocks of data from ROM to RAM will help a bit too. MS ___ Tinyos-help mailing list Tinyos-help@millennium.berkeley.edu https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
Re: [Tinyos-help] Wrong printed value
ahI think the number of significant digits for a float is 24 bits so the cast may be rounding. See: http://en.wikipedia.org/wiki/Floating_point#Rounding_modes MS Geo Gkolfin wrote: There are not so many steps to be made. The functionality is described in my first mail. On Fri, Aug 19, 2011 at 9:38 PM, Eric Decker cire...@gmail.com mailto:cire...@gmail.com wrote: On Fri, Aug 19, 2011 at 11:32 AM, Geo Gkolfin geo198...@gmail.com mailto:geo198...@gmail.com wrote: Thanks for your answer! Actually it almost worked! %lu prints 3354000128 instead of 3354000112. %lx prints c7e9fb00 which is 3354000128 hex. This can drive you crazy! Any ideas please? Without explicitly stepping through the code and seeing what it is doing, we would be guessing. On Thu, Aug 18, 2011 at 12:58 AM, Michael Schippling sc...@santafe.edu mailto:sc...@santafe.edu wrote: That is a little odd... I guess the implicit casting is trying to help you by returning the largest value for the uint16 when converting from a too-big float. When you change to uint32 you should get 0xC7E9FAF0 in your integer (which is what my Widows calculator shows as the correct conversion for decimal 354000112). Then, because the top bit is set and you asked for a signed decimal output %ld you should get a negative value, but it's off by 16... -940967168d == 0xC7E9FB00 so I'm not sure what is going on. Try printing %lu or %lx and see what you get. MS Geo Gkolfin wrote: Hello! I am using telosb motes and tinyos-2.1.0. I have an application in which some floating point operations are done and I wish to print (using PrintfClient) only the decimal part of the result. Since the printed value is not what it should be -it is always 65535- I wrote a simple program where I have: float y; uint16_t x; y=4354.542134509; x=y; printf(int(4354.542134509)=%__u\n,x); printfflush(); I run java net.tinyos.tools.PrintfClient -comm serial@/dev/ttyUSB0:telosb and I get the 4354! If I change the value stored in y to: y=3354000112.542134509 then the printf returns 65535 -the same value as in my application! So I guess this is because the value does not fit into a uint16_t. I change x definition to uint32_t and %u to %ld (make is okay with that), but then the printed value is -940967168! What is the problem? Thanks in advance, Georgia --__--__ _ Tinyos-help mailing list Tinyos-help@millennium.__berkeley.edu mailto:Tinyos-help@millennium.berkeley.edu https://www.millennium.__berkeley.edu/cgi-bin/mailman/__listinfo/tinyos-help https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help ___ Tinyos-help mailing list Tinyos-help@millennium.berkeley.edu mailto:Tinyos-help@millennium.berkeley.edu https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help -- Eric B. Decker Senior (over 50 :-) Researcher ___ 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] Error on tos-check-env
Searching for win32 error 487 I found that there may be a conflict with McAfee VirusScan 8.0.0 or perhaps some other process. Look through the search results, and check on the cygwin.com site for any advice they may have. MS LU Wei wrote: HI: I am new to tinyos. i just installed tinyos on windowsXP and cygwin, and i make this cammand to check that the environment is setup correctly: tos-check-env the output of this command is: a little window show up and say perl.exe have stopped work , besides, the cygwin window show perl 3872 fork_copy: linked dll data/bss pass 0 failed, 0x2c2000..0x2c2370, done 0, windows pid 604, win32 error 487. Please, how can i correct this errors? best wishes! 2011-08-12 Jacky ___ 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] Programming Iris Motes
well, you can use TOS, or program them from the ground up... Have a look at the doc/tutorial and http://docs.tinyos.net MS suraj p wrote: Hi everyone, I have 2 Iris motes and MIB 520 and I want to use these for home automation project. In order to do this do I have to learn programming in TinyOS? Please reply me with necessary info. -- Suraj ___ 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] semaphore and tossim
Any sort of waiting is a bad idea in TOS because it is non-pre-emptive. There is a threads implementation, of which I know nothing, that might provide sync primitives if you insist on doing it the way you describe. However the pattern you probably want is fairly standard: task1() { someMessage.send() } someMessage.sendDone() { // did it go out ok? } mymessage.receive() { post task2(); } task2() { // continue from here } Hopefully you can interpret my shorthand sketch MS ehsan enayati wrote: Hi, i'm doing my thesis simulations in tinyos2.1 and TOSSIM, in one of my component i need to wait for an event(general concept of event not the one in tinyos) to happen , i broadcast a packet via AMSend and i should wait till first response comes back and then continue my program sth like this: . . AMSend.send() WAIT and after receiving first response continue from here . . . i wanted to use semaphore but it didn't worked in TOSSIM, please help me my thesis deadline is near and i should solve this problem as soon as possible. With the best regards *Ehsan Enayati* M.Sc. Student ,Information Technology Sharif University Of Technology enay...@ce.sharif.edu mailto:enay...@ce.sharif.edu http://ce.sharif.edu/~enayati ___ 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] Pinouts of a TelosB SPI bus
hmmm...I haven't used SPI, on anything actually, but it looks like they did not bring all the signals you need to the I/O headers. According the the MSP430 Users Guide, I think you need SOMI0 which is named RADIO_SO on the schematic. You do get access to SOMO0 and UCLK0 as RADIO_SI and RADIO_SCLK, and I think you can use them for I2C, but there's not enough wires for SPI. I believe, from a quick glance at the spec sheet, that an internal UART is used to do the actual comm but the I/O pins are those of the RADIO_* variety. The CC2420 radio chip interfaces via SPI so you would need to do arbitration in any case. MS Marcelo Coelho wrote: Thanks for the quick replies! From what I understood, the SPI functionality is provided by the UART0 tx/rx ports and the I2Cclk (for clock source) and I2Cdata (for the slave select) in the 10pin expansion header. Michael: I liked the pinout that you pointed, specially the description of the UART1TX (?wtf?) :p Cheers, Marcelo Coelho -Original Message- From: Michael Schippling [mailto:sc...@santafe.edu] Sent: segunda-feira, 1 de Agosto de 2011 17:04 To: Thomas Schmid Cc: Marcelo Coelho; tinyos-help@millennium.berkeley.edu Subject: Re: [Tinyos-help] Pinouts of a TelosB SPI bus And here's a list of controller and header assignments: http://www.etantdonnes.com/Motes/TMOTEpins.txt MS Thomas Schmid wrote: http://www.snm.ethz.ch/pub/uploads/Projects/tmote_sky_schematic.pdf - Thomas On Mon, Aug 1, 2011 at 8:24 AM, Marcelo Coelho mjcoe...@criticalsoftware.com wrote: Hi! I'm trying to add Ethernet communication functionality to a Crossbow TelosB mote. To accomplish that, I intend to use an Arduino Ethernet shield (and it's schematics), but don't have the pinouts of the TelosB mote. Do you know the pinouts of the TelosB SPI bus? Thanks in advance! Best regards, Marcelo Coelho DISCLAIMER: This message is confidential and may contain privileged information. It is for use only by the people or entities to whom it is addressed. If you are not an intended recipient, you should not disclose, distribute, copy, print, rely on or otherwise make use of this message. If an addressing or transmission error has misdirected it to you we would be grateful if you would please notify the sender by return, before deleting it from your system. Are you controlling information disclosure? Decide what you need to keep secret and enforce it with csSECURE. See how at www.csSECURE.net. ___ Tinyos-help mailing list Tinyos-help@millennium.berkeley.edu https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-h elp ___ Tinyos-help mailing list Tinyos-help@millennium.berkeley.edu https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help DISCLAIMER: This message is confidential and may contain privileged information. It is for use only by the people or entities to whom it is addressed. If you are not an intended recipient, you should not disclose, distribute, copy, print, rely on or otherwise make use of this message. If an addressing or transmission error has misdirected it to you we would be grateful if you would please notify the sender by return, before deleting it from your system. Are you controlling information disclosure? Decide what you need to keep secret and enforce it with csSECURE. See how at www.csSECURE.net. ___ 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] Logarithmic function
I have two different versions of msp430 tools courtesy of different mystery TOS installations, one in /usr and one in /opt. They both have the same directory structure, so the only math.h file I could find was: .../msp430/msp430/include/math.h Both contain a logf() declaration, and a logf10()... To show my ignorance I remembered that log was base 10 not ln, so that probably tells you how useful my information is... MS Geo Gkolfin wrote: Oops, my bad! Actually logf() works fine. It computes ln correctly. I still cannot find it in any of the math.h files but it works. Sorry again. ___ 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] Logarithmic function
The base10 log ironic part was a reference to how bad my memory is of math functions that I don't often use... I also forgot that avr math.h uses doubles... hope things keep working for you MS Geo Gkolfin wrote: Dear Mr Michael Schippling Thank you so much for both your help and your irony. I am afraid I was looking at avr! After your enlightening reply I was able (at last) to find logf. Unfortunately I cannot understand the base 10 ironic part of your mail. But logf(2.718) returns 1 so I guess logf computes the Neperian logarithm. Excuse me if my comment is irrelevant. Once again thank you for replying. Please keep up the good work helping us and the positive energy. Best regards, Georgia On Sun, Jul 31, 2011 at 7:37 PM, Michael Schippling sc...@santafe.edu mailto:sc...@santafe.edu wrote: I have two different versions of msp430 tools courtesy of different mystery TOS installations, one in /usr and one in /opt. They both have the same directory structure, so the only math.h file I could find was: .../msp430/msp430/include/__math.h Both contain a logf() declaration, and a logf10()... To show my ignorance I remembered that log was base 10 not ln, so that probably tells you how useful my information is... MS Geo Gkolfin wrote: Oops, my bad! Actually logf() works fine. It computes ln correctly. I still cannot find it in any of the math.h files but it works. Sorry again. --__--__ _ Tinyos-help mailing list Tinyos-help@millennium.__berkeley.edu mailto:Tinyos-help@millennium.berkeley.edu https://www.millennium.__berkeley.edu/cgi-bin/mailman/__listinfo/tinyos-help 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] Logarithmic function?
there may be a logf(float) function. Look in the relevant math.h file to see what's what. MS Geo Gkolfin wrote: Hello, I am using a telosb mote and I am trying to convert the adc value of an external temp sensor in Celsius. The conversion formula uses the logarithmic function. I need to compute ln(x/y). I tried log(x/y) as in C, but it is not correct. Could someone help me? Thanks in advance! ___ 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] L operator in timers
You forgot to mention that big-endian numbers are MUCH easier to read in hex, and even octal, dumps... I rue the day intel decided to one-up motorola and go little-ended. Computers will never be connected to one-another after all... Between that and the incredibly stupid p.match over CR/LF I'll bet the world GDP has been dinged by at least 10%. Given that the hardware message headers are NOT nx_ types and that there is (in all cases?) some kind of translator between TOS and e'net, IMHO it is just-one-more-confusion to add big-end numbers into the mix. But back to TOS... One possibility is that the Timer does not really use a full 32 bit value. Both atmega and msp have 16 bit counters -- maybe there is some software foo to extend that by counting the counts -- so a mis-aligned number _might_ wrap around and end up setting a crazy count value. Your experimental protocol seems to be the best approach. MS Eric Decker wrote: On Mon, Jul 25, 2011 at 5:19 PM, Michael Schippling sc...@santafe.edu mailto:sc...@santafe.edu wrote: hmmmnot sure Normal numbers on just about every platform with which we deal are Little Endian, but for some reason they decided to use Big Endian for the nx_types, didn't think it through and not concerned about performance. prior to intel processors being as ubiquitous as they are big endian processors were more prevalent. And the powers that be selected big endian for network transmission order on the networks being worked on at the time. It made sense because big endian network order and big endian puters played well. At least at the IP level. IEEE did it different and the h/w guys did it different. Look at how we describe IPv6 h/w addresses (like EUI-64). Its easy to wrap ones mind into squirrly little nots. Then intel came along and frankly having TinyOS network order be little endian for custom protocols makes sense from a performance perspective but in the presense of IPv6 and 6lowpan stuff it would still have to be sent over big endian. So who know what is the right answer. even though, e.g. the CC2420 hardware header values, are still Little. But treating a small valued Big End int as Little would make the value large -- I think I did that right, in my head at least. that is correct. Which doesn't explain the behaviour he is seeing. And why I think playing computer or byting the bullet and debugging the embedded system in a more reasonable way (like with a real debugger via the jtag port) is the way to go. What I meant by reset(10) was to send a literal value as an arg, rather than getting it out of your message. Just to see that something works the way we want. yep good suggestion. eric MS scatram...@gmail.com mailto:scatram...@gmail.com wrote: for going crazy I meant that the TimerTMilli MyTimer fires every few milliseconds... I bet you are right saying that the app_period is not reconverted to the right byte order. it would explain why the timer fires in few millisec cos I usually set the app_period between 1 and 30 btw, what's reset(10) ? is not a Timer command, isn't it? cheers Davide On 25 Jul 2011, at 22:13, Michael Schippling wrote: I don't have no intercourse with nx_types but it might be that app_period is not being re-converted back to the right byte order. Does it work with reset(10)? Also, please define crazy timer MS scatram...@gmail.com mailto:scatram...@gmail.com wrote: Thanks a million Michael there still is something that doesn't work: if I do: call MyTimer.startPeriodic(1024L * (uint16_t) (sync_msg.app_period)); where 'period' is a 'nx_uint16_t' inside the struct 'sync_msg' everything works fine on the other hand, if I use a function like: reset((uint16_t) (sync_msg.app_period)) ... reset (uint16_t period){ call MyTimer.startPeriodic(1024L * (uint16_t) period); } the timer goes crazy any idea why? am I doing something wrong casting the value? Davide On 25 Jul 2011, at 17:14, Michael Schippling wrote: long integer scatram...@gmail.com mailto:scatram...@gmail.com wrote: Hi, An easy question: What the 'L' stands for when assigning the period to a timer? for example call MyTimer.startPeriodic(1024 * 10L); it starts a periodic timer that fires every 10 seconds but what's the meaning of 'L' I couldn't find it in google... thanks Davide ___ Tinyos-help mailing list Tinyos-help@millennium.berkeley.edu mailto:Tinyos-help@millennium.berkeley.edu
Re: [Tinyos-help] Loading / saving a array of uint8_t at micaz/iris nodes
From my reading of the referenced page it looks like the xml file is used to define storage areas -- like files -- in the external EEPROM, but it doesn't address initializing the contents prior to running your program. You could implement a message to send and store your key. I don't know if there is any erase of external EEPROM done when a device is programmed, so the contents _might_ persist across new downloads and thus you would only have to do the message thing once. Another possibility is that there is a small internal EEPROM area on each controller. In T1 one accessed this using the InternalFlashC component -- which has probably changed names in T2. This memory _is_ erased but can be initialized at download time. I don't think TOS has implemented any method to do this so you would have to dig through the controller and download utilities to figure out how to do it. MS Markus Niedermann wrote: Hey! Im using tinyos 2.1.1 at micaZ and iris nodes. I use ECDH to get a secret key for a symmetric encryption between nodes and with the PC. For saving time, I pregenerate my public / private keys at the PC. First, I hard-coded them as uint8_t- arrays in the code. The configuration is should be installed at different nodes with different keys. Now I want to save the 160-bit-keys at the external flash of my nodes. How should I handle this? The TinyOS-Page seems to be partially offline, so I can't get all Information I need. http://docs.tinyos.net/tinywiki/index.php/Storage I read this tutorial. I'm not quite sure how I have to configure the xml file. I guess I have to write a second application, that I use to save the keys on my nodes, right? Or is there a way to save something directly over the serial interface? Thanks for your help! Markus ___ 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] L operator in timers
long integer scatram...@gmail.com wrote: Hi, An easy question: What the 'L' stands for when assigning the period to a timer? for example call MyTimer.startPeriodic(1024 * 10L); it starts a periodic timer that fires every 10 seconds but what's the meaning of 'L' I couldn't find it in google... thanks Davide ___ 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] L operator in timers
I don't have no intercourse with nx_types but it might be that app_period is not being re-converted back to the right byte order. Does it work with reset(10)? Also, please define crazy timer MS scatram...@gmail.com wrote: Thanks a million Michael there still is something that doesn't work: if I do: call MyTimer.startPeriodic(1024L * (uint16_t) (sync_msg.app_period)); where 'period' is a 'nx_uint16_t' inside the struct 'sync_msg' everything works fine on the other hand, if I use a function like: reset((uint16_t) (sync_msg.app_period)) ... reset (uint16_t period){ call MyTimer.startPeriodic(1024L * (uint16_t) period); } the timer goes crazy any idea why? am I doing something wrong casting the value? Davide On 25 Jul 2011, at 17:14, Michael Schippling wrote: long integer scatram...@gmail.com wrote: Hi, An easy question: What the 'L' stands for when assigning the period to a timer? for example call MyTimer.startPeriodic(1024 * 10L); it starts a periodic timer that fires every 10 seconds but what's the meaning of 'L' I couldn't find it in google... thanks Davide ___ 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 ___ Tinyos-help mailing list Tinyos-help@millennium.berkeley.edu https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
Re: [Tinyos-help] L operator in timers
hmmmnot sure Normal numbers on just about every platform with which we deal are Little Endian, but for some reason they decided to use Big Endian for the nx_types, even though, e.g. the CC2420 hardware header values, are still Little. But treating a small valued Big End int as Little would make the value large -- I think I did that right, in my head at least. What I meant by reset(10) was to send a literal value as an arg, rather than getting it out of your message. Just to see that something works the way we want. MS scatram...@gmail.com wrote: for going crazy I meant that the TimerTMilli MyTimer fires every few milliseconds... I bet you are right saying that the app_period is not reconverted to the right byte order. it would explain why the timer fires in few millisec cos I usually set the app_period between 1 and 30 btw, what's reset(10) ? is not a Timer command, isn't it? cheers Davide On 25 Jul 2011, at 22:13, Michael Schippling wrote: I don't have no intercourse with nx_types but it might be that app_period is not being re-converted back to the right byte order. Does it work with reset(10)? Also, please define crazy timer MS scatram...@gmail.com wrote: Thanks a million Michael there still is something that doesn't work: if I do: call MyTimer.startPeriodic(1024L * (uint16_t) (sync_msg.app_period)); where 'period' is a 'nx_uint16_t' inside the struct 'sync_msg' everything works fine on the other hand, if I use a function like: reset((uint16_t) (sync_msg.app_period)) ... reset (uint16_t period){ call MyTimer.startPeriodic(1024L * (uint16_t) period); } the timer goes crazy any idea why? am I doing something wrong casting the value? Davide On 25 Jul 2011, at 17:14, Michael Schippling wrote: long integer scatram...@gmail.com wrote: Hi, An easy question: What the 'L' stands for when assigning the period to a timer? for example call MyTimer.startPeriodic(1024 * 10L); it starts a periodic timer that fires every 10 seconds but what's the meaning of 'L' I couldn't find it in google... thanks Davide ___ 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 ___ 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] What is the maximum speed LED can toggle?
The usual thing would be to have a Timer post a send() task, and use a busy semaphore that is reset in sendDone(). Then you only need one global message buffer. If it was the receive side that hung up I would look at how you free the internal receive msg buffers. But it might be best to post your code... MS Lee Carol wrote: Hi Michael and Eric, thank you for replying. It's the sending side that failed and I do not know how to debug a buffer failure.. After extensive testing, it does seem like some kind of buffer problem as it always give me a few successful packet then die if I am on the 40~50Hz but no packet is sent after that. Any idea? Thanks On Fri, Jul 22, 2011 at 5:47 PM, Michael Schippling sc...@santafe.edu mailto:sc...@santafe.edu wrote: If you can't debug it with an LED or two...haha... Actually I have sometimes used a scope and once or twice have been forced to use a logic analyzer. You should be able to flash the LED exactly as fast as you can execute a while-loop with a toggle in it. There may be a buffer failure. Are you freeing each message buffer as soon as you are done? Is it the sending or receiving side that dies, and how do we know? My speed tests using T1 and mica's of various flavors were able to run fairly fast for-mostly-ever, although 33/second is about the mica2 limit. What platform are you using? MS Eric Decker wrote: On Fri, Jul 22, 2011 at 2:19 PM, Lee Carol casab...@gmail.com mailto:casab...@gmail.com mailto:casab...@gmail.com mailto:casab...@gmail.com wrote: Hi, I am writing a program that, every time a packet is sent from mote, LED light toggles. When I increase the packet sending rate to 33Hz, my mote only works for few seconds then stop. I've examined my code and everything seems to work fine. Wondering if LED is causing the problem and want to know how fast the LED can be toggled. probably not. Not much can go wrong with the LED. I would recommend that you get a jtag pod and dig into what is actually going on. trying to debug embedded systems using printfs and led while doable isnt the most efficient of programmer time. my not so humble opinion. (I've been doing embedded stuff since the 70's). Anyone knows? Thanks for viewing Carol _ Tinyos-help mailing list Tinyos-help@millennium.__berkeley.edu mailto:Tinyos-help@millennium.berkeley.edu mailto:Tinyos-help@__millennium.berkeley.edu mailto:Tinyos-help@millennium.berkeley.edu https://www.millennium.__berkeley.edu/cgi-bin/mailman/__listinfo/tinyos-help https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help -- Eric B. Decker Senior (over 50 :-) Researcher --__--__ _ Tinyos-help mailing list Tinyos-help@millennium.__berkeley.edu mailto:Tinyos-help@millennium.berkeley.edu https://www.millennium.__berkeley.edu/cgi-bin/mailman/__listinfo/tinyos-help 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] What is the maximum speed LED can toggle?
If you can't debug it with an LED or two...haha... Actually I have sometimes used a scope and once or twice have been forced to use a logic analyzer. You should be able to flash the LED exactly as fast as you can execute a while-loop with a toggle in it. There may be a buffer failure. Are you freeing each message buffer as soon as you are done? Is it the sending or receiving side that dies, and how do we know? My speed tests using T1 and mica's of various flavors were able to run fairly fast for-mostly-ever, although 33/second is about the mica2 limit. What platform are you using? MS Eric Decker wrote: On Fri, Jul 22, 2011 at 2:19 PM, Lee Carol casab...@gmail.com mailto:casab...@gmail.com wrote: Hi, I am writing a program that, every time a packet is sent from mote, LED light toggles. When I increase the packet sending rate to 33Hz, my mote only works for few seconds then stop. I've examined my code and everything seems to work fine. Wondering if LED is causing the problem and want to know how fast the LED can be toggled. probably not. Not much can go wrong with the LED. I would recommend that you get a jtag pod and dig into what is actually going on. trying to debug embedded systems using printfs and led while doable isnt the most efficient of programmer time. my not so humble opinion. (I've been doing embedded stuff since the 70's). Anyone knows? Thanks for viewing Carol ___ Tinyos-help mailing list Tinyos-help@millennium.berkeley.edu mailto:Tinyos-help@millennium.berkeley.edu https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help -- Eric B. Decker Senior (over 50 :-) Researcher ___ 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] Using TelosB 2420 onboard sensors
Please send messages to the help list, not me directly. I believe the doc/tutorial covers how to use the ADC interfaces and the oscilloscope program. Basically you should be able to replace VoltageC, or even DemoSensorC itself, with anything that provides the ADC interface, such as Photo or Temp (which may be mica specific...not sure...I see that my telos directory has a HumidityC.nc file). Since I don't use Tos2 I'm not sure what they've called everything. MS Aravind S wrote: Hi, I am a final year M.Tech student of Cochin University of Science and Technology in Vlsi and Embedded systems.As a part of my M.Tech project I need your help in the following topic: I am new to tinyos . I have run the oscilloscope app. with two telosb 2420. It seems to work fine but displays a constant line graph. I want to now use the light , temperature sensors to display on graph AND display the value on LINUX terminal.I am using tinyos-2.x installed on linux(RHEL 5.4). Checking DemoSensorC.nc shows VoltageC as DemoSensor. How can this be changed this to light or temp? Please send me the source code. Eagerly waiting for your replay Thanks Aravind.S CEC CUSAT Kerala India ___ Tinyos-help mailing list Tinyos-help@millennium.berkeley.edu https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
Re: [Tinyos-help] net.tinyos.tools.Listen
Please send messages to the help list to keep a record of my mistakes. The problem here is that Java doesn't know from /opt/tinyos-2.x... because that's a cygwin thing. So your CLASSPATH should have a real widows directory name, like C:/cygwin/opt/tinyos-2.x/... If you have compiled Listen as well you should be able to run it from the top java tools directory (from where you compiled). Then the . in the CLASSPATH should find the newly compiled class. MS Nimish Kale wrote: Hi Thanks for the reply, I complied the Listen.java, but still nothing. I keep on getting the same errors. This is what i have put in my .bashrc file export TOSROOT=/opt/tinyos-2.x export TOSDIR=$TOSROOT/tos export TOSDIR=$TOSROOT/tos export CLASSPATH=$TOSROOT/support/sdk/java/tinyos.jar:. export PYTHONPATH=$TOSROOT/support/sdk/python export MAKERULES=$TOSROOT/support/make/Makerules export PATH=/opt/msp430/bin:$PATH Please help me debug this problem On Thu, Jul 14, 2011 at 11:59 AM, Michael Schippling sc...@santafe.edu mailto:sc...@santafe.edu wrote: First make sure your CLASSPATH contains the tools jar file. You shouldn't need to build everything, but if you have to you can compile the files needed by Listen by going to the /opt/tinyos-2.x/support/sdk/__java directory and typing: javac net/tinyos/tools/Listen.java Then the argument -comm serial@/dev/tty/USB0; telosb is wrong. The semi-colon ';' is a command separator so the shell thinks telosb is a new command. It should be a colon ':' with no space, ala: -comm serial@/dev/tty/USB0:telosb MS Nimish Kale wrote: Hi I am new to tinyos and running it on ubuntu. I am having problems with the net.tinyos.tools.Listen. I need to check the data from a mote I am getting the following error: VPCEB23FM:/opt/tinyos-2.x/__apps/BaseStation$ java net.tinyos.tools.Listen -comm serial@/dev/tty/USB0; telosb Exception in thread main java.lang.__NoClassDefFoundError: net/tinyos/tools/Listen Caused by: java.lang.__ClassNotFoundException: net.tinyos.tools.Listen at java.net.URLClassLoader$1.run(__URLClassLoader.java:217) at java.security.__AccessController.doPrivileged(__Native Method) at java.net.URLClassLoader.__findClass(URLClassLoader.java:__205) at java.lang.ClassLoader.__loadClass(ClassLoader.java:__321) at sun.misc.Launcher$__AppClassLoader.loadClass(__Launcher.java:294) at java.lang.ClassLoader.__loadClass(ClassLoader.java:__266) Could not find the main class: net.tinyos.tools.Listen. Program will exit. telosb: command not found when i use the 'make' command in opt/tinyos-2.x/support/sdk/__java I get the following errors: failed to parse message file /opt/tinyos-2.x/tos/lib/__printf/printf.h make[3]: *** [PrintfMsg.java] Error 1 make[3]: Leaving directory `/opt/tinyos-2.x/support/sdk/__java/net/tinyos/tools' make[2]: *** [subdirs] Error 2 make[2]: Leaving directory `/opt/tinyos-2.x/support/sdk/__java/net/tinyos' make[1]: *** [subdirs] Error 2 make[1]: Leaving directory `/opt/tinyos-2.x/support/sdk/__java/net' make: *** [subdirs] Error 2 Please help me out --__--__ _ Tinyos-help mailing list Tinyos-help@millennium.__berkeley.edu mailto:Tinyos-help@millennium.berkeley.edu https://www.millennium.__berkeley.edu/cgi-bin/mailman/__listinfo/tinyos-help https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help -- Nimish Kale MS CS student University of Texas at Dallas ___ Tinyos-help mailing list Tinyos-help@millennium.berkeley.edu https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
Re: [Tinyos-help] java
Are you sure your mica2 is connected to COM1? MS Eric Decker wrote: TinyOS 1 has been deprecated for a long time. You'd be more likely to get help if you were running TinyOS 2.1.1. For example: There is no way I'm going to spend scarce time digging into a T1 problem. On Wed, Jul 13, 2011 at 5:15 AM, Akila Kiki akilafore...@yahoo.fr mailto:akilafore...@yahoo.fr wrote: hi i try to run application ident in tinyos-1.x , but it display me this error: akila@akila-HP-620:/opt/tinyos-1.x/tools/java/net/tinyos/ident$ javac Ident.java akila@akila-HP-620:/opt/tinyos-1.x/tools/java/net/tinyos/ident$ export MOTECOM=serial@COM1:mica2 akila@akila-HP-620:/opt/tinyos-1.x/tools/java/net/tinyos/ident$ java net.tinyos.ident.Ident serial@COM1:57600 died - exiting (java.io.IOException: Could not open COM1: TOSComm JNI library runtime error: flush: Input/output error) it say that serial@COM1:57600 died, how to update it, please help me ___ Tinyos-help mailing list Tinyos-help@millennium.berkeley.edu mailto:Tinyos-help@millennium.berkeley.edu https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help -- Eric B. Decker Senior (over 50 :-) Researcher ___ 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] FTDI USB Serial Device converter disconnected
Are you sure that the device didn't actually disconnect? Maybe the cable got wiggled, power blipped, or something? I can't think of an easy way to debug this since it could be anything from a bad cable to buggy software. Probably the only workaround is to have the USB client attempt to reconnect whenever it dies. MS scatram...@gmail.com wrote: Hi, I'm facing a very nasty problem with the USB using Blip and telosb. I've a small testbed set up where few telosb report data to a telosb IPBaseStation connected by USB to a laptop running Ubuntu 10. The ip-driver is running and the tun0 interface works perfectly until, for some reason, the USB disconnects!!! Happened many times already and always after a random period of time (few hours or few days). Has anybody of you had the same problem? Please, have a look to my dmesg: [ 62.583495] device tun0 entered promiscuous mode [181469.402683] hub 1-0:1.0: port 1 disabled by hub (EMI?), re-enabling... [181469.403667] usb 1-1: USB disconnect, address 2 [181469.406021] ftdi_sio ttyUSB0: FTDI USB Serial Device converter now disconnected from ttyUSB0 [181469.406654] ftdi_sio 1-1:1.0: device disconnected [181469.627963] usb 1-1: new full speed USB device using ohci_hcd and address 3 [181469.777676] usb 1-1: configuration #1 chosen from 1 choice [181469.783296] ftdi_sio 1-1:1.0: FTDI USB Serial Device converter detected [181469.784171] usb 1-1: Detected FT232BM [181469.785634] usb 1-1: FTDI USB Serial Device converter now attached to ttyUSB1 As you can see the USB went off after more than 2 days of activity! I suspect it's related to the USB hardware rather than applications but, so far, it happens to me only using telosb. I google it a bit but I have not found solution yet Any comment is more than welcome Many thanks Davide ___ 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] Error on tos-check-env
You probably have newer versions installed, but check that you really have them with: type dot -- should show a path to dot.exe type java -- should show a path to a java SDK MS Ben Ahmed Farah wrote: Hi, i just installed TinyOS on ubuntu 10.04 and i make this command to check that the environment is setup correctly : tos-check-env the output of this command is: tos-check-env completed with errors: -- WARNING : The JAVA version found first by tos-check-env may not be version 1.4 or version 1.5 one of which is equired by TOS. Please ensure that the located version is 1.4 or 1.5 -- WARNING : The graphviz (dot) version found by tos-check-env is not 1.10. Please update your graphviz version if you'd like to use the nescdoc documentation generator. please how can i correct this errors? thks a lot. Farah. ___ 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] tinyos communication problem
Please post the actual errors your get. For #1, it may be that you are not defining the right download device (parallel is the oldest and now obsolete interface). For instance I have these defined in my top level makefile and/or environment: export DEFAULT_PROGRAM=mib510 export MIB510=/dev/ttyS0 MS pooja kavathekar wrote: Hello! I have just started working with Tinyos and am using mica-z motes for my application. My problem is when I try to compile and download the Blink application into the mote, it gives me an error of 1) 'Direct Parallel access not defined' 2) there seems to be errors in finding the make files...however I checked the directory for the make files and the file is there. 3) Compilation seems fine...the problem is that the code cannot download into the mote. 4) I changed some environment variables and then I got a different error that 'target maybe damaged..' I have upgraded all the softwares needed...any help in this regard will be highly appreciated.Thanks! -- Pooja Kavathekar, MS Student Department of Electrical Computer Engineering, Center for Self-Organizing Intelligent Systems (CSOIS) Utah State University ___ 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] tos-install-jni
I think the problem is that your PATH -- which I believe is what is printed in the output below -- contains these: \WINDOWS\SYSTEM32 \WINDOWS\Sun\Java\bin \PROGRAM FILES\JAVA\JDK1.6.0_11\BIN but the JNI files got installed to the JRE directory: /Program Files/Java/jdk1.6.0_11/jre/bin Windows32 itself has a drain bramaged version of java, I don't know what would be in Sun/Java, and for some reason a standard Java install insists on making two apparently identical JRE directories... So there are many possible java's to run. try: type java to see what you are really running. Then set your PATH variable to have the jre/bin directory before windows/system32 MS vinod kumar wrote: when I run java.net.tools.Listen -comm serial@COM4:telosb I am encountering the problem *Toscomm* *JNI* *library* *not* *found* 1. I have installed the tos-install-*jni* and it is successfully installed without any problems. I confirm this because when I run tos-locate-jre --*jni* the following is printed /cygdrive/c/Program Files/Java/jdk1.6.0_11/jre/bin 2. In order to resolve the problem I try to follow the following link:http://mail.millennium.berkeley.edu/pipermail/tinyos-help/2009-January/037776.html I have run LibTest.java and get the exception below: C:\WINDOWS\SYSTEM32;.;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDO C:\WINDOWS\SYSTEM32;C:\WINDOWS ;C:\PROGRAM FILES\JAVA\JDK1.6.0_11\BIN;C:\CYGW BIN;C:\PROGRAM FILES\ATT\GRAPHVIZ\BIN;C:\PROGRAM FILES\ATT\GRAPHVIZ\BIN\TOOLS \*CYGWIN*\BIN; C:\*CYGWIN*\BIN\NCC;C:\WINDOWS\system32;C:\WINDOWS ;C:\Program Fil Java\jdk1.6.0_11\bin;C:\*cygwin*\bin;C:\Program Files\ATT\Graphviz\bin;C:\Progr Files\ATT\Graphviz\bin\tools;C:\Program Files\Nmap; C:\*cygwin*\bin\ncc;C:\cygw bin;C:\Program Files\CVSNT\ Exception in thread main java.lang.UnsatisfiedLinkError: no *toscomm* in java brary.path at java.lang.ClassLoader.loadLibrary(Unknown Source) at java.lang.Runtime.loadLibrary0(Unknown Source) at java.lang.System.loadLibrary(Unknown Source) at LibTest.main(LibTest.java:6) could you please tell me what I should do? Thanks, Vinodh. ___ 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] tos-install-jni
Based on messages received here, that script only works about 75% of the time... Search this list for various pieces of advice about fixing it. I use a back rev of the tos libs and install them by hand so I can't tell you exactly what to do, but if you can find the getenv and toscomm files you can just copy them to the right places in your JRE. MS vinod kumar wrote: Hi ,all: My environment is Tinyos 2.0.2 , JDK version is 1.5.0_12, and run tos-check-env without error. But when I run the tos-install-jni, it gets a error like below: $ tos-install-jni [: ==: unknown operand Installing 32-bit Java JNI code in /cygdrive/c/Program Files/Java/jdk1.5.0_12/jre/bin ... install: cannot stat `/usr/local/lib/tinyos/*-32.dll': No such file or directory I don't know how to correct this error. Please help me to fix this error. Thanks in advanced. Best wishes, Vinodh. ___ 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] Measuring different dynamic properties
There {is,was} a stack trace module, maybe you can find it by searching on this list. Since there usually isn't any dynamic memory allocation, memory usage is probably no more complicated than looking at the compile output. Dynamic power consumption would be interesting but you need to put a current monitor in-line with the battery, which requires a bit of hardware-foo. Probably just a few resistors going to an ADC input but I'm not sure about the range you would be able to resolve. I have such a thing on my robo-cars, but use an op-amp and a completely different power scheme. I've sometimes puzzled over making some kind of CPU monitor. I think one could put a counter in the task scheduler to measure how long the controller sleeps on it's daily rounds. But that's about as far as I've gotten with it MS swayanti das wrote: Hi All I am trying to measure different properties of TinyOS applications and TinyOS threded applications and have this applications running on iris mote.. Can anyone help me with this. I want to measure the dynamic properties like stack consumption, or real time memory consumption, CPU used, etc.. I have tried measuring the power consumption of these applications, but I need more dynamic properties. Any help is highly appreciated. Regards Swayanti ___ 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] tinyos-1.x
Try doing make again in the tools/java directory and see if you get any errors, or output of any kind. If that doesn't make the class files, post the output here. You can also force a compile of a specific file like this: javac -classpath . net/tinyos/packet/BuildSource.java MS sabrina sabrina wrote: Good evening, here I am preparing my paper on the subject of the study of routing protocols in WSN I installed the TinyOS-1.x according to blog http://www.5secondfuse.com/tinyos/install.html the tinyviz works very well for the simulation of sensors and it has many examples of applications tinyos-1.x/apps with a preview on the functioning of global . / build / pc / main.exe - help I have thus recovered a lot of traces is what I'm most interested in my project as export DBG = led, am, packet, route but the only problem is that I noticed that in some folder as the file on TinyOS packet- 1.x/tools/java/net/tinyos/packet some files.java are not compiled in files.class for eg BuildSource.java as although I did make one on tinyos-1.x/tools/java to compile but I can not get I seek your help on this really small point if you will to send me your file java tinyos-1.x/tools/java is asking too much or if your applicationpacket at least: for tinyos-1.x/tools/java/net/packet able to recover the java classes compile correctly thank you very much for your help. ___ 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] Tinyos 1.x+SimpleCmd
I haven't used either of those programs so this is probably uselessbut Have you run other test apps to see if you really have communication through the system? Try CntToRfm or SenseToRfm. And I think you should see some LEDs flashing when messages are sent/received. Would have to look at the actual code to see which ones though. MS loulou liloucha wrote: Hi all.. I have a problem with the configuration of Telosb mote.. I installed SimpleCmd in a mote whit ID=1, an athor mote(ID=0) connected to the PC is running TOSBase and its receive data using a Java application (BcastInject). but I have a problem between the base station and the athor mote... I think that the mote ID=1 don't receive any things... please if any one worked whit this help me... I need your help.. Regards, ___ 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] bitwise operation
Yes. It's plain old C. With confusing syntactic additions. MS Peng Du wrote: Hi everyone, A quick question: are the bitwise operators in tinyOS the same with the c ones? e.g. for bitwise AND and ~for NOT. Thanks a lot. Regards, Peng ___ 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] Distance Calculations with RSSI
search for rssi location and various other combinations. there has been a lot of work done on this, and none of it is very accurate. MS Matthew Jacques wrote: Hello, I am currently trying to build a WSN using MicaZ motes and I need to know, to a fair degree of accuracy, how far apart one node is from another. I was reading up on how it is possible in some cases to use RSSI and LQI to achieve this. I tried taking measurements of average RSSI when the nodes were 1.5, 2 and 2.5 meters apart but the results were very erratic. While I did notice that the RSSI tended to be higher when the nodes were further away from each other, the results were not accurate enough to place the node within even 4 meters of its actual location. Is RSSI not an accurate enough way to get the precision I need? If not is there any other method I can use to get the distance between nodes? I was also thinking of maybe using the system time of the nodes to time how long a signal took to travel between them but I figured that with the time to send and the turnaround time of the message in the other node this would be a pretty inaccurate way to do it. Is that even worth trying? Thanks, Matthew Jacques ___ 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] Adding precision to sensor data obtained
Pretty much all sensors readings on TOS devices are integer values directly from the ADC -- some few, like Voltage, may be may be mangled for range and level but are probably also ints. IIRC the telosb has a 12 bit converter so you should have 0-4095 as your values, which is a resolution of about .00025 per bit. You may convert that to floating point to about 4 decimal places if you like. MS Mayank Gupta wrote: Hi all, I am sending sensor readings from telosb mote to the pc and storing the data in mysql database. The problem I am facing is that I want data to be precise upto at least 2 decimal places but data in my database always comes out to be as integer. I have modified the mig generated file to push data into the database rather than show output on the screen. I hope someone can guide me in the right direction so that I can get more precise value in my database. Regards, Mayank ___ 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] Adding precision to sensor data obtained
Assuming that the readings you are getting are, as I suggested, the raw ADC values from 0-4095 you can convert them to a voltage by multiplying by the ADC's reference voltage -- nominally 3.3v. So a 0 value is equal to 0 volts and a full scale 4095 value is equal to 3.3v. The reading you get is some fraction in between those: (value / full-scale) * refVolts example, if your value happens to be 2000: (2000 / 4095) * 3.3 == 1.6117 volts I would take the last couple digits with a grain of salt because the system is usually pretty noisy, and I'm not really bright enough to figure out if the theoretical precision is 3 or 4 decimal points anyway. Now your sensor may need some calibration and scaling so the conversion you use will probably have a form like (Mx + B), where M is a scale factor and B is an offset, both of which you might derive from spec sheets or brute force measurements. What are you sensing anyway? MS Mayank Gupta wrote: Thanks for the help Michael. But again I am not really sure how to do that. Can you refer me to some tutorial or reading where I can see how to actually code it.. Sorry but not really getting it. Regards, Mayank On Fri, Jun 10, 2011 at 5:13 PM, Michael Schippling sc...@santafe.edu wrote: Pretty much all sensors readings on TOS devices are integer values directly from the ADC -- some few, like Voltage, may be may be mangled for range and level but are probably also ints. IIRC the telosb has a 12 bit converter so you should have 0-4095 as your values, which is a resolution of about .00025 per bit. You may convert that to floating point to about 4 decimal places if you like. MS Mayank Gupta wrote: Hi all, I am sending sensor readings from telosb mote to the pc and storing the data in mysql database. The problem I am facing is that I want data to be precise upto at least 2 decimal places but data in my database always comes out to be as integer. I have modified the mig generated file to push data into the database rather than show output on the screen. I hope someone can guide me in the right direction so that I can get more precise value in my database. Regards, Mayank ___ 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] Using UART and Radio in MicaZ on MoteWorks
The MultihopMsg struct contains: uint16_t sourceaddr; uint16_t originaddr; which you may be able to use to determine where the message came from. But you may be using the raw uart code to communicate between a micaz and some other device. Then you won't be using AM or MultiHop messages, so the interfaces will be different anyway. MS TJ wrote: I am using MicaZ with MoteWorks on Windows XP. I am trying to implement a network bridge where the mote has to communicate over UART to a attached device (a micro controller running some algorithms) and also communicate with other similar mote-device setups. By my understanding, there are two send interfaces which i can use for the wireless and UART channels respectively. But there is only one receive interface that has to handle both. My doubt is this - how do i differentiate where the packet is coming from if this is the case?? As MoteWorks seems very restricted in terms of the library files it contains. Always Yours Tejovanth ___ 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