It seems like my Samsung tablet rejects and loses its ethernet connection when I connect anything other than internet via micro-usb to ethernet adapter.
I'm trying to connect Raspberry Pi and the tablet via ethernet cable and stream video from the pi to the tablet with network stream in my app or VLC i.e. http://xxx.xxx.xxx.xxx:port#
Is there a way for me to do that with Samsung tablet? Samsung tech has told me that their tablets support ethernet connection only for internet. And it loses its connection if there isn't any response to ping, I think.
I'm considering rooting too. If I root, how can I disable the ping or send imaginary response to the ping when I connect ethernet cable?
Any help would be greatly appreciated!
I made recently roughly similar setup and got it to work.
I used Samsung Tab S2 (and later Samsung Tab S3) as a tablet and Odroid XU4 as a single-board computer instead of Raspberry Pi since I needed more processing power.
Ethernet connection worked when I used a fixed IP in the tablet and did everything in correct order:
First, disable Wifi and mobile data
Connect Ethernet and set fixed IP in Settings
Open video stream
Enable Wifi and/or mobile data
Use another browser tab/app to connect to the Internet (the Ethernet connection stayed alive in my tests)
If necessary, use a port forwarding app to share the video stream to other devices over Wifi
However, I ended up using USB Tethering instead of Ethernet. It was more simple and more reliable solution. The way I did it is documented here:
https://github.com/FinweLtd/mjpg-streamer/tree/master/scripts#mobile-streaming
Both solutions worked without rooting.
Related
Say I have a laptop (Windows 10) and an Android phone. The laptop does not have an internet connection and the Android does not have an internet connection.
I have an Xamarin app that uses a C# Web API that is deployed to the laptop (for testing). How can I connect the mobile to the laptop without any form of internet connection? I believe I have two options:
1) USB cable
2) Bluetooth
I believe I have to install a wireless hotspot on the laptop and then a reverse tethering on the Android.
Have I understood this correctly? Do I have to do this regardless of whether I use a USB cable or a Bluetooth connection.
Tethering is the name given to a mobile that acts as a hotspot. It make use of a network interface (Wifi, Bluetooth, USB port acting as Ethernet...) to share internet connection through the selected interface.
As you'll note I'm not incluiding mobile data in the list. Mobile data is used to connect to Internet. So your mobile is capable of connecting to internet via mobile data and share it via any other interface, i.e. Wifi, Bluetooth and USB (Ethernet)
At least in my mobile im able to just enable Tethering configuring it from Settings -> Wifi connections -> Share internet. Here I can switch on/off the desired interface: USB, bluetooth or Wifi. I can enable just one, both or even all of those
As far as I know a Xamarin app is an android app that embeddes a website and, optionaly but highly common, uses a server as an endpoint (your laptop in this case), also known as API.
So as you ask you don't want to have internet connectivity, all the connections must be made in a local network. To do so you could just enable tethering and turn off mobile data on your mobile. Then on your laptop, connect to your new network over wifi, enable ethernet or connect via bluetooth, depending on your choose.
Of course, you'll have to handle firewall on your laptop to ensure connections are made successfuly. But you should be able at last to ping each other.
I'm trying to throttle my device's network connection while testing it on Android studio. My strategy will be to try and reverse tether the phone to my macbook Air so the computer acts as a hotspot. The computer will be connected to the internet via wifi, and should be acting as an internet hotspot for any paired devices.
However the internet connectivity is never set, so the android device never connects online.
What I did:
Turn on network sharing via Wi-Fi, checked the Blue Tooth Pan Option.
Paired the devices (i.e. the phone is detected by the macbook and vice/versa.
Set up a static IP on the blue tooth pan configuration (see image).
And here is my Bluetooth setup on the device:
My phone is not rooted and frankly I'd rather not have to root it - but for some reason the phone is not detecting Bluetooth on the macbook air. But the macbook does detect the phone and is able to send files to it.
What gives?
I did working reverse tethering from MacBook Pro El Capitan to android mobile. Sharing the network Macbook Pro with Bluetooth PAN.
The trick is, to have android mobile rooted. First connect your mobile to any wifi, change advanced network options in mobile as Static IP, 192.168.2.1 router 192.168.2.1 DNS 8.8.8.8 8.8.4.4.
With terminal emulator apk, enter: su dhcpcd bt-pan
Now you can close your wifi in mobile.
be sure you have bluetooth pan configured as "Use DHCP with manual address" option matching same IP and DNS your put in android.
Note; of course android paired with the macbook, and sharing network and sharing bluetooth options active.
All working very stable.
Recently, I've tried to check transfer packages by proxy-ing from Mac to Android device. I think Bluetooth shouldn't be used for setting the shared internet but instead you should just share from your Ethernet to Wi-Fi.
(I tried to put in a comment as this is more like it since I don't have any images or a concrete explanation... but it wouldn't allow it).
I currently have a pair of google glass paired through bluetooth to an LG G2.
My LG G2 can access the internet and my network without an issue.
Glass can search web pages and browse the internet without an issue.
My custom application works fine through WiFi on my phone and on glass, if glass is going through WiFi.
However I have a custom application that I made that cannot connect to a server on my network through the bluetooth tether. I haven't been able to find anything regarding special permissions or programming changes that would need to be done when tethering, so am I missing something critically important here?
It is absolutely critical that I use my phone's wifi because it supports 5 Ghz WiFi and 2.4 Ghz is completely saturated where I am.
Currently I am trying to use the libstreaming example 3 to stream video to a server:
https://github.com/fyhertz/libstreaming/wiki/Using-libstreaming-with-Wowza-Media-Server
My manifest has been modified to include
android.permissions.BLUETOOTH
android.permissions.BLUETOOTH_ADMIN
I've also hard coded my server IP address and the correct settings to automatically start the video stream inside onCreate. This all works on my phone but I get a connection timeout when connecting through glass when bluetooth tethered.
With the following steps I was able to connect from Google Glass to a server socket:
enable android.permissions.INTERNET to the manifest file
on the android phone: settings->wireless..more->tethering & hotspot ->activate bluetooth tethering
maybe this helps...
As far as I can tell, when data is connected you do not get an ip address... Thus your socket isn't really able to connect. Data requests are sent through bluetooth and really it is your phone making the request....
I will try to look into it, but right now bluetooth connectivity yields an ip address of 0.0.0.0
I'm trying to figure out how to connect two Android powered devices,
namely a smartphone (Android 4.1.2) and an android developer
board (Android 4.0.4) with apps running on each, via USB and get them
to communicate with each other.
Right now the developer board is running as the host and the phone as
an accessory. The hosts app is searching for connected devices and is
able to identify the phone as a device, but the app running on the
phone isn't able to find the host.
I've searched the web for quite a while now (!!) but I didn't come
up with anything helpful yet that solved my problem.
For my project it is crucial that I use an USB connection, so please
don't propose that I use bluetooth, WiFi, or anything else...
Regards
USB is host initiated, so it's not surprising that this is not working. Your device that is functioning as the USB device should respond to requests initiated from the USB host. You will probably have to create some sort of vendor specific protocol around this. I don't know what you are trying to do with this connection, but if the device needs to know things on the host you will need to bake this in to your protocol definition and send that information directly to the device.
What you could try doing is using both devices as a host and connecting a USB to UART bridge device between them, then you can transmit data generically in any direction by using the serial connection (through USBManager if the USB protocol is available, or some Android Java Serial class if it is not), plus you don't have to worry about the host-device connection. This would look something like this:
[Android 4.1.2 Device]<--USB Connection-->[USB to UART Bridge]<--Serial Connection-->[USB to UART Bridge]<--USB Connection-->[Android 4.0.4 Device].
Use OTG Cable to interact with your board and phone. Its easily available in the market.
Iam connecting 3G phone for my Android device for internet connection and another Socket(SPP) for CAN signal receiving.Whenever I manually connect to the Bluetooth tethering via 3G phone, i can browse internet perfectly and speed is good.Whenever programmatically connect to the 3G connection, i couldn't browse internet.i checked in shell and observing that in my mobile 'device is connected' message displayed and E symbol appears.No problem for me to connect Socket.But I got problem to use 3G phone.For this iam using APN/DUN mode.I checked both but no use.Is there any performance issue here or anything wrong to connect different devices by using Bluetooth API in android.Why this happends while connecting Mobile programmatically.Please give me guidance.
Regards,
Rajendar
Yes, you can have several open connections at a time.
In fact, I've used my hands-free bluetooth on my phone, as it is connected to my ELM327 SPP device streaming at full speed. I didn't notice any hiccups.
As for losing connectivity when you are connected to multiple devices, it's most likely an issue with the DUN provider you're using.
Also it's worth stating that, on Verizon/3g phones, when you use the phone as a phone, it suspends all 3g data services until the call is terminated.
The way L2CAP defines the LT_ADDR allows connecting devices up to 7. Your connection problems is something else.