Proximity shield + BLE - Not working

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

cross mob
Anonymous
Not applicable

Hi there,

   

I made a project on the Psoc 4200 (non ble version) and I want to move it to Psoc4 4200BLE, so I did the following:

   

-changed target device

   

-updated components

   

-changed the pins (I looked at the board and shield and 'matched' the pins) both for the shield and leds and proximity loop, also chenged the target for the rgb led (as I am using it in my project)

   

My project runs based on a 1ms task that calls 2 sensors and interprets the movement (on one axis) as swipe or swipe & hold or reset. Based on what it detects it drives a state machine and that way I call the appropriate functions for what I want to do.

   

What I want to do with the 4200ble send those commands (as a uint8) via BLE from CySmart (next step being an phone app). What I want to get is a behavior like this: I send 1 I want to execute the command X, if I send 2 command Y, etc. all while my original program still works and it reads for gesture input via Proximity shield.

   

I looked at the Cypress Youtube video "How to Create a PSoC BLE App" and I just added in my project a BLE component and configured it in a similar way (my service should just read one value, and according to it register a gesture and then call the appropriate function) and also I wrote the code as showed in the video (for the Handler).

   

Now, my problem is that nothing from my original project works anymore, not the Proximity Shield(LEDs don't light up when I hover my hand above and not sensors are red to register gestures); the BLE component sort of works, only that sometimes (like 4/5 tries) it will display the error message "Exchange GATT MTU Size timed out"(gpm.M0117) and also it will fail to reconnect after I disconnect.

   

My reading gesture is based on task (for now I decided to call it every 1ms) and my BLE handler (via "CyBle_ProcessEvents") is called each 100ms.

   

What should I do? Is there a compatibility problem with the shield working in the same time with the BLE? How do I configure the Psoc4200BLE to work with that shield?

   

Where do I find some example code on how should I configure and write some code so that the BLE will just recieve one number and send it to some function that will do something?

0 Likes
1 Solution
Anonymous
Not applicable

I figured it out: just deleted the ble component and reconfigured it again. I don't know what could have been the problem, but now everything just works. 

   

Thank you for your quick answer.

View solution in original post

0 Likes
4 Replies
rola_264706
Level 8
Level 8
50 likes received 25 likes received 10 likes received

Please post your code.

0 Likes
Anonymous
Not applicable

I can't seem to be able to include the code in my post. Is it because it's too long?

   

(I tried to just copy-paste the EventHandler)

0 Likes
rola_264706
Level 8
Level 8
50 likes received 25 likes received 10 likes received

Select file in Psoc Creator and then click on Create_workplace_bundle and then Select minimal in the window that opens and click Archive button. Then click Add Attachments in the new comment window and  then click upload.

0 Likes
Anonymous
Not applicable

I figured it out: just deleted the ble component and reconfigured it again. I don't know what could have been the problem, but now everything just works. 

   

Thank you for your quick answer.

0 Likes