Jump to content

arox

Members
  • Posts

    391
  • Joined

  • Last visited

Posts posted by arox

  1. Well, if I understand your point, it means that we cannot make "consistent" online backup anyway ? (Loss of data is annoying, but inconsistency is far more problematic). And if I cannot make backups of my small $15 board without manual heavy procedure, what the use to  install it on nand ?

  2. Here is my personal doc for configuring pulseaudio in system mode. For a2dp usage, be aware that can work but it is buggy, and bugs depends on kernel version, bluez version, dbus version, pulseaudio version ... I use it with

    3.4.113-sun8i kernel, bluez 5.37, pulse 8.0, dbus ?.?

    You will also need to boost serial speed if you use AP6212 (need to hack startup script somewhat like : hciattach /dev/ttyS3 bcm43xx 1500000 flow bdaddr 42:29:B1:55:01:01)

    And in order to use it "unattended", you need a server to start playback, switch profile on connection - and optionally handle AVRCP commands.

     

    Tips :

    - pair your devices while pulseaudio is running

    - use /usr/share/doc/bluez-tests/examples/monitor-bluetooth to monitor/automate

    - use pactl to switch/reset profile (you need a2dp)

     

    1 Package

    • apt-get install pulseaudio pulseaudio-module-bluetooth pulseaudio-utils

    2 Config

    • /etc/pulse/daemon.conf : allow-module-loading = yes
    • /etc/pulse/system.pa :
      • load-module module-native-protocol-unix auth-anonymous=1
      • load-module module-native-protocol-tcp auth-ip-acl=<your subnet>/<your mask>
      • load-module module-switch-on-connect
      • load-module module-bluetooth-policy
      • load-module module-bluez5-discover
    • create : /etc/dbus-1/system.d/pulse.conf
    <!DOCTYPE busconfig PUBLIC
     "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
     "http://www.freedeskt...busconfig.dtd">
    <busconfig>
            <policy user="root">
                    <allow own="org.pulseaudio.Server"/>
                    <allow send_destination="org.bluez"/>
                    <allow send_interface="org.bluez.Manager"/>
            </policy>
            <policy user="pulse">
                    <allow own="org.pulseaudio.Server"/>
                    <allow send_destination="org.bluez"/>
                    <allow send_interface="org.bluez.Manager"/>
            </policy>
            <policy context="default">
                    <deny own="org.pulseaudio.Server"/>
                    <deny send_destination="org.bluez"/>
                    <deny send_interface="org.bluez.Manager"/>
            </policy>
    </busconfig>
    
    
    • add root to groups : pulse and pulse-access
    • change : "ControllerMode = bredr" in /etc/bluetooth/main.conf

    3 Start pulse audio :

    • pulseaudio --system [-D for daemonize]
  3. You are probably having troubles with DNS, NFS or WIFI.

     

    - Check resolv.conf points to a valid server and you have a route to that server (ping a host by its name)

    And just before pressing play :

    - check the access to your music files (ls /xxx/xxx/xxx.mp3)

    - ping your ipad ip address from hummingboard

  4. 10 hours ago, sadegh said:

    I understand that Desktop is for people like me and Server for specialists . I can still use " Armbian Ubuntu Desktop" instead of go for adventure with " Armbian Debian Server".

     

    Thanks people,

                             Sadegh

     

    I think you "need" use "desktop" BEFORE going for adventure with armbian "server" on another machine. :)

     

  5. I own a BPM M2+ (bad pick). The major problem of my board was always powering it !

     

    Before thinking of bad software or bad/corrupted SD card, always try with another PSU (If you use micro-usb, use a PSU without USB-A connector  - which is even worse than micro-usb because never designed for that use).

     

    And when the boot fail, unplug everything (in particular UART cable and ethernet cable) and be sure the card has time to cool down before trying again. Otherwise, mine don't do a full reset !

  6. Here a nanopi neo with a logilink bt0009 paired with a "chip"

     

    root@hub:~# lsusb | grep -i bluetooth
    Bus 008 Device 002: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)
    root@hub:~# uname -a
    Linux hub 3.4.113-sun8i #20 SMP PREEMPT Fri Dec 30 14:37:10 CET 2016 armv7l armv7l armv7l GNU/Linux
    root@hub:~# echo "paired-devices" | bluetoothctl
    [NEW] Controller 00:15:83:54:9C:58 hub [default]
    [NEW] Device A0:2C:36:25:26:F3 btst
    [bluetooth]# paired-devices
    Device A0:2C:36:25:26:F3 btst
    [DEL] Controller 00:15:83:54:9C:58 hub [default]
    [bluetooth]#

    root@hub:~# bluetoothd -v
    5.37

     

    But I had a lot of trouble with the same dongle yesterday to connect through RFCOMM and used a BT0015 for that use :wacko:

     

    With bluez never try to understand why or when it works or dont.

     

    So ... Same player shoot again : try not to be too close or too far, avoid interferences (usb, wifi, bt ...), reboot to clean kernel and user space daemon state, remove devices, clean /var/lib/bluetooth, stop scan as soon as you have discovered peer, increase delay in main.conf ...

  7. Well, in previous working release, you had a "ap6212-bluetooth.service" which started your missing "hciattach" process through systemd.

    What is missing or bugged in you system is what is (or was in previous version) in script :

     

    /etc/init.d/ap6212-bluetooth

     

    You can see that you need to do something like :

            rfkill unblock all
            echo "0" > /sys/class/rfkill/rfkill0/state
            echo "1" > /sys/class/rfkill/rfkill0/state
            echo " " > /dev/$PORT
            hciattach /dev/ttyS3 bcm43xx 1500000 flow bdaddr   42:29:B1:55:01:01
            hciconfig hci0 up

     

    (Here, hciattach params are a bit altered to increase serial interface speed and change MAC to enable bnep)

     

    If the script exists, try to start it (and always check hci0 is up after bluetoothd start).

     

    But it is also possible that the firmware download fails (/etc/firmware/ap6212/4343A0.hcd) or that the uboot config for ttyS3 in script.bin is bad ...

     

     

     

  8. "How could I remove this service ..."

     

    By removing systemd ;):rolleyes::ph34r: . No, I am kidding (or not ?). But I never paid attention to this machine-id stuff. It seems to be one more "modern linux" invention from systemd. It only exists on machines with systemd and although it is supposed to identify uniquely identify a machine, it seems to be permanently fixed in a specific release and identical on each host ?!?

     

    Is that important that a "transient superfluous gadget" cannot be updated because of a RO fs, whereas much more important software fills the log files because it remains in beta version ? :mellow:  :wacko::rolleyes:

  9. sudo hping3 8.8.8.8 -p 53 -S

    HPING 8.8.8.8 (wlan0 8.8.8.8): S set, 40 headers + 0 data bytes

    len=40 ip=8.8.8.8 ttl=253 id=37843 sport=53 flags=RA seq=0 win=512 rtt=49.1 ms

    len=40 ip=8.8.8.8 ttl=253 id=48294 sport=53 flags=RA seq=1 win=512 rtt=48.9 ms

    ^C

    --- 8.8.8.8 hping statistic ---

    2 packets transmitted, 2 packets received, 0% packet loss

    round-trip min/avg/max = 48.9/49.0/49.1 ms

     

    However:

     

    sudo dig @8.8.8.8 www.ubuntu.com any

     

    ; <<>> DiG 9.10.3-P4-Ubuntu <<>> @8.8.8.8 www.ubuntu.com any

    ; (1 server found)

    ;; global options: +cmd

    ;; connection timed out; no servers could be reachedS

     

    dig +tcp @8.8.8.8 www.ubuntu.com any

    probably work ...

     

    So, you have to either choose another nameserver, find how to auto-configure or add :

    options use-vc

    in /etc/resolv.conf

  10. What I don't understand is why you cannot address a google public DNS server directly with :

     

    dig @8.8.8.8 www.slo-tech.com any

     

    It should work if you can ping 8.8.8.8, even if your local resolver got problems !

     

     

    Can you try to send sync to port 53/tcp with : hping3 8.8.8.8 -p 53 -S

     

    It should respond :
    HPING 8.8.8.8 (eth0 8.8.8.8): S set, 40 headers + 0 data bytes
    len=46 ip=8.8.8.8 ttl=58 id=62807 sport=53 flags=SA seq=0 win=28640 rtt=37.8 ms
    len=46 ip=8.8.8.8 ttl=58 id=10529 sport=53 flags=SA seq=1 win=28640 rtt=37.2 ms

    ...

  11. 'Reconfiguring every time' is the stupid/anachronistic way. You should simply utilize network-manager for that (installed on recent Armbian images by default and taking care of every interface that is not listed in /etc/network/interfaces, applies to Wi-Fi on the Zero by default but not Ethernet)

     

    NM will then use the appropriate DNS server based on the used profile and /etc/resolv.conf will be overwritten every time NM switches a profile (resolv.conf is just there for legacy software reading this file, it's not meant to be written by the user directly any more)

     

    I don't understand why NM should temper (and be allowed to temper) with DNS resolution : DNS is a service and not just a configuration. It has not to be determined by the way you are connected because it presents a security problem. You have to know exactly WHO redirect you when you enter an URL for example and who is then able to trace your activity. You can trust your ISP DNS (including without config via DHCP) or Google DNS or another source, but it is not just a matter of configuration : you have to know who you trust !

     

    And if you trust your router/internet box, then you assume that nobody can temper with it. <_<:ph34r: :ph34r: :ph34r: :ph34r: :ph34r:

  12. Well, I entered "nameserver 8.8.8.8" in my file /etc/resolv.conf and it didn't work.

     

    However, I was able to ping 8.8.8.8

     

    And nobody is filtering traffic, because I tried this in two different networks, one is under my control. And other machines are working just fine.

     

     

    If someone is filtering traffic to force you to use another DNS, he will block port 53 udp/tcp and not icmp/ping ! You need tools like hping or open a socket to 8.8.8.8:53 to check that.

     

    You should also verify that your resolv.conf is a plain file and not a link and that nobody tempered with your nsswitch.conf (or glibc or /lib/libnss_SERVICE.so) : nothing will surprise me anymore in "modern linux" <_< :blink: :ph34r:

  13. Hi,

     

    I have bought Orange Pi Zero and installed Armbian Ubuntu version.

     

    Device (and OS!) works fantastic. However, I have a problem, because DNS resolving does not work until I manually edit /etc/resolv.conf file and enter:

    nameserver <ip_of_my_router>

     

    The problem is, I am using my Zero device in different networks, so I need to reconfigure it every time I connect it to other network.

     

    Is there any solution for this?

     

    In fact, it is quite weird, I have tried several things (when DNS resolving was not working), for instance:

    dig @8.8.8.8 www.slo-tech.com any

     

    and got only:

    ; <<>> DiG 9.10.3-P4-Ubuntu <<>> @8.8.8.8 www.slo-tech.com any

    ; (1 server found)

    ;; global options: +cmd

    ;; connection timed out; no servers could be reached

     

    or:

    host www.slo-tech.com 8.8.8.8

     

    and got:

    ;; connection timed out; no servers could be reached

     

    Any idea whay is that so?

     

    Why not just put "nameserver 8.8.8.8" in your file /etc/resolv.conf ?

     

    And if you have no reply from 8.8.8.8, I suspect someone is filtering traffic <_< .

  14. Why? Try to answer this question first (with facts and not feelings) and you're already done.

     

    Remember the joke that Emacs (some call it an editor, others an operating system) was an abbreviation for 'Eight megabytes and continuously swapping'? Back at that time 8 MB RAM was considered a lot. And back at that time it made some sense to minimize the OS' footprint. It's 2017 now, just take the server images and live with a few 'wasted' MB storage.

     

    I don't think that things are so simple. Having unnecessary software on system disk make system slower, take much time to boot, to backup, to upgrade, more difficult to maintain, etc ... And even if you had huge disk, you will sooner or later run out of space - and then be unable to determine what is needed or not because you never managed the content !

     

    Anyway, this is not an armbian problem but it concerns debian packaging and dependencies. And it is not a debian problem but it concern any linux (or other OS) distribution. One suggestion would be :

    - if you want to develop, test or have a general purpose system, then start with a full maximal system like ubuntu and suppress packages when you need storage.

    - if you know exactly what you need and will need in the future, then start with a minimal system and even compile packages yourself in order to reduce dependencies and keep bullshits at bay.

  15. WiFi. Ofc not directly interchangeable.

     

    In my experience, wifi has always be unreliable and a waste of power. I think there is some nonsense with wifi : you cannot have middle range and high bandwidth networks on an overcrowded frequency. What we need is what bluetooth should become : LE/AMP/mesh. LE stand for low energy : having the capacity to transmit small messages or rest in standby with very little power. AMP is the possibility to dynamically open a high bandwidth channel when needed. Mesh is the possibility to have a micro network of redundant nodes and links with short range / low power transmission, instead of interfering with others transmissions in wide areas as with wifi.

     

    Unfortunately, the specification for that has been more or less released. Which means that current implementation is a mess. In first versions, BT was supposed to be cheap (but reliable) technology for specific use cases ("profiles"). Now, adding LE/AMP/Mesh simply mean multiply complexity by 4.

     

    Nevertheless, at present you should be able to do wifi in ad hoc mode and use obex with bt ? I never tried wifi ad hoc and obex since bluez4. What are the problems ?

  16. I want to turn my Banana PI into a NAS. Since SSDs are still too small (or much too expensive for my purpose) I need to use a standard 3,5 HD and those will need that much power (on spin-on at least) that I can't use the Banana SATA to power up the HD, right?

     

    Can those people that use banana pi et al. as NAS tell me what kind of external power supply they use with what type of connector? If you can recommend low-power HDs I'd like to hear that too.

     

    Are there power supplys that can safely feed the Banana pi itself and the HD? Preferably without soldering the connectors?

     

    I use a BPI M1 as file server. I use 2.5i disk because it doesn't need 12V, don't make noise, is less cumbersome ... and if I want better access time I use an SSD !

     

    So, in order to avoid problems, I power the disk directly, that is : not threw BPI and I power the BPI through the disk power connector. Soldering is not a problem : you can use screw terminals. But you need the connectors and be sure of your polarity !

     

    My experience with powering 5V boards and accessories is that you must avoid multiple connectors interfaces. Micro USB is not top, but USB-A is still worse and in fact there are very few connectors able to deliver peak power reliably on 5V. I use a PSUs with voltage adjustment capability and screw terminals and for a server, I use as little connectors as possible and I don't power accessories (USB or HDMI adapter) threw the board : only so were I able to solve stability problems.

     

    In fact, I have had so many problems that from now on I will only use soldering and screw terminals !

×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines