CHIP-bluetooth-speaker
CHIP-bluetooth-speaker copied to clipboard
Issues installing
Hey, when I run the setup.sh I get an error. It worked the first time I did it but never again. The reason I'm trying again in the first place is because I can see "CHIP Bluetooth speaker" in my paired devices but it doesn't connect at all. Again, it worked the first time but never again. I've tried pairing it again over and over again. I've also tried bt-agent -c NoInputNoOutput -d to get it to pair again properly with no luck. Any help would be very much appreciated!!! Here is the error I'm getting:
`Error processing line 1 of /usr/local/lib/python2.7/dist-packages/easy-install.pth: Traceback (most recent call last): File "/usr/lib/python2.7/site.py", line 162, in addpackage if not dircase in known_paths and os.path.exists(dir): File "/usr/lib/python2.7/genericpath.py", line 18, in exists os.stat(path) TypeError: must be encoded string without NULL bytes, not str
Remainder of file ignored Traceback (most recent call last): File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main "main", fname, loader, pkg_name) File "/usr/lib/python2.7/runpy.py", line 72, in _run_code exec code in run_globals File "/usr/lib/python2.7/dist-packages/easy_install.py", line 5, in main() File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 2199, in main lambda: setup( File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 2185, in with_ei_usage return f() File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 2202, in distclass=DistributionWithoutHelpCommands, **kw File "/usr/lib/python2.7/distutils/core.py", line 151, in setup dist.run_commands() File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands self.run_command(cmd) File "/usr/lib/python2.7/distutils/dist.py", line 971, in run_command cmd_obj.ensure_finalized() File "/usr/lib/python2.7/distutils/cmd.py", line 109, in ensure_finalized self.finalize_options() File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 323, in finalize_options self.check_site_dir() File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 455, in check_site_dir self.pth_file = PthDistributions(pth_file, self.all_site_dirs) File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 1531, in init self._load() File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 1553, in _load os.path.join(self.basedir, path) File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2052, in normalize_path return os.path.normcase(os.path.realpath(filename)) File "/usr/lib/python2.7/posixpath.py", line 382, in realpath path, ok = _joinrealpath('', filename, {}) File "/usr/lib/python2.7/posixpath.py", line 407, in _joinrealpath if not islink(newpath): File "/usr/lib/python2.7/posixpath.py", line 142, in islink st = os.lstat(path) TypeError: must be encoded string without NULL bytes, not str`
It's the error you're getting running setup.sh
? Can you please run sh -x setup.sh
and attach the full output?
Here is the full output:
root@chipbluetoothspeaker:~/btspeak# sh -x setup.sh
+ NAME='CHIP Bluetooth speaker'
+ DEFAULT_PIN=0000
+ [[ 0 -ne 0 ]]
+ set -e
++ uname -r
+ grep -q CONFIG_NAMESPACES /boot/config-4.4.13-ntc-mlc
+ cp -f bt-agent.bin /usr/bin/bt-agent
+ hostnamectl set-hostname 'CHIP Bluetooth speaker'
+ hostnamectl set-chassis embedded
Could not set property: Invalid chassis 'embedded'
+ :
+ DELETE_FW_ENV=0
+ '[' '!' -f /etc/fw_env.config ']'
+ echo '/dev/mtdblock3 0 0x400000 0x4000'
+ DELETE_FW_ENV=1
++ sed s,bootargs=,,
++ grep '^bootargs='
++ fw_printenv
+ BOOTARGS='root=ubi0:rootfs rootfstype=ubifs rw earlyprintk ubi.mtd=4 video=none'
+ grep -q video=none
+ echo root=ubi0:rootfs rootfstype=ubifs rw earlyprintk ubi.mtd=4 video=none
+ '[' 1 == 1 ']'
+ rm -f /etc/fw_env.config
+ '[' -f /sys/class/leds/chip:white:status/trigger ']'
+ echo '@reboot root echo none | tee /sys/class/leds/chip\:white\:status/trigger > /dev/null'
+ cat
+ mkdir -p /home/chip/.config/
+ cat
+ chown -R chip:chip /home/chip/.config/
+ chmod 0600 /home/chip/.config/bluetooth-default-pin
+ cat
+ sed -i 's|^#Class =|Class=|' /etc/bluetooth/main.conf
+ crudini --set /etc/bluetooth/main.conf General Class 0x24043C
Error processing line 1 of /usr/local/lib/python2.7/dist-packages/easy-install.pth:
Traceback (most recent call last):
File "/usr/lib/python2.7/site.py", line 162, in addpackage
if not dircase in known_paths and os.path.exists(dir):
File "/usr/lib/python2.7/genericpath.py", line 18, in exists
os.stat(path)
TypeError: must be encoded string without NULL bytes, not str
Remainder of file ignored
Traceback (most recent call last):
File "/usr/bin/crudini", line 203, in <module>
conf = parse_file(cfgfile)
File "/usr/bin/crudini", line 188, in parse_file
conf = _parse_file(filename, add_default=True)
File "/usr/bin/crudini", line 165, in _parse_file
conf.readfp(fp)
File "/usr/lib/python2.7/dist-packages/iniparse/compat.py", line 111, in readfp
self.data._readfp(fp)
File "/usr/lib/python2.7/dist-packages/iniparse/ini.py", line 641, in _readfp
raise exc
ConfigParser.ParsingError: File contains parsing errors: <???>
[line 2]:
There's stuff missing between this:
+ grep -q CONFIG_NAMESPACES /boot/config-4.4.13-ntc-mlc
and this:
+ cp -f bt-agent.bin /usr/bin/bt-agent
Did you modify the script? If so, please add back what you removed.
I removed the apt portion at the beginning to save time as I had run the script like 10 times prior. Here is the output with that section added back:
root@chipbluetoothspeaker:~/btspeak# sh -x setup.sh
- NAME='CHIP Bluetooth speaker'
- DEFAULT_PIN=0000
- [[ 0 -ne 0 ]]
- set -e ++ uname -r
- grep -q CONFIG_NAMESPACES /boot/config-4.4.13-ntc-mlc
- apt-get update Ign http://ftp.us.debian.org jessie InRelease Hit http://security.debian.org jessie/updates InRelease Hit http://ftp.us.debian.org jessie Release.gpg Hit http://opensource.nextthing.co jessie InRelease Hit http://ftp.us.debian.org jessie Release Hit http://http.debian.net jessie-backports InRelease Hit http://security.debian.org jessie/updates/main Sources Hit http://security.debian.org jessie/updates/contrib Sources Hit http://security.debian.org jessie/updates/non-free Sources Hit http://opensource.nextthing.co jessie/main armhf Packages Hit http://security.debian.org jessie/updates/main armhf Packages Hit http://security.debian.org jessie/updates/contrib armhf Packages Hit http://security.debian.org jessie/updates/non-free armhf Packages Hit http://security.debian.org jessie/updates/contrib Translation-en Hit http://security.debian.org jessie/updates/main Translation-en Hit http://security.debian.org jessie/updates/non-free Translation-en Hit http://ftp.us.debian.org jessie/main Sources Hit http://ftp.us.debian.org jessie/contrib Sources Hit http://ftp.us.debian.org jessie/non-free Sources Hit http://ftp.us.debian.org jessie/main armhf Packages Hit http://ftp.us.debian.org jessie/contrib armhf Packages Hit http://ftp.us.debian.org jessie/non-free armhf Packages Hit http://ftp.us.debian.org jessie/contrib Translation-en Ign http://opensource.nextthing.co jessie/main Translation-en Hit http://ftp.us.debian.org jessie/main Translation-en Hit http://ftp.us.debian.org jessie/non-free Translation-en Get:1 http://http.debian.net jessie-backports/main Sources/DiffIndex [27.8 kB] Get:2 http://http.debian.net jessie-backports/contrib Sources/DiffIndex [27.8 kB] Get:3 http://http.debian.net jessie-backports/non-free Sources/DiffIndex [24.0 kB] Get:4 http://http.debian.net jessie-backports/main armhf Packages/DiffIndex [27.8 kB] Get:5 http://http.debian.net jessie-backports/contrib armhf Packages/DiffIndex [25.3 kB] Get:6 http://http.debian.net jessie-backports/non-free armhf Packages/DiffIndex [8530 B] Get:7 http://http.debian.net jessie-backports/contrib Translation-en/DiffIndex [7468 B] Get:8 http://http.debian.net jessie-backports/main Translation-en/DiffIndex [27.8 kB] Get:9 http://http.debian.net jessie-backports/non-free Translation-en/DiffIndex [16.7 kB] Fetched 193 kB in 40s (4778 B/s) Reading package lists... Done
- apt-get upgrade -y Reading package lists... Done Building dependency tree Reading state information... Done Calculating upgrade... Done The following packages have been kept back: firefox-esr 0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
- apt-get install -y bluez-tools pulseaudio-module-bluetooth pulseaudio libnss-myhostname crudini Reading package lists... Done Building dependency tree Reading state information... Done bluez-tools is already the newest version. crudini is already the newest version. libnss-myhostname is already the newest version. pulseaudio is already the newest version. pulseaudio-module-bluetooth is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
- cp -f bt-agent.bin /usr/bin/bt-agent
- hostnamectl set-hostname 'CHIP Bluetooth speaker'
- hostnamectl set-chassis embedded Could not set property: Invalid chassis 'embedded'
- :
- DELETE_FW_ENV=0
- '[' '!' -f /etc/fw_env.config ']'
- echo '/dev/mtdblock3 0 0x400000 0x4000'
- DELETE_FW_ENV=1 ++ fw_printenv ++ sed s,bootargs=,, ++ grep '^bootargs='
- BOOTARGS='root=ubi0:rootfs rootfstype=ubifs rw earlyprintk ubi.mtd=4 video=none'
- echo root=ubi0:rootfs rootfstype=ubifs rw earlyprintk ubi.mtd=4 video=none
- grep -q video=none
- '[' 1 == 1 ']'
- rm -f /etc/fw_env.config
- '[' -f /sys/class/leds/chip:white:status/trigger ']'
- echo '@reboot root echo none | tee /sys/class/leds/chip:white:status/trigger > /dev/null'
- cat
- mkdir -p /home/chip/.config/
- cat
- chown -R chip:chip /home/chip/.config/
- chmod 0600 /home/chip/.config/bluetooth-default-pin
- cat
- sed -i 's|^#Class =|Class=|' /etc/bluetooth/main.conf
- crudini --set /etc/bluetooth/main.conf General Class 0x24043C Error processing line 1 of /usr/local/lib/python2.7/dist-packages/easy-install.pth: Traceback (most recent call last): File "/usr/lib/python2.7/site.py", line 162, in addpackage if not dircase in known_paths and os.path.exists(dir): File "/usr/lib/python2.7/genericpath.py", line 18, in exists os.stat(path) TypeError: must be encoded string without NULL bytes, not str
Remainder of file ignored
Traceback (most recent call last):
File "/usr/bin/crudini", line 203, in