Forum Menu




 


Log in Problems?
New User? Sign Up!
AVR Freaks Forum Index

Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
K777
PostPosted: Apr 19, 2012 - 07:40 AM
Rookie


Joined: Mar 13, 2012
Posts: 21


Hi. I'm some troubles with pairing. I'm using AT86RF231 with a non atmel µ and perfomance test tal example.

First, when i'm using the timeout values of 50ms for Tx and 200ms to wait for Rx, i can't reach the pairing menu. When i try to use 200ms for Tx and 50ms for Rx, i quickly (in less than 10 trials) see the message "Peer device found".

However the local node is in 'Pairing_rsp_rec'. And the remote node stays in 'Wait_for_pair_conf' and never receives pairing response (and never display he's acting as a reflector).

My local node sends the pairing request and goes to tal_state TAL_AUTO and then TAL_DONE but the tx_done_handling() is not called before the send_pairing_conf(). (so pairing conf is not sent because the tal is not idle...)

any idea that could help?

thank you
 
 View user's profile Send private message  
Reply with quote Back to top
th33lf
PostPosted: Apr 19, 2012 - 11:21 AM
Hangaround


Joined: Sep 29, 2010
Posts: 113


You mentioned using a non-atmel micro, so are you sure the timers, etc. work fine on your platform?
 
 View user's profile Send private message  
Reply with quote Back to top
K777
PostPosted: Apr 19, 2012 - 03:55 PM
Rookie


Joined: Mar 13, 2012
Posts: 21


Maybe my timers are not working so well.

What would i see if i toggle a pin everytime tx_done_handling is called during pairing........?

I think i would see a signal at PAIR_REQUEST_SEND_INTERVAL_IN_MICRO_SEC period (which in the example is 50 ms) and nothing else on the local node.
I think on the remote node i would see a signal at maximum PAIR_RESPONSE_TIMEOUT_IN_MICRO_SEC (200ms in the example)
 
 View user's profile Send private message  
Reply with quote Back to top
th33lf
PostPosted: Apr 20, 2012 - 03:03 PM
Hangaround


Joined: Sep 29, 2010
Posts: 113


Hmm, how about this - from main, try calling pal_timer_start with some known timeout. In the expiry handler callback, toggle a pin and restart the same timer with the same timeout. Run the code after commenting out all tasks except pal_task in the main while() loop. Probe the pin to see if you are getting the expected period.
 
 View user's profile Send private message  
Reply with quote Back to top
K777
PostPosted: Apr 20, 2012 - 03:03 PM
Rookie


Joined: Mar 13, 2012
Posts: 21


My local node never goes into the RX mode, i've check and the CMD_RX_AACK_ON is set after a TX_ARET so it should be working. On my remote node i'm in CMD_RX_AACK_ON most of the time and it receives everything.
 
 View user's profile Send private message  
Reply with quote Back to top
K777
PostPosted: Apr 27, 2012 - 08:58 AM
Rookie


Joined: Mar 13, 2012
Posts: 21


I've set just one send in pairing request
I'm watching if the remote node answers everytime and else why he's staying silent.

3 cases occur,
    first, a Tx frame of 700µs is sent and the remote node send back a peer response
    second , a Tx frame of 400µs is sent and the remote node keep silent
    third, two Tx frames of 700µs separeted by ~2ms are sent and the Tx mode keep silent. I think i resolved third by putting TAL_MAXFRAMERETRIES_DEFAULT to (0x00) but this can't stay like that for eternity i guess.

What should be the normal lenght (µs) of a Tx Peer Request?
How can the lenght of a Peer request could change? (or what is the lenght (µs) of a Peer confirm?)

My IRQ pin on the Tx node stays 20ms high after Tx, is this could be something normal (after BUSY_TX_ARET) ?

Thank you for answers
 
 View user's profile Send private message  
Reply with quote Back to top
uracolix
PostPosted: Apr 27, 2012 - 01:36 PM
Hangaround


Joined: Jun 17, 2008
Posts: 456
Location: Meissen, Germany

The length of the frame is not enough to debug this issue.
If you have a spare node with a serial interface remaining,
you could make it a sniffer and analyze the content of the frame.
 
 View user's profile Send private message Send e-mail Visit poster's website 
Reply with quote Back to top
K777
PostPosted: Apr 27, 2012 - 01:42 PM
Rookie


Joined: Mar 13, 2012
Posts: 21


Yes, i've been advised of this already. I've ordered a raven usb and will receive it soon.
 
 View user's profile Send private message  
Reply with quote Back to top
K777
PostPosted: Jun 22, 2012 - 02:13 PM
Rookie


Joined: Mar 13, 2012
Posts: 21


Hi,
just to give some news,
i received the raven usb stick and download the code into it (by the way the usb programming moed is not working), i used avr to program it. Then i installed it as network connection and used the java consol to control it and wireshark to see frames. I'm just starting to see frames.
 
 View user's profile Send private message  
Reply with quote Back to top
K777
PostPosted: Jun 26, 2012 - 08:59 AM
Rookie


Joined: Mar 13, 2012
Posts: 21


I've got one question,
i've looked several times to find the demo board of the atmel mac on distributors sites but i couldn't find. The part i'm using is AT86RF231_AT91SAM3S4B_SAM3_RFEK01. Where can i find this board? I would like to have it to be able to dissociate hardware issues from the software issues.
 
 View user's profile Send private message  
Reply with quote Back to top
dak664
PostPosted: Jun 26, 2012 - 12:12 PM
Posting Freak


Joined: Jun 15, 2008
Posts: 1779
Location: North Carolina USA

Don't know if you are aware of http://www.newae.com/tiki-index.php?page=15dot4sniffer

It would run on the raven USB stick and possibly your SAM3.
 
 View user's profile Send private message  
Reply with quote Back to top
K777
PostPosted: Jun 26, 2012 - 01:27 PM
Rookie


Joined: Mar 13, 2012
Posts: 21


Thank you, i'm already aware. That's what i'm using as a sniffer. It's with an AT86RF230 and not RF231. I would like to find a card where i can download the code made for AT86RF231_AT91SAM3S4B_SAM3_RFEK01 without changing anything.
 
 View user's profile Send private message  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT + 1 Hour
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2006 The PNphpBB Group
Credits