Thread Tools
This thread is privately moderated by Jack Crossfire, who may elect to delete unwanted replies.
Apr 29, 2017, 02:12 AM
Registered User
Jack Crossfire's Avatar
Thread OP

The raspberry pi zero w arrives

After 12 desperate years, we finally have a cheap, miniature way to bridge a USB host to Wifi & bluetooth. All those gadgets which only provide a USB device controller for I/O can now be wireless.
Unlike the previous pi's, it really can function in the given form factor instead of requiring a bag full of peripherals. They finally fixed the problem of having to desolder 40 pins to access the GPIO header or having to desolder a bunch of headers to gain access to the USB & power signals. Wires can be soldered directly to large test pads on the back.

The heart of the beast is the BCM4343X, now sold as the CYW4343X. It's a bare die & a sign of how all chips are going to be packaged in the future. It provides all the wireless functions. The same chip is used on the raspberry PI 3B.

The bluetooth side of the BCM4343X is accessed by a UART. The kernel uses hciattach to attach the UART to the networking stack. Then, bluetoothd converts the socket interface into a d-bus interface. The python examples use the d-bus interface.

Current consumption is <300mA at 5V. Clockspeed is 700Mhz to 1Ghz. The kernel can be cross compiled, but all other C programs have to be compiled on the pi to satisfy dependencies. The mane program which needs to be compiled is bluetoothd. This takes 30 minutes & an 8GB flash card.

You must install the full raspian distribution, not the lite version to do anything useful. The 1st partition is a vfat boot partition. The 2nd partition is an ext4 root filesystem. The 1st step is adding 'enable_uart=1' to the vfat config.txt to get a serial console. Then, erase 'quiet' from the vfat cmdline.txt file. Then comes the usual raspi-config to expand the filesystem & disable the GUI.

To get BLE & thus bypass MFI certification to communicate with iphones, you have to compile bluez with experimental flags, edit /lib/systemd/system/bluetooth.service to run your compiled bluetoothd as bluetoothd --experimental. The next trick is running bluez/test/example-advertisement & bluez/test/example-gatt-server, then 'hciconfig hci0 leadv 0' to enable advertizing. These programs must be run with the versions of python in their shebang lines. They need exactly those versions of python or the BLE client won't be able to connect.

The only reason BLE exists is to bypass MFI certification. If Apple didn't require it, all the startups would be using full data rate bluetooth or the lightning port. If you don't need to support iPhones, a command line can be exposed over bluetooth by using some rfcomm magic. Then, your program can communicate using stdin & stdout.
Sign up now
to remove ads between posts

Quick Reply
Thread Tools

Similar Threads
Category Thread Thread Starter Forum Replies Last Post
Discussion Raspberry Pi Zero driving APA102 leds mtgtopdeck Night Flying 16 Jun 16, 2017 04:54 PM
Discussion Raspberry Pi robot building kit: Raspberry Pi 3B + AlphaBot + Camera GeekBuying 0 Feb 05, 2017 04:53 AM
Question Bare Raspberry pi zero as Fc? Maxzor Multirotor Drone Electronics 20 Apr 20, 2016 06:54 AM
Help! Raspberry Pi Zero RVaitor DIY Electronics 1 Apr 07, 2016 09:30 PM
Discussion Raspberry Pi Competition - Drone Idea 32bitbrad Multirotor Drone Talk 1 Oct 08, 2015 06:11 PM