Hi,
LanBox + switchpack + pd works !
One thing I still haven't figured out though: When the tcpclient connection dies after a while I can only restore it by sending |disconnect( first and then connecting again. I can do this every 12 messages or so (see patch below), but this can't be the good way, because in the real situation, the messages will have variable timings. Disconnecting and reconnecting before every message seems to get messy and some messages get lost. Why doesn't the 'keep connection alive' section of the lanbox patch take care of this ? I'm under the impression that tcpclient doesn't actively send a 0 on its outlet when the connection dies on its own, but only when you send it a disconnect message. What's the best way make sure there is a connection before sending a message ?
following are ± the steps it took to make it work in the first place:
The 5 pin output of the lanbox has to go into a 3 pin DMX input on the switchpack. soldered an adaptor cable as in the lanbox user manual p13 (first I made a mistake here, wich wasted me lots of time)
on the switchpack: (12 channel DMX switchpack from 'skytec', can't find alot of info on it.) put the it in DMX mode, indicaded on the display by 'd - - .', and check if the base DMX channel is 1 by pressing 'up'.
on windows: Connect lanbox and pc with crossed ethernet cable. Establish a connection by assigning the computer the static IP 192.168.1.10, then opening LCEdit+ > file > new...enter password 777 when asked. Update Lanbox firmware with the version from the CD with LCEdit+. (not sure this was absolutely necessary) Do a little test by placing a switch object on the stage and see if the switchpack responds.
on linux (ubuntu 6.06): assign the computer the static IP 192.168.1.10 in System > Administration > Networking > Ethernet connection > Properties > Configuration > Static IP address open the patch lanbox1_test.pd, ( http://www.timvets.net/software/pd/lanbox_test.tar.gz ) which is based on Cyrille Henry's lanbox.pd patch. (needs [tcpclient], [makesymbol])
-> should now have nice running-lights pattern going on the switchpack :p ->thank you's to cyrille, mik, pd-list...!
Tim
tim wrote:
Hi,
LanBox + switchpack + pd works !
One thing I still haven't figured out though: When the tcpclient connection dies after a while I can only restore it by sending |disconnect( first and then connecting again. I can do this every 12 messages or so (see patch below), but this can't be the good way, because in the real situation, the messages will have variable timings. Disconnecting and reconnecting before every message seems to get messy and some messages get lost. Why doesn't the 'keep connection alive' section of the lanbox patch take care of this ? I'm under the impression that tcpclient doesn't actively send a 0 on its outlet when the connection dies on its own, but only when you send it a disconnect message. What's the best way make sure there is a connection before sending a message ?
[tcpclient] outputs the connection state on its third outlet. Does this work for you? I would [select 0] on that outlet and use the bang to reconnect. Any idea why the connection dies?
Martin
Martin Peach a écrit :
tim wrote:
Hi,
LanBox + switchpack + pd works !
One thing I still haven't figured out though: When the tcpclient connection dies after a while I can only restore it by sending |disconnect( first and then connecting again. I can do this every 12 messages or so (see patch below), but this can't be the good way, because in the real situation, the messages will have variable timings. Disconnecting and reconnecting before every message seems to get messy and some messages get lost. Why doesn't the 'keep connection alive' section of the lanbox patch take care of this ? I'm under the impression that tcpclient doesn't actively send a 0 on its outlet when the connection dies on its own, but only when you send it a disconnect message. What's the best way make sure there is a connection before sending a message ?
[tcpclient] outputs the connection state on its third outlet. Does this work for you? I would [select 0] on that outlet and use the bang to reconnect. Any idea why the connection dies?
the lanbox does have a timeout on the connection. usually, sending a command every 30s solve the problem.
some test on the "keep connection alive" part of the patch sould be made, but i don't have a lanbox anymore.
cyrille
Martin
some test on the "keep connection alive" part of the patch sould be made, but i don't have a lanbox anymore.
cyrille
CommonSet16BitMode Off (which is 8 bit mode) seems to work. Here's lanbox.pd with the change made.
Tim
#N canvas 105 25 886 579 10; #X obj 46 30 inlet; #X msg 46 78 disconnect; #X text 258 98 IP and port number of the lanbox; #X text 47 523 password (ascii value of : 777); #X obj 46 54 route 0 1; #X obj 104 240 sel 0 1; #X msg 111 265 stop; #X msg 137 317 1; #X msg 104 317 0; #X obj 104 345 f; #X obj 46 212 tcpclient; #X obj 110 421 list2symbol; #X msg 182 398 symbol _; #X msg 314 500 connected; #X obj 314 524 print lanbox; #X obj 110 448 sel 101_110_116_101_114_32_112_97_115_115_119_111_114_100_32_58 99_111_110_110_101_99_116_101_100; #X msg 46 504 send 55 55 55 10; #X obj 182 376 loadbang; #X msg 75 100 connect 192.168.1.77 777; #X obj 292 292 outlet; #X msg 134 181 send 42 54 53 48 48 35 10; #X obj 134 154 metro 10000; #X obj 137 290 delay 5000; #X connect 0 0 4 0; #X connect 1 0 10 0; #X connect 4 0 1 0; #X connect 4 1 18 0; #X connect 4 2 10 0; #X connect 5 0 6 0; #X connect 5 0 8 0; #X connect 5 1 22 0; #X connect 6 0 22 0; #X connect 7 0 9 0; #X connect 8 0 9 0; #X connect 9 0 21 0; #X connect 10 0 11 0; #X connect 10 2 5 0; #X connect 10 2 19 0; #X connect 11 0 15 0; #X connect 12 0 11 1; #X connect 13 0 14 0; #X connect 15 0 16 0; #X connect 15 1 13 0; #X connect 16 0 10 0; #X connect 17 0 12 0; #X connect 18 0 10 0; #X connect 20 0 10 0; #X connect 21 0 20 0; #X connect 22 0 7 0;
ok, i'll look at this and commit it as soon as i have a real internet connetion. cyrille
tim a écrit :
some test on the "keep connection alive" part of the patch sould be made, but i don't have a lanbox anymore.
cyrille
CommonSet16BitMode Off (which is 8 bit mode) seems to work. Here's lanbox.pd with the change made.
Tim
#N canvas 105 25 886 579 10; #X obj 46 30 inlet; #X msg 46 78 disconnect; #X text 258 98 IP and port number of the lanbox; #X text 47 523 password (ascii value of : 777); #X obj 46 54 route 0 1; #X obj 104 240 sel 0 1; #X msg 111 265 stop; #X msg 137 317 1; #X msg 104 317 0; #X obj 104 345 f; #X obj 46 212 tcpclient; #X obj 110 421 list2symbol; #X msg 182 398 symbol _; #X msg 314 500 connected; #X obj 314 524 print lanbox; #X obj 110 448 sel 101_110_116_101_114_32_112_97_115_115_119_111_114_100_32_58 99_111_110_110_101_99_116_101_100; #X msg 46 504 send 55 55 55 10; #X obj 182 376 loadbang; #X msg 75 100 connect 192.168.1.77 777; #X obj 292 292 outlet; #X msg 134 181 send 42 54 53 48 48 35 10; #X obj 134 154 metro 10000; #X obj 137 290 delay 5000; #X connect 0 0 4 0; #X connect 1 0 10 0; #X connect 4 0 1 0; #X connect 4 1 18 0; #X connect 4 2 10 0; #X connect 5 0 6 0; #X connect 5 0 8 0; #X connect 5 1 22 0; #X connect 6 0 22 0; #X connect 7 0 9 0; #X connect 8 0 9 0; #X connect 9 0 21 0; #X connect 10 0 11 0; #X connect 10 2 5 0; #X connect 10 2 19 0; #X connect 11 0 15 0; #X connect 12 0 11 1; #X connect 13 0 14 0; #X connect 15 0 16 0; #X connect 15 1 13 0; #X connect 16 0 10 0; #X connect 17 0 12 0; #X connect 18 0 10 0; #X connect 20 0 10 0; #X connect 21 0 20 0; #X connect 22 0 7 0;