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

PSoC™ 4 Forum Discussions

Anonymous
Not applicable

Hellow everyone, I got a problem when running the official example "Central and Peripheral".

This is the link: PSoC-4-BLE/100_Projects_in_100_Days/Day012_Central_Peripheral at master · cypresssemiconductorco/PSo...

I build the original code from the github without any editing and operation the development kit as a BLE Central (press "s").

Then the problem occurs as fellow:

BLE STACK ON:

s

CyBle_GapcStartScan API Success

Started to Scan

CYBLE_EVT_GAPC_SCAN_PROGRESS_RESULT:

eventType:Connectable undirected advertising

    peerAddrType: RANDOM

    peerBdAddr: 539ace8e86a9

CYBLE_EVT_GAPC_SCAN_PROGRESS_RESULT:

eventType:SCAN_RSP

    peerAddrType: RANDOM

    peerBdAddr: 539ace8e86a9

CYBLE_EVT_GAPC_SCAN_PROGRESS_RESULT:

eventType:Non connectable undirected advertising

    peerAddrType: RANDOM

    peerBdAddr: 37bedc972330

CYBLE_EVT_GAPC_SCAN_PROGRESS_RESULT:

eventType:Non connectable undirected advertising

    peerAddrType: RANDOM

    peerBdAddr: 23ca37a8972e

CY_ISR(IntDefaultHandler)   <=  This is I print in the file "Cm0Start.c" in function "Cm0Start.c"

88                                           <=  This is the value of "errno"

I look up the "error.h" that "88" represent "Function not implemented". (#define ENOSYS 88 /* Function not implemented */)

I have no idea what and where to deal with the problem.

Does anyone can give me any advise?

Thank a lot~~~PSoC 4 MCU Community

0 Likes
1 Solution
Yeshwanth_KT
Employee
Employee
50 replies posted 25 replies posted 10 likes received

Hello,

Navigate to "CYBLE_EVT_GAPC_SCAN_PROGRESS_RESULT" event in the function "StackEventhandler" in main.c.

pastedImage_0.png

You will find the above code in that section.

"peerAddr" is an array of only 8 elements. So the valid way to access the locations is from "peerAddr[0] to peerAddr[7]". But in the program peerAddr[8] is being accessed and that is resulting in a fault.

On line 223 in the above picture, replace '<=' with '<' since the value of CYBLE_MAX_ADV_DEVICES is 8.

This should solve your problem. If you get any more issues please feel free to comment down here.

Thanks,

Yeshwanth

View solution in original post

2 Replies
Yeshwanth_KT
Employee
Employee
50 replies posted 25 replies posted 10 likes received

Hello,

Navigate to "CYBLE_EVT_GAPC_SCAN_PROGRESS_RESULT" event in the function "StackEventhandler" in main.c.

pastedImage_0.png

You will find the above code in that section.

"peerAddr" is an array of only 8 elements. So the valid way to access the locations is from "peerAddr[0] to peerAddr[7]". But in the program peerAddr[8] is being accessed and that is resulting in a fault.

On line 223 in the above picture, replace '<=' with '<' since the value of CYBLE_MAX_ADV_DEVICES is 8.

This should solve your problem. If you get any more issues please feel free to comment down here.

Thanks,

Yeshwanth

Anonymous
Not applicable

What amazing!

It really solves this problem.

Thanks a lot bro, I really appreciate your answer.

0 Likes