RN4020 responses to SHW command without connection

RN4020 responses to SHW command without connection

Postby tunelabguy » Mon Sep 28, 2015 4:30 pm

I have configured an RN4020 for a Private Service with a Notify Characteristic and a simple Read Characteristic. When I send the SHW command to write to the simple characteristic, I get a single AOK, as expected. When I send the SHW command to write to the Notify characteristic, I get two AOKs, presumably the first one for the local write and the second one for the sending of the notification to the client. Also as expected, I guess.

The strangeness comes when I write to these characteristics when there is no connection. I can write to the simple characteristic with the SHW command even when there is no connection. I guess that is OK, since no radio activity is involved. But when I write to the notify characteristic, I get inconsistent response. If the device has just been powered up and I write to the Notify characteristic, I get a single AOK. Presumably that is because the local write to the characteristic went OK, and the notification was not attempted because there was no one to notify. But I get different results if I do this:

Make a connection.
Verify notification by writing to the Notify characteristic.
Break the connection by stopping the client (which happens to be my own Android app)
Attempt to write to the Notify characteristic with a SHW command.

What happens in this scenarios is that I get "Connection End" from the RN4020 when the connection is broken from the client end. Then if I try to write to a notify characteristic, the RN4020 goes into an infinite loop of sending me "NFail" responses. They appear on my terminal screen as fast as the terminal software can write them. The RN4020 will still respond to commands. I can sneak in a LS command and I see the list of UUIDs zip by before it is quickly overwritten on the screen by more "NFail" responses. I can understand a single NFail response, but not an infinite number of them. Furthermore, why did the RN4020 even try to do a notification? It knew there was no connection because it told me so before I issued the fateful SHW command. And before any connection had been established, it was happy to accept a SHW command to the very same characteristic. Why the difference in responses and why the infinite responses?

By the way, this RN4020 has the 1.10.09 06/09/2014 firmware.
User avatar
tunelabguy
Verified identity
 
Posts: 29
Joined: Sun Jul 20, 2014 9:41 pm
PIC experience: Professional 5+ years with MCHP products

Re: RN4020 responses to SHW command without connection

Postby Trevor » Sun Jun 05, 2016 10:36 am

Trevor
Verified identity
 
Posts: 13
Joined: Sun Jun 05, 2016 4:16 am
Location: The LAN Downunder
PIC experience: Experienced Hobbyist


Return to Zigbee and wireless topics

Who is online

Users browsing this forum: No registered users and 2 guests

cron