Panda II Hardware Mods for Serial De-Bugging

I have been searching around for the answer on how to debug over serial, but I am still unclear.

It was said that it could be read here … … But the link is down.

Can anyone please describe to me in detail how to do this? Modding a USB cable?

Thanks for the help!

Edit: My main reason for doing this is to be able to get the Panda II to act as a USB client through USB

Serial debugging is as simple as connecting a USB-Serial (TTL) device to the COM1 serial pins on your Panda, and jumpering MODE.

you can’t just mod a USB cable for this, you need a TTL to USB serial adapter. Modding a cable is all about USB host on the single USB port on the USBizi100 devices.

Also, the document your link was about is available from on the first tab.

Alternatively, you can use an RS-232 to TTL level converter, such as Arduino RS232 to TTL Converter with DB9 (MAX202) - DFRobot (cheaper can be found) and connect to your PC’s COM port, if you have one, using a serial cable. I’ve used both Brett’s recommended method and the RS-232 method with great success. The converter is important, as the Panda runs 0V-5V and RS-232 out of your PC runs -12V to 12V.

Incidentally, I am currently using a TTL to convert to RS-232 and then using a dongle to convert the RS-232 to virtual com over USB. Why? Because I have COM1 all wired up for RS-232 on the Panda II, but no available COM ports on this new dev machine.

Thanks for the Reply’s

Ok, So I have a TTL to RS232 Converter. So All that is needed is hooking it up to COM1 RX ans TX and then you said jumping MODE to GND ?

Also, just out of curiosity, I could ditch the Serial idea and use a USB cable into COM1 correct ? Also, then could I debug over COM1 and then use the Micro USB port to act as a mass storage device?


Ok, so this is what I did. I only had a Serial to UART converter, so from COM1 I ran it into the UART-Serial then the serial line into my RS232-USB converter (since I dont have a RS232 port on my computer.

I have the Mod pin jumped to ground. But I am not getting a response from the device?

Shouldn’t all this craziness work?

You should start by this, keep on using USB for debugging like you always do. Add your TTL to USB converter to COM1 and then open COM1 on code and send data. Make sure this data is actually sent. A terminal software is what you need, like teraterm.

Once that is working and you can send and receive data from terminal, now connect MOD low and try to deploy from serial.

That sounds good, except I don’t have a TTL to USB, just Uart to Serial and Serial to USB.

Is there a way to deploy Mass storage code, then restart the device to boot into mass storage mode? I was reading/following this threads advice, but no luck.


I feel like I might be wondering too far off my objective. What is essentially needed to make the Panda II appear as a Mass Storage device?

My Brain hurts… : )

That is the next step. First get it to work as explained and then we can go over mass storage.

You may be able to use the UART to Serial and Serial to USB together. See my picture in the post above. I have a UART to Serial converter on the stackable shield connected to the Panda, then a Serial To USB converter (the blue plug) going to a USB cable extender and back to the PC USB port.

As for mass storage, I agree with Gus. Get the debugging over COM1 working first, it will make your coding so much easier in the long run. Don’t give up, you are actually quite close to your goal.

Ok, So I think I have everything setup correct. I am debugging over USB and trying to send data out of the COM1. I followed the UART-PC tutorial using the below code, and I am not seeing anything in my TeraTerm connection. The code bulds successfully, however when I debug, at the end of the output window I see Error: a3000000

using System.Threading;
using System.IO.Ports;
using System.Text;
namespace MFConsoleApplication1
    public class Program
        public static void Main()
            SerialPort UART = new SerialPort("COM1", 115200);
            int counter=0;
            while (true)
                // create a string
                string counter_string = "Count: " + counter.ToString() + 
                // convert the string to bytes
                byte[] buffer = Encoding.UTF8.GetBytes(counter_string);
                // send the bytes on the serial port
                UART.Write(buffer, 0, buffer.Length);
                // increment the counter;

I believe that a3000000 usually means the firmware on the device does not match the SDK version. check thr rest of the messages in the output window.

an update of the firmware is usually what is required.

Its a brand new device and it has worked with other sample programs.

You should always update the firmware on a brand new device.

I ran the firmware updater before starting and this is the firmware version the deivce: 4.1.2821.0

Is that the most up to date?

It is not important that it is the most up to date but it is important to be a match between what you have on your PC and what is on the device. Our free beginner guide ebook details this.

Right. I am using SDK 4.1 and such. Maybe could it be because I am referencing an assembly from 4.2?

If using 4.1 then you should always use 4.1 everything. I think this page would help too GHI Electronics – Where Hardware Meets Software