Skip to content

Commit

Permalink
lowering hci uart speed
Browse files Browse the repository at this point in the history
  • Loading branch information
hilschernetpi committed Apr 9, 2020
1 parent 00864b7 commit c26e2cf
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 21 deletions.
15 changes: 2 additions & 13 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,8 @@
#use armv7hf compatible base image
FROM balenalib/armv7hf-debian:buster-20191223 as builder

#enable cross compiling (comment out next line if built on Raspberry Pi)
RUN [ "cross-build-start" ]

#environment variables
ENV BLUEZ_VERSION 5.52
ENV BLUEZ_VERSION 5.54

RUN apt-get update && apt-get install -y \
build-essential wget \
Expand All @@ -28,9 +25,6 @@ RUN wget -P /tmp/ https://www.kernel.org/pub/linux/bluetooth/bluez-${BLUEZ_VERSI
&& make \
#install bluez tools
&& make install
#disable cross compiling (comment out next line if built on Raspberry Pi)
RUN [ "cross-build-end" ]


#STEP 2 of multistage build ----Create the final image-----

Expand All @@ -46,11 +40,8 @@ LABEL org.label-schema.build-date=$BUILD_DATE \
org.label-schema.vcs-url="https://github.com/HilscherAutomation/netPI-bluetooth" \
org.label-schema.vcs-ref=$VCS_REF

#enable cross compiling (comment out next line if built on Raspberry Pi)
RUN [ "cross-build-start" ]

#version
ENV HILSCHERNETPI_BLUEZ_VERSION 1.3.3
ENV HILSCHERNETPI_BLUEZ_VERSION 1.3.4

#labeling
LABEL maintainer="netpi@hilscher.com" \
Expand Down Expand Up @@ -117,5 +108,3 @@ ENTRYPOINT ["/etc/init.d/entrypoint.sh"]
#set STOPSGINAL
STOPSIGNAL SIGTERM

#disable cross compiling (comment out next line if built on Raspberry Pi)
RUN [ "cross-build-end" ]
7 changes: 0 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
## Bluetooth

[![](https://images.microbadger.com/badges/image/hilschernetpi/netpi-bluetooth.svg)](https://microbadger.com/images/hilschernetpi/netpi-bluetooth "Bluetooth")
[![](https://images.microbadger.com/badges/commit/hilschernetpi/netpi-bluetooth.svg)](https://microbadger.com/images/hilschernetpi//netpi-bluetooth "Bluetooth")
[![Docker Registry](https://img.shields.io/docker/pulls/hilschernetpi/netpi-bluetooth.svg)](https://registry.hub.docker.com/r/hilschernetpi/netpi-bluetooth/) 
[![Image last updated](https://img.shields.io/badge/dynamic/json.svg?url=https://api.microbadger.com/v1/images/hilschernetpi/netpi-bluetooth&label=Image%20last%20updated&query=$.LastUpdated&colorB=007ec6)](http://microbadger.com/images/hilschernetpi/netpi-bluetooth "Image last updated") 
Expand Down Expand Up @@ -72,12 +71,6 @@ Use bluez tools such as bluetoothctl, hciconfig, hcitool as usual. For a simple

For additional help or information visit the Hilscher Forum at https://forum.hilscher.com/

### Container Automated build

The project complies with the scripting based [Dockerfile](https://docs.docker.com/engine/reference/builder/) method to build the image output file. Using this method is a precondition for an [automated](https://docs.docker.com/docker-hub/builds/) web based build process on DockerHub platform.

DockerHub web platform is x86 CPU based, but an ARM CPU coded output file is needed for Raspberry Pi systems. This is why the Dockerfile includes the [balena](https://balena.io/blog/building-arm-containers-on-any-x86-machine-even-dockerhub/) steps.

### License

View the license information for the software in the project. As with all Docker images, these likely also contain other software which may be under other licenses (such as Bash, etc from the base distribution, along with any direct or indirect dependencies of the primary software being contained).
Expand Down
13 changes: 13 additions & 0 deletions hooks/post_push
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash

# Use manifest-tool to create the manifest, given the experimental
# "docker manifest" command isn't available yet on Docker Hub.

curl -Lo manifest-tool https://github.com/estesp/manifest-tool/releases/download/v0.9.0/manifest-tool-linux-amd64
chmod +x manifest-tool

./manifest-tool push from-args \
--platforms linux/arm \
--template "$IMAGE_NAME" \
--target "$IMAGE_NAME"

6 changes: 6 additions & 0 deletions hooks/pre_build
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash

# Register qemu-*-static for all supported processors except the
# current one, but also remove all registered binfmt_misc before
docker run --rm --privileged multiarch/qemu-user-static:register --reset

2 changes: 1 addition & 1 deletion init.d/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ sleep 1
sleep 1

#load firmware to BCM chip and attach to hci0
hciattach /dev/ttyAMA0 bcm43xx 921600 noflow
hciattach /dev/ttyAMA0 bcm43xx 115200 noflow

#create hci0 device
hciconfig hci0 up
Expand Down

0 comments on commit c26e2cf

Please sign in to comment.