Q:

Bash: Permission denied when trying to echo data directly to Network

I am trying to send characters directly to the network stack as explained in this thread. 
Even when the process work OK under CygWin (Windows), the same lines do fail on Ubuntu v14.04:
luis@Zarzamoro:~$ sudo echo -e "\xff">/dev/udp/255.255.255.255/4000
-bash: connect: Permission denied
-bash: /dev/udp/255.255.255.255/4000: Permission denied

Tested on Ubuntu for PC:
luis@Lamborghini:~$ bash --version
GNU bash, versión 4.3.11(1)-release (i686-pc-linux-gnu)

And Ubuntu for RaspBerry Pi 2:
luis@Zarzamoro:~$ bash --version
GNU bash, version 4.3.11(1)-release (arm-unknown-linux-gnueabihf)

Doing this via direct character sending to NIC instead of by using netcat or socat could be useful for some routers or embedded devices (like NAS) that have a rather modern Bash version, but don't allow (or it is awkward to achieve) installation of extra tools.   
Why is this happening and how could I solve it? 
Tested too:
luis@Zarzamoro:~$ sudo bash -c 'echo -e "\xff" >/dev/udp/255.255.255.255/4000'
bash: connect: Permission denied
bash: /dev/udp/255.255.255.255/4000: Permission denied

And:
luis@Zarzamoro:~$ echo -e "\xff" | sudo tee /dev/udp/255.255.255.255/4000
tee: /dev/udp/255.255.255.255/4000: No such file or directory
▒
luis@Zarzamoro:~$

New info from @Emeric: the problem seems to affect only to broadcast address(es):
luis@Zarzamoro:~$ sudo bash -c 'echo -e "\xff" >/dev/udp/192.168.11.255/4000'
bash: connect: Permission denied
bash: /dev/udp/192.168.11.255/4000: Permission denied
luis@Zarzamoro:~$ sudo bash -c 'echo -e "\xff" >/dev/udp/192.168.11.1/4000'
luis@Zarzamoro:~$

Tested failing too on Kali Linux v1.1.0 with Bash v4.2.37:
luis@Lamborghini:~$ sudo lsb_release -a
No LSB modules are available. 
Distributor ID: Kali
Description:    Kali GNU/Linux 1.1.0
Release:        1.1.0
Codename:       moto
luis@Lamborghini:~$ bash --version
GNU bash, versión 4.2.37(1)-release (i486-pc-linux-gnu)
Copyright (C) 2011 Free Software Foundation, Inc.

luis@Lamborghini:~$ sudo bash -c 'echo -e "\xff" >/dev/udp/192.168.11.255/4000'
bash: connect: Permiso denegado
bash: /dev/udp/192.168.11.255/4000: Permiso denegado

Tested failing too on Bash from Conceptronic CH3SNAS (a NAS with 2 HDDs) installed via Fun_Plug:
sh-4.1# bash --version
GNU bash, version 4.1.11(2)-release (arm-ffp-linux-uclibc)
sh-4.1# su
sh-4.1# echo -e "\xff" > /dev/udp/255.255.255.255/4000
sh: connect: Permission denied
sh: /dev/udp/255.255.255.255/4000: Permission denied

A:

Edited following OP's clarification on the use case:
You can not do that using the latest official release of bash (currently 4.3.30 according to this page).  lib/sh/netopen.c shows that bash opens a UDP socket (SOCK_DGRAM) then directly tries to connect without looking at the ip address to determine whether it would make sense to set specific socket options (in your case SO_BROADCAST). 
Your best bet would be to send a patch to current bash maintainers or the appropriate mailing list, have it included in the official releases, then wait until the rather modern bash version in your NAS gets updated to an even more modern version including your feature. 
Short answer: bash can currently not do that. 
Previous answer:
You have to resort to socat:
$ echo -e "\xff" | socat - UDP-DATAGRAM:255.255.255.255:4000,broadcast

Writing to /dev/udp uses bash's built-in socket implementation.  To the best of my knowledge, this implementation does not allow to send UDP datagrams to the broadcast address, as this requires setting an SO_BROADCAST flag to the socket before sending.   
Using netcat is also not an option, as it rejects the UDP broadcast:
$ echo -e "\xff" | nc -u 255.255.255.255 4000
nc: netcat.c:573: main: Assertion `connect_sock.proto ! = NETCAT_PROTO_UDP' failed. 
Aborted (core dumped)

Edit: 
Sometimes netcat has -b flag to enable broadcast address.  See this answer about UDP broadcasting on Ubuntu.