[Tinyos-help] (no subject)

2011-10-21 Thread Vaibhav Nagarnaik
Hurry up! You should be the first who will visit my site!... 
http://www.gioeca.it/sites.friend.php?fjxyahooID=20m4
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


Re: [Tinyos-help] Problem with communicating with PC using UART0 on telos ver.B for tinyos 2.x

2007-10-16 Thread Vaibhav Nagarnaik
thanks roman,

the problem was with the voltage levels. Since the telosb works on a Vcc=3V and 
the RS232 specifies a logic level of 5V
it needs a level shifter to convert the voltage levels from telosb to RS232. I 
used a switching transistor to convert the 
voltage levels.

 
 
Vaibhav
 



- Original Message 
From: Roman Lim <[EMAIL PROTECTED]>
To: Vaibhav Nagarnaik <[EMAIL PROTECTED]>
Cc: tinyos-help@Millennium.Berkeley.EDU
Sent: Monday, October 8, 2007 12:41:00 AM
Subject: Re: [Tinyos-help] Problem with communicating with PC using UART0 on 
telos ver.B for tinyos 2.x


do you use a levelshifter on your crossover cable? the voltage level
 for
pc communication is +/-5v if i remember it correctly.
in
http://tinyos.cvs.sourceforge.net/tinyos/tinyos-2.x-contrib/ethz/snpk/tos/lib/dsn/
you can find a working tos2 implementation of a uart0 communication
 with
tmote.

roman

Vaibhav Nagarnaik wrote:
> 
> 
>  Hi All,
> 
> Any ideas yet why I can't communicate using UART0 from telosb?
> 
> I have confirmed that the cross-over serial cable is good for
 communication 
> and that there is no other problem. Is it something to do with using
 some 
> kind of chip select for the multiplexed bus on UART0 and CC2420?
> 
> All I have got from the archives is a solution for tinyos 1.x to use 
> BusArbitration module. But I am using 2.x and I think using Resource 
> interface provided by Msp430Usart0C should be enough. Is this
 correct?
> 
> Any other people having similar troubles?
> 
> 
>  
> Vaibhav
> 
> ----- Original Message 
> From: Kevin Klues <[EMAIL PROTECTED]>
> To: Vaibhav Nagarnaik <[EMAIL PROTECTED]>
> Cc: tinyos-help@millennium.berkeley.edu
> Sent: Thursday, October 4, 2007 3:30:15 PM
> Subject: Re: [Tinyos-help] Problem with communicating with PC using
 UART0 on telos ver.B for tinyos 2.x
> 
> I'm actually surprised you see anything at all..
> You can't use USART0 to communicate with the PC because it isn't
> physically connected to the serial port on the telos -- there are no
> wires connecting USART0 to the USB controller to exchange data with
> the PC.
> 
> USART0 is attached to the radio, the flash, and the external
 connector
> pins, while USART1 is attached to the serial port.
> 
> As a side note..
> You should consider using something other than while() loops in the
> way that you do if you actually start implementing something
> substantial in TinyOS.  Because of the concurrency model that TinyOS
> uses, using while() loops to wait on a flag without really knowing
> what you are doing could cause your program to lock up and never
 break
> out of the loop.  Using a split-phase operation is preferred.  Just a
> word of caution for anyone considering doing this.
> 
> Kevin
> 
> On 10/4/07, Vaibhav Nagarnaik <[EMAIL PROTECTED]> wrote:
>> Hi All,
>>
>> I am trying to use tinyos 2.x with telosb to communicate with PC
 using UART0.
>>
>> I have tried different components Msp430Usart0C and Msp430Uart0C but
 I don't receive the same character sent from PC.
>>
>> For example if I send 'a' from PC, I get '0x58 0x08 0x01 0x00' ie
 four characters on the PC. Even when the code explicitly sends 1 byte.
>>
>> I have set baud rate on the PC to 57600. If I run the same code
 using Msp430Usart1C component, there is no problem.
>>
>> Can anyone please point me to the problem in this code?
>>
>> Following is the sample code I am trying to run.
>>
>> configuration TestSerialAppC {}
>> implementation {
>> components TestSerialC as App, MainC, LedsC;
>>
>> components new Msp430Usart0C() as usart0;
>>
>> App.Boot -> MainC;
>> App.Leds -> LedsC;
>>
>> App.usart -> usart0;
>> App.UsartResource -> usart0;
>> }
>>
>> module TestSerialC {
>> uses {
>> interface HplMsp430Usart as usart;
>> interface Boot;
>> interface Resource as UsartResource;
>> interface Leds;
>> }
>> }
>>
>> implementation {
>> event void Boot.booted() {
>> while (call UsartResource.request() != SUCCESS);
>> }
>> event void UsartResource.granted() {
>> uint8_t data;
>> call usart.setModeUart(&msp430_uart_default_config);
>> call usart.enableUart();
>>
>> while (1) {
>> call Leds.led1On();
>> while (! call usart.isRxIntrPending());
>> call Leds.led1Off();
>>
>> data = call usart.rx();
>> 

Re: [Tinyos-help] Problem with communicating with PC using UART0 on telos ver.B for tinyos 2.x

2007-10-05 Thread Vaibhav Nagarnaik



 Hi All,

Any ideas yet why I can't communicate using UART0 from telosb?

I have confirmed that the cross-over serial cable is good for communication 
and that there is no other problem. Is it something to do with using some 
kind of chip select for the multiplexed bus on UART0 and CC2420?

All I have got from the archives is a solution for tinyos 1.x to use 
BusArbitration module. But I am using 2.x and I think using Resource 
interface provided by Msp430Usart0C should be enough. Is this correct?

Any other people having similar troubles?


 
Vaibhav

- Original Message 
From: Kevin Klues <[EMAIL PROTECTED]>
To: Vaibhav Nagarnaik <[EMAIL PROTECTED]>
Cc: tinyos-help@millennium.berkeley.edu
Sent: Thursday, October 4, 2007 3:30:15 PM
Subject: Re: [Tinyos-help] Problem with communicating with PC using UART0 on 
telos ver.B for tinyos 2.x

I'm actually surprised you see anything at all..
You can't use USART0 to communicate with the PC because it isn't
physically connected to the serial port on the telos -- there are no
wires connecting USART0 to the USB controller to exchange data with
the PC.

USART0 is attached to the radio, the flash, and the external connector
pins, while USART1 is attached to the serial port.

As a side note..
You should consider using something other than while() loops in the
way that you do if you actually start implementing something
substantial in TinyOS.  Because of the concurrency model that TinyOS
uses, using while() loops to wait on a flag without really knowing
what you are doing could cause your program to lock up and never break
out of the loop.  Using a split-phase operation is preferred.  Just a
word of caution for anyone considering doing this.

Kevin

On 10/4/07, Vaibhav Nagarnaik <[EMAIL PROTECTED]> wrote:
> Hi All,
>
> I am trying to use tinyos 2.x with telosb to communicate with PC using UART0.
>
> I have tried different components Msp430Usart0C and Msp430Uart0C but I don't 
> receive the same character sent from PC.
>
> For example if I send 'a' from PC, I get '0x58 0x08 0x01 0x00' ie four 
> characters on the PC. Even when the code explicitly sends 1 byte.
>
> I have set baud rate on the PC to 57600. If I run the same code using 
> Msp430Usart1C component, there is no problem.
>
> Can anyone please point me to the problem in this code?
>
> Following is the sample code I am trying to run.
>
> configuration TestSerialAppC {}
> implementation {
> components TestSerialC as App, MainC, LedsC;
>
> components new Msp430Usart0C() as usart0;
>
> App.Boot -> MainC;
> App.Leds -> LedsC;
>
> App.usart -> usart0;
> App.UsartResource -> usart0;
> }
>
> module TestSerialC {
> uses {
> interface HplMsp430Usart as usart;
> interface Boot;
> interface Resource as UsartResource;
> interface Leds;
> }
> }
>
> implementation {
> event void Boot.booted() {
> while (call UsartResource.request() != SUCCESS);
> }
> event void UsartResource.granted() {
> uint8_t data;
> call usart.setModeUart(&msp430_uart_default_config);
> call usart.enableUart();
>
> while (1) {
> call Leds.led1On();
> while (! call usart.isRxIntrPending());
> call Leds.led1Off();
>
> data = call usart.rx();
> call usart.clrRxIntr();
>
> call Leds.led0On();
> call usart.tx(data);
>
> while (! call usart.isTxEmpty());
> if (call usart.isTxIntrPending()) {
> call usart.clrTxIntr();
> }
> call Leds.led0Off();
> }
> }
> }
>
>
>
> Any help is appreciated.
>
> Vaibhav
>
>
>
>
>
>
>
>
>
> 
> Boardwalk for $500? In 2007? Ha! Play Monopoly Here and Now (it's updated for 
> today's economy) at Yahoo! Games.
> http://get.games.yahoo.com/proddesc?gamekey=monopolyherenow
>
> ___
> Tinyos-help mailing list
> Tinyos-help@Millennium.Berkeley.EDU
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>


-- 
~Kevin






  

Tonight's top picks. What will you watch tonight? Preview the hottest shows on 
Yahoo! TV.
http://tv.yahoo.com/ 


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


Re: [Tinyos-help] Problem with communicating with PC using UART0 on telos ver.B for tinyos 2.x

2007-10-04 Thread Vaibhav Nagarnaik
Actually I have connected PC COM port with a cross over serial cable to the 
expansion slot (external connector) on telosb.
 
 
Vaibhav


- Original Message 
From: Kevin Klues <[EMAIL PROTECTED]>
To: Vaibhav Nagarnaik <[EMAIL PROTECTED]>
Cc: tinyos-help@millennium.berkeley.edu
Sent: Thursday, October 4, 2007 3:30:15 PM
Subject: Re: [Tinyos-help] Problem with communicating with PC using UART0 on 
telos ver.B for tinyos 2.x

I'm actually surprised you see anything at all..
You can't use USART0 to communicate with the PC because it isn't
physically connected to the serial port on the telos -- there are no
wires connecting USART0 to the USB controller to exchange data with
the PC.

USART0 is attached to the radio, the flash, and the external connector
pins, while USART1 is attached to the serial port.

As a side note..
You should consider using something other than while() loops in the
way that you do if you actually start implementing something
substantial in TinyOS.  Because of the concurrency model that TinyOS
uses, using while() loops to wait on a flag without really knowing
what you are doing could cause your program to lock up and never break
out of the loop.  Using a split-phase operation is preferred.  Just a
word of caution for anyone considering doing this.

Kevin

On 10/4/07, Vaibhav Nagarnaik <[EMAIL PROTECTED]> wrote:
> Hi All,
>
> I am trying to use tinyos 2.x with telosb to communicate with PC using UART0.
>
> I have tried different components Msp430Usart0C and Msp430Uart0C but I don't 
> receive the same character sent from PC.
>
> For example if I send 'a' from PC, I get '0x58 0x08 0x01 0x00' ie four 
> characters on the PC. Even when the code explicitly sends 1 byte.
>
> I have set baud rate on the PC to 57600. If I run the same code using 
> Msp430Usart1C component, there is no problem.
>
> Can anyone please point me to the problem in this code?
>
> Following is the sample code I am trying to run.
>
> configuration TestSerialAppC {}
> implementation {
> components TestSerialC as App, MainC, LedsC;
>
> components new Msp430Usart0C() as usart0;
>
> App.Boot -> MainC;
> App.Leds -> LedsC;
>
> App.usart -> usart0;
> App.UsartResource -> usart0;
> }
>
> module TestSerialC {
> uses {
> interface HplMsp430Usart as usart;
> interface Boot;
> interface Resource as UsartResource;
> interface Leds;
> }
> }
>
> implementation {
> event void Boot.booted() {
> while (call UsartResource.request() != SUCCESS);
> }
> event void UsartResource.granted() {
> uint8_t data;
> call usart.setModeUart(&msp430_uart_default_config);
> call usart.enableUart();
>
> while (1) {
> call Leds.led1On();
> while (! call usart.isRxIntrPending());
> call Leds.led1Off();
>
> data = call usart.rx();
> call usart.clrRxIntr();
>
> call Leds.led0On();
> call usart.tx(data);
>
> while (! call usart.isTxEmpty());
> if (call usart.isTxIntrPending()) {
> call usart.clrTxIntr();
> }
> call Leds.led0Off();
> }
> }
> }
>
>
>
> Any help is appreciated.
>
> Vaibhav
>
>
>
>
>
>
>
>
>
> 
> Boardwalk for $500? In 2007? Ha! Play Monopoly Here and Now (it's updated for 
> today's economy) at Yahoo! Games.
> http://get.games.yahoo.com/proddesc?gamekey=monopolyherenow
>
> ___
> Tinyos-help mailing list
> Tinyos-help@Millennium.Berkeley.EDU
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>


-- 
~Kevin






  

Tonight's top picks. What will you watch tonight? Preview the hottest shows on 
Yahoo! TV.
http://tv.yahoo.com/ 


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


[Tinyos-help] Problem with communicating with PC using UART0 on telos ver.B for tinyos 2.x

2007-10-04 Thread Vaibhav Nagarnaik
Hi All,

I am trying to use tinyos 2.x with telosb to communicate with PC using UART0.

I have tried different components Msp430Usart0C and Msp430Uart0C but I don't 
receive the same character sent from PC.

For example if I send 'a' from PC, I get '0x58 0x08 0x01 0x00' ie four 
characters on the PC. Even when the code explicitly sends 1 byte.

I have set baud rate on the PC to 57600. If I run the same code using 
Msp430Usart1C component, there is no problem.

Can anyone please point me to the problem in this code?

Following is the sample code I am trying to run.

configuration TestSerialAppC {}
implementation {
components TestSerialC as App, MainC, LedsC;

components new Msp430Usart0C() as usart0;

App.Boot -> MainC;
App.Leds -> LedsC;

App.usart -> usart0;
App.UsartResource -> usart0;
}

module TestSerialC {
uses {
interface HplMsp430Usart as usart;
interface Boot;
interface Resource as UsartResource;
interface Leds;
}
}

implementation {
event void Boot.booted() {
while (call UsartResource.request() != SUCCESS);
}
event void UsartResource.granted() {
uint8_t data;
call usart.setModeUart(&msp430_uart_default_config);
call usart.enableUart();

while (1) {
call Leds.led1On();
while (! call usart.isRxIntrPending());
call Leds.led1Off();

data = call usart.rx();
call usart.clrRxIntr();

call Leds.led0On();
call usart.tx(data);

while (! call usart.isTxEmpty());
if (call usart.isTxIntrPending()) {
call usart.clrTxIntr();
}
call Leds.led0Off();
}
}
}



Any help is appreciated. 
 
Vaibhav








   

Boardwalk for $500? In 2007? Ha! Play Monopoly Here and Now (it's updated for 
today's economy) at Yahoo! Games.
http://get.games.yahoo.com/proddesc?gamekey=monopolyherenow  

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