Connecting AUBTM-23 Bluetooth module to a 8051 microcontroller - android

I am doing my final year project and am facing a problem to send data through a mobile device (android) to a AUBTM-23 bluetooth module, which has a RS232 port something similar to this one, which is conected to a 8051 controller serially.
When I try connecting the module to PC and send data from mobile, the data is properly read in hyperterminal with following information:
OK
+CON1:1
data received from mobile device
+DCON:1
OK
+CON1:1-->received when mobile app tries connection with module.
Then the serial data gets transferred, then when the app disconnects I get DCON.
But when I use it with 8051, there is no data transfer.
I searched and found that module is programmed to send these tags(CON, DCON, OK) and also it is designed to be embedded in a host system (which i think 8051 is not) which requires cable replacement function.
SO, is it possible to connect the module to 8051 controller?
does a serial port really requires a host?
Can I make any arrangement for the extra tags (CON, DCON, OK)?
And to connect rs232 port serially, i am making use of only 3 pins and leaving the remaining 6 pins unconnected, could that be a problem?

You can use 8051, UART , just write code for sending AT commands check those on hyperterminal whether they woring or not .. then connect TX RX of 8051 to RX Tx of ur module. Be careful to add a voltage divider with 10kand 15k resistors between Rx line of Module,as it should receive only 3.3 v and max232 will output 5v.
It will work...

8051 can be used as a host for the AUBTM-23
There are several conditions that could be causing problems and additional information is necessary to correctly diagnose and troubleshoot them. That being said, the following information might be of some assistance.
You might need a MAX232 (or other TTL to RS232 level converter) between the 8051 UART pins and the RS232 port on the AUBTM-23 device. Otherwise, you may† be able to bypass the RS232 port and connect the appropriate 8051 UART pins directly to the UART pins on the AUBTM-23 chip. † note that this option depends on the voltages used by both chips and additional circuitry (e.g. level shifter) may be required
The AUBTM-23 datasheet says that flow control can be either RTS/CTS or None and is configured during factory calibration. When you connected the AUBTM-23 to HyperTerminal, what type of flow control was used?
If your AUBTM-23 device uses RTS/CTS (hardware) flow control, you should connect the the RTS and CTS lines to available port pins on the 8051 and add the appropriate code to handle the handshaking.
If your AUBTM-23 device does not use flow control, you should be able to use a minimal 3-wire (TX, RX, GND) RS232 connection.

Related

Can multiple phones be connected to same Arduino via Bluetooth using MIT App Inventor?

I am currently working on a project in MIT App Inventor, where I am connecting an Android device to an Arduino via Bluetooth.
Is it possible to connect multiple Android phones to this Arduino, and is there a procedure by which an Arduino could distinguish between them?
I assume, that you are using a serial bluetooth device, such as HC-06 or HC-05. As I know, even the master module HC-05 can only connect to one client at a time (which makes sense, since the serial connection on the other side is the same)(despite the fact, that bluetooth in principle allows handling multiple clients at a time, though it's a rather complex task). This means, that you would have to use one serial bluetooth module for each phone, you want to connect at the same time.
When using more than one bluetooth module, you have to connect them to the Arduino over serial, but only one device can use the serial connection at a time. Depending on the number of phones, you want to connect, you can use either the SoftwareSerial library to emulate more than one serial connection (so every connection can be identified by its own SoftwareSerial object), or you have to multiplex your data lines between the different serial bluetooth devices (so that you control the serial connection to the devices with for example setting digital pins). For the last mentioned possibilities, I'm not sure about the property limits in the serial connection. Maybe you can multiplex just only with a few transistors.
If you want not only distinguish between the different connections but directly between different phones (for example to remember special settings for only your phone, not the others) you would have to send an identification over bluetooth to the Arduino (for example the MAC adress of the phone).
For more help, you should state you question in a better way and telling more details

send data using android Bluetooth to Arduino

Good day.
I want to send Accelerometer readings from the Android to Arduino using Bluetooth communication. I don't want to write the code to discover devices around and connect or connect to them through program interface . I can connect to the other device manually by the android setting.all I want to do is to send the string through output buffer or anything while i connect manually to the Arduino bluetooth but the tutorials out there shows how to connect and discover device.
I have been struggling to know how to send data (string or int) and i really don't care about discover and connect because i can do this manually from my android settings
thank you in advance
Sensors, Arduino devices and other hardware systems typically work on SERIAL PORT PROFILE (SIP). You may wanna double check this with the specific hardware you are dealing with. But I am quite sure it is SIP. If that is the case, you can literally copy and paste android chat sample code and change UUID to default UUID of Serial Port.
Just replace UUID of the sample with this: 00001101-0000-1000-8000-00805F9B34FB
The UUID is the chat example is defined in BluetoothChatService.java. You can change both secure and insecure UUIDs.
This is the sample: https://android.googlesource.com/platform/development/+/eclair-passion-release/samples/BluetoothChat

Android: RS232 Serial Communication with android device

I have a MR400s taximeter hardware. I want to communicate with this taximeter using RS232 cable and I have already achieved this connection and communication in windows. But I wanted to make connection using android device.
How can I achieve this?
Thanks
Ishan jain
I use the USB to serial library, you can find it here: USB Serial for Android.
It doesn't require any root access. You'll need to check if your Android device supports USB host mode. Then, using a usb OTG cable and a USB to serial adapter cable you can start communicating with your serial device via RS232. There are code examples to get you started on the Github page of the USB to Serial library.
An alternative to a cable connection to the Android device (using the "USB Serial for Android" library, see the other answer) is a converter from RS232 to Bluetooth.
Such a converter will use the serial connection profile of Bluetooth, and ways access such a connection in Android are discussed in this question.
You can build such a converter based on an Arduino by adding a Bluetooth shield and simple code that converts incoming data from the serial port to outgoing data on the Bluetooth connection. (I could not find detailed instructions for this right now.) When you want to connect the Arduino's serial port to a RS232 device you would need another shield for logic level conversion (RS232 is ±12 V, Arduino is 5 V or 3.3 V).
There is also a commercial product implementing this Photologic Text Streamer (ca. 265 USD !!!). It seems that this provides a read-only connection for Android (not totally sure about that, though). A read-only connection is still ok for cases where you only want to read sensor values.
Finally, you could do a similar thing using an Arduino and a wifi shield.

Direct serial port connectivity from arduino to android for data communication

Using Arduino I can get the sensor values logged into the serial monitor over the USB cable...
Is there any way that I can read these values directly on an android tablet by connecting a usb convertor(So that I can tramnsmitt it via GPRS to a server Db)...Please give my some solid directions...
You can do it wired if you use a FT232 or CP2102 converter. Here are a couple apps on the Google Play store that act as a serial monitor.
USB Serial Terminal
Slick USB Serial Terminal
One thing to note is that wired USB communication with Android is not very common, so you may run into some problems depending on the phone you are using. If you want a more guaranteed solution, look into an Arduino Bluetooth module that supports SPP - Serial Port Profile. You can connect the Arduino's RX/TX pins to the Bluetooth module, and have it communicate with the Android device over a wireless Bluetooth serial connection.
Also, here is a similar question on SO, however the answer may have outdated information regarding using the wired solution.
How to make Android and Arduino communicate without a wireless module

Android tablet to serial communication

I'm having trouble understanding how to communicate my android app to communicate with a custom board via serial connection. The android software supports USB host mode.
My android 3.1+ tablet as USB host <-----packet of bytes-----> custom board at 9600 baud rate
Here's what I understand about setting up my app:
Using USB manager I find my USB device (custom board)
After finding my USB device I set up a USBInterface to communicate.
Using the USBInterface I need to find the USBEndpoint(can someone tell me what that is?)
I can now use USBDeviceConnection to send and recieve information.
Any help to understand the process helps. Thanks
Think of endpoints as virtual conduits with defined behaviors, similar to sockets.
Endpoints for USB CDC devices consist of a control endpoint, a bulk IN, a bulk OUT, and an "interrupt" endpoint. The control endpoint is bi-directional and is used for configuring the connection. Once the connection is configured, the BULK IN is where the tablet will receive data (think RX) and BULK OUT will be where the tablet sends data (think TX). The interrupt endpoint is IN-ONLY and will notify the tablet of any state changes from the device.
The endpoint locations and functionality are specified by the device in its USB Interface Descriptor. The Host protocol stack will retrieve that descriptor and have it available for the application layer to use.
You will use the control endpoint to configure items such as baud rate, parity, stop bits, etc.

Categories

Resources