I am using Arduino Leonardo to transmit an string to a wifi module. The format of command that wifi module can recognize is:

> 
> AT60,1,*content to a server*
> 
> 
> 

I am using an virtual server(TCP/IP Builder) to test the content I can received.

**Here is the content I want to send:**

> 
> smart/device/deviceCmd?userId=1010002003&deviceId=A00019999990002&cmd=ON
> 
> 
> 

Since I try to send it again and again, I use a loop to send it. In the virtual server side, **the content I got is:**

> 
> smart/device/deviceCmd?userId=1010002003&devceId=A00019999990002&cmd=ON
>  smart/device/deviceCmd?userId=1010002003&devceId=A00019999990002&cmd=ON
>  smart/device/deviceCmd?userId=1010002003&dviceId=A00019999990002&cmd=ON
>  smart/device/deviceCmd?userId=1010002003&eviceId=A00019999990002&cmd=ON
>  smart/device/deviceCmd?userId=1010002003&devieId=A00019999990002&cmd=ON
>  smart/device/deviceCmd?userId=1010002003deviceId=A00019999990002&cmd=ON
>  smart/device/deviceCmd?userId=1010002003&dviceId=A00019999990002&cmd=ON
>  smart/device/deviceCmd?userId=1010002003&dviceId=A00019999990002&cmd=ON
>  smart/device/deviceCmd?userId=1010002003&deiceId=A00019999990002&cmd=ON
>  smart/device/deviceCmd?userId=1010002003&dviceId=A00019999990002&cmd=ON
> 
> 
> 

This is the **QUESTION**: There exist one terrible mistake in the content I received, which is the ***deviceId*** part **never correct**. It's so weird.

---

Here is part of related code:
-----------------------------

//In Uart.cpp

```
//These three lines can sent a formatted string as "AT60,1,content"
Serial1.write("AT60,");
Serial1.write(channelID); //channel ID = 1 here
Serial1.write(reportIsFire, 76);

```

//In Uart.h

```
//Definition of the string I need to send, which has 76 characters.
char reportIsFire[76] = ",smart/device/deviceCmd?userId=1010002003&deviceId=A00019999990002&cmd=ON \n";

```

---

Here is few background of this application:
-------------------------------------------

* I am using Arduino 1.5.8 IDE with VisualStudio
* Since the serial buffer of Arduino is only 64 Bytes, I have already
change the buffer size to 128 Bytes in "HardwareSerial.h" to send
out this large string.
* The baud rate is 115200 and I am using Serial 1. I have used Serial 1
to transmit few other characters and it works fine.

I will appreciate that If you have any idea about this question.