Write Bluetooth from android to arduino in real time - Android Studio

Hello,
I'm searching for so many time a way to send bluetooth data from android to arduino using HC-06 in real time, meaning for me send data every seconds for example. Actually with all my tries, my btSocket become null, I don't rally know why. I add that I use in this project tensorflow lite. So I just want a website or an example code to help me.
Thanks you !

Related

Help needed - Java signed applets

Hi all
First of all great forum, found lots of help in here so far.
But I have come up blank with my current problem, tried to google and all, to no avail...
I want to use my TyTN II to log on to my bank on PIE, but the bank use signed JAVA applets, and the closest I came was thunderhawk. But none of the browsers for PDA seem to be able to use signed applets.
My bank has no plans whatsoever to implement web access from PDA´s or WM powered devices, so I´m still trying to find a way to run signed applets in PIE.
You could argue that I should figure out another way to access my info (sms, phone call and stuff), but this has intrigued me so I´m bend on trying to figure out a way
If any of you have an idea or solution, please let me know

PS3 controller

Hi everyone,
I have started looking into using a PS3 controller as an input device for my Diamond.
I want the adility to play games using a PS3 contoller over bluetooth, as the device doesnt have good controls for games. I have managed to get my ps3 controller to work over usb on my pc Next step is to get my controller over blueooth to my pc, I will keep updating this thread
I have found some useful web pages
how get input from PS3 controller over wired with source code: http://www.codeproject.com/KB/mcpp/wiredps3axis.aspx
How to get ps3 controller over bluetooth on linux with source code: http://fedoraforum.org/forum/showthread.php?t=199246
I dont really know what Im doing when it comes to wm6 and making a device work with wm6. I dont know much about the bluetooth stack either. I will probably need to write some sort of a driver at some point. To catch the input from the controller and convert it into a command on my diamond.
So any help of any kind would be great. Any problems you can see with my plan?
Sorry not sure if this is the right place to put this thread so move if you want.
Well, that didnt go to well.
The controller is appearing in my bluetooth manager on my pc, but i cant connect or query its services.
Now Im really stuck
if someone could help me get some trace data from the connection, or enlighten me to a way of getting some information out of the bluetooth stack.
Thx,
Chris McNamee
Assuming that the PS3 doesn't use a proprietary communication protocol that can't be reverse engineered, this should be possible.
However, I suggest looking here first to get source and discussion re use of the Wii mote on the PPC first.
Then re implement the PS3's control mechanisms.
http://www.codeplex.com/WiiMoB/Thread/View.aspx?ThreadId=10953
There's further discussions here:
http://forum.xda-developers.com/showthread.php?t=335973
and here:
http://forums.neurostechnology.com/index.php?topic=9759.0
to get you started. Interesting project though!
V
Thanks
Cheers vijay555,
I will have a look as soon as I get a bit of free time
Hmmmm
Thanks vijay555
There is some excellent information on some of those links, but will need to get a wiimote. I cant tell if the drivers have been loaded by the wm6
but i was wondering, how does wm6 know which device its talking to over bluetooth?
It must be via a device serial or something, but what is the term for it?
like i said im a bit of a novice
Yeah, now we're cooking
I found an alternative, the wii remote/classic controller it uses bluetooth and there is lots of source code and examples
http://sourceforge.net/projects/wiiuse/
it comes with a libaray for windows and an example of how to use
all the source code is there to downloading
Now all I need is a wii remote
and to get it going on my pc, then port to PPC.
Then I need to write a frontend to control what action on the mote do on my PPC. Should be easy
sounds like an interesting project, keep us updated!
It has begun
Yesterday I bought a wii controller and got it talking to my pc using the wiiuse.
Wiiuse is open source and it has code already to interpret the controls of the wiimote, including the ir sensing, accelerometer, wii nunchuck, and the classic controller. Which we be very useful, as I dont need to work it out myself.
Also I have got wiimob, kind of working. It uses a library called bluetools to controller the bluetooth (which is pay for, so will need to find/make an alternative at some point but works for now). I have got to the point the author got stuck at (comment in the code says he never got passed), so Im kind of on my own now. Wiimob can search for wiimotes, then search it services but fails when trying to get a stream to the service. Im pretty sure this is because the RemoteService class returned by the bluetools doesnt have the correct GUID, which cause the connection to be refused by the remote device as it doesnt exist.
It is all looking very promising at the min
next steps:
get the bluetools talking to a service on my pc and see if I get the right GUID to determine if its the bluetools code which is failing to get the GUID or the wiimote not giving its GUID for the service.
Will post back with any news
Interesting
It seems that the library doesnt want to connect to a human input device, it wont connect to the wiimote or my bluetooth keyboard. It does seem to work to other services like Obex file transfer.
Hmmm, what?
Guess I found try and find some samples of people using this library and human input device or find a new library. Im not really up for trying to create my own at the min, as it would take a while
O dear
Its really not going well, either my knowledge isnt up to the job or it cant be done.
I have tried hard, but windows mobile is missing the all important hid.dll driver to get a listing of pair bluetooth hid devices so i can open a handle to the device. So I then looked into opening a connection myself and bypassing the hid driver, but from what I can work out it needs two l2cap connections open to the device, 1 on channel 11 for writing and another on channel 13 for reading data. But windows mobile doesnt have an api to access the l2cap layer of the bluetooth stack, the layer down (hci) can be extended but this would take along time to implement as I would then have to implement the l2cap layer myself.
Its turning into a losing battle, I really now doubting that I can do this.
The only idea left is how does the windows mobile use a bluetooth keybaord, does it use a generic driver which it extends or is it complete in its self. If it does uses a generic driver, i need to find some doc.
If anyone has any advice about how to implement l2cap connection or any thing about connecting to a hid device in windows mobile I would be very greatful.
Thanks guys,
But I think this is dead, like many other projects to try and get windows mobile work with a wiimote.
Things have taken a turn
Yeah,
A very helpful guy pointed me down a new line of throught,
I now beleive that I maybe able to do this
well, i need the win ce 6 platform builder
i owuld like to help but not got a clue about these things! keep up the good work
Well, any suggestions
Hmm, the wiimote uses bluetooth hid profile to communicate which talks over a l2cap connection. HID profile uses the universal serial bus (USB) architecture but send data over bluetooth
http://www.bluetooth.com/Bluetooth/Technology/Works/HID.htm
I have two options from what i can see
1. Well, I have found source for a sample keybaord device which I could rip off but cant get it to compile
2. Gain access to the L2CAP layer of the bluetooth stack by extending the stack with some of my own code. Then create my own connections to the wiimote and start sending and receiving reports to the device.
Any suggestions on the best approach?
both will take alot of time either way.
Hmm,
The L2CAP sample code requires some of the core dll for wm. These include coredll.dll and the btd.dll
during the build linking fails as I dont have the lib files, to get the lib files I need to build the os, as these files can change depending on the options specified during the build. I dont really want to do this, as it will limit the software to only one os version of wm, the one i build against.
Next question is can I do a library call and get the function points at runtime?
Well I think I may have to ask on a new thread. I hope so, as it would over come alot of problems, and it wouldnt limit the code to certain versions of the wm
Opened my mouth too quick
I using the wince 6 sdk,
But windows mobile 6 is based on wince 5. Hopefull I will have more luck with the wince 5 sdk
Well, that went a bit better.
Ive got pasted all compiling errors with the sample code I found. I have all the needed include and library files.
When trying to link the compiled code I get a single error now.
1>Compiling...
1>l2capdev.cpp
1>Compiling resources...
1>Microsoft (R) Windows (R) Resource Compiler Version 6.0.5724.0
1>Copyright (C) Microsoft Corporation. All rights reserved.
1>Linking...
1>uafxcw.lib(dllmodul.obj) : error LNK2005: DllMain already defined in l2capdev.obj
1> Creating library Windows Mobile 6 Professional SDK (ARMV4I)\Release/l2capdev.lib and object Windows Mobile 6 Professional SDK (ARMV4I)\Release/l2capdev.exp
1>Windows Mobile 6 Professional SDK (ARMV4I)\Release/l2capdev.dll : fatal error LNK1169: one or more multiply defined symbols found
1>Build log was saved at "file://d:\Documents and Settings\Chris\My Documents\Visual Studio 2008\Projects\Bak new l2capdev\l2capdev\Windows Mobile 6 Professional SDK (ARMV4I)\Release\BuildLog.htm"
1>l2capdev - 2 error(s), 0 warning(s)
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========
If anyone can help with this error it would be great.
Sorry guys, but Ive got alot of coursework on at the min.
So it might go a bit quite on here for a bit, but done worry.
Im still working on this when I get some spare time, but I dont have much at the min
Any progress on this mcnamee?
No luck
Well, I have given up on this for awhile.
I would like to start working on this project again when I have some more time.
But for now this is dead.
Chris McNamee
If you are interested in alternatives to the MSI or Chainpus BGP100 bluetooth gamepad, google search "modded by bacteria" go to the "work in progress" section of his forums, and search for the thread "Re-housed Bluetooth controller". The creator of the site, Bacteria, will be transplanting the innards of the BGP100 into an SNES controller. Previously, he has transplanted it into a PS1 controller. It seams feasible to DIY into almost any controller housing.
PS3 for EVO?
I'd love to use the bluetooth connectivity for my Evo and playing ROMs. any ideas?
Apologies if this has been mentioned...

Google Maps / Earth : automated plotting from DB

Hi XDA!
I know the forum is mostly aimed at mobile dev but the people here are so good i thought it the best place to ask a question regarding dev in general.
I have a database (mySQL) with rows that contain latitude/longitude values representing the locations of customer complaints. I'd like to plot these on Google Maps / Earth and put up a dashboard so that we can see if there's any particular location that's a 'pain point'... any idea how to do this? I need the plotting step to be completely automated cos I already know how to automatically insert new rows into the mySQL table whenever a new complaint comes in.
I've done some Googling and i usually see people talking about manually importing an Excel file with the co-ordinates... This won't work for me cos we get thousands of calls coming in daily and the whole process needs to be completely automated for it to be practically feasible.
Ok, some background about me: I'm not a 'proper' developer... I've never worked in a structured dev environment. I'm just someone who knows a little bit about dev and I've had to write some code cos there was nobody else to do it
I can do some mid-level Java (I've written a few servlets that run on tomcat ...they listen for HTTP requests and respond with some XML... nothing hectic) and I know enough about mySQL to be able to work with it comfortably.
I'd really appreciate any help with my plotting question

[Q] how to migrate from WM8 to Android ?

Hi Folks, I hope I'm posting this in the right section withoud doubling another thread because I have found hints here and there but no actual, efficient solution to my problem.....
Excuse my english, I'm french and couldn't find any solution on french forums either so I'm knocking at your door....
I've always had Android devices but because of some technical issues my provider lended me a WM8 phone (Nokia Lumia 520) for a couple of months before I can get back a new Android phone.
I have the two phones with me for a couple of days but I'm having a hard time transfering some data from the WM8 phone back to my Android, especilly :
-call log (could cope without)
-pdf files (important)
-sms threads (critical)
I mainly focused on SMS's, thinking of different means I could expand upon later on if need be (app, backuping through desktop, outlook or Gmail synch, getting android to synch with OneDrive....) none of this worked so far.
Thanks in advance for your kind help
The only one you will get is the PDF files. You should be able to upload them all into OneDrive and then download them to your PC. From there, transfer them to your Android. The other two are stuck in the Windows cloud, just like how you can't transfer SMS threads from iPhone to Android.
if you come up with something, let the rest of us know!
It *might* be possible to import messages using Bluetooth. I know you can do it from Android to WP8. The other direction... never tried, no idea.
GoodDayToDie said:
It *might* be possible to import messages using Bluetooth. I know you can do it from Android to WP8. The other direction... never tried, no idea.
Click to expand...
Click to collapse
I hoped so from the very begining but I couldn't find any info about doing it the other way round as you mention :/
in the worst case, is there a means to backup those sms in order to check them later on, or print them maybe ?
Well, they're automatically backed up if you turn it on (Settings -> Backup) but that just goes to Microsoft's "cloud" and I don't know how easy it is to find / download / import it would be.

Suggestions for app - New Android Studio user

Hello everybody, happy to have found this forum.
I am a student and have studied 3 years Java in highschool (pretty good level) and studying for about 2 C/C++ at University, am good with PHP and databases and I know some CMS pretty well. So intermediate programming skills, hoping to improve them. I'm from Italy so excuse my bad grammar
I want to create this app for some friends of mine and I want it to be connected to a database and that database will be displayed online on a website. Basic data categorized and if possible displayed differently for different zones. So say you're from Japan and access a category from the website: firstly it asks for location access and then displays to you the "nearest" data available (if you'd want you could access data from other locations). This should have minimum costs, talking website/database.
So what I am asking, how hard this can be? I have never created a project in Android Studio, just worked with Netbeans ,CodeBlocks and Eclipse.
Is there a way to quickly learn how to save the data from an app to a database ? The other way I guess I'm able to do it.
If any of you is so kindhearted to help me find some good tutorials.
Thanks.
It depends on your skill, based on your skill set it will be easy for you.
All you need is create an API for your app so it can exchange data to your web server. You can use a PHP Framework for your API to make your life easy.
On Android part you can use GSON for converting JSON data to Java Object and vice versa.
mariozawa said:
It depends on your skill, based on your skill set it will be easy for you.
All you need is create an API for your app so it can exchange data to your web server. You can use a PHP Framework for your API to make your life easy.
On Android part you can use GSON for converting JSON data to Java Object and vice versa.
Click to expand...
Click to collapse
hello kababayan.. do you specialized on themes? for what devices?
ioubuntu said:
Hello everybody, happy to have found this forum.
I am a student and have studied 3 years Java in highschool (pretty good level) and studying for about 2 C/C++ at University, am good with PHP and databases and I know some CMS pretty well. So intermediate programming skills, hoping to improve them. I'm from Italy so excuse my bad grammar
I want to create this app for some friends of mine and I want it to be connected to a database and that database will be displayed online on a website. Basic data categorized and if possible displayed differently for different zones. So say you're from Japan and access a category from the website: firstly it asks for location access and then displays to you the "nearest" data available (if you'd want you could access data from other locations). This should have minimum costs, talking website/database.
So what I am asking, how hard this can be? I have never created a project in Android Studio, just worked with Netbeans ,CodeBlocks and Eclipse.
Is there a way to quickly learn how to save the data from an app to a database ? The other way I guess I'm able to do it.
If any of you is so kindhearted to help me find some good tutorials.
Thanks.
Click to expand...
Click to collapse
I guess it can be created and to save your time try to build it using a mobile app builder then connecting it to other source would be easier
All the best

Categories

Resources