This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Illegal Command after "02" Connect.

Other Parts Discussed in Thread: MSP430G2553

Hi,

I've recently started working with the CC3000 booster pack connected to a MSP430G2553. I followed the instructions found here using the Basic Wi-Fi application

I was able to connect to my mobile phone AP using the command 

    028godzilla

and getting the response

    DONE
    IP:192.168.43.103

after this I try to open a socket using the command

    03

and get the response

    Illegal Command
    DONE

also try to disconnect using the command

    09

and am met with the same Illegal command DONE response. I am unsure of why this occurring. 

I am using Docklight V2.0 as my terminal program and see no error in communication. Is there something that I have overlooked in the code and need to change? I appreciate any help you're able to give.

Regards,

Luke.

  • Luke,

    you can give it a try to use the CC3000 Basic Wi-Fi Host, it makes things much easier in my opinion.

  • Hi Leo,

    Thank you for your response, however, I am feel confident with using a terminal and also feel that the problem I'm having is not due to the terminal communication.

    For additional information, I have noticed that I can input any command (0x01 -> 0x0b) only once, but after entering a command all commands return the "Illegal Command" print.

    I noticed that the only place this is returned is within the switch statement in the UART handler. I had recently tried adding code in this section to allow for a command that connects to a secured network. As such there may be some error in this section causing the Illegal Command to be wrongly returned. I had uninstalled the Basic WiFi application and re-installed after attempting to restore the code to its initial state. Unfortunately this has not fixed the error. I will attempt this again tonight and report back on the results.

    Regards,

    Luke.

  • As an update :

    I used the MSP430G2553 in debugging mode and was able to execute the commands without receiving the "Illegal command" response. Yet leaving debugging mode and using the device will cause the "Illegal command" response after any command is issued.

    Is this a common problem? If so is there there a work around for this? Simply put, the device works as expected in debugging mode, but not as expected outside of debug mode.

    Regards,

    Luke.

  • Luke,

    that is quite strange. From your description, I think somehow the UART data get corrupted after the first command. Can you make a small test? At the beginning of DemoHandleUartCommand() function, could you echo back the first two bytes of usBuffer parameter? Just like this:

    DispatcherUartSendPacket(usBuffer, 2);

    Then check if the echoed command is the same as the one you sent before.

    I have tested the Basic WiFi application on MSP-EXP430G2 with MSP430G2553 many times as I wrote the host Python script, but can't recall for the same issue you are seeing.

  • Hi Leo,

    thank you again for your response. It would seem that the buffer is being corrupted is causing the fault. As can be seen in the example below . The Ascii character seems to be pushed back and replaced with the ÿ character.

    Additionally, I tested the device with the terminal program PuTTY, rather than Docklight. The commands executed fine without and Illegal Command Returns, as such I have to come to the conclusion that the issue is with the terminal program. Which is odd, as it works in debugging mode. 

    Kind regards,

    Luke.

  • Luke,

    glad to hear the problem is now solved. Anyway I would also recommend to use Tera Term. It is free, and have scripting like functionality.