Hello There, Guest!
View New Posts  |  View Today's Posts
How connect Rpi to Crestron processor

  • 0 Vote(s) - 0 Average


07-19-2016, 11:51 AM #1
rogeliopúlido
Junior Member
**
Posts: 1 Threads:1 Joined: Jul 2016 Reputation: 0

How connect Rpi to Crestron processor
Hi
I'm triying to connect my raspberry pi to MC3 processor.
I have a python program, which does some function ever a string is entered by the user.
The idea is with a Simple+ module, send to raspberry the string then the raspberry does the function, but I can´t send strings.

I only can connect with Putty (port 22) and always y send a string, the terminal said "Protocol mismatch." 
I tried to send some string using the debugger of Toolbox but does'n work.

07-20-2016, 01:08 PM #2
AceInfinity
Developer
*******
Administrators
Posts: 9,733 Threads:1,026 Joined: Jun 2011 Reputation: 76

RE: How connect Rpi to Crestron processor
You have to use the Crestron TCP client from SIMPL+ in order to feed data back to the Raspberry PI. Connecting to the MC3 via PuTTY (SSH) is essentially like a pseudo SSH because it's actually still just Telnet (and you can also connect on port 23 as normal if it wasn't disabled), and is only used for loading the program and other controller specific things, it has nothing to do with the loaded program unless you've created console commands.

The debugger via Toolbox is only for symbols too, and unless you have stuff within the loaded program in one of the program slots, it's not going to do anything.
This post was last modified: 07-20-2016, 01:15 PM by AceInfinity.


Microsoft MVP .NET Programming - (2012 - Present)
®Crestron DMC-T Certified Automation Programmer

Development Site: aceinfinity.net

 ▲
 ▲ ▲

07-22-2016, 06:12 PM #3
AceInfinity
Developer
*******
Administrators
Posts: 9,733 Threads:1,026 Joined: Jun 2011 Reputation: 76

RE: How connect Rpi to Crestron processor
The questions I would have are:

1) How are you wanting to send the strings back to the RPi? TCP?
2) How are you managing when the Crestron processor sends the string to the RPi? On program load? User console command? Do you have a touchscreen that invokes the send from a button press?

Without answers to these questions, this will not work.

Skeleton SIMPL+:
Code:
#Symbol_Name "TCPIP Client"

#DEFAULT_VOLATILE
#ENABLE_TRACE

#DEFINE_CONSTANT    TCP_MAX_BUFFER       4096
#DEFINE_CONSTANT    TRUE                1
#DEFINE_CONSTANT    FALSE                    0

TCP_Client client[TCP_MAX_BUFFER];
// INTEGER connected, err;

// define your DIGITAL/STRING/ETC... INPUT's and OUTPUT's here...
// perhaps parameters as well for anything constant like a port number or other properties

Function connect()
{
    // call to SocketConnectClient() here
}

Function send_string(String data$)
{
}

// ------------------- EVENTS -------------------
SocketConnect client
{
}

SocketReceive client
{
}

SocketDisconnect client
{
}

CHANGE tx$
{
    // send data here
}

PUSH dispose
{
    // call to SocketDisconnectClient() here
}

FUNCTION Main()
{
    WaitForInitializationComplete();
}

Something along those lines...
This post was last modified: 07-22-2016, 06:30 PM by AceInfinity.


Microsoft MVP .NET Programming - (2012 - Present)
®Crestron DMC-T Certified Automation Programmer

Development Site: aceinfinity.net

 ▲
 ▲ ▲




Forum Jump:



Users browsing this thread: 1 Guest(s)