cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 4 MCU

Contributor

In a PSoC4 BLE project I setup the Device Name in the BLE configution screen, GAP Settings, General, Device Name to be "LBE-5A" (without the quotes).  I built the program and programmed a Device.  Using an iPad app I observed the device to be advertising the name correctly. 

Next, I changed the name in the same location in the BLE configuration screen to be LBE-5A-100.  After building and programming the iPad app showed it to be advertising the same as before (LBE-5A) without the -100 part. 

Do I have to do something other than clicking OK in the configuration screen, rebuilding and programming the device for this to work?

Thanks,

Dennis

0 Likes
Reply
1 Solution
Moderator
Moderator

Maybe you need refresh the advertising device list of iPad app or even restart the app. I tested the PSoC4 BLE DVK board with IOS CySmart app, and did not find any issue with changing device name freely.

View solution in original post

0 Likes
Reply
5 Replies
Moderator
Moderator

Maybe you need refresh the advertising device list of iPad app or even restart the app. I tested the PSoC4 BLE DVK board with IOS CySmart app, and did not find any issue with changing device name freely.

View solution in original post

0 Likes
Reply
Contributor

Well, here's what I found out...though I don't fully understand it all:

It turns out that the PSoC4 BLE was doing exactly what it was supposed to do and actually was advertising the new name I had programmed into it.  I determined this by installing the BLE app, LightBlue on my iphone which showed the new name being advertised by the PSoC4 BLE.   Next I installed the same app on my iPad which did not show the new name, but, instead, the old name.  Turning off the PSoC made the old name disappear from Lightblue's list.  Turning it back on made the old name reappear.  So, apparently, the iPad was detecting the advertising from the PSoC (by its MAC address?) but presenting the old name to the app. 

I tried "forget this device" which couldn't be done since the device did not show in the BLUETOOTH list.  Then I rebooted the iPad which made no difference.  I tried resetting the iPad and resetting the network setting, neither of which had any effect on the problem. 

I had written my app with TechBASIC and so went looking for something in that languages that might help. It has a command "disconnect" but it requires the name of the connected device which I didn't have since it was not connected.  Finally, I reprogrammed the PSoC with the old name, told my app to look for and connect with the device advertising the old name and it did so.  Then, since it was connected I was able to use the disconnect command along with the old name to disconnect the iPad from the PSoC.   Following that, I was able to "forget this device".   After all of this I was then able to set the new name to both the PSoC and the iPad and make it work.  All I had to do then was insert the disconnect command in the proper place in my app to make sure it was disconnected before it started scanning for an advertising remote again. 

So, I guess your suggestion was the correct answer.  I just had to figure out how to get there.

Thanks for your help,

Dennis

Moderator
Moderator

Thanks for providing the details. Have you resolve this issue totally?

0 Likes
Reply
Contributor

WangS_81

Well, no, it's not been resolved Completely  The solution I came up with did fix the exact thing I had described but a follow-on problem became apparent after I got past the described one. Now if I have two of the peripheral units on at the same time (a situation to be expected) and use the TechBASIC function BLEDiscoveredPeripheral I get an intermittent problem. This function returns, among other things, the peripheral's Local Name and an array called advertisements which also contains the peripheral's Local Name.   These two returns should be and often are the same...but not always.  Sometimes one of them gives the name of one of the two peripherals and the other one gives the name of the other peripheral. So far I haven't found a way to solve this. Any suggestions or thoughts would be greatly appreciate.

Dennis

0 Likes
Reply
Moderator
Moderator

Sorry, I still did not fully get the exact issue you are facing now. Can you describe it with simpler words?

some questions -

1. Are you sure that all peripherals are advertising new name once the name is updated?

2. Are you use your own custom boards or DVK boards?

3. Can you tell more info about the mobile/pad app?

0 Likes
Reply