phone: Sony Ericsson x8 - rooted
I see with ifconfig, that when I enable wifi in settings, rmnet0 (which represents 2g/3g) will disappear - only wlan0 will show up on ifconfig then. As soon as I disable wlan0, I can see rmnet0 again...
There is one process which I like to run on 2g/3g at all times, never on wifi. In my process I I can configure on which IP it will bind.
Therefore I need to find a way, to let rmnet0 always stay alive, even when wifi is also enabled. How can I do that?
(I am not developing an app. I am looking for something like a linux command. If needed I would also exchange/flash system files, got a custom rom anyway. The process is a linux app, which runs inside Debian Linux on top of Android using chroot. Therefore I guess the java/sdk restrictions do not matter here, as I have full system access.)
Related
I want to use my laptop with LTE modem (and SIM card slot) for regular calls, using the phone number associated with my SIM. From my current operator, and also some forums, I got an answer that it is not possible.
Why?
I still would like to know a technical reasons behind it. Whether it is just a matter of software (that nobody has created a Dialer/Phone app which could be installed on a 64bit linux or windows system), or there is something else making this impossible.
Natively, 4G (or LTE) is only for data
I understand that when a smartphone is connected to an internet via 4G (LTE), and a call is established, it reverts to 3G or 2G network. This would make sense that if a laptop's broadband module only supports 4G, it is not able to do so.
How about VoLTE?
I still think that it should be possible via VoLTE. There are even apps for android to convert an LTE phone (which natively does not support VoLTE) to utilize VoLTE.
Do you have any experience with matter of Calling or sending SMS using 4G? Are there any apps, or at least APIs which I could use to implement it? Or am I missing something in facts I have explained above?
If I have a SIM card from a mobile operator - for example, Vodacom in South Africa, I can use their USSD services via dialling *111#. Then I can navigate the options via using my mobile phone keyboard.
I would like to create a script that does this in an automated way. Is there a way to do this?
I see this is possible on an Android application (Make USSD call in android). Is there a way to consume a specific mobile operator's UUSD service without first purchasing a SIM card from that operator? (i.e. running this from a server over http/tcp).
To access the USSD menu you need to be on the mobile network. USSD is not internet, nor even data network. USSD is transported on mobile signaling network. Thus you need to have a SIM.
To navigate on a USSD menu via scripts, you may need few steps.
You need a GSM device connected to your computer. A USB Modem is OK but all modems don't have this functionality. I have been using a Huawei 180E model.
You'll need to talk to your modem over a serial line. On Linux, USB Modems can be reached as tty devices, typically on /dev/ttyUSB0 (there is no absolute rule: some models only define 2 devices, some models define 4). For tests, you can use some terminal software. I use miniterm.py, a Python program, but minicom is OK as probably many others. For automation you may need a serial library for your preferred language. On the command line, there is atinout but I didn't manage to make it work properly, socat - /dev/ttyUSB0 should also work.
Finally, to talk to your modem, you need to use the Hayes Modem AT commands. You can read the AT command reference [3GPP 27.007][1], chapter 7.15 for a formal documentation, but basically, sent to the modem (without the #... part):
ATZ # to reset the modem
AT+CUST=2 # to close any ongoing USSD session
AT+CUSD=1,"#111#",15 # to initiate the navigation
and if you get the menu, you're fine; if not, well, things are not desperate, but it may be more difficult as you'll probably need to play with character encoding.
[1]: https://www.etsi.org/deliver/etsi_ts/127000_127099/127007/10.03.00_60 (/ts_127007v100300p.pdf
Is it possible to connect FM go on my iPhone to the FM pro database on the server when the iPhone is not on the same network?
The server has a firewall and remote access is actually only possible though a VPN tunnel.
If not, what opportunities do I have to have a remote acces to the database without copying the file onto the smartphone, and to update the db as soon the iPhone is back in the same WLAN? Due to a slow VPN, installing the VPN on the smartphone is an undesirable option.
Thank you.
You can ask to open a specific port in the firewall (5003) and redirect to the FileMaker Server.
You can also try to remote on one of the local computers from the phone if it is allowed by firewall, but I think you will find using it a bit awkward.
The best option is to use VPN (which you don't want to), so may be it is worth investigating why it is slow. Is it generally slow or it is slow with FIleMaker only? You might have to optimise your system.
I would like to build an application on my iPhone that connects to my raspberry Pi. Because these are going to be in close proximity (next to each other), I'd like to use the wired connection (lightning port to USB) to communicate. Is this possible or must I use wireless technologies? My assumption is that wired would be better as it ensures a connection and would be faster, however, I am open to be corrected.
This is related to a hobbyist project where I want to access a raspberry pi sensor on my iphone. The sensor (and Pi) will be next to the iphone. I'm building a custom weird case to combine them.
Any thoughts much appreciated.
Thanks
Iain
For communication with peripheral devices (Raspberry Pi for example) you have several alternatives.
UART via 30-pin or lightning connector (MFi needed)
USB via 30-pin or lightning connector (MFi needed)
Quick start: Microchip's development kits. This module can prolong communication to RPi or you can try to implement the Accessory stack (and communication with authentification chip) to RPi itself.
FSK or similar modulated-audio communication via audio-jack (no MFi needed)
You would have to implement hardware FSK modem on the RPi side and a software one on the iOS side. It is a bit tricky but by no means impossible.
Of course you could implement software modem on the RPi side, too. But since RPi doesn't have audio input you would have to use an USB audio card or something. Or complicate your life trying to sample an analog pin fast enough.
User not really Jake made a quite impressive list of links on this topic here on SO.
Bluetooth as an External Accessory (MFi needed)
Quick start: RN-41/42-APL
Easy to use Bluetooth stack. Communication with authentification chip is handled by the BT module. Note that when communicating with iOS devices data troughput is not much better than when using BLE modules.
Bluetooth as a BLE module (no MFi needed)
Data troughput not much worse then the old BT. Implementing the communication might be a bit more tricky code-wise. This module seems interesting.
WiFi communication (no MFi needed)
WiFi might be a good choice. But for your device and iOS device to be able to find eachother you will need either static IP (for the server device) or minimal Zeroconf (Bonjour) implementation.
When using WiFi you can go either with infrastructure network (using external Access Point) or you could go with AdHoc (created by your device). Later seems promising but be careful - iOS7 & AdHoc network don't seem to work well together yet.
With WiFi you have many modules to choose from. A simpler to use would be a module like RN-XV WiFly Module. TCP stack is already implemented in the module - you can use simple UART communication. I'm not sure how to implement Zeroconf on this one.
Or there are raw WiFi modules like MRF24WG0MA/MB. They are stable and reliable and they can be used on home-etched PCB. Downside for RPi user would be that you would almost certainly need an PIC24 or something between the RPi and MRF24W. Microchip provides free TCP/IP stack for their microcontrollers and this stack includes Zeroconf.
And the easiest way: you could simply use a WiFi dongle (with RPi) for communication. Zeroconf should be easy enough to implement on the RPi - and it's not even needed at the begining if you are ok with assigning static IP to the RPi (if it acts as a server).
This is not possible without signing up for apples MFI program. You have to pay and sign a bunch of NDA's.
https://developer.apple.com/programs/mfi/
You can use other methods, like bluetooth and connection over the audio port.
While #RokJarc's answer is pretty complete, I've also had success with both wired (lightning to usb) and wireless connections using iOS's personal hotspot. Here are the steps:
For wired, on the Pi, install ipheth-utils:
sudo apt-get install ipheth-utils
And add an eth1 network interface by editing /etc/network/interfaces to include:
allow-hotplug eth1
iface eth1 inet manual
For wireless, make sure /etc/network/interfaces has a wireless network entry such as:
allow-hotplug wlan0
iface wlan0 inet manual
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
If you are using wpa_supplicant and add a network entry for the iPhone's hotspot in /etc/wpa_supplicant/wpa_supplicant.conf:
network={
ssid="Banana Phone"
psk="ring ring ring"
key_mgmt=WPA-PSK
id_str="banana"
priority=3
}
The ssid should be the name of the phone from Settings -> General -> About -> Name and the password should come from the personal hotspot screen.
Now start the personal hotspot on your phone. The pi should automatically connect when connected by a usb to lighting cable or using wifi. After connecting, the pi should be assigned an ip somewhere in 172.20.10.x. You can run ifconfig on the pi to figure out which one. (I believe that you should be able to define a static ip here but haven't messed around with that yet)
From there, you can connect another computer to the hotspot and ssh into the pi using the 172.20.10.x ip or even ssh directly from the phone.
In my personal testing, latency over lightning is consistently low and I've used this on both a Raspberry Pi Two and Raspberry Pi Zero for streaming realtime mjpeg video from two cameras to a VR headset. In this scheme, the network is a fairly small source of the 100ms or so latency. The experience is not Vive quality of course, but it is still usable and the iPhone + Pi combo provides lots of fun hacking opportunities
It's possible to do this with Mfi.You can run usbmuxd service on your Raspberry Pi. The usbmuxd will transfer the USB data into socket packets. Your iOS App also need to implement the same protocol to rx/tx the data from/to your Raspberry Pi.
David House has already made this work. https://github.com/davidahouse/PiTalk
I am trying to detect Apple devices connected to a wireless network. This is relatively simple using Bonjour, however I am also trying to detect what kind of device it is. Like, a MacBook Air, a MacBook Pro, a MacPro, an iPhone, iPod, or an iPad.
I have found that Bonjour requests to MacBook's and MacPros include an "ADDITIONAL SECTION" response to the query which includes the model:
;; ADDITIONAL SECTION:
Q9550._device-info._tcp.local. 10 IN TXT "model=MacPro3,1"
and
;; ADDITIONAL SECTION:
Air._device-info._tcp.local. 10 IN TXT "model=MacBookAir4,2"
From testing an iPhone (3GS and 4), an iPod touch, and an iPad2, all of the iDevices only respond with their name:
;; ANSWER SECTION:
111.1.168.192.in-addr.arpa. 10 IN PTR gmPad2.local.
Clearly, the name may not reflect the device. So, I would not like to try to extrapolate the type of device from the name. Does anyone know any other ways to detect iDevice types?
Edit: just to be clear, the command I am using is: dig #224.0.0.251 -p5353 -x 192.168.1.111 ... substituting the IP address of the Apple device
Use port 62078
The most reliable indicator I have seen is whether you can connect to IP port 62078.
Port 62078 is used for the "iphone-sync" service, and I don't think MacBooks use it. This port always appears to be open for the iPhones and iPads on our (very small) network.
Possibly (but not probably) there are messages you can send to the port to sniff out more details...
I think the official xml list of port assignements is here, although it wasn't working for me just now:
http://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xml
MAC address
In theory the MAC addresses might help - but probably not much use unless you can find somewhere that maintains a reliable list of ranges (e.g. a network security firm, or hardware provider). MAC addresses do depend on the actual chips used (or a flashed MAC). The database is at the organisation level (although organisations sometimes choose to use specific ranges for specific devices).
http://standards.ieee.org/develop/regauth/oui/public.html allows you to download the database of "Organizationally Unique Identifiers", or you can look up "Apple", or the first three bytes of a MAC address e.g. 00264A.
Anecdotally, the MAC lookup doesn't work... First three digits of my iPad MAC are 28-68-BA and that comes up with nothing.
User agent
Probably not useful, but if you can watch the network traffic or have an http proxy, then the user-agent string could help (see http://developer.apple.com/library/IOS/documentation/AppleApplications/Reference/SafariWebContent/OptimizingforSafarioniPhone/OptimizingforSafarioniPhone.html#//apple_ref/doc/uid/TP40006517-SW3).
Edit (added):
Appleās Bonjour protocol relies on Multicast DNS (mDNS) operating at UDP port 5353 and sends to these reserved group addresses: IPv4 Group Address - 224.0.0.251, IPv6 Group Address - FF02::FB - reference.
This would help get push notification when Apple devices connect to a local network (link-local) by listening for multicast messages on 5353 UDP. Perhaps sniff the packet and see if it has any extra information in it :)
Although I presume that Bonjour API also allows for seeing this...
You can also use the airport utility to do this manually :
1) open AirportUtility
2) Go to "Wireless Clients" (hover mouse by the arrow and click it)
3) Go to DHCP Clients, and you will see iPad,iPhone, computer name, etc.... as the Client ID column.