Midlet connectivity via broadband or GPRS - java-me

Midlet using HttpConnection to connect a webservice application.
A mobile can use a wireless broadband to connect to internet or can use internet facility provided by the network provider i.e. Vodafone or Virgin which is I think known as GPRS. Correct me if my understanding is wrong.
Now my question is when the midlet will run which connectivity it will use? Secondly do I need to code differently for midlet to use GPRS or it doesn't matter?
I deployed my application on Nokia E65 and it asked me which connection to use. The mobile had both wireless lan and provider GPRS active.
On IPhone the preference is for wireless lan. (Not related to J2me)

There is no standard Access Point Selection APi in J2ME.
That means the MIDlet itself can't decide whether to use Wi-Fi or GPRS.
Some phones will allow the user to change application settings in order to force a MIDlet to use a specific network when it is available (and maybe prompt the user for an alternative when the preferred network is not available).
This is mostly because there is no standard way to describe a wireless network that contains enough information : QoS, cost per byte downloaded and uploaded, average bitrate, ping time...
In most cases, the logic to automatically choose a network without those information would be too complicated and not reliable enough.
Manual Access Point selection is the only way to put the user in charge of the cost of data transfer, so far.

It depends on the client mobile phone. On some models, there is only one GPRS configuration that is used by all applications including midlets, On some others the configuration used for browsing can be different than the one used by midlets.

Related

WPS VS Access Point when connecting to WiFi

I'm building a commercial esp8266 device. I need it to connect to WiFi to use the device with an app.
I managed to connect it via both WPS and Access Point (getting the SSID and Password from the app by connecting to the Access Point).
I'm trying to understand which of these two would be ideal for commercial use.
WPS compromises network security until a device connects but it is super fast.
AP doesn't compromise security but it is slower + the user loses his WiFi connection until he passes the SSID and Password.
Another problem is that people might not be able to find the WPS button on their router.
Which of these two methods of connecting to WiFi should I use?
So, essentially what should I choose between Speed and Security?
Edit: It's important to note that multiple commercial devices use WPS to connect (printers for example).
In a commercial setting using WPS makes no sense at all, just use the access point information as you do not want to have any chance of security breach.

HoloLens Geolocation Scenarios

I have a number of required business cases for HoloLens that require the device to understand a general geolocation, such as the current wearer longitude and latitude within 10 meters or so, as well as sending location information to and from an endpoint during various processes. Users WILL have a mobile device with geolocation capabilities that could assist in the process if necessary, and could also be used as a WiFi hotspot.
Is this a reasonable and reliable use case for HoloLens? Can apps be created that use geolocation and maintain connectivity during an experience, either on their own or with real-time communication to and from a mobile device that has these capabilities?
Yes - definitely is a realistic scenario. I've done some integration between a blue-tooth GPS and the Hololens. Let me know the particular device you're looking at and I'll see if I can get it working with the Hololens. //Lance Larsen (Microsoft MVP) - www.lancelarsen.com

Double role WiFi SoftAP

I know the purpose of softAP in WiFi.
While enabling the softAP WiFi playing a host role we cant activate to client role till deactivate the softAP.
Why we can't design the double role softAP, which means why can't we activate our WiFi to play client and host at same time ?
If we do, what kind of problem we happen to face, is't possible?
Because in GSM we are creating virtual multiplexing ports for data,call,SMS etc.., like wise why can't we develop any firmware do perform like this for WiFi?
Of course, it's possible and it exists for various NICs. It's more complex because double mode requires handling the coexistence of both links.
Microsoft added a feature called "Virtual Wi-Fi" to Windows 7 and later operating systems, which enabled a Wi-Fi card to act as both a Wi-Fi client and a wireless access point simultaneously. Although a relatively fresh concept, new computers with Windows 7 and above were now being released with "Virtual WiFi" as a default program, making personal computing less complicated without the need for a second device.

WiFi Connection's Name

I am Developing a Java ME Application. Here I am using WiFi Connection. Now My Question is how to get a particular WiFi Connections name using Java ME Code ?
My Requirement is for Nokia E5 Device only.
After doing much research work I found that this is not possible in Java ME Technology to fetch the WiFi Connection's Name.
However Similar Library would be com.nokia.multisim.networkid which returns Network ID and Network Short Name.
I Dont Think so it is 100% possible in J2ME and even though if it has worked and there is no guarantee that it will work on all J2ME devices which has Wifi connectivity.
most appropriate answer i have found , please go through it once.
" Much as I hate to put you through all that grief and then not have a simple answer, I don't have a simple answer.
The reason for that is because Java's networking model is based on TCP/IP, and the TCP/IP architecture is based on the idea that applications will neither know nor care about the hardware details of networking. A typical mobile device may contain several different network interfaces (WiFi, Bluetooth, Infrared, USB cable, and so forth), but when an app wants to contact another network node, the app doesn't know which of these interfaces is actually being used. And in fact, if the OS wants to do so, it can use more than one (in parallel) and/or switch interfaces in and out, based on routing criteria such as best measured data rates. Rather like how cell phones route phone calls.
So basic Java/JME won't know anything about WiFi.
However, there is an extension, specified as JSR 309 (http://jsp.org) that looks like it may help. It supports learning about and controlling the network interfaces themselves. The problem is that not all devices will implement this extension, so it will depend on what device(s) you are supporting. "

Accessing Bluetooth virtual COM port on Windows without manual pairing

I need to connect to a Bluetooth device through virtual COM port created in Windows. It's easy when the port has been already created during manual pairing procedure. But I would like my application to relieve an user from the manual pairing of a device. I would like to present all devices in the range, allow user to chose one, and then create virtual COM port connected with the selected device. I'm not trying to avoid the pairing procedure itself, but rather I would like to invoke it by my application.
I started getting familiar with Microsoft Bluetooth API. And then some doubts arose. I've been wondering what happen if some user would use different (than Microsoft's) Bluetooth stack? Is the Microsoft's API the real Bluetooth API, which have to be implemented by any other Bluetooth stack provider? Or rather each provider has its own API, and the Microsoft's is only one of many other?
Thanks everyone for valuable input. I'd like to summarize what I've found so far. The Microsoft Bluetooth API is not operating system API. Application written against it will not cooperate correctly with any other Bluetooth stack. It seems that applications which are intended to cooperate with multiple stacks need to provide some stack abstraction layer, and stack specific code for all of them.The other solution is to allow user for manual pairing of the Bluetooth device, which eventually create some virtual device in the operating system (e.g., COM port). Then the application can use standard interface of such a device.
I can't speak for the Microsoft Bluetooth API, but there are multiple Bluetooth stacks available for the PC platform (even more for mobile devices).
The underlying API is defined by the Bluetooth Core Spec and so all stacks should be able to interact, in fact it is mandatory that they interop or they cannot use the Bluetooth name and logo.
As to pairing, your going to have a hard time getting devices to pair if they have default security, which requires a pin code.
Things might be simpler in the (near) future, as the Bluetooth standard has introduced a new security model, secure simple pairing, which has a 'just works' mode that requires no Pin code. This is still stronger then the current security, except against Man in the middle attacks. However, it could be a while before you see the chips with this feature in PCs.
If you can change to using .NET :-/ I can recommend our library 32feet.NET.
For explicit pairing there's BluetoothSecurity.PairDevice. We can also create the virtual port for you, for example:
BluetoothClient cli = new BluetoothClient();
BluetoothDeviceInfo[] list = cli.DiscoverDevices();
BluetoothDeviceInfo selected = GetUserToSelectOne(list);
BluetoothSecurity.PairDevice(selected, pin);
// Ask Win32 to create a virtual serial port
selected.SetServiceState(BluetoothService.SerialPort);
However I really don't like virtual serial ports so I always suggest that people use a normal sockets connection using our BluetoothClient class, it will automatically handle a pairing request if required.
On Win32 we support the stacks from Microsoft, Widcomm/Broadcom, and BlueSoleil. On Widcomm there's no support for SetServiceState there yet, and their API has no support for responding to pairing requests. BlueSoleil should support both.
A brief user's guide is at 32feet.NET — User’s Guide, and all the class documentation is available at the main site http://32feet.net, the Widcomm documentation is only in our code repository at the moment.

Resources