Websockets Example Compile Issues


#1

I have the apparently unsupported Dexter Industries WIFI module.

I downloaded the example Websockets files linked at the bottom: http://www.dexterindustries.com/manual/ … b-browser/

I opened up DIWIFI-Websocket-Chrome.c and DIWIFI-Websocket-Chrome.h, hit Compile Program and got 71 errors. :frowning:

File "C:UsersPersonDocumentsRoboticsProgramsDIWIFI-Websocket-Chrome.c" compiled on Jan 14 2015 19:17:36
*Warning*:Substituting similar variable 'playSound' for 'PlaySound'. Check spelling and letter case.
*Warning*:Substituting similar variable 'stopAllTasks' for 'StopAllTasks'. Check spelling and letter case.
*Warning*:Substituting similar variable 'playSound' for 'PlaySound'. Check spelling and letter case.
*Warning*:Substituting similar variable 'stopAllTasks' for 'StopAllTasks'. Check spelling and letter case.
*Warning*:Substituting similar variable 'stringFind' for 'StringFind'. Check spelling and letter case.
**Error**:'*' Indirection levels mismatch. Call to 'nxtWriteRawHS'. Parameter: 'char * pData' is 'byteData' of type 'ubyte'.
**Error**:'*' Indirection levels mismatch. Call to 'nxtWriteRawHS'. Parameter: 'char * pData' is 'newline' of type 'ubyte'.
**Error**:Expression does not fit parameter. Call to 'nxtWriteRawHS'. Parameter: 'char * pData' is 'newline' of type 'ubyte [2]'.
**Error**:'*' Indirection levels mismatch. Call to 'memset'. Parameter: 'void * pToBuffer' is 'buff[0]' of type 'ubyte'.
**Error**:'*' Indirection levels mismatch. Call to 'memcpy'. Parameter: 'void * pToBuffer' is 'buff[0]' of type 'ubyte'.
*Warning*:Substituting similar variable 'stringFromChars' for 'StringFromChars'. Check spelling and letter case.
**Error**:Procedure call Parameters don't match declaration for 'stringFromChars(unsigned string & sToString, char * pFromChars)'
**Error**:'*' Indirection levels mismatch. Call to 'nxtWriteRawHS'. Parameter: 'char * pData' is 'pData' of type 'ubyte &'.
**Error**:'*' Indirection levels mismatch. Call to 'memcpy'. Parameter: 'void * pToBuffer' is 'buf[index]' of type 'ubyte'.
**Error**:'*' Indirection levels mismatch. Call to 'nxtReadRawHS'. Parameter: 'ubyte * pData' is 'BytesRead[0]' of type 'ubyte'.
**Error**:'*' Indirection levels mismatch. Call to 'nxtReadRawHS'. Parameter: 'ubyte * pData' is 'BytesRead[0]' of type 'ubyte'.
**Error**:'*' Indirection levels mismatch. Call to 'nxtReadRawHS'. Parameter: 'ubyte * pData' is 'BytesRead[0]' of type 'ubyte'.
*Warning*:Substituting similar variable 'stringFromChars' for 'StringFromChars'. Check spelling and letter case.
**Error**:Procedure call Parameters don't match declaration for 'stringFromChars(unsigned string & sToString, char * pFromChars)'
**Error**:'const' expressions does not fit. Call to 'find_and_print'. Parameter: 'unsigned string & findme' is '"WebSocket-Key: "' of type 'string'.
**Error**:'*' Indirection levels mismatch. Call to 'nxtReadRawHS'. Parameter: 'ubyte * pData' is 'BytesRead[0]' of type 'ubyte'.
**Error**:'*' Indirection levels mismatch. Call to 'nxtReadRawHS'. Parameter: 'ubyte * pData' is 'BytesRead[0]' of type 'ubyte'.
**Error**:'*' Indirection levels mismatch. Call to 'nxtReadRawHS'. Parameter: 'ubyte * pData' is 'BytesRead[0]' of type 'ubyte'.
**Error**:'*' Indirection levels mismatch. Call to 'nxtReadRawHS'. Parameter: 'ubyte * pData' is 'BytesRead[0]' of type 'ubyte'.
*Warning*:Substituting similar variable 'stringFromChars' for 'StringFromChars'. Check spelling and letter case.
**Error**:Procedure call Parameters don't match declaration for 'stringFromChars(unsigned string & sToString, char * pFromChars)'
*Warning*:Symbol 'nxtDisplayString' is 'deprecated' definition. There may be alternate symbol with equivalent functionality.
**Error**:'const' expressions does not fit. Call to 'writeStr'. Parameter: 'unsigned string & sData' is '"AT+DNSLOOKUP="' of type 'string'.
**Error**:'const' expressions does not fit. Call to 'writeStr'. Parameter: 'unsigned string & sData' is '"www."' of type 'string'.
**Error**:'const' expressions does not fit. Call to 'writeStr'. Parameter: 'unsigned string & sData' is '"dexterindustries"' of type 'string'.
**Error**:'const' expressions does not fit. Call to 'writeStr'. Parameter: 'unsigned string & sData' is '".com"' of type 'string'.
**Error**:'const' expressions does not fit. Call to 'writeStr'. Parameter: 'unsigned string & sData' is '"AT+NCTCP="' of type 'string'.
**Error**:'*' Indirection levels mismatch. Call to 'nxtReadRawHS'. Parameter: 'ubyte * pData' is 'BytesRead[0]' of type 'ubyte'.
**Error**:'*' Indirection levels mismatch. Call to 'nxtReadRawHS'. Parameter: 'ubyte * pData' is 'BytesRead[0]' of type 'ubyte'.
**Error**:'*' Indirection levels mismatch. Call to 'nxtReadRawHS'. Parameter: 'ubyte * pData' is 'BytesRead[0]' of type 'ubyte'.
**Error**:'*' Indirection levels mismatch. Call to 'nxtReadRawHS'. Parameter: 'ubyte * pData' is 'BytesRead[0]' of type 'ubyte'.
**Error**:Expression does not fit parameter. Call to 'nxtWriteRawHS'. Parameter: 'char * pData' is 'byteStart2' of type 'ubyte [3]'.
**Error**:'const' expressions does not fit. Call to 'writeStr'. Parameter: 'unsigned string & sData' is '"GET "' of type 'string'.
**Error**:'const' expressions does not fit. Call to 'writeStr'. Parameter: 'unsigned string & sData' is '"http://"' of type 'string'.
**Error**:'const' expressions does not fit. Call to 'writeStr'. Parameter: 'unsigned string & sData' is '"www."' of type 'string'.
**Error**:'const' expressions does not fit. Call to 'writeStr'. Parameter: 'unsigned string & sData' is '"dexterindustries."' of type 'string'.
**Error**:'const' expressions does not fit. Call to 'writeStr'. Parameter: 'unsigned string & sData' is '"com"' of type 'string'.
**Error**:'const' expressions does not fit. Call to 'writeStr'. Parameter: 'unsigned string & sData' is '"/websocket/"' of type 'string'.
**Error**:'const' expressions does not fit. Call to 'writeStr'. Parameter: 'unsigned string & sData' is '"calc2.php"' of type 'string'.
**Error**:'const' expressions does not fit. Call to 'writeStr'. Parameter: 'unsigned string & sData' is '"?"' of type 'string'.
**Error**:'const' expressions does not fit. Call to 'writeStr'. Parameter: 'unsigned string & sData' is '"name="' of type 'string'.
**Error**:'*' Indirection levels mismatch. Call to 'nxtWriteRawHS'. Parameter: 'char * pData' is 'byteData' of type 'ubyte'.
**Error**:'const' expressions does not fit. Call to 'writeStr'. Parameter: 'unsigned string & sData' is '" HTTP"' of type 'string'.
**Error**:'const' expressions does not fit. Call to 'writeStr'. Parameter: 'unsigned string & sData' is '"/1.1"' of type 'string'.
**Error**:'const' expressions does not fit. Call to 'writeStr'. Parameter: 'unsigned string & sData' is '"Host: "' of type 'string'.
**Error**:'const' expressions does not fit. Call to 'writeStr'. Parameter: 'unsigned string & sData' is '"www."' of type 'string'.
**Error**:'const' expressions does not fit. Call to 'writeStr'. Parameter: 'unsigned string & sData' is '"dexterindustries."' of type 'string'.
**Error**:'const' expressions does not fit. Call to 'writeStr'. Parameter: 'unsigned string & sData' is '"com"' of type 'string'.
**Error**:Expression does not fit parameter. Call to 'nxtWriteRawHS'. Parameter: 'char * pData' is 'byteEnd' of type 'ubyte [3]'.
**Error**:'*' Indirection levels mismatch. Call to 'nxtReadRawHS'. Parameter: 'ubyte * pData' is 'BytesRead[0]' of type 'ubyte'.
**Error**:Array size mismatch. Call to 'memset'. Parameter: 'const char nValue' is 'websocketBuff' of type 'ubyte [128]'.
**Error**:'*' Indirection levels mismatch. Call to 'nxtWriteRawHS'. Parameter: 'char * pData' is 'nData[i]' of type 'ubyte'.
**Error**:'*' Indirection levels mismatch. Call to 'nxtReadRawHS'. Parameter: 'ubyte * pData' is 'BytesRead[0]' of type 'ubyte'.
**Error**:Array size mismatch. Call to 'appendToBuff'. Parameter: 'const ubyte & pData' is 'listen_cmd' of type 'ubyte [11]'.
**Error**:Array size mismatch. Call to 'appendToBuff'. Parameter: 'const ubyte & pData' is 'newline' of type 'ubyte [1]'.
**Error**:'*' Indirection levels mismatch. Call to 'nxtReadRawHS'. Parameter: 'ubyte * pData' is 'BytesRead[0]' of type 'ubyte'.
**Error**:Expression does not fit parameter. Call to 'nxtWriteRawHS'. Parameter: 'char * pData' is 'byteStart' of type 'ubyte [3]'.
**Error**:'const' expressions does not fit. Call to 'writeStr'. Parameter: 'unsigned string & sData' is '"HTTP/1.1 101 "' of type 'string'.
**Error**:'const' expressions does not fit. Call to 'writeStr'. Parameter: 'unsigned string & sData' is '"Switching "' of type 'string'.
**Error**:'const' expressions does not fit. Call to 'writeStr'. Parameter: 'unsigned string & sData' is '"Protocols"' of type 'string'.
**Error**:'const' expressions does not fit. Call to 'writeStr'. Parameter: 'unsigned string & sData' is '"Upgrade: "' of type 'string'.
**Error**:'const' expressions does not fit. Call to 'writeStr'. Parameter: 'unsigned string & sData' is '"websocket"' of type 'string'.
**Error**:'const' expressions does not fit. Call to 'writeStr'. Parameter: 'unsigned string & sData' is '"Connection: "' of type 'string'.
**Error**:'const' expressions does not fit. Call to 'writeStr'. Parameter: 'unsigned string & sData' is '"Upgrade"' of type 'string'.
**Error**:'const' expressions does not fit. Call to 'writeStr'. Parameter: 'unsigned string & sData' is '"Sec-WebSocket-"' of type 'string'.
**Error**:'const' expressions does not fit. Call to 'writeStr'. Parameter: 'unsigned string & sData' is '"Accept: "' of type 'string'.
**Error**:'*' Indirection levels mismatch. Call to 'nxtWriteRawHS'. Parameter: 'char * pData' is 'byteData' of type 'ubyte'.
**Error**:Expression does not fit parameter. Call to 'nxtWriteRawHS'. Parameter: 'char * pData' is 'byteEnd' of type 'ubyte [3]'.
**Error**:'*' Indirection levels mismatch. Call to 'nxtReadRawHS'. Parameter: 'ubyte * pData' is 'BytesRead[0]' of type 'ubyte'.
*Warning*:Substituting similar variable 'stringFromChars' for 'StringFromChars'. Check spelling and letter case.
**Error**:Procedure call Parameters don't match declaration for 'stringFromChars(unsigned string & sToString, char * pFromChars)'
**Error**:Expression does not fit parameter. Call to 'nxtWriteRawHS'. Parameter: 'char * pData' is 'starttx' of type 'ubyte [3]'.
**Error**:'*' Indirection levels mismatch. Call to 'nxtWriteRawHS'. Parameter: 'char * pData' is 'byteData' of type 'byte'.
**Error**:Expression does not fit parameter. Call to 'nxtWriteRawHS'. Parameter: 'char * pData' is 'endtx' of type 'ubyte [2]'.
**Error**:'*' Indirection levels mismatch. Call to 'nxtReadRawHS'. Parameter: 'ubyte * pData' is 'BytesRead[0]' of type 'ubyte'.
*Warning*:Substituting similar variable 'stringFromChars' for 'StringFromChars'. Check spelling and letter case.
**Error**:Procedure call Parameters don't match declaration for 'stringFromChars(unsigned string & sToString, char * pFromChars)'

I am running RobotC 4.27. Any direction as to why this example program didn’t work would be helpful.


#2

Wow, did not know anyone still had these out there and were using them. It’s been years!

The short answer is that RobotC originally (I think back in version 2.0) didn’t have pointers. In the jump to 3 a lot of our code had to be updated to adjust for pointers. Since we didn’t have the wifi module any more, we didn’t update the code for that. It should just be a matter of changing over each of the variables that throws this error to a pointer. I think you just add a “&” or “*” in front of some of the variables!


#3

I bought this from Dexter Industries less than two years ago? I am surprised that it fell out of support so quickly after they stopped selling them.

Anyway I tinkered with trying to add & before items and didn’t get anywhere.

Any further assistance would be greatly appreciated.