The Mulle - A node for Bluetooth Sensor Networks / Development information    


   



Updated 2010-01-16 12.43 (swe time)

The Mulle is a small EIS (Embedded Internet System) platform based on the Renesas M16C/62P microcontroller. The Mulle platform is usually battery powered and is therefore designed for low-power consumption. The size of the Mulle platform is only 26 x 24 x 5 mm. A presentation in .pdf format also available. The Mulle platform is a complete standalone sensor node aimed at ad-hoc sensor networking and ambient intelligence systems.

All Mulle versions use the same high-density 60-pin expansion connecter where daughter boards can be attahed for a large variety of sensors. This enables the same daughter board to be used on 10/100 m. Bluetooth with temperature sensor, (v3.1, v4.1),10 m. Bluetooth with 3-axis accelerometer (v4.2), ad 150+ m. Zigbee with 3-axis accelerometer (v5.2).

The Bluetooth-based Mulle use standardized protocols such as Bluetooth profiles (LAP, SPP and PAN) and TCP/IP to communicate. This approach enables users all over the world to access sensor data from a Mulle in real time.
The newest Mulle, version v5.2, comes with a IEEE 802.15.4 (Zigbee) transceiver. TinyOS, the world's de-facto operating system for sensor nodes, is now also supported on the Mulle.
The EISLAB Mulle public server can be found here.
The Mulle commercially available from Eistec, see http://www.eistec.se.
Development information about the Mulle is available at Eistec's Wiki: http://www.eistec.se/docs/wiki.
My doctoral thesis is a good starting point for the interested reader.

Debug using mulle_term
mulle_term is a simple command line debug application for Mulle development. It is designed to work under Linux, and opens /dev/ttyUSB0 with baud rate 57600 by default (which are the same settings as the Mulle software uses by default).

Pictures of the Mulle in several formats
Pictures of the Mulle, free for use pictures.

-->

Features

  • Renesas M16C/62 MCU @ 10 MHz, Mitsumi Bluetooth 1.2 or 2.0 radio transceiver (IEEE 802.15.4/ZigBee prototype exists)
  • IR (BP104), temperature (DS600), acceleration/seismic (ADXLxxx), on-board generation 2
  • Gyro, GPS (Lassen iQ), pulse (Polar), SpO2 (Nonin) and other sensors available for generation 1
  • 60-pin expansion board for external sensors available for version 3.
    Eagle CAD templates for the expansion board are here: v 1.0 (obsolete) and v 1.1.

Power Consumption - Typical Operation

Mulle v1Mulle v2 IRMulle v3
Battery Supply1 Lishen Lithium-polymer (25x25x5 mm)1 Lishen Lithium-polymer (25x25x5 mm)1 Lishen Lithium-polymer (25x25x5 mm)
Minimum Vin3.4 V3.4 V3.1 V
Battery Capacity130 mAh130 mAh130 mAh
Regulated Supplyyesyesyes
uC active 10 MHz, radio off 7.6 mA
uC active 5 MHz, radio off 5.1 mA
uC active 2.5 MHz, radio off 3.3 mA
uC active 1.25 MHz, radio off 2.2 mA
uC sleep with RTC on0.97 mA0.003 mA0.004 mA
uC sleep, radio idle listening (inquiry + page scan)2 mA1.02 mA
uC sleep, Bluetooth Parked (18 slots)9.00 mA 
uC sleep, Bluetooth Parked (200 slots)3.96 mA2.67 mA
uC sleep, Bluetooth Parked (8096 slots)3.672 mA1.848 mA
Max. Power (uC active, radio TX/RX) 47.9 mA
uC sleep, Bluetooth active 40.27 mA


Powerpoint presentation

Success stories

Batteries
The Mulle normally uses a Lishen Li-polymer re-chargable battery. Other suitable batteries are Saft LS 14500 (www.elfa.se) and GP NiMH batteries (www.farnell.com).

Mulle software development
Guides for getting started with software development on the Mulle are: the Mulle SDK and Mulle development using gcc.

Communicating with the Mulle Public Server (MPS) using OLPv1
A guide for getting started application layer communication with is here: Mulle - MPS communication.

The Mulle Software Architecture
The Mulle is build upon lwIP and lwBT, and supports the following protocols:

  • TCP/IP + UDP
  •  ICMP
     DHCP
     HTTP
     NTP
     mDNS-SD (Bonjour compatible)
     IGMP
     NAT
     NATPMP
  • Bluetooth
  •  H4 / CSR BCSP
     HCI
     L2CAP
     SDP
     BNEP
     RFCOMM
     PPP
  • Bluetooth Profiles
  •  SPP
     DUN
     LAP
     PAN-PANU
     PAN-GN
     PAN-NAP

The Mulle Bluetooth stack is successfully tested with the following devices below:

  • Thor WRAP Bluetooth Access Point
  • D-Link DBT-900 AP Bluetooth Access Point
  • Ericsson T68i
  • SonyEricsson T610
  • SonyEricsson P800, P900
  • SonyEricsson K700i
  • Nokia 3360
  • Bluesoleil Bluetooth software for Windows
  • Linux Bluez Bluetooth stack
  • MacOS X Bluetooth stack
  • Compaq/HP iPAQ

Mulle precompiled firmwares

How to use a Mulle sensor node

  • Power supply
  • The Mulle system requires a voltage between 3.6V to 4.2V. Use a regulated DC supply or batteries.

  • Connecting the expansion board to a Mulle version 1
  • Connect the expansion board as shown in the pictures.

    Note that the text might be incorrect on the expansion board. The correct pin configuration is here.

  • Retrieving debug info and reprogramming using a serial port
  • Use a RS323-level converter to transform 12V on the COM-port to 3.3V on the Mulle. This is important!
    A good program to download a new firmware into the Mulle is M16C-Flasher. Turn the Mulle off, and short the programming pins (CNVss and VCC). Power up the Mulle. Start the M16C-Flasher application and press "Connect". The text "Connection OK" should appear in green text. Now press the down-arrow on the "Program" and chose "Prog. new file". Select the .mot file that should be downloaded. Wait for the text "Downloading OK" appears.

  • Retrieving debug info and reprogramming using a USB to UART adapter
  • coming soon ...

  • Connecting to a Mulle using Bluetooth (Bluesoleil)
  • Start Bluesoleil, and click on the orange sun in the middle.

    When you see a device called EISLAB and a number; right-click and choose "Refresh services". When the refresh is finished; right click again and choose "Connect to LAN Access...". Done! You can test the connection by surfing to http://192.168.0.1/

  • Connecting to a Mulle using Bluetooth (Linux - Bluez)
  • This is probably just one of several ways of how to connect a Linux machine to the Mulle, using the LAP profile.
    Prerequisites.
    - Package: bluez-utils
    Available from bluez.sourceforge.net.
    - Kernel support for
    - PPP
    - PPP filtering (not necessarily)
    - Bluetooth subsystem support.
    - RFCOMM protocol support.
    - Bluetooth device driver
    Select your driver.

    First of all, make sure your Bluetooth dongle is up and running.
    This can be done with 'hciconfig'.

    Running 'hciconfig' should give you something like this.

    $ hciconfig
    hci0:   Type: USB
            BD Address: 00:10:C6:4F:9E:F9 ACL MTU: 192:8  SCO MTU: 64:8
    	UP RUNNING PSCAN ISCAN
    	RX bytes:77 acl:0 sco:0 events:9 errors:0
    	TX bytes:31 acl:0 sco:0 commands:8 errors:0
    
    If it says DOWN, just type 'hciconfig hci0 up', or whatever device name is listed. If no device name is listed, you probably lack Bluetooth support in your kernel or the kernel does not have support for your Bluetooth device. When that is done, use hcitool to scan for available devices.
    $ hcitool -i hci0 scan
    This should give you the Bluetooth device address to the Mulle. If not, make sure the devices are in range and that the Mulle is properly set up. Using the DUN daemon 'dund' that is supplied with the bluez-utils package, you can easily set up a PPP connection over LAP using rfcomm. The 'dund' command with the following arguments should give you:
    $ dund -n -c 'bluetooth device address'
    dund[7027]: Bluetooth DUN daemon
    dund[7027]: Searching for LAP on 
    dund[7027]: Connecting to  channel 1
    dund[7027]: Connection established
    Using interface ppp0
    Connect: ppp0 <--> /dev/rfcomm0
    kernel does not support PPP filtering
    local  IP address 192.168.0.3
    remote IP address 192.168.0.1
    Routing tables and so on should now be in order, and you should be able to ping the Mulle at the IP address 192.168.0.1.

  • To use the Bonjour Service Discovery Protocol with Mulles
  • Download Bonjour for Windows and install it.For Linux we recommend Avahi. Bonjour is bundled with MaxOS X

  • How to communicate using version 2 of the EIS protocol *DRAFT*
  • The new and updated version, using a 8-byte header always.

    Note that 'major' byte always has highest bit set so that servers can tell if the client is using the old OLP or the new OLP2. Lowest bit in minor indicates the the packet is a request (bit='1') or response (bit='0') The 'length' field is also special. The two lowest bits indicate if a request or response is a composed of a single packet, or if it is the first or last packet or one in between. Bit 0 indicates if a packet is the last packet, if set. Bit 1 indicates if the packet is the first packet, if set. So a sequence of "11" indicates that a packet if both the first and last, hence a single packet. A sequence of "10" means first packet. "01" means last packet, and "00" means a packet that is not the first nor the last in a sequence. The length field is thus 14 bits long.

    An initial draft to a Mulle server using pthreads with OLPv2 olp2.zip.

    See olp2.h.

    struct olp2_hdr {
      unsigned char major;
      unsigned char minor;
      unsigned short length;
      unsigned char seq_unused;
      unsigned char unused[3];
    }__attribute__((__packed__));
    


  • Mulle server for OLPv1 in C using pthreads (obsolete)
  • This software is a Mulle server for Linux, using pthreads. It is not of production quality, and must only be used for prototyping!


  • Sensor client - A command line tool
  • This is a command line based application. It currently supports GPS (Lassen IQ/SQ) and temperature (DS600) sensors.
    eislab-sensorclient-0.4.zip.
    Use this client with the public server. Sensor client will not work with Mulles over a direct connection, only with the server!

    
    host[/home/user/eislab-client]$ java Main GPS sensor-212
    Starting connection
    
    Time: 12:47:35 10 12 2006 UTC
    Date: 20061210124735
    Position:
    LAT: N 65:37:11.72
    LON: E 22:8:29.63
    ALT: + 2.93 m (WGS-84)
    Velocity
    East: 0 m/s
    North: 0 m/s
    Up: 0 m/s
    Health: Don't have GPS time
    Battery: OK
    Almanac: Not complete
    RTC: Avail. at power-up
    Antenna: OK
    Current Mode
    Dim: 2D (Auto)
    nSVs: 0
    PDOP: 0.000
    HDOP: 0.000
    VDOP: 0.000
    TDOP: 0.000
    Fix mode: 0
    
    	

  • SensorApp - A graphical wxWidgets application
  • The SensorApp graphical application acts as a client for Mulles. Users can use to SensorApp connect to a Mulle sensor node and retrieve sensor data. SensorApp also allows the data to be logged to file. A screen shot can be found here.
    SensorApp version 0.3.0 can be downloaded here.

    Most Mulles are not configured to use a 5 byte header format. Communication with them are performed in the following way:
    1) The client transmits a single byte, TYPE_START, with a value of 0x03;
    2) The Mulle starts a data transmission, and sends its data with a fixed interval, without any header. So for a DS600 sensor, that means that 8 bytes will be transmitted every second. These bytes should be interpreted as four 16-bits unsigned integers in little endian. These 16 bits values are the 10-bit values from the Mulles A/D-converter, and can them be used to produce a result.


    SensorApp will be extended with mDNS-SD support in the near future, providing device discovery of available Mulles, and auto-configuration of sensor type.

  • Sensor Studio
  • Sensor Studio is the hyperloaded SensorApp application. Now with Bonjour support.
    Sensor Studio version 0.8.5 can be downloaded here.