What's new? | Help | Directory | Sign in
Google
aircable
AIRcable Open Source Project
  
  
  
  
    
Search
for
Updated Sep 13, 2007 by naranjo.manuel
Labels: Featured
Tutorial_Index  

This page shows some code examples you can use to develop your own solutions.

All this examples are released under the Apache V2 License

Index

Slave Related Code

  1. Micro Slave: A simple code that opens the slave port on discoverable mode and accepts all the incoming connections. It will teach you how to open the slave channel, how to make slave connections, and how to use debugging.
  2. Little Slave: Like the micro slave, but now it will open the shell if the user press "+" when the connection is firstly started. It will teach you how to handle input characters, how to open shell connections and finally will introduce Leds handling.
  3. Filtered Service Slave: A more complex mode, it will open the port in discoverable mode, but will check that those who want to connect to this peer complies with an address pattern. It will teach you how to compare string, and reject incoming connections.
  4. Restrictive Slave: This is a piece of code taken from our command line, that will pair to a device, and then will apair invisible to all the other devices. It will teach you how to make an slave device discover and undiscoverable.
  5. Improved Slave: This is another slave example, it ensures slave profile availability almost 100% of the time.

Master Related Code

  1. Mini Master: This code will make inquires, and once it found a device it will try to connect, once the connection is closed it will start the process again. This will teach you how to handle alarms, make inquires, handle inquires results, make master connection, and check master connections.
  2. Filtered Service Master: This code will make inquires, and if the device it discovers matches a given pattern it will make a connection, once the connection is lost it will connect to the first thing it can find. It will teach you how to work with inquires showing how sensitive they are.
  3. Listed Master: Those interested on buying AIRcable Mini or SMD can be very interested in this code. This code will have a predefined list of devices (between 0 and 48), will open a connection to each one of this (one at the time), will make some work over the connection, will close the connection and will continue with the next device, all this on an endless working cycle. It will teach you how to use PRINT and close master connections from the master side.
  4. Cable Master: This code is like our Cable Master, it will make inquires and will pair with the first device it can find. Once it is paired it will not inquiry any more and will only connect to it's peer. This code will show you a way to handle pairs from the master side.

Interactive Code

  1. Interactive Code: Sometimes you need an interactive shell on the other side, this code will teach you how to write a simple interactive program that will let the user control a series of leds and will read some analog/digital inputs.
  2. Wireless Command Line: This is a modified version of the command line version 0.5 that uses SPP for the command line instead of the UART.

Networking

  1. Relay Mode Code: This code will show you how easy is to create a network of AIRcable devices. For this example you will need at least 3 different bluetooth devices, and one of those 3 must be an AIRcable OS enabled device. In this mode the AIRcable OS device will be connected to two other devices and will make a bridge between them, this way you can make the range of your bluetooth devices much longer.
  2. DUN SPP: This example shows you how to switch between SPP and DUN profiles.

Hardware Interfacing

  1. GPS and Data Logging: In this example we will get connected to a Bluetooth Enabled GPS and will log all the data to a file.
  2. vCard Sender: In this brief example we will show you how to create an automatic vCard sender.
  3. SMS Sender: This example will show you how to generate SMS messages on a BT enabled cell phone, and send them.
  4. I2C Example: The AIRcable OS can communicate with any I2C device. This example uses the MCP3421 18bit ADC to read temperatures from a type-K thermocouple.

Miscellaneous

  1. Bitwise Operations: There are times when you need to do some bitwise operations, for example when you need to calculate a checksum, here we will show some bitwise operations implementations.
  2. Publisher: Proximity Marketing with the AIRcable OS

Future Examples

  1. Advanced Uart: This example read from Uart and writte to SPP, via BASIC program
  2. UART Interrupting: doing reads and writes manually with @UART interrupts
  3. Timing: attach clock, use time functions
  4. Analog Interface: read from analog 1 and 2, a battery monitor that blinks when battery is low
  5. Temperature Sensor: temperature sensor and use @SENSOR
  6. I2C Interface: use the i2c function to talk to an ADC ads1112
  7. Having Some Fun: make some noise with a speaker

Comment by naranjo.manuel, Jul 26, 2007

Wiki Pages now support comments, you can leave us your questions here. We'll reply them soon.

Comment by jouikov, Dec 21, 2007

You had SMS message sender on cell phone Do you have Email sender use cell phone ?

Comment by naranjo.manuel, Dec 21, 2007

I can't get what you mean.

You want to be able to generate an email with BASIC code and then make your cell phone send it?

Comment by jouikov, Dec 25, 2007

yes I mean that generate email code with BASIC and send use cellphone to my email

Comment by naranjo.manuel, Dec 25, 2007

I don't know if you can do that. I should read the AT+GSM specs and see if there's a command to achieve it.

Comment by xirimpliks, Feb 26, 2008

do i can a video streaming whit de smd chip? Which the speed of transmition of this chip?

Comment by naranjo.manuel, Feb 26, 2008

The chip can do as much as 1.5Mb/second if you can do video over rfcomm spp connections then you should be able to retransmit video on the SMD module. But that will require you make changes on both the transmitter of the video and the receiver. It will not do it out of the box. The Bluetooth specs doesn't provide this feature that's why.

Comment by nocker.bk, Apr 11, 2008

Hi! I'm interested in connecting the wiimote (the Wii controller) to a microcontroller which has a serial port (rs232).

To connect to wiimote you've to establish a L2CAP link. Could any aircable do this kind of link?

Thanks

Comment by naranjo.manuel, Apr 11, 2008

Hi,

Sorry but you can't use the AIRcable for that. The wiimote behaves as a mouse, and then uses the hid profile, which we don't support on the device right now.

Thanks Manuel

Comment by chuaclar...@hotmail.com, Jun 18, 2008

Hi,

i have some enquires to ask. i have done the codes for the SMD but however, there's nothing happening to the board. and also for the AIRcable industrial, i had connected it to the computer using the bluetooth dongle but again, nothing shows on the screen. so yea, currently now nothing is working. i hope u will reply me as soon as possible..


Sign in to add a comment