1 4 5 6 7 8 Previous Next 114 Replies Latest reply on Jul 31, 2017 12:40 PM by 0andriy Go to original post
      • 75. Re: Newer Kernel on Edison (OpenWrt)
        FerryT

        Yes, I saw that, great work!

         

        What's next? From https://edison.internet-share.com/wiki/Using_a_vanilla_Linux_kernel_with_Intel_Edison  I get

        • Pin control support for I2C family (enabling I2C6 mode)

         

        Is that the control of the external mutliplexers on the Edison Arduino board (sorry, don't know what is exactly meant by 'pin control', I'm just a HW engineer)

        • 76. Re: Newer Kernel on Edison (OpenWrt)
          0andriy

          I2C bus 1 works fine. On contrary bus 6 is switched to mode 2 which means SCU (MCU) manageable.

          And sorry, no, I should move that to lowest priority now. I have other stuff to do and my main point now is to switch to ACPI.

          • 77. Re: Newer Kernel on Edison (OpenWrt)
            FerryT

            Today I have reached a milestone: new u-boot + new kernel + new rootfs boots. Even the LED blinks :-) when I do:

            root@edison:~# blink-led

            /bin/sh: line 6: /sys/kernel/debug/gpio_debug/gpio40/current_pinmux: No such file or directory

            I also managed to boot new u-boot + new kernel + old (2.1 rootfs), however not much worked then, as systemd chokes.

             

            I built Andy's u-boot (as described in the u-boot topic on this forum), so this replaces the original u-boot.

            The kernel is from my branch eds-4.11, which is exactly Andy's after 4.11 was released and Andy rebased. I build the kernel with a Yocto recipe that add 2 fragments, i.e. flips on the switch for smsc95xx (this is a USB hub with 4 downstream ports and 1 ethernet port) and ftdi_sio (usb-serial converter). The kernel has built-in initramfs that has the drivers for mmc and sdhci and is on mmcblk0p9 . It mounts the sdcard (mmcblk1) and switch_root's to that.

            The sdcard contains the rootfs built with Yocto Morty, more or less based on the recipies that build Edison Poky 2.1. And dangerously so, it tries on first boot to resize partitions (as 2.1 did), and formats mmcblk0p9 erasing the kernel, I will fix that soon I hope.

             

            One issue I run into is that the usb port is not working. It doesn't detect the smsc95xx nor a USB stick when I plug that directly in the Edison. For comparison, with the old image with the smsc95xx plugged into the Edison Arduino board and USB stick plugged into the smsc95xx I get:

            root@edison:~# uname -a

            Linux edison 3.10.17-poky-edison+ #1 SMP PREEMPT Mon Jan 11 14:54:18 CET 2016 i686 GNU/Linux

             

            root@edison:~# lsmod

            Module                  Size  Used by

            smsc95xx               31910  0

            usb_f_acm              14335  1

            u_serial               18582  1 usb_f_acm

            g_multi                70924  0

            libcomposite           39245  2 usb_f_acm,g_multi

            bcm_bt_lpm             13708  0

            bcm4334x              587105  0

             

            root@edison:~# lsusb  

            Bus 001 Device 004: ID 125f:312b A-DATA Technology Co., Ltd. Superior S102 Pro

            Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter

            Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub

            Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp.

            Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

             

            root@edison:~# lsusb -t

            /:  Bus 02.Port 1: Dev 1, class="root_hub", Driver=dwc3-host/1p, 5000M

            /:  Bus 01.Port 1: Dev 1, class="root_hub", Driver=dwc3-host/1p, 480M

                |__ Port 1: Dev 2, If 0, class="Hub", Driver=hub/5p, 480M

                    |__ Port 1: Dev 3, If 0, class="Vendor" Specific Class, Driver=smsc95xx, 480M

                    |__ Port 2: Dev 4, If 0, class="Mass" Storage, Driver=usb-storage, 480M

            With new kernel/image I get:

            root@edison:~# uname -a

            Linux edison 4.11.0-edison-standard #11 SMP Mon May 22 23:20:10 CEST 2017 i686 i686 i386 GNU/Linux

             

            root@edison:~# lsmod

            Module                  Size  Used by

            iptable_nat            16384  0

            nf_nat_ipv4            16384  1 iptable_nat

            nf_nat                 24576  1 nf_nat_ipv4

            spidev                 16384  0

            spi_pxa2xx_platform    24576  0

            pwm_lpss_pci           16384  0

            pwm_lpss               16384  1 pwm_lpss_pci

            brcmfmac              208896  0

            brcmutil               16384  1 brcmfmac

            spi_pxa2xx_pci         16384  0

            smsc95xx               32768  0

            mmc_block              28672  7

            sdhci_pci              28672  0

            sdhci                  40960  1 sdhci_pci

            led_class              16384  1 sdhci

            mmc_core              106496  4 sdhci,sdhci_pci,mmc_block,brcmfmac

             

            root@edison:~# lsusb

            Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub

            Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

             

            root@edison:~# lsusb -t

            /:  Bus 02.Port 1: Dev 1, class="root_hub", Driver=xhci-hcd/1p, 5000M

            /:  Bus 01.Port 1: Dev 1, class="root_hub", Driver=xhci-hcd/1p, 480M

            I have the feeling that I might have the wrong USB driver (xhci-hcd) instead of dwc3-host. But afaik the driver is built-in the kernel. Is there anything I need to do to make the usb work? Am I missing a module (i note that dw_dmac is not loaded)?

             

            No spooky fail or errors:

            root@edison:~# journalctl -b | grep error

            May 25 20:20:27 edison kernel: serial: probe of 0000:00:04.0 failed with error -16

            May 25 20:20:27 edison kernel: 8250_mid: probe of 0000:00:04.0 failed with error -16

            May 25 20:20:27 edison systemd-fsck[2277]: fsck failed with error code 8.

            May 25 20:20:27 edison systemd-fsck[2277]: Ignoring error.

            May 25 20:20:27 edison kernel: brcmfmac mmc2:0001:1: Direct firmware load for brcm/brcmfmac43340-sdio.bin failed with error -2

            May 25 20:20:28 edison kernel[2309]: [    1.535279] serial: probe of 0000:00:04.0 failed with error -16

            May 25 20:20:28 edison kernel[2309]: [    1.543363] 8250_mid: probe of 0000:00:04.0 failed with error -16

            May 25 20:20:28 edison kernel[2309]: [  108.041191] brcmfmac mmc2:0001:1: Direct firmware load for brcm/brcmfmac43340-sdio.bin failed with error -2

            root@edison:~# journalctl -b | grep fail

            May 25 20:20:27 edison kernel: serial: probe of 0000:00:04.0 failed with error -16

            May 25 20:20:27 edison kernel: 8250_mid: probe of 0000:00:04.0 failed with error -16

            May 25 20:20:27 edison systemd-fsck[2277]: fsck failed with error code 8.

            May 25 20:20:27 edison kernel: brcmfmac mmc2:0001:1: Direct firmware load for brcm/brcmfmac43340-sdio.bin failed with error -2

            May 25 20:20:28 edison kernel[2309]: [    1.535279] serial: probe of 0000:00:04.0 failed with error -16

            May 25 20:20:28 edison kernel[2309]: [    1.543363] 8250_mid: probe of 0000:00:04.0 failed with error -16

            May 25 20:20:28 edison avahi-daemon[2323]: ../../avahi-0.6.32/avahi-daemon/chroot.c: open() failed: No such file or directory

            May 25 20:20:28 edison kernel[2309]: [  108.041191] brcmfmac mmc2:0001:1: Direct firmware load for brcm/brcmfmac43340-sdio.bin failed with error -2

            May 25 20:20:29 edison systemd-fsck[2356]: fsck failed with error code 8.

            May 25 20:21:56 edison systemd[1]: Dependency failed for Serial Getty on ttyMFD2.

            May 25 20:21:56 edison systemd[1]: serial-getty@ttyMFD2.service: Job serial-getty@ttyMFD2.service/start failed with result 'dependency'.

            May 25 20:21:56 edison systemd[1]: dev-ttyMFD2.device: Job dev-ttyMFD2.device/start failed with result 'timeout'.

            USB messages:

            root@edison:~# journalctl -b | grep usb 

            May 25 20:20:26 edison kernel: usbcore: registered new interface driver usbfs

            May 25 20:20:26 edison kernel: usbcore: registered new interface driver hub

            May 25 20:20:26 edison kernel: usbcore: registered new device driver usb

            May 25 20:20:27 edison kernel: usbcore: registered new interface driver r8152

            May 25 20:20:27 edison kernel: usbcore: registered new interface driver asix

            May 25 20:20:27 edison kernel: usbcore: registered new interface driver ax88179_178a

            May 25 20:20:27 edison kernel: usbcore: registered new interface driver cdc_ether

            May 25 20:20:27 edison kernel: usbcore: registered new interface driver net1080

            May 25 20:20:27 edison kernel: usbcore: registered new interface driver cdc_subset

            May 25 20:20:27 edison kernel: usbcore: registered new interface driver zaurus

            May 25 20:20:27 edison kernel: usbcore: registered new interface driver MOSCHIP usb-ethernet driver

            May 25 20:20:27 edison kernel: usbcore: registered new interface driver cdc_ncm

            May 25 20:20:27 edison kernel: usb usb1: New USB device found, idVendor=1d6b, idProduct=0002

            May 25 20:20:27 edison kernel: usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1

            May 25 20:20:27 edison kernel: usb usb1: Product: xHCI Host Controller

            May 25 20:20:27 edison kernel: usb usb1: Manufacturer: Linux 4.11.0-edison-standard xhci-hcd

            May 25 20:20:27 edison kernel: usb usb1: SerialNumber: xhci-hcd.2.auto

            May 25 20:20:27 edison kernel: usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.

            May 25 20:20:27 edison kernel: usb usb2: New USB device found, idVendor=1d6b, idProduct=0003

            May 25 20:20:27 edison kernel: usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1

            May 25 20:20:27 edison kernel: usb usb2: Product: xHCI Host Controller

            May 25 20:20:27 edison kernel: usb usb2: Manufacturer: Linux 4.11.0-edison-standard xhci-hcd

            May 25 20:20:27 edison kernel: usb usb2: SerialNumber: xhci-hcd.2.auto

            May 25 20:20:27 edison kernel: usbcore: registered new interface driver usblp

            May 25 20:20:27 edison kernel: usbcore: registered new interface driver usb-storage

            May 25 20:20:27 edison kernel: usbcore: registered new interface driver usbserial

            May 25 20:20:27 edison kernel: usbcore: registered new interface driver pl2303

            May 25 20:20:27 edison kernel: usbserial: USB Serial support registered for pl2303

            May 25 20:20:27 edison kernel: usbcore: registered new interface driver usbhid

            May 25 20:20:27 edison kernel: usbhid: USB HID core driver

            May 25 20:20:27 edison kernel: usbcore: registered new interface driver smsc95xx

            May 25 20:20:28 edison kernel[2309]: [    0.122820] usbcore: registered new interface driver usbfs

            May 25 20:20:28 edison kernel[2309]: [    0.123049] usbcore: registered new interface driver hub

            May 25 20:20:28 edison kernel[2309]: [    0.123314] usbcore: registered new device driver usb

            May 25 20:20:28 edison kernel[2309]: [    2.832189] usbcore: registered new interface driver r8152

            May 25 20:20:28 edison kernel[2309]: [    2.837805] usbcore: registered new interface driver asix

            May 25 20:20:28 edison kernel[2309]: [    2.843312] usbcore: registered new interface driver ax88179_178a

            May 25 20:20:28 edison kernel[2309]: [    2.849512] usbcore: registered new interface driver cdc_ether

            May 25 20:20:28 edison kernel[2309]: [    2.855501] usbcore: registered new interface driver net1080

            May 25 20:20:28 edison kernel[2309]: [    2.861272] usbcore: registered new interface driver cdc_subset

            May 25 20:20:28 edison kernel[2309]: [    2.867292] usbcore: registered new interface driver zaurus

            May 25 20:20:28 edison kernel[2309]: [    2.872968] usbcore: registered new interface driver MOSCHIP usb-ethernet driver

            May 25 20:20:28 edison kernel[2309]: [    2.880490] usbcore: registered new interface driver cdc_ncm

            May 25 20:20:28 edison kernel[2309]: [    2.954230] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002

            May 25 20:20:28 edison kernel[2309]: [    2.961076] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1

            May 25 20:20:28 edison kernel[2309]: [    2.968338] usb usb1: Product: xHCI Host Controller

            May 25 20:20:28 edison kernel[2309]: [    2.973248] usb usb1: Manufacturer: Linux 4.11.0-edison-standard xhci-hcd

            May 25 20:20:28 edison kernel[2309]: [    2.980063] usb usb1: SerialNumber: xhci-hcd.2.auto

            May 25 20:20:28 edison kernel[2309]: [    3.007686] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.

            May 25 20:20:28 edison kernel[2309]: [    3.015994] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003

            May 25 20:20:28 edison kernel[2309]: [    3.022849] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1

            May 25 20:20:28 edison kernel[2309]: [    3.030111] usb usb2: Product: xHCI Host Controller

            May 25 20:20:28 edison kernel[2309]: [    3.035025] usb usb2: Manufacturer: Linux 4.11.0-edison-standard xhci-hcd

            May 25 20:20:28 edison kernel[2309]: [    3.041844] usb usb2: SerialNumber: xhci-hcd.2.auto

            May 25 20:20:28 edison kernel[2309]: [    3.055830] usbcore: registered new interface driver usblp

            May 25 20:20:28 edison kernel[2309]: [    3.061502] usbcore: registered new interface driver usb-storage

            May 25 20:20:28 edison kernel[2309]: [    3.067730] usbcore: registered new interface driver usbserial

            May 25 20:20:28 edison kernel[2309]: [    3.073682] usbcore: registered new interface driver pl2303

            May 25 20:20:28 edison kernel[2309]: [    3.079347] usbserial: USB Serial support registered for pl2303

            May 25 20:20:28 edison kernel[2309]: [    3.132300] usbcore: registered new interface driver usbhid

            May 25 20:20:28 edison kernel[2309]: [    3.137925] usbhid: USB HID core driver

            May 25 20:20:28 edison kernel[2309]: [  106.398710] usbcore: registered new interface driver smsc95xx

            • 78. Re: Newer Kernel on Edison (OpenWrt)
              FerryT

              I got the USB to work. I am using the SMSC LAN9514 eval board. When setting the jumper to BUS (powered) in stead of SELF (powered from adapter), while leaving the adapter, it's Christmas and all the LED's go on, connman automatically connects the network, USB stick pops up.

              root@edison:~# uname -a

              Linux edison 4.11.0-edison-standard #11 SMP Mon May 22 23:20:10 CEST 2017 i686 i686 i386 GNU/Linux

              00:11.0 USB controller: Intel Corporation Device 119e (rev 01)

              root@edison:~#

              root@edison:~# lsusb

              Bus 001 Device 007: ID 125f:312b A-DATA Technology Co., Ltd. Superior S102 Pro

              Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub

              Bus 001 Device 006: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter

              Bus 001 Device 005: ID 0424:9514 Standard Microsystems Corp. SMC9514 Hub

              Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

              root@edison:~# lsusb -t

              /:  Bus 02.Port 1: Dev 1, class="root_hub", Driver=xhci-hcd/1p, 5000M

              /:  Bus 01.Port 1: Dev 1, class="root_hub", Driver=xhci-hcd/1p, 480M

                  |__ Port 1: Dev 5, If 0, class="Hub", Driver=hub/5p, 480M

                      |__ Port 1: Dev 6, If 0, class="Vendor" Specific Class, Driver=smsc95xx, 480M

                      |__ Port 2: Dev 7, If 0, class="Mass" Storage, Driver=usb-storage, 480M

              root@edison:~# ifconfig

              eth0      Link encap:Ethernet  HWaddr 00:80:0f:95:1d:4d 

                        inet addr:192.168.188.33  Bcast:192.168.188.255  Mask:255.255.255.0

                        inet6 addr: fe80::280:fff:fe95:1d4d/64 Scope:Link

                        inet6 addr: 2002:c0a8:201:1:280:fff:fe95:1d4d/64 Scope:Global

                        UP BROADCAST RUNNING MULTICAST DYNAMIC  MTU:1500  Metric:1

                        RX packets:516 errors:0 dropped:0 overruns:0 frame:0

                        TX packets:108 errors:0 dropped:0 overruns:0 carrier:0

                        collisions:0 txqueuelen:1000

                        RX bytes:58635 (57.2 KiB)  TX bytes:15393 (15.0 KiB)

               

              lo        Link encap:Local Loopback 

                        inet addr:127.0.0.1  Mask:255.0.0.0

                        inet6 addr: ::1/128 Scope:Host

                        UP LOOPBACK RUNNING  MTU:65536  Metric:1

                        RX packets:0 errors:0 dropped:0 overruns:0 frame:0

                        TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

                        collisions:0 txqueuelen:1000

                        RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

              ferry@delfion:~$ iperf3 -c edison

              Connecting to host edison, port 5201

              [  5] local 2002:c0a8:201:1:343f:df9c:3e84:175c port 36404 connected to 2002:c0a8:201:1:280:fff:fe95:1d4d port 5201

              [ ID] Interval           Transfer     Bandwidth       Retr  Cwnd

              [  5]   0.00-1.00   sec  11.3 MBytes  95.1 Mbits/sec    1    111 KBytes      

              [  5]   1.00-2.00   sec  11.1 MBytes  92.7 Mbits/sec    0    118 KBytes      

              [  5]   2.00-3.00   sec  11.1 MBytes  93.3 Mbits/sec    0    126 KBytes      

              [  5]   3.00-4.00   sec  11.1 MBytes  92.7 Mbits/sec    0    126 KBytes      

              [  5]   4.00-5.00   sec  11.1 MBytes  92.8 Mbits/sec    0    126 KBytes      

              [  5]   5.00-6.00   sec  11.0 MBytes  92.2 Mbits/sec    0    126 KBytes      

              [  5]   6.00-7.00   sec  11.1 MBytes  92.7 Mbits/sec    0    126 KBytes      

              [  5]   7.00-8.00   sec  11.1 MBytes  92.8 Mbits/sec    0    126 KBytes      

              [  5]   8.00-9.00   sec  11.1 MBytes  92.7 Mbits/sec    0    126 KBytes      

              [  5]   9.00-10.00  sec  11.2 MBytes  94.3 Mbits/sec    0    170 KBytes      

              - - - - - - - - - - - - - - - - - - - - - - - - -

              [ ID] Interval           Transfer     Bandwidth       Retr

              [  5]   0.00-10.00  sec   111 MBytes  93.1 Mbits/sec    1             sender

              [  5]   0.00-10.00  sec   110 MBytes  92.7 Mbits/sec                  receiver

              And the sshd has started, so I can remote login.

              1 of 1 people found this helpful
              • 79. Re: Newer Kernel on Edison (OpenWrt)
                FerryT

                You can find my new images here: GitHub - htot/meta-intel-edison: Here is the meta-intel-edison that builds, tries to stay up to date and provides a PREE…

                 

                There are four branches that generate 4 different images:

                • dizzy-uptodate tracks origin/dizzy with 3.10.98 kernel. This branch pulls https://github.com/htot/meta-intel-iot-middleware.git branch dizzy-uptodate with fixes for paho-mqtt relocated and iotkit-comm-js no longer supported.
                • dizzy-latest tracks origin/master as much as possible with 3.10.98 kernel. This branch pulls https://github.com/htot/meta-intel-iot-middleware.git branch dizzy-latest with fixes for paho-mqtt relocated and iotkit-comm-js no longer supported + java support removed. This gives mraa 0.9.0, upm 0.4.1 and mosquitto 1.4.
                • dizzy-rt same as dizzy-latest but with real time kernel. Switches the kernel to the PREEMPT_RT 3.10.17-rt kernel
                • morty experimental branch based on Yocto Morty, vanilla kernel 4.11

                 

                To me the most exciting are dizzy-rt and morty. But, if you are just looking to build a new image and can't because the official 3.5 image needs manual modifications try out dizzy-uptodate or dizzy-latest.

                 

                If you select one of these branches on github, you will see the contents of the README.md change to the appropriate info for that branch. For morty build instructions can be found on the wiki pages.

                 

                Help on morty work is highly appreciated, especially in testing and adding back features that I removed.

                Also, I believe many will be happy to see mraa ported to the vanilla (currently 4.11) kernel, so there applications will work again. Noteworthy things that need to be changed: serial port moved from ttyMFD2 to linux standard ttyS2, pincontrol and pinmux changed to linux standard. The mraa abstraction that takes care is this and needs porting is : mraa/intel_edison_fab_c.c at master · intel-iot-devkit/mraa · GitHub

                 

                Ferry

                • 80. Re: Newer Kernel on Edison (OpenWrt)
                  FerryT

                  0andriy I got bluetooth working (sort of). This is using the morty image which has bluez5.41. I needed to turn on 'experimental and then install bluez5-noinst-tools_5.41-r0_i386.deb to get btattach. Then following your instructions, followed by `rfkill unblock 1`:

                  edison:/home/ferry# hciconfig -a

                  hci0:   Type: Primary  Bus: UART

                          BD Address: 43:34:1B:00:1F:AC  ACL MTU: 1021:8  SCO MTU: 64:1

                          UP RUNNING PSCAN

                          RX bytes:16173 acl:66 sco:0 events:717 errors:0

                          TX bytes:49030 acl:65 sco:0 commands:573 errors:0

                          Features: 0xbf 0xfe 0xcf 0xfe 0xdb 0xff 0x7b 0x87

                          Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3

                          Link policy: RSWITCH SNIFF

                          Link mode: SLAVE ACCEPT

                          Name: 'edison'

                          Class: 0x000110

                          Service Classes: Unspecified

                          Device Class: Computer, Handheld

                          HCI Version: 4.0 (0x6)  Revision: 0xa6

                          LMP Version: 4.0 (0x6)  Subversion: 0x410e

                          Manufacturer: Broadcom Corporation (15)

                   

                  Note I even have the same BD Address as you (that can't be right). And you have Device Class: Miscellaneous.

                   

                  Then with bluetoothctl:

                  [bluetooth]# show

                  Controller 43:34:1B:00:1F:AC

                          Name: edison

                          Alias: edison

                          Class: 0x000110

                          Powered: yes

                          Discoverable: no

                          Pairable: yes

                          UUID: Generic Attribute Profile (00001801-0000-1000-8000-00805f9b34fb)

                          UUID: A/V Remote Control        (0000110e-0000-1000-8000-00805f9b34fb)

                          UUID: PnP Information           (00001200-0000-1000-8000-00805f9b34fb)

                          UUID: Generic Access Profile    (00001800-0000-1000-8000-00805f9b34fb)

                          UUID: A/V Remote Control Target (0000110c-0000-1000-8000-00805f9b34fb)

                          Modalias: usb:v1D6Bp0246d0529

                          Discovering: no

                   

                  Connecting to my phone, or my BT USB dongle on my PC connects, pairs, but then disconnects.

                  [bluetooth]# devices

                  Device 00:10:60:D0:BE:9D delfion-0

                  Device 38:BC:1A:29:4A:3E MX4 Ubuntu // computer

                  [bluetooth]# connect 00:10:60:D0:BE:9D

                  Attempting to connect to 00:10:60:D0:BE:9D

                  Failed to connect: org.bluez.Error.Failed

                  [bluetooth]# info 00:10:60:D0:BE:9D

                  Device 00:10:60:D0:BE:9D

                          Name: delfion-0

                          Alias: delfion-0

                          Class: 0x0c0104

                          Icon: computer

                          Paired: no

                          Trusted: no

                          Blocked: no

                          Connected: no

                          LegacyPairing: yes

                          UUID: Audio Source              (0000110a-0000-1000-8000-00805f9b34fb)

                          UUID: Audio Sink                (0000110b-0000-1000-8000-00805f9b34fb)

                          UUID: A/V Remote Control Target (0000110c-0000-1000-8000-00805f9b34fb)

                          UUID: A/V Remote Control        (0000110e-0000-1000-8000-00805f9b34fb)

                          UUID: Headset AG                (00001112-0000-1000-8000-00805f9b34fb)

                          UUID: PnP Information           (00001200-0000-1000-8000-00805f9b34fb)

                          UUID: Generic Access Profile    (00001800-0000-1000-8000-00805f9b34fb)

                          UUID: Generic Attribute Profile (00001801-0000-1000-8000-00805f9b34fb)

                          Modalias: usb:v1D6Bp0246d052B

                  [bluetooth]# info 38:BC:1A:29:4A:3E // phone

                  Device 38:BC:1A:29:4A:3E

                          Name: MX4 Ubuntu

                          Alias: MX4 Ubuntu

                          Class: 0x5c020c

                          Icon: phone

                          Paired: yes

                          Trusted: yes

                          Blocked: no

                          Connected: no

                          LegacyPairing: no

                          UUID: OBEX Object Push          (00001105-0000-1000-8000-00805f9b34fb)

                          UUID: Audio Source              (0000110a-0000-1000-8000-00805f9b34fb)

                          UUID: Audio Sink                (0000110b-0000-1000-8000-00805f9b34fb)

                          UUID: A/V Remote Control Target (0000110c-0000-1000-8000-00805f9b34fb)

                          UUID: A/V Remote Control        (0000110e-0000-1000-8000-00805f9b34fb)

                          UUID: Headset AG                (00001112-0000-1000-8000-00805f9b34fb)

                          UUID: Handsfree Audio Gateway   (0000111f-0000-1000-8000-00805f9b34fb)

                          UUID: Phonebook Access Server   (0000112f-0000-1000-8000-00805f9b34fb)

                          UUID: Message Notification Se.. (00001133-0000-1000-8000-00805f9b34fb)

                          UUID: PnP Information           (00001200-0000-1000-8000-00805f9b34fb)

                          UUID: Generic Access Profile    (00001800-0000-1000-8000-00805f9b34fb)

                          UUID: Generic Attribute Profile (00001801-0000-1000-8000-00805f9b34fb)

                          Modalias: usb:v1D6Bp0246d0529

                   

                  edison:/home/ferry# journalctl -b | grep -i blue

                  Jun 06 22:05:54 edison sudo[3080]:ferry : TTY=pts/0 ; PWD=/home/ferry ; USER=root ; COMMAND=/usr/bin/dpkg -i bluez5-noinst-tools_5.41-r0_i386.deb

                  Jun 06 22:27:28 edison kernel: Bluetooth: HCI UART driver ver 2.3

                  Jun 06 22:27:28 edison kernel: Bluetooth: HCI UART protocol H4 registered

                  Jun 06 22:27:28 edison kernel: Bluetooth: HCI UART protocol Broadcom registered

                  Jun 06 22:27:28 edison kernel[2305]: [84949.755638] Bluetooth: HCI UART driver ver 2.3

                  Jun 06 22:27:28 edison kernel[2305]: [84949.755648] Bluetooth: HCI UART protocol H4 registered

                  Jun 06 22:27:28 edison bluetooth_rfkill_event[2300]: 1496780848.838112: idx 1 type 2 op 0 soft 0 hard 0

                  Jun 06 22:27:28 edison bluetooth_rfkill_event[2300]: 1496780848.840912: idx 1 type 2 op 2 soft 1 hard 0

                  Jun 06 22:27:28 edison kernel[2305]: [84949.755942] Bluetooth: HCI UART protocol Broadcom registered

                  Jun 06 22:27:28 edison systemd[1]: Starting Bluetooth service...

                  Jun 06 22:27:28 edison bluetoothd[3201]: Bluetooth daemon 5.41

                  Jun 06 22:27:28 edison systemd[1]: Started Bluetooth service.

                  Jun 06 22:27:28 edison systemd[1]: Reached target Bluetooth.

                  Jun 06 22:27:29 edison bluetoothd[3201]: Starting SDP server

                  Jun 06 22:27:29 edison bluetoothd[3201]: kernel lacks bnep-protocol support

                  Jun 06 22:27:29 edison bluetoothd[3201]: System does not support network plugin

                  Jun 06 22:27:29 edison kernel: Bluetooth: hci0: BCM: chip id 82

                  Jun 06 22:27:29 edison kernel: Bluetooth: hci0: BCM43341B0 (002.001.014) build 0000

                  Jun 06 22:27:29 edison bluetoothd[3201]: Bluetooth management interface 1.14 initialized

                  Jun 06 22:27:29 edison kernel[2305]: [84949.944570] Bluetooth: hci0: BCM: chip id 82

                  Jun 06 22:27:29 edison kernel[2305]: [84949.944592] Bluetooth: hci0: BCM43341B0 (002.001.014) build 0000

                  Jun 06 22:27:29 edison kernel: Bluetooth: hci0: BCM (002.001.014) build 0166

                  Jun 06 22:27:29 edison kernel[2305]: [84950.567951] Bluetooth: hci0: BCM (002.001.014) build 0166

                  Jun 06 22:27:29 edison bluetoothd[3201]: Failed to obtain handles for "Service Changed" characteristic

                  Jun 06 22:27:29 edison bluetoothd[3201]: RFCOMM server failed for hfp_hf: socket(STREAM, RFCOMM): Protocol not supported (93)

                  Jun 06 22:29:17 edison bluetooth_rfkill_event[2300]: 1496780957.331441: idx 1 type 2 op 2 soft 0 hard 0

                  Jun 06 22:38:31 edison bluetoothd[3201]: Unable to connect hfp_hf: socket(STREAM, RFCOMM): Protocol not supported (93)

                  Jun 06 22:38:31 edison bluetoothd[3201]: Connecting hfp_hf failed: Input/output error

                  Jun 06 22:38:31 edison bluetoothd[3201]: a2dp-sink profile connect failed for 38:BC:1A:29:4A:3E: Protocol not available

                  Jun 06 22:38:31 edison bluetoothd[3201]: a2dp-source profile connect failed for 38:BC:1A:29:4A:3E: Protocol not available

                  Jun 06 22:39:41 edison bluetoothd[3201]: Unable to connect hfp_hf: socket(STREAM, RFCOMM): Protocol not supported (93)

                  Jun 06 22:39:41 edison bluetoothd[3201]: Connecting hfp_hf failed: Input/output error

                  Jun 06 22:39:41 edison bluetoothd[3201]: a2dp-sink profile connect failed for 38:BC:1A:29:4A:3E: Protocol not available

                  Jun 06 22:39:41 edison bluetoothd[3201]: a2dp-source profile connect failed for 38:BC:1A:29:4A:3E: Protocol not available

                  Jun 06 23:00:22 edison kernel: Bluetooth: hci0 command 0x0402 tx timeout

                  Jun 06 23:00:22 edison kernel[2305]: [86923.222812] Bluetooth: hci0 command 0x0402 tx timeout

                  Jun 06 23:05:04 edison kernel: Bluetooth: hci0: Frame reassembly failed (-84)

                  Jun 06 23:05:04 edison kernel[2305]: [87205.816413] Bluetooth: hci0: Frame reassembly failed (-84)

                  Jun 06 23:05:06 edison bluetoothd[3201]: Failed to set mode: Failed (0x03)

                  Jun 06 23:05:06 edison kernel: Bluetooth: hci0 command 0x0c3a tx timeout

                  Jun 06 23:05:06 edison kernel[2305]: [87207.828478] Bluetooth: hci0 command 0x0c3a tx timeout
                  <repeated 4x>

                  Jun 06 23:07:52 edison kernel: Bluetooth: hci0 command 0x200b tx timeout

                  Jun 06 23:07:52 edison kernel: Bluetooth: hci0: Frame reassembly failed (-84)

                  Jun 06 23:07:52 edison kernel[2305]: [87373.459107] Bluetooth: hci0 command 0x200b tx timeout

                  Jun 06 23:07:52 edison kernel[2305]: [87373.464604] Bluetooth: hci0: Frame reassembly failed (-84)

                  Jun 06 23:07:54 edison kernel: Bluetooth: hci0 command 0x200c tx timeout

                  Jun 06 23:07:54 edison kernel[2305]: [87375.507086] Bluetooth: hci0 command 0x200c tx timeout

                  Jun 06 23:10:05 edison bluetoothd[3201]: a2dp-sink profile connect failed for 00:10:60:D0:BE:9D: Protocol not available

                  Jun 06 23:10:05 edison bluetoothd[3201]: a2dp-source profile connect failed for 00:10:60:D0:BE:9D: Protocol not available

                   

                  So , it works a bit (somehow that seems to be normal for BT, I can seem to get my phone to connect with my car, but it connects with my computer, grrr). Now I am wondering, something wrong with the kernel driver, bluetooth config, or the serial connection between HS UART (3Mb/s!) and the bluetooth interface.

                  • 81. Re: Newer Kernel on Edison (OpenWrt)
                    0andriy

                    At least my understanding that we need a change for MAC address and maybe do some additional configuration. So, I'm not an expert in BT at all and only what I can recommend is to file bugs on kernel bugzilla against bluetooth driver (at least one about MAC address). I can't help here.

                    • 82. Re: Newer Kernel on Edison (OpenWrt)
                      FerryT

                      Played around a bit more with bluetooth.

                       

                      There seems to be more working than I thought.

                      - pairing works with other 4.0 devices (my phone and my laptop)

                      - pairing seems not to be working with 2.0 devices (the dongle in my PC), this may be a configuration issue that I need to research further

                      - seems like the Edison disconnects when no bluetooth services are in use, that may be normal

                      - my new kernel image has all 'experimental' BT services disabled, including OBEX. Because of this not much useful services remain, I will fix that soon.

                      - I have been able to get agetty to listen on rfcomm0 on the Edison and then 'screen' into a login from my laptop (wireless console). The BT then persists as it should.

                      - It would be nice to be able to get a network connection over BT, but I don't know how to do that yet. Hints appreciated.

                       

                      Don't know any other use cases for BT yet, so this a low prio for me. But anyway, I sleep better knowing that it works :-)

                      • 83. Re: Newer Kernel on Edison (OpenWrt)
                        FerryT

                        Pushed BT changes today to https://github.com/htot/meta-intel-edison/tree/morty. Now the bluetooth firmware is loaded, 'experimental' tools installed (this includes btattach). Services configuration is yocto standard file, but this may need modification. That is a tbd.

                        • 84. Re: Newer Kernel on Edison (OpenWrt)
                          FerryT

                          Today I managed to pair the Edison with the BT2.0 PC. Not sure what did the trick, because I did 2 things:

                          1) install a newer bluetooth firmware (as you see above the build was 166, now it is 176), which I found here android-x86 / device/generic/common / [eb3057] /firmware/brcm . I think android-x86 moved their latest repositories to another location, but I didn't find (more) newer firmware there. So, afaik this is the latest in the wild, but if anybody found something newer please let me know.

                          2) On the Edison I remove the PC device ( that didn't exist, because it was never paired) from bluetoothctl. And on the PC too, from within KDE's bluetooth tray.

                          3) Then used bluetoothctl on both machines to pair.

                           

                          So, could be the firmware, or a half broken pairing state that needed clean up. Or both.

                           

                          4) found out that you can not login as root via the bluetooth rfcomm0, it is blocked by pam, that is a good thing. You can login as user, if you create one first.

                           

                          Next, I will try to get pan working, add a systemd service to start btattach, update recipies to get latest wifi fimware from kernel.org and bt firmware from android-x86.

                           

                          And then it will be time to play with pincontrols and muxes.

                          • 85. Re: Newer Kernel on Edison (OpenWrt)
                            0andriy

                            I have 3 versions of firmwares,  one of them used to be pre-production and I wouldn't share it, the rest is the same set you have, i.e. 166 and 176. Btw, the guy, who is related to kernel development, from Broadcom is responsive, you may ask him about firmwares I suppose. https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/commit/?id=ffdec3f6a5f29eb8a848b6a2417e0a1b45d32fcc (Brennan reported issues with Wi-Fi firmware on Edison and here we are)

                            • 86. Re: Newer Kernel on Edison (OpenWrt)
                              FerryT

                              I can't seem to find any information on how to modify pinmux mode in run time from user space.

                               

                              I found info on how to do that from within drivers (far away from my capabilities), and a little on device tree. But as I understand the dt gets built into the kernel.

                               

                              A pointer in the right direction is highly appreciated.

                              • 87. Re: Newer Kernel on Edison (OpenWrt)
                                0andriy

                                The main question is a good justification for "why do you need that run time?"

                                Otherwise, regarding to Edison, you need to write a bit of C code (because there is neither ACPI (yet) nor DT for that).

                                Here (http://hobby.farit.ru/connecting-buttons-intel-edison/) I put an example how to enable PWM out for newer kernel.

                                • 88. Re: Newer Kernel on Edison (OpenWrt)
                                  FerryT

                                  0andriy I can think of 2 use cases:

                                  1) In a development situation (eh typically like the Edison), you may want to quickly change the mux modes. F.i. you haver RX/TX enabled for ttyS1, but you decide you might need RX/TX/RTS/CTS. So you need to put 2 pins extra in the UART mode, which will remove them from the available GPIO pin list. But you don't really want to build a new kernel to do a quick test, running a bash script but be nice, or run a small program using mraa (interestingly, mraa can not do uart with hw flow control, so this sort of an anti-example).

                                  2) Some applications (I never had that my self), need more functions then there are pins, but not all functions at the same time.  Example: at a certain point in time TX is connected to the UART, but in another point in time the user space drives then pin low for a certain time (this is a function that the UART driver can not do afaik, the UART always frames in a start/stop bit, it can generate a BREAK but not for a programmable time). So you would reprogram TX as GPIO and set low. Then later program back to UART.

                                   

                                  I think this is what mraa theoretically provides, and I was investigating what it would take to make mraa work on the Edison.

                                   

                                  Nevertheless for production (when neither 1) or 2) applies), fixing the pin modes (with the device tree I guess, need to study that) is very convenient and improves reliability as well.

                                   

                                  In your example, is this code running in the kernel? The include files are missing, but I don't think pinctrl_register_mappings can be called from user space?

                                  • 89. Re: Newer Kernel on Edison (OpenWrt)
                                    0andriy

                                    No, 1) is a good example, though ACPI / DT + reboot solves it easily without writing a line of code. See how it's done in https://github.com/westeri/meta-acpi/ layer for Intel IoT ACPI-enabled boards.

                                    OTOH 2) is kinda subjective. For me sounds like it needs a specific driver in kernel for such a special hardware.

                                     

                                    With regard to my patch, I can send it to you, just drop me an email and I answer on it with a properly formatted patch. I use several like it for testing.

                                    1 4 5 6 7 8 Previous Next