Difference between revisions of "Heirloom BT pairing setup"

From Studio Kousagi Wiki
Jump to: navigation, search
(Created page with "=Procedure used to prime Novena Heirloom laptops= This is run on the Novena Heirloom laptops prior to shipping to pair the BT keyboard. #Prep laptop hardware for booting. #Inser...")
 
 
(29 intermediate revisions by the same user not shown)
Line 2: Line 2:
 
This is run on the Novena Heirloom laptops prior to shipping to pair the BT keyboard.
 
This is run on the Novena Heirloom laptops prior to shipping to pair the BT keyboard.
  
#Prep laptop hardware for booting.
+
#Extract the heirloom hardware kit, and assemble the hardware for booting.
#Insert SD card for heirloom init
+
##Pull out motherboard, long flex cable, PCIe card, hard drive. Return other items to box.
#Short across the P_EXT header
+
##Use ESD bag to line workspace.
#Power on the system. It should boot to a login screen, and not a blue screen with a text menu on it
+
##Attach PCIe card using a temporary screw.
#Plug in a USB keyboard
+
##Label PCIe card with box number.
#Type in 'root' and 'kosagi' to log in
+
##Attach front panel board with matching numbered board
#Start a terminal window.
+
##Attach fan to front panel board
#type 'systemctl stop bluetooth'
+
##Attach temporary speakers to front panel board
#type 'rm -rf /var/lib/bluetooth'
+
##Attach LCD panel adapter
#type 'systemctl start bluetooth'
+
##Label BT keyboard with corresponding box number
#type 'bluetoothctl'. You will now be in the bluetooth shell.
+
##Label hard drive with corresponding box number
##In the BT shell, type 'power on'
+
##Attach hard drive
##In the BT shell, type 'agent KeyboardOnly'
+
#Boot into temporary environment using external SD image (to avoid spoiling the first boot experience primed on the SSD)
##In the BT shell, type 'default-agent'
+
##Insert SD card for heirloom init
##In the BT shell, type 'pairable on'
+
##Short across the P_EXT header
##In the BT shell, type 'scan on'. At this point, flick the switch on the right hand side of the BT keyboard. You should see within a few seconds the keyboard show up, with an MAC ID starting with 90:...
+
##Attach temporary battery board. This should power on the system.
##In the BT shell, type 'pair 90:' and hit tab. This should tab-complete the whole BT keyboard MAC ID.
+
##It should boot to a login screen, and not a blue screen with a text menu on it
##Follow the instructions (e.g. typing into BT keyboard the 6-digit PIN followed by enter key)
+
##Plug in a USB keyboard to the front panel board
##After typing in the PIN, the system should indicate the keyboard is paired.
+
##Type in 'root' and 'kosagi' to log in
##In the BT shell, type 'trust 90:' and hit tab.  
+
#Configure BT in the temporary boot environment with the new keyboard
##In the BT shell, type 'connect 90:' and hit tab.
+
##Start a terminal window
##In the BT shell, type 'quit'
+
##type 'bluetoothctl'. You will now be in the bluetooth shell. Here, you will pair and trust the keyboard.
#You should now be back in the main terminal window environment.  
+
###In the BT shell, type 'power on'
#Mount the SSD with 'mount /dev/sdb3 /mnt'
+
###In the BT shell, type 'agent KeyboardOnly'
#Install BT firmware with 'dpkg –root=/mnt -i Downloads/firmware-atheros_0.43_all.deb'
+
###In the BT shell, type 'default-agent'
#Copy BT configuration with 'cp -a /var/lib/bluetooth /mnt/var/lib'
+
###In the BT shell, type 'pairable on'
#Unmount SSD with 'umount /mnt'
+
###In the BT shell, type 'scan on'. At this point, flick the switch on the right hand side of the BT keyboard. You should see within a few seconds the keyboard show up, with an MAC ID starting with 90:...
#Shutdown the system with 'shutdown -h now'
+
###In the BT shell, type 'pair 90:' and hit tab. This should tab-complete the whole BT keyboard MAC ID.
#Power off the system, so that the orange light on the mainboard is off. This may require you to press and hold the power button for a few seconds
+
###Follow the instructions (e.g. typing into BT keyboard the 6-digit PIN followed by enter key). If there is no prompt to pair using a PIN code, allow the pairing to abort, and try again. Do not proceed with next steps until you've been prompted to enter a PIN code.
#Remove the SD card from the external SD card slot
+
###After typing in the PIN, the system should indicate the keyboard is paired.
#Reboot the system. It should go to a blue screen with a text menu on it.  
+
###In the BT shell, type 'trust 90:' and hit tab.  
#Hit the space bar on the bluetooth keyboard. It should automatically associate, and you can tell it's working by using the up/down arrow keys to navigate the menu.
+
###In the BT shell, type 'connect 90:' and hit tab.
 +
###In the BT shell, type 'quit'
 +
###You should now be back in the main terminal window environment.  
 +
#Update the firmware on the target
 +
##Mount the SSD with 'mount /dev/sda3 /mnt'
 +
##Insert the USB drive with firmware update into the front panel board
 +
##mount the USB drive to 'mount /dev/sdb1 /mnt2'
 +
##go to the drive directory with 'cd /mnt2'
 +
##run update using 'dpkg --root=/mnt -i *.deb'
 +
#Copy the BT configuration from the temporary boot environment onto the permanent SSD environment
 +
##Install BT firmware with 'dpkg –root=/mnt -i ~/Downloads/firmware-atheros_0.43_all.deb'
 +
##Copy BT configuration with 'cp -a /var/lib/bluetooth /mnt/var/lib/'
 +
#manually install /boot contents because you can't do that on a /mnt environment
 +
##run 'mount /dev/sda1 /mnt3'
 +
## cp novena.dtb /mnt3; cp zimage /mnt3
 +
## umount /mnt3
 +
## run 'mount /dev/mmcblk1p1 /mnt3'
 +
## cp novena.dtb /mnt3; cp zimage /mnt3
 +
## umount /mnt3
 +
#Test audio
 +
## test audio by playing a song. 'mplayer -ao pulse::1 test.mp3'. You will need to unmute audio using alsamixer. Run 'alsamixer', select the imx audio device using F6, and unmute any channels that are muted.
 +
##unmount USB drive wtih 'cd; umount /mnt2'
 +
#Set the hardware EEPROM with heirloom flag
 +
##use novena-eeprom to update the heirloom flag: 'novena-eeprom -f es8328,senoko,edp,pcie,gbit,hdmi,eepromoops,sataroot,heirloom -w'. A script called eeprom-cmd.sh was created for convenience.
 +
##Unmount SSD with 'umount /mnt'
 +
#Test the suspend function
 +
##Select suspend from the power menu
 +
##Use the wake-up switch to power the system back on again. Verify the BT keyboard still talks to the system.
 +
#Remove bluetooth config on the temporary boot environment
 +
##type 'systemctl stop bluetooth'
 +
##type 'rm -rf /var/lib/bluetooth/*'
 +
#Test the configuration
 +
##Shutdown the system with 'shutdown -h now'
 +
##Remove the SD card from the external SD card slot
 +
##Make sure the system is in cold shutdown state (orange light off)
 +
##Reboot the system using the power button (to test the button). It should go to a blue screen with a text menu on it.  
 +
##The fan should be spinning during power-on.
 +
##Flick the right switch on the BT keyboard to re-initiate pairing.
 +
##Hit the space bar on the bluetooth keyboard. It should automatically associate, and you can tell it's working by using the up/down arrow keys to navigate the menu.
 +
##Take note if the fan is spinning. It should be stopped now if the thermal driver is working correctly.
 
#Turn the system off. You are now done
 
#Turn the system off. You are now done

Latest revision as of 19:19, 28 March 2015

Procedure used to prime Novena Heirloom laptops

This is run on the Novena Heirloom laptops prior to shipping to pair the BT keyboard.

  1. Extract the heirloom hardware kit, and assemble the hardware for booting.
    1. Pull out motherboard, long flex cable, PCIe card, hard drive. Return other items to box.
    2. Use ESD bag to line workspace.
    3. Attach PCIe card using a temporary screw.
    4. Label PCIe card with box number.
    5. Attach front panel board with matching numbered board
    6. Attach fan to front panel board
    7. Attach temporary speakers to front panel board
    8. Attach LCD panel adapter
    9. Label BT keyboard with corresponding box number
    10. Label hard drive with corresponding box number
    11. Attach hard drive
  2. Boot into temporary environment using external SD image (to avoid spoiling the first boot experience primed on the SSD)
    1. Insert SD card for heirloom init
    2. Short across the P_EXT header
    3. Attach temporary battery board. This should power on the system.
    4. It should boot to a login screen, and not a blue screen with a text menu on it
    5. Plug in a USB keyboard to the front panel board
    6. Type in 'root' and 'kosagi' to log in
  3. Configure BT in the temporary boot environment with the new keyboard
    1. Start a terminal window
    2. type 'bluetoothctl'. You will now be in the bluetooth shell. Here, you will pair and trust the keyboard.
      1. In the BT shell, type 'power on'
      2. In the BT shell, type 'agent KeyboardOnly'
      3. In the BT shell, type 'default-agent'
      4. In the BT shell, type 'pairable on'
      5. In the BT shell, type 'scan on'. At this point, flick the switch on the right hand side of the BT keyboard. You should see within a few seconds the keyboard show up, with an MAC ID starting with 90:...
      6. In the BT shell, type 'pair 90:' and hit tab. This should tab-complete the whole BT keyboard MAC ID.
      7. Follow the instructions (e.g. typing into BT keyboard the 6-digit PIN followed by enter key). If there is no prompt to pair using a PIN code, allow the pairing to abort, and try again. Do not proceed with next steps until you've been prompted to enter a PIN code.
      8. After typing in the PIN, the system should indicate the keyboard is paired.
      9. In the BT shell, type 'trust 90:' and hit tab.
      10. In the BT shell, type 'connect 90:' and hit tab.
      11. In the BT shell, type 'quit'
      12. You should now be back in the main terminal window environment.
  4. Update the firmware on the target
    1. Mount the SSD with 'mount /dev/sda3 /mnt'
    2. Insert the USB drive with firmware update into the front panel board
    3. mount the USB drive to 'mount /dev/sdb1 /mnt2'
    4. go to the drive directory with 'cd /mnt2'
    5. run update using 'dpkg --root=/mnt -i *.deb'
  5. Copy the BT configuration from the temporary boot environment onto the permanent SSD environment
    1. Install BT firmware with 'dpkg –root=/mnt -i ~/Downloads/firmware-atheros_0.43_all.deb'
    2. Copy BT configuration with 'cp -a /var/lib/bluetooth /mnt/var/lib/'
  6. manually install /boot contents because you can't do that on a /mnt environment
    1. run 'mount /dev/sda1 /mnt3'
    2. cp novena.dtb /mnt3; cp zimage /mnt3
    3. umount /mnt3
    4. run 'mount /dev/mmcblk1p1 /mnt3'
    5. cp novena.dtb /mnt3; cp zimage /mnt3
    6. umount /mnt3
  7. Test audio
    1. test audio by playing a song. 'mplayer -ao pulse::1 test.mp3'. You will need to unmute audio using alsamixer. Run 'alsamixer', select the imx audio device using F6, and unmute any channels that are muted.
    2. unmount USB drive wtih 'cd; umount /mnt2'
  8. Set the hardware EEPROM with heirloom flag
    1. use novena-eeprom to update the heirloom flag: 'novena-eeprom -f es8328,senoko,edp,pcie,gbit,hdmi,eepromoops,sataroot,heirloom -w'. A script called eeprom-cmd.sh was created for convenience.
    2. Unmount SSD with 'umount /mnt'
  9. Test the suspend function
    1. Select suspend from the power menu
    2. Use the wake-up switch to power the system back on again. Verify the BT keyboard still talks to the system.
  10. Remove bluetooth config on the temporary boot environment
    1. type 'systemctl stop bluetooth'
    2. type 'rm -rf /var/lib/bluetooth/*'
  11. Test the configuration
    1. Shutdown the system with 'shutdown -h now'
    2. Remove the SD card from the external SD card slot
    3. Make sure the system is in cold shutdown state (orange light off)
    4. Reboot the system using the power button (to test the button). It should go to a blue screen with a text menu on it.
    5. The fan should be spinning during power-on.
    6. Flick the right switch on the BT keyboard to re-initiate pairing.
    7. Hit the space bar on the bluetooth keyboard. It should automatically associate, and you can tell it's working by using the up/down arrow keys to navigate the menu.
    8. Take note if the fan is spinning. It should be stopped now if the thermal driver is working correctly.
  12. Turn the system off. You are now done