1 Reply Latest reply on Nov 2, 2018 12:33 PM by stefanrousseau

    Help for Blue Tooth

    hugoliu56

      I use petalinux 2017.2 to generate the system.

      Wifi is ok but Bluetooth not work. I use the bt.sh.

      #To turn on BT_REG_ON, which is on EMIO GPIO #0
      echo 960 > /sys/class/gpio/export
      ./bt_ttys2.sh: line 7: echo: write error: Device or resource busy
      echo out > /sys/class/gpio/gpio960/direction
      echo 1 > /sys/class/gpio/gpio960/value
      #Set uart0 = serial1 = ttyPS1 baudrate:
      #(this was for UART0 from PS) stty -F /dev/ttyPS1 115200
      stty -F /dev/ttyS2 115200
      sleep 1s
      #For the flow control.
      #It seems you have to send a character before RTS from the 1DX modulke will be set in the correct state.
      #(this was for UART0 from PS) echo "W" > /dev/ttyPS1
      echo "W" > /dev/ttyS2
      sleep 1s
      #Initialize the device:
      #(this was for UART0 from PS) hciattach /dev/ttyPS1 bcm43xx 921600 flow -t 10
      hciattach /dev/ttyS2 bcm43xx 3000000 flow -t 10
      Initialization timed out.
      sleep 2s
       
      #Configure the right BT device:
      hciconfig hci0 up
      Can't get device info: No such device
       
      #begin new
      sleep 1s
      random: crng init done
      hciconfig hci0 reset
      Can't get device info: No such device
      hciconfig hci0 class 0x200404
      Can't get device info: No such device
      #for no password:
        #for no password:
        hciconfig hci0 sspmode 1
        Can't get device info: No such device
        hciconfig hci0 piscan
        Can't get device info: No such device
        hciconfig hci0 leadv
        Can't get device info: No such device
        hciconfig -a
        #end new
         
        sleep 1s
        #Scan for BT devices:
        hcitool scan
        Device is not available: No such device
        set +v
        *****************
        The kernel information as below:
       
         Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
       
         43c00000.serial: ttyS2 at MMIO 0x43c01000 (irq = 166, base_baud = 3000000) is a                       16550A
       
         e0000000.serial: ttyPS1 at MMIO 0xe0000000 (irq = 144, base_baud = 6249999) is a                       xuartps
       
         e0001000.serial: ttyPS0 at MMIO 0xe0001000 (irq = 145, base_baud = 6249999) is a                       xuartps
       
         console [ttyPS0] enabled
       
         console [ttyPS0] enabled
       
         bootconsole [earlycon0] disabled
       
         bootconsole [earlycon0] disabled
       
          
       
          

      Please help me to solve it.

        • GPIO on MiniZed
          stefanrousseau

          With the tools versions, the way GPIO is addressed has changed.  Please download the Using Bluetooth on MiniZed 2018.2

          document for 2017.4 or 2018.2 and look at the paragraph on playing audio over a Bluetooth Speaker.  The "get-gpio-offsets" utility can be used to discover the GPIO locations.