Spp communication issue with NUL character

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

cross mob
KaGo_4359196
Level 3
Level 3
First like given Welcome!

Hello,

I am working on CYBT-333047-02 evaluation board (CYW20706 chip), I am using spp example programm from wiced studio.

In order to analyse this program I am using Real term terminal on PC and Serial bluetooth terminal in Android device.

when I send the NUL (00 in HEX) character from android to bluetooth, I am not able to see it on Real term terminal on PC. other than NUL character I can see all other characters and number.

Can anyone please explain me why it is happening so ? what I should change in order to get the NULScreenshot_2019-09-18-11-57-56-144.jpeg character ?

Thank you.Screenshot (7).png

0 Likes
5 Replies
DheerajPK_41
Moderator
Moderator
Moderator
750 replies posted 500 likes received 500 replies posted

Hi Kalpana,

It can be a Real term terminal configuration issue. Could you please try the same experiment with teraterm serial terminal?

If it is not working please let me know which WICED version are you using (Go to C:\Users\username\Documents\WICED-Studio-6.X\version.txt)?

Instruction to test the app is as follows.

Instructions

------------

To demonstrate the app, work through the following steps.

1. Build and download the application to the WICED board.

2. Use standard terminal emulation application such as Term Term to open the WICED Peripheral UART, use baud rate of 115200.

3. Use the computer's 'Add a Bluetooth Device' menu to pair with spp app. That should create an incoming and outgoing COM ports on your computer, see 'More Bluetooth options'.

4. Use application such as Term Term to open the outgoing COM port.

5. By default the spp application sends data on a timer to the peer application.

6. Type any key on the terminal of the outgoing COM port, the spp application will receive the key.

7. Press the application button on the WICED board to send 1 MB data to the Windows.

Thanks,

-Dheeraj

Hello Dheeraj,

Thank you for reply.

I tried it with other terminal program and it is same issue. May be I think the NUL character is treated as string terminator in C program and that's why when I send NUL character it is treated as end of the string. If it is the case, how can I declare it as character instead of string terminator.

please help me with this problem.

My wiced version is  WICED-SDK Version: Wiced_006.004.000.0061 (6.4)

Thank you.

0 Likes

Hi kalpana,

I tried sending '0' from Serial Terminal app to spp device and its printing 30 ( hex of 0 as per ASCII chart) .Its working correctly.

Can you please check?

Thanks,

Anjana

0 Likes

Hello Anjana,

you told your sending Hex of 0 as per ASCII chart and its printing 30 (is it in HEX or ASCII ), if it is in HEX it should print 0 , if it is in ASCII it should print NUL not 30.

I got confused with your answer, Can you explain me clearly?

Thank you.

0 Likes

Hi Kalpana,

Sorry for the confusion.

I am printing hex on my 20706 SPP . Send 0 (as hex) from serial terminal app and printed 0 on 20706 Teraterm.

                                                            Send 0 (as string) from serial terminal app and printed 30 (hex of Character 0) on 20706 Teraterm  

Thanks,
Anjana

0 Likes