HELP! - Issues writing to cypress peripheral

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

cross mob
leri_4809736
Level 1
Level 1

Hi All,

I am using a Nordic nRF52840 device to write a simple 1 byte value to a peripheral device. The Peripheral is a sealed product so I do not know the part number but do know it is cypress. The peripheral is connected to a servo and when I write to a particular characteristic via a mobile device the servo moves as it should.

When I do the same thing from my nRF52 (Adafruit Feather sense), the characteristic is updated (confirmed with a read after the write) but the servo doesn't move until I disconnect the central. So far my application is having to disconnect and re-connect after every write which is causing problems down stream.

Does anyone have any idea what could be causing this?

I have tried writes with and without response and it seems without does not change the characteristic at all. So I am using write with response.

Any help massively appreciated.

Many thanks

Lewis

0 Likes
4 Replies
VenkataD_41
Moderator
Moderator
Moderator
750 replies posted 500 replies posted 250 solutions authored

Hi Lewis,

The peripheral is connected to a servo and when I write to a particular characteristic via a mobile device the servo moves as it should.

Okay. What is the mobile app you are using?

Can you also check once with CySmart for Android and see whether the peripheral is working as expected? If the CySmart app works fine, then there will not be any issue with PSoC peripheral device.

When I do the same thing from my nRF52 (Adafruit Feather sense), the characteristic is updated (confirmed with a read after the write) but the servo doesn't move until I disconnect the central. So far my application is having to disconnect and re-connect after every write which is causing problems down stream.

Please check whether the nRF application firmware is well written. Please compare the code with nRF central and Client code examples.

Please check the air logs (using sniffer) when you are using the mobile app and nRF central device and see if there is any difference.

Thanks

Ganesh

0 Likes

Thank you for getting back to me Ganesh.

I have used multiple BLE apps (nRF connect, LighBlue, BLE tools, BLE scanner, BLE Hero.....) I have not used CySmart however I doubt this would be any different. I have no doubt that the peripheral is working as it should.

I have ordered a sniffer but it has not arrived yet but this will be my next action. In the mean time can you think of any reason why a write with resp would only take effect after a disconnection? It is strange that the characteristic is updated but action not taken. It feels like the connection during the write is never completed? Is this possible?

Lewis

0 Likes

Hi Lewis,

I have used multiple BLE apps (nRF connect, LighBlue, BLE tools, BLE scanner, BLE Hero.....) I have not used CySmart however I doubt this would be any different. I have no doubt that the peripheral is working as it should.

It looks like the issue lies at the peripheral side since many of the standard mobile applications are not working. Do you have the access to program the peripheral or send the peripheral project?

In the mean time can you think of any reason why a write with resp would only take effect after a disconnection? It is strange that the characteristic is updated but action not taken. It feels like the connection during the write is never completed? Is this possible?

I could not think of any possible reason for this behavior. This should not happen ideally if the peripheral project is fine (assuming mobile app will not have any issue).

In case when the characteristic is updated and still the peripheral is not working, there might be problem with the peripheral code.

Please try with CySmart App with Windows also along with Android.

It would be difficult to analyze the problem without the project or airlog. So please try to get the airlog. Also, if possible, please attach the truncated version of the project.

Thanks

Ganesh

0 Likes
danielmeyers
Level 1
Level 1
First reply posted Welcome!

Over the last ten years, processors in almost all of our devices have become multi-core. Multicore microcontrollers have followed in their wake. In the catalogs of major manufacturers you can already find general purpose microcontrollers with multiple cores at reasonable prices, but unfortunately they are not adapted to peripheral devices. So it seems to be time to start using multi-core microcontrollers in your own devices, such as a device that can make paper for me on https://writemypapers4me.net/ , of course in those cases where it is justified.

0 Likes