Issues when run speed_test from SDK2.2

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

cross mob
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

Hi,

I am new to the SDK2.2 and Broadcom solution on BLTE and I am doing an evaluation on it.

i intend to run speed_test from SDK2.2 by downloading to the tag3 board for a performance data rate test by using the speed_test example provided from the SDK.

i have setup an external sniffer to monitor BLTE traffic from running wireshark, so I can see what data are sent and received and from the timestamps of the capture packets, I can have idea of data rate.

However when I run SpeedTest application from Window peerapps folder,  I see nothing from the wireshark capture of any data sent nor data received from master to slave (master is Window peerapps of SpeedTest, slave is the speed_test run on the tag3 board).

Also I cannot find any document of how to use speed_test for data rate test, And from the speed_test.c comments, it said "configure client configuration descriptor to allow service to send notifications over control characteristics", but how to do it from Window peerapps SpeedTest though?  The SpeedTest applicaton has no such feature to allow me to configure client desccirptor for send notifciation and might be this is the reason why I cannot get any data packet for sent and received in whireshark.

Please advise me how to run the SpeedTest and how to configurate send notification from it, I really have no idea and no document to help me to understand how it works.

I have read thro' the source code of speed_test.c, it looked to me the configuration description changes should be from the

"master" (SpeedTest) side.

Thanks in advance for your help, our team need the data rate performance data in order to consider whether this is the solution we are looking for.

0 Likes
1 Solution

Here's what I did during an attempt to get the speed test working.


1.

Disabled all existing Bluetooth radios on my Laptop

2.

Made sure I had already installed Broadcom BTW (Bluetooth for Windows), which requires that only a BCM20702 based dongle be present during install.


3.

Plugged in an old BCM20702 based BT Dongle that used to ship with the old TAG2 boards (we removed from the kit because they were problematic, but mine seems to work ok).  Plugable and others make these and they leverage the BTW software as well.


3.

Copied /WICED-Smart-SDK/Apps/speed_test/peerapps/Windows/SpeedTest/Release/x86/SpeedTest.exe to my desktop


4.

Plugged in a TAG3 board and went into Windows device manager to make sure the FTDI USB drivers enumerated correctly (COM10 and COM11).

USB-Yes.png


5.

Opened the SDK (2.2.1) and went to the Make Target window and found speed_test-BCM920736TAG_Q32 download, double clicked it and began the process of program the TAG3 board.


Detecting device...

Device found

Downloading application...

Download complete

Application running

13:14:42 Build Finished (took 12s.452ms)



6.

Went into Windows and attempted to add the device using the Windows Bluetooth tool found on the Taskbar; unfortunately, my machine choked when trying to install the drivers.

Bluetooth-adddevice-windows.png

6a.

Wasn't sure if it's related, but recalled the issue with OTA and that prior to using the OTA functionality, one has to disable "USB selective suspend" for the Bluetooth radio installed on the PC (mine was the ones called "Generic Bluetooth Adapter").  To do so, I opened open Windows Device Manager and Under Bluetooth Radios selected the Bluetooth USB Device and display its properties.  In the Power Management tab, I turned off "Allow the computer to turn off this device to save power".  Then clicked ok and restarted my laptop.


Unplugged the eval board and dongle prior to doing so.


7.

Once rebooted, I repeated steps 4,5,6 for the most part. Reset the TAG3 board so that it would return to programming mode.

Still experiencing a driver issue which may be related incorrect PID/VID assignment.

failed.png


kwang is going to attempt to get this running on his machine to see if he runs into the same issue.

Update:

alexleung0316

kwang ran into similar issues.

We were told that failure to install Speed Test service or any other service is expected as Windows does not have drivers available for this proprietary service.  However, we were also told that it should not cause any problems with running the speed test peer app though.

I still need to walk through the process of adding the device within the speed test application and nobody is home per below:

speed-test.png

Do you see the eval board/speed test program running on the peripheral listed there in the peer app?


View solution in original post

0 Likes
6 Replies
Anonymous
Not applicable

I am almost for sure Window peerapp is missing the feature to allow me to change configuration descriptor to notification (from 0 to 1).

I used an app running on Andriod tablet that allow me to change configuration descriptor to send notification and I simply tested it out after changed but writing 10 bytes out, from the trace logs both in speed_test (I enabled tracing and more trace debug messages) and in Android app, the 10 bytes were able to sent out from master (Android app) to slave (speed_test on tag3)

See below capture from Android app log

====================================

Speed Test (20:73:6A:18:98:77)
V 11:47:58.602 Connecting to 20:73:6A:18:98:77...
D 11:47:58.614 gatt = device.connectGatt(autoConnect = false)
D 11:48:00.485 [Callback] Connection state changed with status: 0 and new state: 2 (CONNECTED)
D 11:48:00.504 [Broadcast] Action received: android.bluetooth.device.action.ACL_CONNECTED
I 11:48:00.516 Connected to 20:73:6A:18:98:77
V 11:48:01.138 Discovering Services...
D 11:48:01.155 gatt.discoverServices()
D 11:48:02.366 [Callback] Services discovered with status: 0
I 11:48:02.397 Services Discovered
V 11:48:02.454 Generic Attribute (0x1801)
Generic Access (0x1800)
- Device Name (0x2A00)
- Appearance (0x2A01)
Unknown Service (dfdd3e89-d394-4023-9d8f-c453b2cffc22)
- Unknown Characteristic [N WNR] (8a848ace-9082-474e-0090-4f1755c695af)
Client Characteristic Configuration (0x2902)
- Unknown Characteristic [N W] (6d4824d7-d102-4bab-83b1-c3322541721d)
Client Characteristic Configuration (0x2902)
V 11:48:10.523 Reading descriptor 00002902-0000-1000-8000-00805f9b34fb
D 11:48:10.535 gatt.readDescriptor(00002902-0000-1000-8000-00805f9b34fb)
I 11:48:10.578 Read Response received from descr. 00002902-0000-1000-8000-00805f9b34fb, value: (0x) 01-00
A 11:48:10.589 "Notifications enabled" received
V 11:48:10.615 Notifications enabled for 6d4824d7-d102-4bab-83b1-c3322541721d
V 11:48:18.610 Reading descriptor 00002902-0000-1000-8000-00805f9b34fb
D 11:48:18.622 gatt.readDescriptor(00002902-0000-1000-8000-00805f9b34fb)
I 11:48:18.664 Read Response received from descr. 00002902-0000-1000-8000-00805f9b34fb, value: (0x) 00-00
A 11:48:18.676 "Notifications and indications disabled" received
V 11:48:18.704 Notifications and indications disabled for 8a848ace-9082-474e-0090-4f1755c695af
V 11:48:20.696 Enabling notifications for 8a848ace-9082-474e-0090-4f1755c695af
D 11:48:20.732 gatt.writeDescriptor(00002902-0000-1000-8000-00805f9b34fb, value=0x01-00)
I 11:48:20.746 Data written to descr. 00002902-0000-1000-8000-00805f9b34fb, value: (0x) 01-00
A 11:48:20.757 "Notifications enabled" sent
V 11:48:20.777 Notifications enabled for 8a848ace-9082-474e-0090-4f1755c695af
V 11:48:47.284 Writing to characteristic 8a848ace-9082-474e-0090-4f1755c695af
D 11:48:47.304 gatt.writeCharacteristic(8a848ace-9082-474e-0090-4f1755c695af)
I 11:48:47.325 Data written to 8a848ace-9082-474e-0090-4f1755c695af, value: (0x) 12-34-55-67-89-02-34-56-78-90

See below trace capture from SDK console window

==========================================

11:48:11 - Checking readable attribute 002a

11:48:11 -

11:48:11 - l2cap Tx:

11:48:11 - 40201b001700040009152a00142b00af

11:48:11 - 95c655174f90004e478290ce8a848a

11:48:11 -

11:48:11 - blecm evt handler:

11:48:11 - 13050140000200

11:48:11 -

11:48:11 - l2cap Rx:

11:48:11 - 40200b0007000400082b002f000328

11:48:11 -

11:48:11 - Checking readable attribute 002d

11:48:11 -

11:48:11 - l2cap Tx:

11:48:11 - 40201b001700040009152d00182e001d

11:48:11 - 72412532c3b183ab4b02d1d724486d

11:48:11 -

11:48:11 - l2cap Rx:

11:48:11 - 40200b0007000400082e002f000328

11:48:11 -

11:48:11 - l2cap Tx:

11:48:11 - 402009000500040001082e000a

11:48:11 -

11:48:11 - blecm evt handler:

11:48:11 - 13050140000200

11:48:11 -

11:48:11 - l2cap Rx:

11:48:11 - 4020090005000400042c002c00

11:48:11 -

11:48:11 - l2cap Tx:

11:48:11 - 40200a000600040005012c000229

11:48:12 -

11:48:12 - l2cap Rx:

11:48:12 - 4020090005000400042f002f00

11:48:12 -

11:48:12 - l2cap Tx:

11:48:12 - 40200a000600040005012f000229

11:48:12 -

11:48:12 - blecm evt handler:

11:48:12 - 13050140000200

11:48:12 -

11:48:12 - blecm evt handler:

11:48:12 - 13050140000100

11:48:12 -

11:48:12 - blecm evt handler:

11:48:12 - 3e0a0300400006000000bc02

11:48:20 -

11:48:20 - l2cap Rx:

11:48:20 - 40200700030004000a2f00

11:48:20 -

11:48:20 - Checking readable attribute 002f

11:48:20 -

11:48:20 - l2cap Tx:

11:48:20 - 40200700030004000b0100

11:48:20 -

11:48:20 - blecm evt handler:

11:48:20 - 13050140000100

11:48:28 -

11:48:28 - l2cap Rx:

11:48:28 - 40200700030004000a2c00

11:48:28 -

11:48:28 - Checking readable attribute 002c

11:48:28 -

11:48:28 - l2cap Tx:

11:48:28 - 40200700030004000b0000

11:48:28 -

11:48:28 - blecm evt handler:

11:48:28 - 13050140000100

11:48:30 -

11:48:30 - l2cap Rx:

11:48:30 - 4020090005000400522c000100

11:48:30 -

11:48:30 - write cmd

11:48:30 -

11:48:30 - Checking readable attribute 002c

11:48:30 -

11:48:30 -  permission check retCode = 03

11:48:57 -

11:48:57 - l2cap Rx:

11:48:57 - 402011000d000400522b001234556789

11:48:57 - 0234567890

11:48:57 -

11:48:57 - write cmd

11:48:57 -

11:48:57 - Checking readable attribute 002b

11:48:57 -

11:48:57 -  permission check retCode = 00

11:48:57 - speed_test_write_handler >> len: 10, handle: 43  <<< 10 bytes write handler (actually it is the receiver instead of write handle, anyway)

0 Likes

Here's what I did during an attempt to get the speed test working.


1.

Disabled all existing Bluetooth radios on my Laptop

2.

Made sure I had already installed Broadcom BTW (Bluetooth for Windows), which requires that only a BCM20702 based dongle be present during install.


3.

Plugged in an old BCM20702 based BT Dongle that used to ship with the old TAG2 boards (we removed from the kit because they were problematic, but mine seems to work ok).  Plugable and others make these and they leverage the BTW software as well.


3.

Copied /WICED-Smart-SDK/Apps/speed_test/peerapps/Windows/SpeedTest/Release/x86/SpeedTest.exe to my desktop


4.

Plugged in a TAG3 board and went into Windows device manager to make sure the FTDI USB drivers enumerated correctly (COM10 and COM11).

USB-Yes.png


5.

Opened the SDK (2.2.1) and went to the Make Target window and found speed_test-BCM920736TAG_Q32 download, double clicked it and began the process of program the TAG3 board.


Detecting device...

Device found

Downloading application...

Download complete

Application running

13:14:42 Build Finished (took 12s.452ms)



6.

Went into Windows and attempted to add the device using the Windows Bluetooth tool found on the Taskbar; unfortunately, my machine choked when trying to install the drivers.

Bluetooth-adddevice-windows.png

6a.

Wasn't sure if it's related, but recalled the issue with OTA and that prior to using the OTA functionality, one has to disable "USB selective suspend" for the Bluetooth radio installed on the PC (mine was the ones called "Generic Bluetooth Adapter").  To do so, I opened open Windows Device Manager and Under Bluetooth Radios selected the Bluetooth USB Device and display its properties.  In the Power Management tab, I turned off "Allow the computer to turn off this device to save power".  Then clicked ok and restarted my laptop.


Unplugged the eval board and dongle prior to doing so.


7.

Once rebooted, I repeated steps 4,5,6 for the most part. Reset the TAG3 board so that it would return to programming mode.

Still experiencing a driver issue which may be related incorrect PID/VID assignment.

failed.png


kwang is going to attempt to get this running on his machine to see if he runs into the same issue.

Update:

alexleung0316

kwang ran into similar issues.

We were told that failure to install Speed Test service or any other service is expected as Windows does not have drivers available for this proprietary service.  However, we were also told that it should not cause any problems with running the speed test peer app though.

I still need to walk through the process of adding the device within the speed test application and nobody is home per below:

speed-test.png

Do you see the eval board/speed test program running on the peripheral listed there in the peer app?


0 Likes
Anonymous
Not applicable

Thanks for your info, it is awesome and useful.

Now I can run the Window SpeedTest, the issue I had was the last paried device ("hello") that I tested need to remove and then should add device again for speed_test.

See my screen snapshot below

pastedImage_0.png

However It looked to me the reported data rate is 12.432kps, not that close to the other posts said can reach up to 80Kps.

Note: I have made some changes in speed_test to force loopback, please see below

>>>>>>>>>>>>>>

// fine timeout callback, send as many frames as we can

void speed_test_fine_timeout(UINT32 arg)

{

  #if FORCE_LOOPBACK   <<< I force it to send notification regardless, though I think is unnecessary, I did it anyway

    while (blecm_getAvailableTxBuffers())

  #else

    while ((speed_test.current_test == TEST_NOTIFICATIONS) &&

           ((speed_test.data_client_configuration & CCC_NOTIFICATION) != 0) &&

           blecm_getAvailableTxBuffers())

  #endif       

    {

        extern INT32 ulp_getRand(void);

        int i;

        UINT8 buf[20];

        INT32 *p_buf = (INT32 *)buf;

        for (i = 0; i < 5; i++, p_buf++)

        {

            *p_buf = ulp_getRand();

        }

        bleprofile_sendNotification(HANDLE_SPEED_TEST_CHARACTERISTIC_DATA_VALUE, buf, 20);

    }

}

0 Likes
Anonymous
Not applicable

Please see the screenshot of the Window Speed Test below, under "Performance test" I checked "Device should loopback frames" and then click "Start Send", for a quick test I just sent 200 frames and force it to stop, the performance showed 12.432kps.

Also I noticed speed_test in tag3 stopped and did not continue to send and receive (loop back) frames, and I needed to momentarily to click "Stop" and then "Start Send" again, and this is why I tried to force loopback in the codes that I posted in previous thread.

Any advise that I can continue see the send and receive loop back frames infinitely show I can really see what is the data rate (I hope to see it can be at around 80kps then I will pick it in my BTLE design for IoT projects)

pastedImage_0.png

0 Likes
Anonymous
Not applicable

I used Asus BT4.0 Dongle that our IT dept bought from local electronic store in Vancouver, Canada,

What I did for the installation is pretty simple, just installed the CDROM for the driver will work perfectly on my desktop pc.

At the end of the day, see the screenshot below, you can find ASUS USB-BT400 together with MS bluetooth enumerator under Bluetooth Radio.

Note: this is the setup of my desktop pc that does not have other BT radio interface.

For the one that is on a notebook (Dell) pc which has BT radio interface, it is a bit complicated, I have tried several times to install BT drivers using same Asus BT4.0 dongle in order to get it work but failed, the tricks finally I figured out to get it work, was simply uninstalled Dell BT driver, then installed BTW that I downloaded from Broadcom, however it still ran into issues as you mentioned for unrecognized peripheral drivers, note even I tried to use Microsoft auto driver update failed resolve it (Win7 has no support for BT4.0 peripheral driver... I guessed though), then I "repaired" BTW for the missing drivers by running Asus CDROM and it worked!!!!

pastedImage_0.png

snapshot of my desktop pc for Bluetooth interfaces.

pastedImage_1.png

snapshot of devices and printers, note: after removed last paired "hello" and added BT device for "speed_test", launched Window SpeedTest and it worked.

pastedImage_2.png

snapshot of SpeedTest, note: in order to know it is actually paired with tag3 board running speed_test, need to verify from the Device pull down box field the tag3 slave device ID. 20:73:6A:18:98:77, if there is no device ID printed on the pull down box field, it will not work at all though it showed no hints to you.

Actually we can have some hints, Win7 will warn you that a paired device security info is not updated if the last paired device is not removed, so need to pay attention on the Window screen and see if the security info small window popped up at around the lower right corner of the screen, you know it need to be removed and add again for add device.

Hope this can help other developers not to run into same issues as I did.

0 Likes
Anonymous
Not applicable

yes, it worked now for me.

My issues were not the BT dongle driver, I have properly setup drivers and have no issues to me.

My issue arose because I forgot to remove the paired device in BT devices group, after I removed previous paired "hello" device and added "speed_test" device to BT device group, Window SpeedTest worked ok for me,

I guessed this question is answered.

However I need to create another question for how to achieve the max 80kps data rate by using SpeeTest with speed_test run in tag3 board.

Have a nice weekend.

Cheers!

0 Likes