puart_control: stop scan after puart_control_handle_cancel_connect_cmd

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
RuCh_2181101
Level 3
Level 3
5 likes given First like received First like given

Dear Sir,

     It is complex case in puart_control.

     1. Connect to Device A (does not exist in air)

     2. Connect to Device A (does not exist in air) again, it should be get "In Progress" error.

     3. Cancel Connect , in puart_control_handle_cancel_connect_cmd, it will only call "blecen_Conn(NO_CONN, NULL, 0);".

     Then you will find that the device cannot scan anymore.

     Could you give me a hand to comment it ?

Best Regards,

Rush Chen

0 Likes
1 Solution
RuCh_2181101
Level 3
Level 3
5 likes given First like received First like given

WICED 2.2.1 had fixed it. Just comment.

View solution in original post

19 Replies
BoonT_56
Employee
Employee
500 likes received 250 likes received 100 likes received

did you have a chance to walk through the new puart_control project under app of the new sdk 2.2?

there is a "sample puart control protocol.pdf" inside this project folder that spelled out the use client control.exe and puart_control app to verify your design.

0 Likes
MichaelF_56
Moderator
Moderator
Moderator
250 sign-ins 25 comments on blog 10 comments on blog

rushchen,

Have you had a chance to refer to the sample application boont referenced ?

0 Likes

Dear All,

   Yes. but I will try it again for double confirm.

Best Regards,

Rush Chen

0 Likes

please refer to my pm to you.

0 Likes

We check the Client Control in puart_control. We found no implementation for ID_CANCEL_CONNECT.

ClientControl.rc:

    DEFPUSHBUTTON   "Cancel Connect",ID_CANCEL_CONNECT,195,23,100,14

It is strange.It look like some problem in BT stack.

Best Regards,

Rush Chen

I also use other case to test the invalid address problem.

Below is my test procedure and I use original puart_control to test.

1. Start Device Discovery.

     1.1. The module found 78:a5:04:41:37:9a, and 88:0f:10:49:e1:ad

2. Power off 78:a5:04:41:37:9a

3. Use Connect button to connect 78:a5:04:41:37:9a.

4. We wait until timeout and log show "Scan:0"

5. Start Device Discovery again, Then you will found no function of Device Discovery.

6. I wait 5 min more. We still cannot SCAN. Then I power on the 78:a5:04:41:37:9a

7. The device will connect directly and scan back to normal.


Above is my test, For some exception, the TAG maybe power off or out-of-range after the module scan them. It should be have function to cancel the connect. But "blecen_Conn(NO_CONN, NULL, 0);" seem no useful.

Our SDK is 2.2.

test.png

0 Likes

i'm getting a distributor in your region to get in touch with you to look into this issue more closely. an air trace may be more meaningful to pinpoint the issue.

0 Likes

i used my tag3 to discover my sense.

1) Start Device Discovery

2) Found my sense

3) Power off my sense

4) Click "Connect" to try to connect to sense, to no avail of course

5) Wait till Scan:0

6) Start Device Discovery

7) Scan:2

i was able to repeat the above for a few times...

0 Likes
BoonT_56
Employee
Employee
500 likes received 250 likes received 100 likes received

After I power up my sense, it auto-connects to the tag.


Then, I proceed to do a "Disconnect", with success.

0 Likes
BoonT_56
Employee
Employee
500 likes received 250 likes received 100 likes received

btw, I am using the puart_control.c that comes with SDK 2.2.0 and not the one from my PM.

0 Likes

Hi Boont,

   It is good to have your help.

   For your procedures,

   In 7), do you have find others devices ? In my case, I cannot find any device even others device are available.

   >>> After I power up my sense, it auto-connects to the tag."

   Yes, we have same situation (7. The device will connect directly and scan back to normal.).


   No try-connect timeout...

   Could you prepare two sense (A, B) ?

   After try-connect to A (had been power off), could you connect to Sense B ?

Best Regards,

Rush Chen

0 Likes

i will try again on these scenarios on my thursday as i have customer appointments today.

0 Likes
BoonT_56
Employee
Employee
500 likes received 250 likes received 100 likes received

I have three sense tags, A, B and C

1) Turn on A and B, C is off

2) Clientcontrol found A and B

3) A and B now sleep

4) Try to connect to A, of course will fail, waiting for Scan:0

5) Turn on C and click "Start Device Discovery", but failed to find C

6) Wait for Scan:0

7) Turn on B and C, also failed to find anybody

😎 Wait for Scan:0

9) With B and C off, turning on A, it will auto-connect to Tag3.

Another test scenario with two sense tags only, A and B

1) Turn on A and B

2) Clientcontrol found A and B

3) A and B now sleep

4) Try to connect to A, of course will fail, waiting for Scan:0

5) On clientcontrol, switch the BD_add to B's and turn on B

6) Click "Connect" but failed to connect to B

7) Wait for Scan:0

😎 Turn on A, and it will auto-connect to Tag3

I will feedback the above to factory.

Hi Boon,

   Could you give me a hand to update the status and schedule ?

   Does it enter your bug system ?

Best Regards,

Rush Chen

0 Likes

my understanding is that the factory will rectify it in the next sdk release although i do not know when is it.

j.t

0 Likes
BoonT_56
Employee
Employee
500 likes received 250 likes received 100 likes received

controller.jpg

I used two SENSE tags so as to be consistent with you. As you can see, I was able to go back to Discovery after Scan:0. And I always do a "Reset" before I start anything.

0 Likes

Hi Boont,

  Reset can be a work-a-round.

  But that also mean that the puart_control cannot support multi-client. After reset the module, others connection will drop in the same time.

  Is it possible to provide the patch in next release of WICED ?

Best Regards,

Rush Chen

0 Likes

I spoke with the developers and they seem certain this has been fixed and will appear in the next release of the SDK.  No ETA yet on the release.

0 Likes
RuCh_2181101
Level 3
Level 3
5 likes given First like received First like given

WICED 2.2.1 had fixed it. Just comment.