Phases for mobile game development - java-me

I'm currently thinking of developing chess code with multi-player facility connected and played via bluetooth. For that I need to chalk out the phases, i mean systematic modules, that I should follow to develop the game. If anyone can state it or have any link that can help it out, it would be great.
Another thing I am developing this in J2ME, so can anyone give me an idea about the way to connect the game in two mobile devices through bluetooth in J2ME. I mean to say the class or file that is used to connect the gaming devices.

For the second part of your question: you need to make an SPP (serial) connection between the two devices, with one acting as a client and the other as a server; see this tutorial for more information.
Then you need to create your own protocol to allow the two devices to communicate everything they need to.
This will only work on handsets with JSR 82.

Related

ESP32 Bluetooth Pairing To Phone

I am trying to make it so that my ESP32 board can detect my phone when I approach it based on RSSI. However, the ESP32 cannot see the phone unless the phone is in discovery mode, which is not super useful. To solve this, I was hoping to pair my phone with the ESP32 so that the phone would always be looking for the ESP32, and connect when it is found without any human intervention.
I decided to try the Arduino integration, but as I was working through all of the examples I couldn't find any with this functionality, so I'm kind of lost. If this is not possible or easy with Arduino, I am willing to switch, but I was unable to find anything about pairing in the normal phone interface for ESP-IDF either.
So, basically, using an ESP32, how do I pair to a phone?
The easiest way is to make the esp a gatt server and advertise a specific service. The phone will look for that specific service and connects if found.
You could make an app for your phone, like for ios its pretty easy. But keep in mind for mobile devices a continuous search for devices could be power unfriendly if misused.
If you use esp-idf instead of arduino, some examples are included. (You could use the vscode integrated esp-idd) Check learnesp32.com for an easy step into the basics, coming from Arduino.

How can I receive Bluetooth audio signal and forward it to a Bluetooth speaker?

I need some help because I don´t know how to approach this challenge.
I want to build a device, that's receiving a Bluetooth audio signal and is forwarding it to a Bluetooth speaker. It´s also running some algorithms with the audio data and also simultaneously sending results via UDP to a different device.
I already thought about using two or three ESP32s, using one with an extra Bluetooth module, or searching for a whole different MCU with Bluetooth 5.0 or higher and Wifi 5GHz. But I don´t know approach the best is, or maybe a completely different one.
Some context, why we want to do it:
We want to create a real-time light show, based on the current playing song. It is already working for PC, but also want to make it accessible for phone users. Sadly there is no way to capture the internal audio on iPhone or Android phones. Our Idea to make the music sync with the phone possible is that you are connected with the phone via Bluetooth to our "sync box" which is then connected to the speaker via Bluetooth or AUX. The "sync box" is running our algorithms for creating the light shows and then sending the data to the microcontrollers from the light strips.
So maybe you have an idea how we can sync the lights to the music completely differently or how I can approach the challenge with Bluetooth.
Any help is highly appreciated.
Thanks a lot.

Is there way to detect a certain phone from a few feet away

I am trying to build a system with a raspberry pi that allows clients access into a building depending on their membership status. Right now, it uses QR codes, but I want to know if it is possible to add a feature where it uses some technology like NFC or RFID or Bluetooth to detect their phone or RFID card from at least a foot away and confirm they have a membership.
Someone told me I could use RFID, but I am only aware of that being used in short-distance applications, like a card on a hotel door. I am not sure about Bluetooth either, because the phone would have to connect to the pi first, right? Maybe there is something I don't know about. So please offer any suggestions. Thanks
I think bluetooth does good work for tracking user. Since it's the best to handle large distances than NFC and RFID these two technologies are used for low range scenarios, check this link.
In addition, you can check distance(using Proximity and RSSI) and membership status as well. but you need to know how to handle bluetooth connectivity with raspberry pi check this link. as well create an app on that mobile phone to use Bluetooth (depending which OS you're using for Android, iOS).
Regards,

TI CC2541 (BLE): Send data (to an Android phone)

I am experimenting with Bluetooth Low-Energy (BLE) for the purpose of connecting a hardware device to an Android application. My goal is to send a recognizable piece of data to an Android phone.
I am using the keyfob from Texas Instrument's CC2541 Mini-development kit, and am programming it using the IAR Workbench (which I am learning on the fly). My issue is that I cannot figure out what code should be used to send data from the keyfob to the phone.
I understand that this is somewhat vague, but because of the non-disclosure policies of my company I cannot share the code that I am working with. Does anyone have any references to code for the IAR Workbench that will allow the CC2541 to send a piece of data? Right now, I prefer to use GATT if that helps.
Thanks, and please ask me more questions if I need to clarify anything.
Assuming you're working from a pre-existing service profile, there is a function for every service called ServiceName_SetParameter(). Calling that function will change the characteristic value. When the characteristic is read by the phone, it will receive this value. If the characteristic supports notifications, and your phone has registered for notifications on that characteristic, the new value will be transmitted whenever SetParameter is called.
You can implement any proprietary protcol to connect to and interact with your beacon device. It can assume other roles than just the beacon task. It can also listen to and respond to connection attempts thus expanding into a lot more than a regular beacon.
If you study the cc2541 close you realize it is a pretty advanced IO controller that offers a lot of IO signal possibilities. That way you could use the cc2541 as the heart of an IO control application where you measure and control equipment. Mobile apps can then easily connect to your beacon/IO Controller device and interact with the machinery it is hooked up to. As you see, it´s a remarkably versatile system on chip and a cool circuit to learn to program.

How to communicate with mobile devices using Bluetooth in j2me?

I need to develop a project based on Bluetooth in mobile. Since I am new to j2me I studied some of the articles and run the project until the discovery of devices and services. I need to communicate between devices and transfer the desired files. I search code for client server communication through Bluetooth and got it but I didn't know how to run those code and implement further.
I have go through articles and I can run client server communication. Now I need to transfer the file and communicate to the user which was beyond the limit of my mobile through the another mobile which was within my limit.
JSR82.com has many articles and tutorials about how to use bluetooth from J2ME.
Better you refer the book, "BLUETOTH APPLICATION PROGRAMMING WITH JAVA API" by C.Balakumar. It is helpfull to you.

Resources