bringmeup / hub

1 stars 0 forks source link

BT does not work #17

Open nazgee opened 6 years ago

nazgee commented 6 years ago

BT does not work -- even the initial steps (i.e. installing line discipline and uploading firmware to shared transport) fail.

ST stands for shared-transport -- abstraction layer that allows sharing GPS and BT on the same transport layer (UART). In order to address 2 different modules, shared-transport interface defines channels. Each channel has a special meaning and is used by a particular part of TI module:

In order to fully initialize the shared-transport layer 2 components are involved:

  1. KIM exposes sysfs nodes in /sys/devices/kim/*
  2. KIM waits for installing line discipline (ldisc) by userspace
  3. UIM reads KIM configuration from /sys/devices/kim/* (e.g. baudrate or serial port name)
  4. UIM attempts to register line discipline (invokes st_uart_config) 5 KIM uploads firmware to the chip - ( https://elixir.bootlin.com/linux/v4.14.2/source/drivers/misc/ti-st/st_kim.c#L497 )

Unfortunately, step 4 fails with this:

(stk) :ldisc installation timeout

because UIM is not able to set the baudrate properly:

03-27 02:20:09.846   223   223 E uim-sysfs: uim: Inside main
03-27 02:20:09.847   223   223 E uim-sysfs: uim:kim sysfs name: bt_kim
03-27 02:20:09.847   223   223 E uim-sysfs: uim:ST built into the kernel ?
03-27 02:20:09.848   223   223 E uim-sysfs: uim:BT driver module un-available... 
03-27 02:20:09.848   223   223 E uim-sysfs: uim:BT driver built into the kernel ?
03-27 02:20:09.848   223   223 E uim-sysfs: uim:FM driver module un-available... 
03-27 02:20:09.848   223   223 E uim-sysfs: uim:FM driver built into the kernel ?
03-27 02:20:09.848   223   223 E uim-sysfs: uim:GPS driver module un-available... 
03-27 02:20:09.848   223   223 E uim-sysfs: uim:GPS driver built into the kernel ?
03-27 02:20:09.848   223   223 E uim-sysfs: uim:FM V4L2 driver module un-available... 
03-27 02:20:09.848   223   223 E uim-sysfs: uim:FM V4L2 driver built into the kernel ?
03-27 02:20:09.848   223   223 E uim-sysfs: uim:found bluetooth rfkill entry @ 0
03-27 02:20:09.848   223   223 E uim-sysfs: 
03-27 02:20:09.848   223   223 E uim-sysfs: uim:changed permissions for /sys/class/rfkill/rfkill0/state(0) 
03-27 02:20:09.848   223   223 E uim-sysfs: 
03-27 02:20:09.854   223   223 E uim-sysfs: uim: Inside st_uart_config
03-27 02:20:09.854   223   223 E uim-sysfs: uim:install set to 1
03-27 02:20:09.857   223   223 E uim-sysfs: uim: Inside set_baud_rate
03-27 02:20:09.858   223   223 E uim-sysfs: uim: set_baud_rate() done
03-27 02:20:09.858   223   223 E uim-sysfs: uim: Setting speed to 3000000
03-27 02:20:09.858   223   223 E uim-sysfs: uim: Inside read_command_complete
03-27 02:20:09.858   223   223 E uim-sysfs: uim: Command complete started
03-27 02:20:09.858   223   223 E uim-sysfs: uim: Inside read_hci_event
03-27 02:20:09.858   223   223 E uim-sysfs: uim: read_hci_event
03-27 02:20:09.858   223   223 E uim-sysfs: uim: read_hci_event reading...
03-27 02:20:09.858   223   223 E uim-sysfs: uim: read_hci_event sleeping
03-27 02:20:09.914   223   223 E uim-sysfs: uim: read_hci_event reading...
03-27 02:20:09.914   223   223 E uim-sysfs: uim: read_hci_event sleeping
03-27 02:20:09.965   223   223 E uim-sysfs: uim: read_hci_event reading...
03-27 02:20:09.966   223   223 E uim-sysfs: uim: read_hci_event sleeping
03-27 02:20:10.017   223   223 E uim-sysfs: uim: read_hci_event reading...
03-27 02:20:10.017   223   223 E uim-sysfs: uim: read_hci_event sleeping
03-27 02:20:10.067   223   223 E uim-sysfs: uim: read_hci_event reading...
03-27 02:20:10.067   223   223 E uim-sysfs: uim: read_hci_event too many retries
03-27 02:20:10.067   223   223 E uim-sysfs: uim: Invalid response
03-27 02:20:10.067   223   223 E uim-sysfs: uim:cleanup

Ideas: