Serial Communication Error

What is the Contents of SerialDataReceivedEventArgs e . May be that you get an ByteArryay or string in e. … ?? and should get the data from there.

@ RoSchmi -
No there you only get some information i guess… but i know that data won’t be accessible from there -.-

Did you recently update the firmware of your BT module ?
How do programs like Teraterm behave when you connect to your module using the serial COM port created by the BT module ?

Try this.

Set a breakpoint after the serial.read() line and then have a look at the read buffer and see if this looks correct. The error may be in the decode or there is something wrong with the data in the buffer so checking what you actually have in the buffer before code conversion might show what is wrong.

1 Like

Ok first of all i checked the data buffer and the data is incorrectly coming from the source, so conversion isn’t the problem here…
After that i tried out different baud rates, just to point out that the BT module reconfigurated itself. I have a baud rate of 1843200 (the BT Module documetation said that this is a low error rate and with my older MCU the serial communication worked fine at this rate) 8n1. I try to reset the BT , but this is only possible via UART, which is not very clever i guess -.-

@ quickshat - I think 1843200 is too fast for a NETMF device. With the GHI Bluetooth module it worked with 460800 (I would first try with 115200). A higher baudrate does not necessarily speed up the application. The bottleneck is usually the NETMF code. What kind of Bluetooth module are you using?

I’m using the Bluegiga WT32i… and guess what… i only can change the baudrate over UART… so stupid
Btw the factory reset is a uart cmd too

I do not know the Bluegiga WT32i but there should be a way of an electrical reset to factory presets by holding special pins low or high when powering up.

@ RoSchmi -
i didn’t find something out :’(

Ok i Finaly Solved the Problem …
It was possible to set a Custom baud Rate via realterm , so i could Change Baud settings !
Thank you for your Great Support !!

1 Like