hmmm can you run

grep PD_THREADED_IO /root/Bela/core/default_libpd_render.cpp

in the console at the bottom of the IDE and see what it returns?

right, it seems that your update didn't get through, because you should get one extra line

#define PD_THREADED_IO

Can you try to update again? To avoid doubts, this is the zip archive you should use : https://github.com/BelaPlatform/Bela/archive/master.zip

I've been using an old Bela board. I tried the update again (from your zip) but no luck.

I had a newer Bela board in storage so I grabbed that and now everything is working fine.

    giuliomoro

    I did, but the error got cleared during the update process. Can I run the update in my terminal to avoid the console being cleared?

    sure, just uncompress the archive, and run from the terminal Bela/scripts/update_board -y

    2 years later

    Hello

    I am having trouble using [netsend] from Bela to PD running on my laptop. Should the patch running on bela connect to http://192.168.7.2/ or localhost? (i tried both to no avail)

    I am able to successfully send data from my laptop to bela via [netsend] to http://192.168.7.2/, so it rules out the issues described in the thread above.

    thank you
    James

    What is created by the USB driver is a local network between Bela and the host computer, where each device has a different IP:

    • host computer is 192.168.7.1
    • Bela is 192.168.7.2

    As usual, each device can send data to itself at the IP address 127.0.0.1, or equivalently the named server localhost.

    Therefore the host would use the following to send to Bela:

    [loadbang]
    |
    [connect 192.168.7.2(
    |
    [netsend]

    and Bela would use the following to send to the host:

    [loadbang]
    |
    [connect 192.168.7.1(
    |
    [netsend]

    Hey thank you for the quick and detailed reply (as always!)

    For some reason my network shows 2 bela devices (I only have one)

    alt text

    so I had to use the secondary address of 192.168.6.1 instead of 192.168.7.1 to send from the board.

    Not sure why that happened but I'll remember to check that next time.

    cheers

      jamesstaub For some reason my network shows 2 bela devices (I only have one)

      this is explained here.

      jamesstaub so I had to use the secondary address of 192.168.6.1 instead of 192.168.7.1 to send from the board.

      That's unexpected to me, I would have expected that either would work. Does the 192.168.7.1 not work?

        giuliomoro no it did not work when my network was showing both. After disconnecting and reconnecting I've got only the .7 address and that's working again

        that's confusing and needs investigation. You may want to disable one of the two networks, e.g.: disable it on the macos side, or by removing the related entries in /etc/network/interfaces and /etc/dhcp/dhcpd.conf on the board (you should reboot after editing, but be careful that a corrupted file may mean you won't be able to connect back to the board, so make sure you backup your projects first).

        3 years later

        Hi, I've got some issue with the [netsend] module on Bela Mini- from what I've observed so far the situation is as follows:

        I run Bela Mini in standalone mode (i.e. not connected to the laptop) and I'm using a wifi dongle to connect to a network. Pure Data patch sends out some data in OSC protocol via [netsend]. Every now and then the whole patch restarts. My suspicion is that it happens due to the loss of connection to the network - the patch crashes when I try to send out some data via OSC (e.g. I press a button which sends a midi note number). The only time it happend while Bela was connected to the laptop, there was some info printed out in the IDE console, but I've neglected to copy it (when I'm trying to recreate the situation now with Bela connected to the laptop, strangely it doesn't happen, even if I turn off the wifi router to which Bela is connected). So I don't have any report from the console that I could post here, unfortunately.

        The main question, though, is as follows: is there a way to make [netsend] behave the same way it does when Pd runs on a laptop - i.e. when the device disconnects from the network, rather than crash, [netsend] sends "0" to it's left outlet, which could be used to try and reestablish the connection? I don't mind if I loose snippets of OSC data every now and then, but a crash and a restart is a major problem for me.

        After it crashes , log onto the board and access the log with journalctl -u bela_startup -n 2000 --boot | cat and see if there is any useful information there.

        I've managed to recreate the situation. Here's the info from the Bela IDE console:

        I/O thread warning: Error on outgoing socket. Discarding 0 bytes of anoutgoing packet of size 16
        I/O thread warning: failed sendto(63, 0x4a0840, 16, 0, 0xb587bd70, 16) call: 101 Network is unreachable
        Segmentation fault
        make: *** [runide] Error 139
        Makefile:613: recipe for target 'runide' failed
        Bela stopped

        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.

        alt text

          a month later

          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?