0

ARDUINO + D52QD2M4IA (nRF52832) - protocol help…

mikeardy gravatar image

asked 2016-09-26 14:51:40 +0100

Petter gravatar image

updated 2016-09-28 10:04:54 +0100

Hi.

I develop an application in the past with ARDUINO and a nRF24AP2 module with great success. I can read 8 heart rate monitors ANT+ sensors in the same time, with 8 differents channels.

Now I am trying to upgrade my application using a D52QD2M4IA (nRF52832) to read 15 or many sensors in the same time.

The main problem I have is a protocol issue.

According to ANT Message Protocol and Usage 5.1 I wrote an ARDUINO library to connect with nRF24AP2. It works. But not with D52QD2M4IA.

I report a protocol dump report between ARDUINO (the Host) and the ANT+ Nordic Modules:

----------------------------------------------- nRF24AP2 started

RX <<< [ A4 1 6F 0 CA ]
1) GETTING CAPABILITIES
TX >>> [ A4 2 4D 0 54 BF ] len=6
RX <<< [ A4 6 54 8 3 0 B2 36 0 79 ]
Canali massimi disponibili sul modulo :8
100) SET NETWORK KEY - network #: 0 ...
TX >>> [ A4 9 46 0 B9 A5 21 FB BD 72 C3 45 64 ] len=13
RX <<< [ A4 3 40 0 46 0 A1 ]
101) CHANNEL ASSIGN - channel #: 0 - channel type: 64 - network #: 0
TX >>> [ A4 3 42 0 40 0 A5 ] len=7
RX <<< [ A4 3 40 0 42 0 A5 ]
102) SET CHANNEL - channel #: 0 - device number: 0 - device type: 120 - transmission type: 0
TX >>> [ A4 5 51 0 0 0 78 0 88 ] len=9
RX <<< [ A4 3 40 0 51 0 B6 ]
103) SET CHANNEL FREQUENCY - channel #: 0 - frequency: 57
TX >>> [ A4 2 45 0 39 DA ] len=6
RX <<< [ A4 3 40 0 45 0 A2 ]
104) SET RX EXT MESSAGE ENABLE - enable: 1
TX >>> [ A4 2 66 0 1 C1 ] len=6
RX <<< [ A4 3 40 0 66 0 81 ]
105) OPEN SCAN MODE (CONTINUOUS)
TX >>> [ A4 1 5B 0 FE ] len=5
RX <<< [ A4 3 40 0 5B 0 BC ]
106) 106) 106) 106) 106) 106) 106



----------------------------------------------- D52QD2M4IA started

RX <<< [ A4 1 6F 1 CB ]
1) GETTING CAPABILITIES
TX >>> [ A4 2 4D 0 54 BF ] len=6
MESSAGE_READ_INFO_TIMEOUT_MIDMESSAGE
RX <<< [ A4 84 2A 8 4 BA 9B 0 7D 68 FE 0 0 0 0 0 0 0 54 0 1 0 1 0 0 0 1 0 0 0 1 0 0 0 0 0 0 66 8F 0 0 0 0 0 1 9E 5 0 0 E8 3 0 0 0 0 0 0 8 1 23 0 2 25 0 6B 0 1 1 0 1D 0 D 0 1F 0 0 10 10 A4 1 6F 1 CB A4 84 2A 8 4 BA 9B 0 7D 68 FE 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ]
Messaggio non atteso!: 2A - Messaggio atteso era: 54
1) GETTING CAPABILITIES
TX >>> [ A4 2 4D 0 54 BF ] len=6
MESSAGE_READ_INFO_TIMEOUT_MIDMESSAGE
RX <<< [ A4 8 4A 8 4 BA 36 0 7D 68 FC 0 ]
Messaggio non atteso!: 4A - Messaggio atteso era: 54
1) GETTING CAPABILITIES
TX >>> [ A4 2 4D 0 54 BF ] len=6
MESSAGE_READ_INFO_TIMEOUT_MIDMESSAGE
RX <<< [ A4 8 4A 8 4 BA 9B 80 FD 43 FC 0 ]
Messaggio non atteso!: 4A - Messaggio atteso era: 54
1) GETTING CAPABILITIES
TX >>> [ A4 2 4D 0 54 BF ] len=6
MESSAGE_READ_INFO_TIMEOUT_MIDMESSAGE
RX <<< [ A4 84 AA 8 4 BA 36 0 7D 68 FE 0 0 0 0 0 0 0 54 0 1 0 1 0 0 0 4 0 0 0 1 0 0 0 0 0 0 66 8F 0 0 0 0 0 1 9E 5 0 0 E8 3 0 0 0 0 0 0 8 1 23 0 2 25 0 6B 0 1 1 0 1D 0 D 0 1F 0 0 31 31 A4 1 6F 1 CB A4 84 2A 8 4 BA 9B 0 7D 68 FE A4 8 4A 8 4 BA 36 0 7D 68 FC A4 8 4A 8 4 BA 9B 80 FD 43 FC A4 84 AA 8 4 BA 36 0 7D 68 FE 0 0 0 0 0 0 0 0 0 ]
Messaggio non atteso!: AA - Messaggio atteso era: 54
1) GETTING CAPABILITIES
TX >>> [ A4 2 4D 0 54 BF ] len=6
MESSAGE_READ_INFO_TIMEOUT_MIDMESSAGE
RX <<< [ A4 84 AA 8 4 BA 9B 80 FD 43 FC 0 0 0 0 0 0 0 54 0 1 0 1 0 0 0 5 0 0 0 1 0 0 0 0 0 0 66 8F 0 0 0 0 0 1 9E 5 0 0 E8 3 0 0 0 0 0 0 8 1 23 0 2 25 0 6B 0 1 1 0 1D 0 D 0 1F 0 0 3C 3C A4 1 6F 1 CB A4 84 2A 8 4 BA 9B 0 7D 68 FE A4 8 4A 8 4 BA 36 0 7D 68 FC A4 8 4A 8 4 BA 9B 80 FD 43 FC A4 84 AA 8 4 BA 36 0 7D 68 FE A4 84 AA 8 4 BA 9B 80 FD ]
Messaggio non atteso!: AA - Messaggio atteso era: 54
1) GETTING CAPABILITIES
TX >>> [ A4 2 4D 0 54 BF ] len=6
MESSAGE_READ_INFO_TIMEOUT_MIDMESSAGE
RX <<< [ A4 84 AA 8 4 BA 3B 0 7D 68 FC 0 0 0 0 0 0 0 54 0 1 0 1 0 0 0 6 0 0 0 1 0 0 0 0 0 0 66 8F 0 0 0 0 0 1 9E 5 0 0 E8 3 0 0 0 0 0 0 8 1 23 0 2 25 0 6B 0 1 1 0 1D 0 D 0 1F 0 0 7 7 4 BA 3B 0 7D 68 FC 2A 8 4 BA 9B 0 7D 68 FE A4 8 4A 8 4 BA 36 0 7D 68 FC A4 8 4A 8 4 BA 9B 80 FD 43 FC A4 84 AA 8 4 BA 36 0 7D 68 FE A4 84 AA 8 4 BA 9B 80 FD ]
Messaggio non atteso!: AA - Messaggio atteso era: 54
1) GETTING CAPABILITIES
TX >>> [ A4 2 4D 0 54 BF ] len=6
MESSAGE_READ_INFO_TIMEOUT_MIDMESSAGE
RX <<< [ A4 84 54 8 4 BA 36 0 F6 1D 8B 0 0 0 0 0 0 0 54 0 1 0 1 0 0 0 7 0 0 0 1 0 0 0 0 0 0 66 8F 0 0 0 0 0 1 9E 5 0 0 E8 3 0 0 0 0 0 0 8 1 23 0 2 25 0 6B 0 1 1 0 1D 0 D 0 1F 0 0 12 12 4 BA 3B 0 7D 68 FC A4 84 54 8 4 BA 36 0 F6 1D 8B 4A 8 4 BA 36 0 7D 68 FC A4 8 4A 8 4 BA 9B 80 FD 43 FC A4 84 AA 8 4 BA 36 0 7D 68 FE A4 84 AA 8 4 BA 9B 80 FD ]
Canali massimi disponibili sul modulo :8
100) SET NETWORK KEY - network #: 0 ...
TX >>> [ A4 9 46 0 B9 A5 21 FB BD 72 C3 45 64 ] len=13
MESSAGE_READ_INFO_TIMEOUT_MIDMESSAGE
RX <<< [ A4 20 0 46 0 D0 36 0 F6 1D 8B 0 0 0 0 0 0 0 40 0 1 0 1 0 0 0 8 0 0 0 1 0 0 0 0 8 ]
Messaggio non atteso!: 0 - Messaggio atteso era: 40
100) SET NETWORK KEY - network #: 0 ...
TX >>> [ A4 9 46 0 B9 A5 21 FB BD 72 C3 45 64 ] len=13
MESSAGE_READ_INFO_TIMEOUT_MIDMESSAGE
RX <<< [ A4 20 0 46 0 A1 36 0 F6 1D 8B 0 0 0 0 0 0 0 40 0 1 0 1 0 0 0 9 0 0 0 1 0 0 0 0 8 ]
Messaggio non atteso!: 0 - Messaggio atteso era: 40
[...]

How I can solve this problem? It seems to using extended message but also if I try to disable them the module seems to ignore it. Many thanks.

edit retag flag offensive close delete report spam

Comments

You are sending commands over UART to the nRF52? What firmware are you running on the nRF52? We don't have an example for running a serialized application with the ANT SoftDevices, only BLE. The nRF24AP2 is only a connectivity IC, while the nRF52 is not, but can be.

Petter Myhre ( 2016-09-28 10:31:44 +0100 )editconvert to answer

Thanks Petter for your response, excuse me I add an answer below, could you help me? Thanks.

mikeardy ( 2016-09-28 11:57:16 +0100 )editconvert to answer

1 answer

Sort by » oldest newest most voted
0
mikeardy gravatar image

answered 2016-09-28 11:56:13 +0100

updated 2016-09-28 12:00:23 +0100

Hi, and thanks for response... so in attach there is a picture of the D52QD2M4IA module.

image description

I bought one of it connected like following: The wiring I used is:

H202 -> TO ARDUINO PIN FOR RESET FUNCTION
H203 -> VCC
H204 -> GND
H206 -> TO ARDUINO PIN FOR SUSPEND FUNCTION
H207 -> TO ARDUINO PIN FOR SLEEP FUNCTION
H209 -> PORTSEL TO GND (ASYNC)
H210 -> BR2 TO VCC
H211 -> UART TX TO ARDUINO RX
H212 -> UART RX TO ARDUINO TX
H213 -> BR1 TO VCC
H214 -> BR3 TO VCC
H217 -> RTS TO ARDUINO INPUT PIN

BR1-2-3 to VCC = selection of 57600bps serial UART speed

When Arduino starts it execute this routines...

// module reset
void hardwareReset() {
[... some other code ...]
digitalWrite(RESET_PIN, LOW);
delay(5);
[... some other code ...]
hw_reset_count++;
delay(5);
digitalWrite(RESET_PIN, HIGH);
[... some other code ...]
}


// **************************************************************************************************
// * ANT Management Routines
// **************************************************************************************************
void antBegin() {
pinMode(SUSPEND_PIN, OUTPUT);
pinMode(SLEEP_PIN, OUTPUT);
pinMode(RESET_PIN, OUTPUT);
pinMode(RTS_PIN, INPUT);
[... some other code ...]
digitalWrite(RESET_PIN, HIGH);
digitalWrite(SUSPEND_PIN, HIGH);
digitalWrite(SLEEP_PIN, LOW);
//This should not be strictly necessary - the device should always come up by itself....
//But let's make sure we didn't miss the first RTS in a power-up race
hardwareReset();
}

It respond me so I assume that there is a firmware that can "drive" the ANT protocol or not? I do not download any kind of software in it...

How can I solve my issues?

My needs is to read as many as HRM data and pass thought Arduino to a PC application. Could you help me? Thanks.

edit flag offensive delete publish link more

Comments

I'm sorry. You are correct. It seems they have made serialization firmware (ANT network processor application) for it. Maybe you can find something useful in tech resources here? I think you should contact Dynastream regarding application support, at thisisant.com.

Petter Myhre ( 2016-09-28 12:26:11 +0100 )editconvert to answer

I tryed to contact Dynastream but I had no so clear explanation... Here can be found the discussion ---> https://www.thisisant.com/forum/viewt... thanks

mikeardy ( 2016-09-28 15:07:38 +0100 )editconvert to answer

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer. Do not ask a new question or reply to an answer here.

[hide preview]

Question Tools

1 follower

Stats

Asked: 2016-09-26 14:51:40 +0100

Seen: 188 times

Last updated: sep. 28 '16