This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Serialization problem using OpenWRT on mips board as application part.

Hello.

I want to use nRF52810 as a connectvity platform connected to OpenWRT MIPS based board via UART. For some reason the only solution I can assure is to use 2 wire UART without parity control using 9600 baudrate. I am not able to make it work.
What I've done:
- successfully created connectivity binary for PCA10040e board (nRF52810 emulated on nRF52832) that is using s112 SoftDevice (the one that will fit my target uC)
- successfully connected such a connectivity board to another PCA10040 board running heart rate example - it works fine using 2 wire 9600 UART
- successfully compiled pc-ble-example for my OpenWRT board
Unfortunately:
- I am not able to run pc-ble-driver based heart rate example by connecting my MIPS board to PCA10040 running connectivity binary with s112
- I am not able to run pc-ble-driver based heart rate example by connecting my MIPS board to PCA10040 running connectivity binary with s132
In both cases pc-ble-driver based heart rate example informs about a problem with detecting SoftDevice (no expected response). 
Are there some limitations regarding pc-ble-driver and serialization PHY? Maybe pc-ble-driver expects higher baudrate or even flow control? Are someone aware of problems using pc-ble-driver without connectivity binaries in a standard versions provided along with the pc-ble-driver? 

Parents
  • Hi Alan Klimala

    I am also trying to do exactly the same but ran into an issue while compiling pc-ble-driver for x86_64 itself.

    Can you pls share the steps which you used to cross compile pc-ble-driver for mips based board which could be run on openwrt ?


    Thanks in advance,

    Kasiviswanathan.V

  • Will docker config file be enough? If so then here you go:

    FROM ubuntu:latest
    
    MAINTAINER Alan Klimala <[email protected]>
    
    # Get neccessary dependencies
    #############################
    RUN apt-get update -qq &&\
        apt-get install -y \
    		bash \
    		bc \
    		binutils \
            build-essential \
    		bzip2 \
            curl \
    		cpio \
            file \
            gawk \
    		gcc \
    		g++ \
            gettext \
            git \
    		gzip \
            libncurses5-dev \
            libssl-dev \
    		make \
    		mercurial \
    		nano \
    		ninja-build \
    		patch \
    		perl \
            python2.7 \
            python3 \
            rsync \
    		sed \
            subversion \
            sudo \
            swig \
    		tar \
            unzip \
            wget \
            zlib1g-dev \
            && apt-get -y autoremove \
            && apt-get clean \
            && rm -rf /var/lib/apt/lists/*
    
    # Compile OpenWRT build environment
    ###################################
    WORKDIR /
    RUN git clone https://github.com/openwrt/openwrt.git
    WORKDIR /openwrt
    RUN ./scripts/feeds update -a \
    	&& ./scripts/feeds install -a
    COPY ./menuconfig.config /openwrt/.config
    ENV FORCE_UNSAFE_CONFIGURE=1
    RUN make
    
    # Compile vcpkg tool from Nordic Semiconductor
    ##############################################
    WORKDIR /home
    RUN git clone https://github.com/NordicPlayground/vcpkg.git 
    WORKDIR /home/vcpkg 
    RUN ./bootstrap-vcpkg.sh \
    	&& ./vcpkg integrate install \
    	&& ./vcpkg install sdl2 curl asio catch2 \
    	&& ./vcpkg install --head spdlog
    ENV VCPKG_ROOT=/home/vcpkg
    ENV PATH=$VCPKG_ROOT:$PATH
    RUN echo "set(CMAKE_C_COMPILER mipsel-openwrt-linux-musl-gcc)" >> ./triplets/x64-linux.cmake
    RUN echo "set(CMAKE_CXX_COMPILER mipsel-openwrt-linux-musl-g++)" >> ./triplets/x64-linux.cmake
    	
    # Register OpenWRT SDK
    #############################
    ENV STAGING_DIR=/openwrt/staging_dir
    ENV TOOLCHAIN_DIR=$STAGING_DIR/toolchain-mipsel_24kc_gcc-8.4.0_musl
    ENV LDCFLAGS=$TOOLCHAIN_DIR/usr/lib
    ENV LD_LIBRARY_PATH=$TOOLCHAIN_DIR/usr/lib
    ENV PATH=$TOOLCHAIN_DIR/bin:$PATH
    #ENV CC=mipsel-openwrt-linux-gcc
    #ENV CXX=mipsel-openwrt-linux-g++
    
    # Prepare libnrf package
    ##################################
    #WORKDIR /home
    #RUN mkdir -p packages/libnrf
    #COPY ./pc-ble-driver/Makefile /home/packages/libnrf/Makefile
    #WORKDIR /openwrt
    #RUN cp ./feeds.conf.default ./feeds.conf \
    #	&& echo "src-link vemmio /home/packages" >> feeds.conf
    #RUN ./scripts/feeds update -a \
    #	&& ./scripts/feeds install -a
    
    # Uncomment below if you want 
    # to have libNRF built.
    ##################################
    #WORKDIR /home/packages/libnrf
    #RUN rm Makefile && \
    #	git clone https://your-link-to-pc-ble-driver .
    #COPY ./pc-ble-driver/Makefile /home/packages/libnrf/Makefile
    #WORKDIR /openwrt
    #COPY ./libnrf_menuconfig.config /openwrt/.config
    #RUN make
    
    WORKDIR /home
    CMD ["bash"]

Reply
  • Will docker config file be enough? If so then here you go:

    FROM ubuntu:latest
    
    MAINTAINER Alan Klimala <[email protected]>
    
    # Get neccessary dependencies
    #############################
    RUN apt-get update -qq &&\
        apt-get install -y \
    		bash \
    		bc \
    		binutils \
            build-essential \
    		bzip2 \
            curl \
    		cpio \
            file \
            gawk \
    		gcc \
    		g++ \
            gettext \
            git \
    		gzip \
            libncurses5-dev \
            libssl-dev \
    		make \
    		mercurial \
    		nano \
    		ninja-build \
    		patch \
    		perl \
            python2.7 \
            python3 \
            rsync \
    		sed \
            subversion \
            sudo \
            swig \
    		tar \
            unzip \
            wget \
            zlib1g-dev \
            && apt-get -y autoremove \
            && apt-get clean \
            && rm -rf /var/lib/apt/lists/*
    
    # Compile OpenWRT build environment
    ###################################
    WORKDIR /
    RUN git clone https://github.com/openwrt/openwrt.git
    WORKDIR /openwrt
    RUN ./scripts/feeds update -a \
    	&& ./scripts/feeds install -a
    COPY ./menuconfig.config /openwrt/.config
    ENV FORCE_UNSAFE_CONFIGURE=1
    RUN make
    
    # Compile vcpkg tool from Nordic Semiconductor
    ##############################################
    WORKDIR /home
    RUN git clone https://github.com/NordicPlayground/vcpkg.git 
    WORKDIR /home/vcpkg 
    RUN ./bootstrap-vcpkg.sh \
    	&& ./vcpkg integrate install \
    	&& ./vcpkg install sdl2 curl asio catch2 \
    	&& ./vcpkg install --head spdlog
    ENV VCPKG_ROOT=/home/vcpkg
    ENV PATH=$VCPKG_ROOT:$PATH
    RUN echo "set(CMAKE_C_COMPILER mipsel-openwrt-linux-musl-gcc)" >> ./triplets/x64-linux.cmake
    RUN echo "set(CMAKE_CXX_COMPILER mipsel-openwrt-linux-musl-g++)" >> ./triplets/x64-linux.cmake
    	
    # Register OpenWRT SDK
    #############################
    ENV STAGING_DIR=/openwrt/staging_dir
    ENV TOOLCHAIN_DIR=$STAGING_DIR/toolchain-mipsel_24kc_gcc-8.4.0_musl
    ENV LDCFLAGS=$TOOLCHAIN_DIR/usr/lib
    ENV LD_LIBRARY_PATH=$TOOLCHAIN_DIR/usr/lib
    ENV PATH=$TOOLCHAIN_DIR/bin:$PATH
    #ENV CC=mipsel-openwrt-linux-gcc
    #ENV CXX=mipsel-openwrt-linux-g++
    
    # Prepare libnrf package
    ##################################
    #WORKDIR /home
    #RUN mkdir -p packages/libnrf
    #COPY ./pc-ble-driver/Makefile /home/packages/libnrf/Makefile
    #WORKDIR /openwrt
    #RUN cp ./feeds.conf.default ./feeds.conf \
    #	&& echo "src-link vemmio /home/packages" >> feeds.conf
    #RUN ./scripts/feeds update -a \
    #	&& ./scripts/feeds install -a
    
    # Uncomment below if you want 
    # to have libNRF built.
    ##################################
    #WORKDIR /home/packages/libnrf
    #RUN rm Makefile && \
    #	git clone https://your-link-to-pc-ble-driver .
    #COPY ./pc-ble-driver/Makefile /home/packages/libnrf/Makefile
    #WORKDIR /openwrt
    #COPY ./libnrf_menuconfig.config /openwrt/.config
    #RUN make
    
    WORKDIR /home
    CMD ["bash"]

Children
No Data
Related