What are the other mean of connectivity apart from bluetooth? - java-me

I want to consider all the connectivity possibilities in JavaME , connectivity between phone mobile and PC. Apart from bluetooth what are the possible means of such connectivity ?

You need to have a look at the Generic Connection Framework (GCF) which gives you the ablility to open connections using various protocols. You do this my using a Connector object.
It is obviously completely dependant upon the hardware upon the phone and any optional JSRs that it implements, but you can communicate to a phone via:
Using internet protocols e.g. Http, Datagram, Socket connections (Requires PC to be accessible via the internet)
NFC (Near Field Communication)
Using a Secure Element (SATSA)
Serial COMM port connection (I think)
I'll completely admit that using some of these methods to communicate between a PC and a phone are nuts but it could be done.
The best thing to do for simplicity is to use bluetooth or a HttpConnection.

U also able to connect mobile with pc via internet (Gprs).Better u look at the Generic Connection Framework (GCF) documentation.It will help u

Related

Make ROS independent from wlan connection with new network inteface

I am starting ROS on Ubuntu 20 on Raspberry PI with setting ROS_HOSTNAME to $(hostname).local and ROS_MASTER_URI to http://$(hostname):11311.
The problem is that if I am connected to WiFi and then that connection fails (for example if WiFi goes out of range), then the robot stops working correctly.
I was thinking that a possible solution could be to create a new network interface or a VLAN and start ROS on that network and then bridge that new network to wlan interface. This would make the network that the ROS is connected to independent from wlan interface, but it would still have access to network if wlan would be online. I would also like to keep the possibility to connect to robot's ROS through another device on the wlan network.
I am asking here for help because I don't have enough networking knowledge to make this work. So any guidelines would be appreciated. If there is another better approach to solving this problem, please let me know.
I suggest using ros_bridge for communication with the robot. It is often used if you have a web interface for your robot and you need to visualize some data from the robot's backend on the web. Or even send a command to the robot.
The counterpart to this node is the roslibjs library. You can find it here
For more info, you can check Robot Web Tools, a collection of tools for web-based robot apps.
However, maybe you are not interested in web apps; you can still use ros_bridge with roslibpy which is python implementation of rosbridge protocol. It is the same as roslibjs, but this uses python instead of javascript.
You can easily create a python app which will use roslibpy to subscribe or publish to topics or call services.
This approach is better because you will encapsulate your robotic backend, and you can control what is visible to the outside world with params for the ros_bridge node. You can also handle better reconnects if your robot lost wifi connection.
Still, you can use exposed ROS_MASTER_URI for rviz and debug proposes, but I wouldn't try to use it for controlling the robot because the connection between nodes won't be recreated if you lose wifi connection.
In my work, we used ros_bridge for some time in production AMR, and I have to say that it wasn't as robust as I thought initially. For example, there were issues when the robot changed the wifi access points, and caching messages didn't behave according to the documentation. For the web, we still use it but to control a fleet of mobile robots, we had to abandon it, and we developed our solution based on rabbitmq.
But I guess that if you are using Raspberry Pi, then it is not a production robot, and therefore I think you should be OK with ros_bridge.

How to communicate with an Arduino circuit using a web app?

I have recently made a Arduino circuit as shown in the link below:
http://www.instructables.com/id/DC-Motor-Control-With-Bluetooth/
As you can see, the person in the video of the above link used a bluetooth controller app to control and send signals to the Arduino board via HC-05 bluetooth board.
Here's the question. How can I use a web app/ web instead of a native app(like the video) to control and send signals to the Arduino board?
It would require the use of additional hardware. It is for connection to the network or broadly web.
Once we consider this we have several options infront of us :
We can use a gsm module. In this hardware we would insert a sim and use its network for connecting to web. But when you buy a GSM module be sure that it got http services as some modules support only message services. ( I would suggest GSM sim 900A module).
We can use a wifi hardware. This would act just same way as wifi on our mobile or laptop. But it requires some hotspot in its range thus restricts portability.
We can connect an ethernet cable to the arduino module and use the network. But thus restricts portability more than wifi. But you can go for that to if that satisfies your need.
Once you get the network for connecting to the web, now comes the point where your device must listen on the web for the requests that come to the device and must act as the inputs. We call it creating a server. The server listens on web and respond to them. As for a beginning you can follow this article.

Is it possible to connect to Sony Camera Remote API with hybrid mobile apps

Since we need to have a UDP socket to discover the device, and since javascript seems not supporting UDP, is it possible to connect to Sony Camera Remote API with a javascript based mobile app (non native).
As said in the comments, you can use Cordova to do the SSDP discovery.
However, as far as I can see, the API is HTTP-based. So if you don't need discover (can write in the IP address and port manually), then this should be possible to do.
Did you ever get anywhere with this project? I'd be interested in getting some LiveView and controlling a camera using Javascript.

Unable to communicate without port-forwarding

Hi we have an IOT project that has a running website + android app , that is made on Node.js server and uses the HTTP protocol with REST API's to communicate with embedded device CC3200 from Texas Instruments .
The project controls heating beds by sending messages from web or mobile to CC3200 which is our control box that sends the commands to the heating beds .
Problems :
We require port-forwarding on certain ports , we need to get rid of it
CC3200 when post changes to the web , changes cannot be seen unless the page is refreshed .
I researched and found that there are two possible solutions , either to use IO.js or switch to MQTT . But at this final stage of the project both the solutions seem like starting from a beginning .
Any help on this will be appreciated .
PS: Port-forwarding is more of a big issue
Most solutions typically relies on a long-lasting connection initiated by the embedded device to the outside server in order to get rid of port forwarding issues. As you cited it, MQTT allows you to do just that, but so does Long-polling HTTP, or even Websockets.
Using one of the above does not necessarily mean starting from the beginning, but certainly requires some additional work to get this logic implemented on the embedded device on the first hand, and setup a publicly available secure message broker (e.g MQTT) on the other.
Another solution, would be to use UPnP IGD to dynamically add port-forwarding entries on the home gateway (if it is supported), or use STUN techniques. Note however that this solution will expose the device to the outside world, publicly, so you might want to pay attention to the security aspects this implies.
See also :
UDP Hole Punching
STUN, TURN & ICE for NAT Traversal

Simple Universal Plug and Play ( uPNP ) to find Raspberry Pi on Network

I have a RaspberryPi connected to my home network via WiFi with a dynamic ip address. I then have my iPhone connected to the same network also via WiFi. The Pi has a lightweight c++ HTTP server running on it that can execute commands. I now want to write an Objective-C app that can find the Pi on the network, regardless of it's ip address, and send it commands. So, Universal Plug and Play seems like the logical solution - but everything I find on Google is dealing with Media players and streaming audio/video content.
I just want the Pi to somehow simply broadcast on my network - "Hey, I'm RasberryPi and my IP Address is 192.168.0.5!".
Can somebody please suggest a package or solution to this problem? Thanks!
For the RPi side I would suggest GUPnP as long as you can fulfill the dependency requirements. It's a very modular framework so you don't need to load or use any of the multimedia related things if you don't need them. It's based on glib and libsoup and allows you to fairly easily define and implement your own UPnP services. Take a look at the BinaryLight example: It implements a BinaryLight Device that contains a SwitchPower service with several methods and two state variables (properties). You should be able to hit the ground running if you start with that. There's documentation on how to write a server.
The components you are going to need/want:
libgssdp, handles discovery, used by gupnp
libgupnp, the actual upnp implementation, used by your app
the dependencies (glib, gio, gmodule, libsoup, libxml)
Also possibly for testing (this on a desktop linux machine since it requires gtk):
gupnp-tools, contains gupnp-universal-cp
EDIT: If you really don't want to implement any UPnP functionality, it's possible you could just use GSSDP for the IP discovery. This could be very simple: see test-publish example.

Resources