Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

Use Base_Master_Transmit and want to receive and sent data

RankRank

Total Posts: 33

Joined 0

PM

Hi,

I want to assign a channel with Master_Transmit_0x10 to send data to the device.
According mine information, i can use 1 channel to receive and sent data by setting the channeltype to BASE_Master_Transmit_0x10.
The device sends speed data and can receive resistance, but i do not receive any data.
If i changed the channeltyp to BASE_Slave_Receive_0x00, i receive data, but i cannot sent data packages back to the device.

Which channeltype must i use to sent and receive data, using one channel.

Thanks
Klaasjan
     
Avatar
RankRankRankRank

Total Posts: 662

Joined 2012-10-09

PM

Is the device that you are trying to receive data from a device that you can control, or is it a sensor created by a different manufacturer?

If you can control both end points of your system, you would configure one device as bidirectional master, and the other one as a bidirectional slave. It is possible for the master to receive data from the slave that is sent on the reverse direction, however, the slave host application needs to transmit the data. Please refer to section 9.5.5.1 for additional information on how to send data from slave to master, there is a diagram in this section that explains how all the messaging works when exchanging broadcast data between a master and a slave.      
RankRank

Total Posts: 33

Joined 0

PM

Hi Alejandra,

The device sends speed, cadence data but i can sent some resistance information. The information i got from this device, says i need to setup a channel as a master. But in this mode no speed or cadence data is sent.
So yes it is a device i can control.

How do i setup a bidirectional paired channel?
I mis that option (probably my mistake grin)

greetz
Klaasjan



alejandra - 11 February 2014 12:21 PM
Is the device that you are trying to receive data from a device that you can control, or is it a sensor created by a different manufacturer?

If you can control both end points of your system, you would configure one device as bidirectional master, and the other one as a bidirectional slave. It is possible for the master to receive data from the slave that is sent on the reverse direction, however, the slave host application needs to transmit the data. Please refer to section 9.5.5.1 for additional information on how to send data from slave to master, there is a diagram in this section that explains how all the messaging works when exchanging broadcast data between a master and a slave.
     
Avatar
RankRankRankRank

Total Posts: 662

Joined 2012-10-09

PM

If you do have control of both devices (i.e, you are writing the firmware for both of them), you need to configure one device as bidirectional master (BASE_Master_Transmit_0x10)., and the other device as a bidirectional slave (BASE_Slave_Receive_0x00), with matching channel parameters. The master will transmit data on every channel period as expected from a master device; you can update the payload on the EVENT_TX. The slave needs to send broadcast messages for them to be received by the master; you can cue them off the received broadcast messages from the master, as described in section 9.5.5.1 of the message protocol document.

If you have access to two USB sticks, I would recommend using ANTware to get familiar with all the messaging involved in this.      
RankRank

Total Posts: 33

Joined 0

PM

Hi,

It is one device. Which can sent speed and cadence data as recieve resistance level data
If i understand you, i need to setup 2 channels.
According mine information one channel is enough to recieve and sent data.


alejandra - 11 February 2014 02:02 PM
If you do have control of both devices (i.e, you are writing the firmware for both of them), you need to configure one device as bidirectional master (BASE_Master_Transmit_0x10)., and the other device as a bidirectional slave (BASE_Slave_Receive_0x00), with matching channel parameters. The master will transmit data on every channel period as expected from a master device; you can update the payload on the EVENT_TX. The slave needs to send broadcast messages for them to be received by the master; you can cue them off the received broadcast messages from the master, as described in section 9.5.5.1 of the message protocol document.

If you have access to two USB sticks, I would recommend using ANTware to get familiar with all the messaging involved in this.
     
Avatar
RankRankRankRank

Total Posts: 662

Joined 2012-10-09

PM

In order to see bidirectional communication in action, you need two devices. It is possible to achieve this with a single channel. One of the devices would be configured as the master end point of the communication, while the other device would be configured as the slave. Note that it is still a single channel, with each of the two devices being an endpoint for the same channel. Makes sense?

Section 5 of the ANT Protocol and Message Usage Document does provide a very good description on how channels work, and what a master/slave endpoints do. Please take the time to review this, it may help clarify what role each of the devices you are working with has. You can find this document in the downloads section of the website.

http://www.thisisant.com/developer/resources/downloads/


So just to clarify, you are creating a device that transmits speed/distance, and receives resistance. Where is the resistance received from? It sounds like this is a device from a 3rd party, so then you need to confirm with that 3rd party whether that device is configured as a master or slave, and what do you need to do on it to get it to transmit the data you are looking for.      
Avatar
RankRankRankRank

Total Posts: 662

Joined 2012-10-09

PM

Also, based on your original post


If i changed the channeltyp to BASE_Slave_Receive_0x00, i receive data, but i cannot sent data packages back to the device.


If you are able to receive the resistance data by configuring a slave channel, it is most likely that the 3rd party device is configured as a master. This means your device needs to be configured as a slave, and you can send data back in the reverse direction. Confirm with the 3rd party whether they actually listen for that data on the reverse direction, or if they are expecting a different channel.      
RankRank

Total Posts: 33

Joined 0

PM

The information i got from the device maker, is that the channel must by master.


alejandra - 11 February 2014 03:03 PM
Also, based on your original post


If i changed the channeltyp to BASE_Slave_Receive_0x00, i receive data, but i cannot sent data packages back to the device.


If you are able to receive the resistance data by configuring a slave channel, it is most likely that the 3rd party device is configured as a master. This means your device needs to be configured as a slave, and you can send data back in the reverse direction. Confirm with the 3rd party whether they actually listen for that data on the reverse direction, or if they are expecting a different channel.