Receiving data via UART
응답
15. 7. 21 오전 8:12
Hello,

I managed to send data with the XDK via UART but currently I have problems with receiving some.
The function "SER_serialRead" always gives back "2" (what means, that "the requested number of bytes are not present in the driver's buffer"). I also tried to use the function "BLE_hciReceiveData()" which is already implemented. But "SER_serialRead" inside of "BLE_hciReceiveData()" gives back the same error.
So I think it is not a fault in my declaration of the buffers or anything since the function provided from the XDK team is not working as well.

Does anyone have any idea why receiving data is not working?

Thank you for your help!
0 (0 투표)
Receiving data via UART
응답
15. 7. 24 오전 3:40 as a reply to Wang Ben.
Hello,

anyone has any idea what the problems is?

Thank you!
Best regards
0 (0 투표)
Receiving data via UART
응답
15. 7. 29 오후 9:39 as a reply to Wang Ben.
Hello benwang,

I’m extremely sorry for keeping you waiting so long!
We're just going to reproduce your bug in order to give you a good advice.

I will keep you posted.

Regards,
Manuel
0 (0 투표)
Receiving data via UART
응답
15. 8. 3 오전 8:46 as a reply to Manuel Cerny.
Hello Manuel,

thank you for your answer!
I just found the reason for the return value "2". In another thread I found the information, that Pins have to be configured as In or Output manually. So PB10 has to be configured as Input:

  static GPIO_handleInfo_t infoRX;

    infoRX.port = gpioPortB;
    infoRX.bitIndex = 10;
    infoRX.magicWord = GPIO_HANDLE_MAGIC_WORD;

As this is not included in the "BLE_hciReceiveData()" provided by BCDS aswell, this could't work neither.

Best regards

0 (0 투표)
Receiving data via UART
응답
15. 8. 4 오전 5:25 as a reply to Wang Ben.
Hi benwang,

I'm taking over on this thread as Manuel is his well deserved vacation ;)

Before Manuel left, he gave me a short overview over his discoveries regarding UART and the XDK. Unfortunately I wasn't fully able to replicate your setup.
Would you mind sharing the source code you got so far with me, so I can see what you did so far and provide you better support?

If copying all your things into this thread is too much for you, feel free to post your email address here and I'll follow up with you so we can exchange our source code there and post the results later on here.

- Florian
0 (0 투표)
Receiving data via UART
응답
15. 8. 6 오전 4:32 as a reply to Florian Harr.
Hi Florian,

as I wrote a post ago, the problem is solved and the code is running. The problem was the RX-Pin of the XDK which has to be configured as input. I haven't read about this in the documentation so I did not configure the pin at first.

As the configuration is also not included in the "BLE_hciReceiveData()" provided by BCDS, I am wondering if this code is running in your setup?

Best regards!
0 (0 투표)
Receiving data via UART
응답
15. 8. 7 오전 3:39 as a reply to Wang Ben.
Hi benwang,

great to hear that your problem is solved. I didn't realize that in your latest post.

The BLE_hciReceiveData() worked for me the last time I used it, I would wonder if that changed! I'll try it again and let you know.

- Florian
0 (0 투표)