Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

EVENT_TRANSMISSiON_FAILED on acknowledged transmission from slave

Rank

Total Posts: 2

Joined 2011-01-05

PM

Hi,

I'm having trouble using the ANT11TS33M5IB module connected to our host MCU via SPI. If I can get a sanity check on the steps to get it up that would be helpful. A broadcast message works in both directions, but an Acknowledged message is always returning EVENT_TX_FAILED. I'm using AntwareII to be the master, and have verified using another computer than AntwareII as the slave to this master works... the problem is definately our software!

Using defaults for everything, except the Device# being changed to 1 for the Master, we initialize the radio on the slave with these steps:
//assign channel
transmitPacket[0]=mirror(0xA5); //SYNC byte
transmitPacket[1]=mirror(0x03); //data bytes
transmitPacket[2]=mirror(0x42); //msg type
transmitPacket[3]=mirror(0x00); //channel number
transmitPacket[4]=mirror(0x00); //channel type
transmitPacket[5]=mirror(0x00); //network number
transmitPacket[6]=transmitPacket[0]^transmitPacket[1]^transmitPacket[2]^transmitPacket[3]^transmitPacket[4]^transmitPacket[5];

//set channel id
transmitPacket[0]=mirror(0xA5); //SYNC byte
transmitPacket[1]=mirror(0x05); //data bytes
transmitPacket[2]=mirror(0x51); //msg type
transmitPacket[3]=mirror(0x00); //channel number
transmitPacket[4]=mirror(0x01); //device number_1
transmitPacket[5]=mirror(0x00); //device number_2
transmitPacket[6]=mirror(0x01); //7:pairing, 6:0 device type id
transmitPacket[7]=mirror(0x01); //trans. type
transmitPacket[8]=transmitPacket[0]^transmitPacket[1]^transmitPacket[2]^transmitPacket[3]^transmitPacket[4]^transmitPacket[5]^transmitPacket[6]^transmitPacket[7];

//set channel period
transmitPacket[0]=mirror(0xA5); //SYNC byte
transmitPacket[1]=mirror(0x03); //data bytes
transmitPacket[2]=mirror(0x43); //msg type
transmitPacket[3]=mirror(0x00); //channel number
transmitPacket[4]=mirror(0x00); //messaging period 1
transmitPacket[5]=mirror(0x20); //messaging period 2
transmitPacket[6]=transmitPacket[0]^transmitPacket[1]^transmitPacket[2]^transmitPacket[3]^transmitPacket[4]^transmitPacket[5];

//open channel
transmitPacket[0]=mirror(0xA5); //SYNC byte
transmitPacket[1]=mirror(0x01); //data bytes
transmitPacket[2]=mirror(0x4B); //msg type
transmitPacket[3]=mirror(0x00); //channel number
transmitPacket[4]=transmitPacket[0]^transmitPacket[1]^transmitPacket[2]^transmitPacket[3];

//Activity LED Enable
transmitPacket[0]=mirror(0xA5); //SYNC byte
transmitPacket[1]=mirror(0x02); //data bytes
transmitPacket[2]=mirror(0x68); //LED control
transmitPacket[3]=mirror(0x00); //filler byte
transmitPacket[4]=mirror(0x01); //LED enabled
transmitPacket[5]=transmitPacket[0]^transmitPacket[1]^transmitPacket[2]^transmitPacket[3]^transmitPacket[4];




I'm at loss... the broadcast works both directions, and the master is recieving the acknowledged transmissions, the slave as mentioned (initialized with settings above) is getting EVENT_TX_FAILED for each transmission.      
RankRankRank

Total Posts: 95

Joined 2010-05-03

PM

Hi,

Could you send the device log from the master side?

Please make sure the device log contains only the session where the slave is transmitting acknowledged messages to the master; including the channel configuration.      
Rank

Total Posts: 2

Joined 2011-01-05

PM

Hi,

Thank you for your quick reply, it got the ball rolling!

The problem's cause (in case someone else has the same experience):

We're using an 8MHz Microchip PIC to run the slave node, and the problem encountered was that it's not keeping up to the incoming stream of data from the master (run by ANTwareII and a dev kit USB Interface Board). I looped the incoming data back to the master (antware) via the slave, and found it wasn't transmitting at it's intended 1Hz (instead it was a loop back every ~5s).

With the PIC at 16MHz I found it would take a while (order of minutes), but eventually would get an event_tx_complete after many failures.

at 32MHz it typically would have a complete transmission, and doesn't typically have failures. However if it does, (and I had a breakpoint set on the failure condition in my development software for the microcontroller) it has now fallen behind and now has a string of failures in a row.

Since this equates to 500 000 (instructions at 8MHz) my attention is now toward what's wrong with the microcontroller's responsiveness.

Thank you muharram for drawing my attention to the log file.      
Rank

Total Posts: 2

Joined 2011-01-05

PM

Just in case others stumble upon this thread, there was a bug in our interface driver... high clock speeds are not required to operate the ANT module.

Hoping I haven't spooked anyone about high power usage...