7 Replies Latest reply on Jul 7, 2020 12:13 AM by isong

    Bluetooth on Ultra96V2

    mah110mat

      I'm trying to connect a keyboard via bluetooth on Ultra96V2 board.

      But it does not work well.

      Could anyone give me any advices to connect?

      followings are my operations..

       

      1. boot a board by Linux from http://avnet.me/ultra96-v2-oob.

      2. login by root

      3. use a script as blow

        echo BT_POWER_UP > /dev/wilc_bt

        echo BT_DOWNLOAD_FW > /dev/wilc_bt

        echo BT_FW_CHIP_WAKEUP > /dev/wilc_bt

          # after this command, same messages are shown repeatedly that is " [  341.066759] Another device is preventing allow sleep operation. request source is Wifi"

       

        stty -F /dev/ttyS1 115200

        stty -F /dev/ttyS1 crtscts

        hciattach /dev/ttyS1 -t 10 any 115200 noflow nosleep

          # this command looks like work well a moment, but timeout message came up after few seconds.

             [  171.245441] Bluetooth: hci0 command 0x1003 tx timeout

             [  173.261438] Bluetooth: hci0 command 0x1001 tx timeout

             [  175.277387] Bluetooth: hci0 command 0x1009 tx timeout

       

        hciconfig -a

          # this command gives a message but BD Address looks like weird.

            hciconfig -a

            hci0:    Type: Primary  Bus: UART

                BD Address: 00:00:00:00:00:00  ACL MTU: 0:0  SCO MTU: 0:0

                DOWN INIT RUNNING

                RX bytes:0 acl:0 sco:0 events:0 errors:0

                TX bytes:12 acl:0 sco:0 commands:3 errors:0

                Features: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00

                Packet type: DM1 DH1 HV1

                Link policy:

                Link mode: SLAVE ACCEPT

       

       

       

        • Re: Bluetooth on Ultra96V2
          anantanus

          Hi,

           

          Were you able to solve it?

           

          Can you please share it if you had solved it?

           

          Im facing the same issue

            • Re: Bluetooth on Ultra96V2
              lightcollector

              Try this:

               

              # Do this only once after board power-up:

              echo BT_POWER_UP > /dev/wilc_bt

              echo BT_DOWNLOAD_FW > /dev/wilc_bt

               

              stty -F /dev/ttyPS1 115200

              # Initialize the device:

              hciattach /dev/ttyPS1 -t 10 any 115200 noflow nosleep

              sleep 1s

              hciconfig hci0 up

              hciconfig hci0

              1 of 1 people found this helpful
                • Re: Bluetooth on Ultra96V2
                  mah110mat

                  Thank you for comments.
                  Unfortunately, I can not solve this issue yet.
                  I tried following as lightcollector commented.

                  before trying, I checked which port connected to the BT module.
                  # dmesg|grep ttyPS
                  [ 2.515418] ff000000.serial: ttyPS2 at MMIO 0xff000000 (irq = 40, base_baud = 6249999) is a xuartps
                  [ 2.519401] ff010000.serial: ttyPS0 at MMIO 0xff010000 (irq = 41, base_baud = 6249999) is a xuartps

                  in my environment, it looks like that ttyPS2 is connecting to BT module.

                  # echo BT_POWER_UP > /dev/wilc_bt
                  [ 72.729601] at_pwr_dev: open()
                  [ 72.732708] AT PWR: bt_power_up
                  [ 72.735861] Device already up. request source is BT
                  [ 72.742316] at_pwr_dev: close()
                  # echo BT_DOWNLOAD_FW > /dev/wilc_bt
                  [ 74.117535] at_pwr_dev: open()
                  [ 74.120598] AT PWR: bt_download_fw
                  [ 74.124006] Bluetooth firmware: mchp/wilc3000_ble_firmware.bin
                  [ 74.136755] Downloading BT firmware size = 58184 ...
                  [ 74.294713] Starting BT firmware
                  [ 74.405466] BT Start Succeeded
                  [ 74.408555] at_pwr_dev: close()
                  # stty -F /dev/ttyPS2 115200
                  # hciattach /dev/ttyPS2 -t 10 any 115200 noflow nosleep
                  Device setup complete
                  [ 100.589430] Bluetooth: hci0 command 0x1003 tx timeout
                  [ 102.605462] Bluetooth: hci0 command 0x1001 tx timeout
                  [ 104.621462] Bluetooth: hci0 command 0x1009 tx timeout
                  # hciconfig hci0
                  hci0: Type: Primary Bus: UART
                  BD Address: 00:00:00:00:00:00 ACL MTU: 0:0 SCO MTU: 0:0
                  DOWN
                  RX bytes:0 acl:0 sco:0 events:0 errors:0
                  TX bytes:12 acl:0 sco:0 commands:3 errors:0

                  2 of 2 people found this helpful
              • Re: Bluetooth on Ultra96V2
                isong

                Not an answer, but I have created a new thread related to this issue.

                - Bluetooth issue on Ultra96 V2 board (hci0 command 0x1001 tx timeout)