r/crestronprogramming • u/alexz99tt • Aug 09 '19
Issues with VPTComServer library
I am working on a project where I connect to a crestron processor and upload .lpz files in specified program slots. I need to check the IPTables, basically when I check in text console and type "ipt -p:all", I get a list of IP-ID and their stats.
So, what I need to do is to either create a crestron script or .NET console application with VPTServer where it waits for, lets say, 10 programs uploaded in a processor to initialize for like 1-2 minutes then I can run ipt command. After that, I have to somehow check whether all the IP ID are at "NOT REG", where, if at least one IP ID is NOT REG, then it fails.
So, for this part, I'm trying to use VPTComServer. I went to Toolbox Reference under 'Help' drop-down, scrolled down in the left hand side and saw Visual Basic Interface.
I created a ConsoleApp .NET core and included VptComServer.exe reference, I created a VptSession object, then I tried to connect using OpenSession(IP address, name). After I run the code, visual studio goes in Break Mode, I've tried C# and VB but still the same problem. Don't know exactly why, maybe that the Library is old or?
Code: https://prnt.sc/oqofbv
Error: http://prnt.sc/oqofyd
I've been researching and asking questions in Crestron tech support for awhile, still no answers. So, what can I do to resolve this issue with the Break Mode?
Thank you.
3
u/geauxtig3rs Aug 10 '19
I'm guessing that .netCore doesn't like something being used in VptComServer. That would explain the break state. You're trying to access unsupported assemblies.
I'm not completely certain why you would use VptComServer instead of something like OpenSSH (or I think .net core supports ssh out of the box now).
Alternatively as others have mentioned, you can use the edk, but that's just running .net assemblies when it really comes down to it. You can get inside of it and see exactly what the cmdlets are doing. You may want to rip them apart and see how they are accessing the data. I think it's using raw sockets for ctp and telnet (ctp is port 41795) and using renci ssh for ssh.
I would probably recommend using ssh for your communications anyway. Newer firmwares are disabling telnet and ctp out of the box for processors, and if you've built your system on top of that, you're going to run into serious issues as new firmware gets rolled out to your devices.
2
u/parkthrowaway99 Aug 10 '19
I have no idea what your issue might be, but I would approach that problem with powershell and the EDK (search for it on labs). Mike Gallo has spent a lot of time documenting and implementing very reliable interfaces to Crestron console. You can always run powershell from c#.
1
u/dieselbangerz Aug 10 '19
If I recall, NOT REG typically indicates the IP ID is referenced in another program, or the table entry has been modified without restarting the program slot associated with it.
Is it one device that is regularly doing this?
Are you dumping 10 programs and sending progload -p:all?
1
u/dieselbangerz Aug 10 '19
Okay - but understand this - the problem is not normal, and it’s not something you should need to be checking for after every program load. NOT REG indicates either a duplicate IP ID or a possible timing issue with how multiple programs on a single processor start. These are issues that need to be corrected in the program.
EISC: Ethernet inter-systems communication
If this happens regularly enough that you need to develop tools to spot the issue, there’s another problem altogether - and I’m trying to help you find it. You need to move away from trying to figure out how to check for NOT REG and figure out why it’s happening in the first place.
Gonna go out on a limb here and say there’s no one else jumping in with shortcuts of how they search for NOT REG iptable entries - because no one has ever needed to do it.
If you’re still intent on monitoring the IP ID connection, you’re better off using a device extender in SIMPL and sending a notification for any IP ID you know shouldn’t be “offline” after a program load. NOT REG will show as offline. But again, this usually indicates program issue of some kind.
1
u/[deleted] Aug 10 '19
[removed] — view removed comment