Jump to content
View in the app

A better way to browse. Learn more.

Tinkerunity

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Geschrieben

Hallo zusammen,

 

ich habe gerade folgendes Problem bei der Nutzung der Perl bindings: Nach dem connect zu einem zweiten Stapel ist die Verbindung zum ersten Stapel nicht mehr nutzbar. Folgendes Beispiel:

 

#!/usr/bin/perl

use lib '../bindings/perl/source/lib';

use strict;
use warnings;
use Tinkerforge::IPConnection;
use Tinkerforge::BrickletTemperature;

my $ipcon1  = Tinkerforge::IPConnection->new();
my $b_temp1 = Tinkerforge::BrickletTemperature->new('dHw', $ipcon1);
my $ipcon2  = Tinkerforge::IPConnection->new();
my $b_temp2 = Tinkerforge::BrickletTemperature->new('aH3', $ipcon2);

$ipcon1->connect('tf-1', 4223);
$ipcon2->connect('tf-2', 4223);

print "temp1: " . ($b_temp1->get_temperature / 100.0) . "\n";
print "temp2: " . ($b_temp2->get_temperature / 100.0) . "\n";

$ipcon1->disconnect;
$ipcon2->disconnect;

 

Die Ausgabe ist folgendermaßen:

 

root@pi-1:/opt/tinkerforge/software/display# ./test2.pl
Did not receive response for function 1 in time at ./test2.pl line 18
Perl exited with active threads:
6 running and unjoined
0 finished and unjoined
0 running and detached

 

In C/C++ funktioniert das problemlos.

 

Daten zum System:

root@pi-1:/opt/tinkerforge/software/display# perl -v

This is perl 5, version 14, subversion 2 (v5.14.2) built for arm-linux-gnueabihf-thread-multi-64int
(with 89 registered patches, see perl -V for more detail)
[...]
root@pi-1:/opt/tinkerforge/software/display# lsb_release -a
No LSB modules are available.
Distributor ID:	Debian
Description:	Debian GNU/Linux 7.10 (wheezy)
Release:	7.10
Codename:	wheezy

 

Es ist ein Raspbian Wheezy.

 

Gibt es ein bekanntes Problem mit den Perl Bindings und mehreren IP Connections?

 

Viele Grüße

Robin

Geschrieben
  • Autor

Habe nur ich das Problem mit mehreren IP Connections in Perl? Oder sehe ich gerade den Wald vor lauter Bäumen nicht und mache irgendwas falsch?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Gast
Reply to this topic...

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.