Nice, how do I reproduce the issue?
Basic [netsend]/[netreceive]
- Edited
You should be able to reproduce the issue by running this patch on Bela mini: https://krzysztofcybulski.com/netsend_test.pd
It implies that Bela has a wifi dongle and tries to connect to a network. The issue happens when the network is not present (i.e. router turned off).
In the patch, I've tried to create a workaround - there's a [spigot] module, which is supposed to stop date being sent to [netsend] while the network is not available, but it doesn't seem to work. There's also a supposed auto-reset function - every time [netsend] sends out "0" to its left output, it attempts to reconnect after 1000 ms.
I've recently tested the auto-reset function that I've implemented in the patch above and it works perfectly on a laptop, but no success on a Bela Mini. Bela always seems to restart whenever the connection is lost.
I didn't manage to reproduce the issue with the crash upon connection loss. What's the version number Pd on Bela that you see on patch startup? Maybe try updating your Bela code to the latest from the dev
branch and see if that works?
Thank's a lot for checking it for me!
giuliomoro What's the version number Pd on Bela that you see on patch startup?
bela stdbuf[633]: pd 0.51.4
I'm also not sure what it means:
giuliomoro try updating your Bela code to the latest from the dev branch
I suppose it's some different kind of update from the regular, IDE-based "UPDATE BELA" procedure?
it's the same procedure, just using the dev
branch. It's explained here "updating to an experimental release"
giuliomoro Thx!
Does the pd version number ( pd 0.51.4 ) look suspiciously outdated to you?
it doesn't seem too bad, but updating to the latest version will make sure we are testing on the very same version.
krzysztofcybulski The issue happens when the network is not present (i.e. router turned off).
is this when the network is not present from the beginning or when it is present when the program starts but is switched off while it's running?
- Edited
giuliomoro is this when the network is not present from the beginning or when it is present when the program starts but is switched off while it's running?
Thanks for asking, it definitely happens each time I'm booting Bela while the network is not present. The Pd patch restarts over and over until I turn on the router, and it eventually connects and the patch continues as desired. Strangely enough, when I purposefuly turn the router off, it doesn't always make the Pd patch restart. However, the patch seems to restart spontaneously at random moments (although very seldom - I thing I've only encountered it once or twice) and it definitely restarts when I walk away from the router far enough so that Bela is not within the reach of the network. The real problem, though, is when the patch seems to be connected for a period of time and I try to send some OSC from the patch and it suddenly restarts.
In general, it's not that much of an issue as it usually happens only while I turn on Bela (sometimes the Pd patch would restart a couple of times before settling, or would restart once or twice while trying to send out some data over OSC) and when it eventually settles, it stays on for hours. Neverteless, I'm using two Bela-powered instruments for a piece on a major contemporary music festival and I'd like to exclude the possibility of the issue taking place in the middle of the performance...
I've just updated Bela from the dev branch and it doesn't seem to change anything.
krzysztofcybulski ttps://krzysztofcybulski.com/netsend_test.pd
Does this still work to reproduce the issue?
I also thought - if you still got some capacity for trying to recreate the issue - that it would be best if you try with the actual patch, which is here: https://krzysztofcybulski.com/netsend_issue.pd
It should produce three high "ring" tones, followed by a lower one and again a high one, then it's only some low frequency pulse wave. When I run it on the Bela mini and there's no network around, the patch restarts during the lower "ring" tone (which is supposed to indicate a succesful connection).
What settings are you running this with?
[connect 255.255.255.255 52000(
really?
What does your network configuration look like for that to be a valid address?
I'm not really sure what seems to be invalid with this address, althoug I know next to nothing about networking, honestly - 255.255.255.255 is for broadcasting to any other stuff (i.e. instruments) connected to the same network, 52000 is just an arbitrary number - I was advised to pick a high number at som point trying to resolve the issue.
Well I have never seen it used before, but I see how it may work...
Hmmm can you try broadcasting to a specific network instead (Directed Broadcast)? That normally is the address of the device on the network
but replacing the last value with 255. E.g..: if your device has address 192.168.1.10 on the wifi netwrok, try sending to 192.168.1.255
More generally, it's the broadcast address shown for a specific netwrok when you do ip a
OK will try that! Thanks!
- Edited
So - switching to Directed Broadcast doesn't seem to change anything.
I was trying to get Pd on a laptop to behave in the same way (i.e. crash when the network is not present) and [netsend] doesn't indicate that it's disconnected even when it actually is (i.e. router turned off). Which seemed puzzling, but I've found this info on pd.iem.sh website:
"As of 0.51, Pd supports IPv6 addresses, netsend -u (UDP) is fully “connectionless” and no longer closes if no one receives a UDP message"
which seems to explain it. However, shouldn't it behave the same way on Bela, as the pd version I have now is 0.51.4?
And also, Isn't UDP supposed to work that way anyway?
And most of the above doens't make much sense, as I've just realised that for the IPv6 to work, the address would have to be in a different format.