Hi Razvan, When I typed "echo $PYTHONPATH", the computer didn't show me anything. What do you think? I will try it tomorrow at office and let you know. Thanks.
Regards, Bai On Wed, Sep 9, 2009 at 3:22 PM, Razvan Musaloiu-E. <[email protected]>wrote: > Hi! > > On Wed, 9 Sep 2009, BAI LI wrote: > > On Wed, Sep 9, 2009 at 2:43 PM, Razvan Musaloiu-E. <[email protected] >> >wrote: >> >> Hi! >>> >>> On Wed, 9 Sep 2009, BAI LI wrote: >>> >>> Hi, >>> >>>> >>>> That is the manual I am using. All the stuffs are latest. Not too sure >>>> where >>>> it went wrong. >>>> >>>> I tried the command you suggested already. No luck. Have you tried it on >>>> micaz since it is updated to the latest CVS? >>>> >>>> >>> I don't have a micaz at hand but I just retested with a telosb and it >>> works >>> fine. I think your python is searching for the tos.py in the wrong place. >>> Is >>> your PYTHONPATH is using including the $TOSROOT/support/sdk/python? >>> >>> >> Where I can or what command I can use to check out if my pytho using th >> ecorrect path? >> >> > From the bash shell you can print the PYTHONPATH with the following > command: > > echo $PYTHONPATH > > Same as for PATH basically. :-) > > > You can check the path my running python and the type: >>> >>> import tos >>> help(tos) >>> >>> And then look at the FILES sections. In my case it says: >>> >>> FILE >>> /home/lpl/local/src/tinyos-2.x/support/sdk/python/tos.py >>> >>> Which is correct because that is where my local installation is. >>> >>> >> Am I doing it right as you suggested? I got the following errors. I guess >> the Python path is not correct? >> >> administra...@jujumao /opt/tinyos-2.x/apps/tests/deluge/blink >> $ python >> Python 2.5.1 (r251:54863, May 18 2007, 16:56:43) >> [GCC 3.4.4 (cygming special, gdc 0.12, using dmd 0.125)] on cygwin >> Type "help", "copyright", "credits" or "license" for more information. >> >>> import tos >>>>> >>>> Traceback (most recent call last): >> File "<stdin>", line 1, in <module> >> ImportError: No module named tos >> >>> import tos.py >>>>> >>>> Traceback (most recent call last): >> File "<stdin>", line 1, in <module> >> ImportError: No module named tos.py >> >>> help(tos) >>>>> >>>> Traceback (most recent call last): >> File "<stdin>", line 1, in <module> >> NameError: name 'tos' is not defined >> >> >> > This is strange. If you don't have tos.py in your path then the tos-deluge > should fail in a different way. > > -- > Razvan ME > > > >> One more thing: the correct baudrate for micaz is 57600 and not 115200. >>> >> >> Thanks >> >> >>> >>> -- >>> Razvan ME >>> >>> On Wed, Sep 9, 2009 at 2:13 PM, Razvan Musaloiu-E. <[email protected] >>> >>>> wrote: >>>>> >>>> >>>> Hi! >>>> >>>>> >>>>> On Wed, 9 Sep 2009, BAI LI wrote: >>>>> >>>>> Hi, >>>>> >>>>> >>>>>> Since Deluge manual doesn't provide any micaz install command. It >>>>>> could be >>>>>> something wrong with the command I typed. But i tried different >>>>>> combination. >>>>>> It still had the same error. So I reckon it has nothing to do with >>>>>> this >>>>>> command. >>>>>> >>>>>> >>>>>> What manual are you reading? The current one is this one: >>>>> http://docs.tinyos.net/index.php/Deluge_T2 >>>>> >>>>> One thing to note is that the first parameter needs to ser...@port >>>>> :SPEED >>>>> for serial ports. >>>>> >>>>> -- >>>>> Razvan ME >>>>> >>>>> >>>>> On Wed, Sep 9, 2009 at 2:03 PM, Razvan Musaloiu-E. <[email protected] >>>>> >>>>> wrote: >>>>>> >>>>>>> >>>>>>> >>>>>> Hi! >>>>>> >>>>>> >>>>>>> >>>>>>> On Wed, 9 Sep 2009, BAI LI wrote: >>>>>>> >>>>>>> Hi, >>>>>>> >>>>>>> >>>>>>> I have followed the intructions from the Deulge tutorial and also >>>>>>>> installed >>>>>>>> pyserial tools as required. I met the following error when i tried >>>>>>>> to >>>>>>>> inject >>>>>>>> blink image to micaz >>>>>>>> >>>>>>>> administra...@jujumao /opt/tinyos-2.x/apps/tests/deluge/Blink >>>>>>>> $ tos-deluge /dev/ttyS5:115200 -i 1 build/micaz/tos-image.xml >>>>>>>> Traceback (most recent call last): >>>>>>>> File "/usr/local/bin/tos-deluge", line 401, in <module> >>>>>>>> am = tos.AM() >>>>>>>> TypeError: __init__() takes exactly 2 arguments (1 given) >>>>>>>> >>>>>>>> It is the latest CVS. What could cause this problem? >>>>>>>> >>>>>>>> >>>>>>>> Can you run tos-deluge and see if the output is like this? >>>>>>>> >>>>>>>> >>>>>>> $ tos-deluge >>>>>>> Usage: /home/lpl/local/bin/tos-deluge <source> >>>>>>> <-p|-i|-r|-d|-e|-s> >>>>>>> image_number [options] >>>>>>> <source> can be: >>>>>>> ser...@port:SPEED Serial ports >>>>>>> netw...@host:PORT MIB600 >>>>>>> -p --ping Provide status of the image in the external >>>>>>> flash >>>>>>> -i --inject Inject a compiled TinyOS application >>>>>>> [options]: tos_image.xml file path >>>>>>> -e --erase Erase an image in the external flash >>>>>>> -b --boot Force a reboot of the mote >>>>>>> -r --reprogram Reprogram the mote >>>>>>> -d --disseminate Disseminate the image in the external flash to >>>>>>> the network >>>>>>> -dr --disseminate-and-reprogram >>>>>>> -s --stop Stop the dissemination >>>>>>> -ls --local-stop Stop the dissemination only on the local mote >>>>>>> >>>>>>> If it's not then you are not running the latest CVS. :-) >>>>>>> >>>>>>> -- >>>>>>> Razvan ME >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>> >>>> >>
_______________________________________________ Tinyos-help mailing list [email protected] https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
