Tobias Posted July 18, 2017 at 02:10 PM Share Posted July 18, 2017 at 02:10 PM Hallo, ich suche jetzt schon eine ganze Weile verzweifelt eine Lösung so folgendem Problem: function matlab_example_simple() import com.tinkerforge.IPConnection; import com.tinkerforge.BrickletIndustrialDigitalIn4; HOST = 'localhost'; PORT = 4223; UID = 'oae'; % Change XYZ to the UID of your Industrial Digital In 4 Bricklet ipcon = IPConnection(); % Create IP connection idi4 = handle(BrickletIndustrialDigitalIn4(UID, ipcon), 'CallbackProperties'); % Create device object ipcon.connect(HOST, PORT); % Connect to brickd % Don't use device before ipcon is connected % Get current value as bitmask valueMask = idi4.getValue(); fprintf('Value Mask: %s\n', dec2bin(valueMask)); input('Press key to exit\n', 's'); ipcon.disconnect(); end Dieser Code ist ein Beispiel-Code von tinkerforge.com. Er führt bei mir in Matlab zu folgendem Fehler: Error using spielwiese (line 12) Java exception occurred: com.tinkerforge.NetworkException: Could not create socket: Connection refused: connect at com.tinkerforge.IPConnectionBase.connectUnlocked(IPConnectionBase.java:513) at com.tinkerforge.IPConnectionBase.connect(IPConnectionBase.java:469) Caused by: java.net.ConnectException: Connection refused: connect at java.net.DualStackPlainSocketImpl.connect0(Native Method) at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source) at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source) at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source) at java.net.AbstractPlainSocketImpl.connect(Unknown Source) at java.net.PlainSocketImpl.connect(Unknown Source) at java.net.SocksSocketImpl.connect(Unknown Source) at java.net.Socket.connect(Unknown Source) at java.net.Socket.connect(Unknown Source) at java.net.Socket.<init>(Unknown Source) at java.net.Socket.<init>(Unknown Source) at com.tinkerforge.IPConnectionBase.connectUnlocked(IPConnectionBase.java:511) ... 1 more Auf meinem alten PC (Windows 7, Matlab 2014b) konnte ich die Verbindung ganz normal aufbauen. Seit ich den neuen PC habe (Windows 10, Matlab 2017a) funktioniert es leider nicht mehr. Habe mich ganz genau an die Installationsanleitung von https://www.tinkerforge.com/de/doc/Software/API_Bindings_MATLAB.html#api-bindings-matlab-install gehalten. Hat jemand eine Idee, woran das liegen könnte? Vielen Dank! Quote Link to comment Share on other sites More sharing options...
photron Posted July 18, 2017 at 02:24 PM Share Posted July 18, 2017 at 02:24 PM Hast du den Brick Daemon auch wieder installiert? Quote Link to comment Share on other sites More sharing options...
Tobias Posted July 18, 2017 at 05:55 PM Author Share Posted July 18, 2017 at 05:55 PM Oh, ich bin so doof... Das hatte ich vergessen. Ist schon so lange her... Jetzt funktioniert es. Vielen Dank! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.