APN type IA and broken tethering - Nexus 4 Q&A, Help & Troubleshooting

After the kitkat update, I see in my APN settings two records.
One like we have used to have to far (APN type default,supl) and one with APN type ia and no APN value.
This has completely broken my tethering using vodafone GR (202 05).
Does anyone know what APN type "ia" is?

+1
georgemv said:
After the kitkat update, I see in my APN settings two records.
One like we have used to have to far (APN type default,supl) and one with APN type ia and no APN value.
This has completely broken my tethering using vodafone GR (202 05).
Does anyone know what APN type "ia" is?
Click to expand...
Click to collapse
+1, what's type ia?

/**
* APN types for data connections. These are usage categories for an APN
* entry. One APN entry may support multiple APN types, eg, a single APN
* may service regular internet traffic ("default") as well as MMS-specific
* connections.<br/>
* APN_TYPE_ALL is a special type to indicate that this APN entry can
* service all data connections.
*/
public static final String APN_TYPE_ALL = "*";
/** APN type for default data traffic */
public static final String APN_TYPE_DEFAULT = "default";
/** APN type for MMS traffic */
public static final String APN_TYPE_MMS = "mms";
/** APN type for SUPL assisted GPS */
public static final String APN_TYPE_SUPL = "supl";
/** APN type for DUN traffic */
public static final String APN_TYPE_DUN = "dun";
/** APN type for HiPri traffic */
public static final String APN_TYPE_HIPRI = "hipri";
/** APN type for FOTA */
public static final String APN_TYPE_FOTA = "fota";
/** APN type for IMS */
public static final String APN_TYPE_IMS = "ims";
/** APN type for CBS */
public static final String APN_TYPE_CBS = "cbs";
/** APN type for IA Initial Attach APN */
public static final String APN_TYPE_IA = "ia";
/** APN type for IA Emergency PDN */
public static final String APN_TYPE_EMERGENCY = "emergency";

Related

Passing string variable to dll -> NotSupportedException

This is all very frustrating! I have an "ez_tapi.dll" from Paul Vangelderp and it works a treat for eVB but I can not seem to use it in C#.
If anybody feel inspired they can test this themselves: the zipped attachment contains Paul's DLL code (C++ project) and his small test project (eVB), which proves that the DLL works well. Also included is my micky-mouse C# test project: I can dial up a modem and establish a GSM/V.110 connection, but when I try to send data by calling Ez_tapi_UTransmit() the application blows. I am assuming we have a problem passing the string between managed and unmanaged code.
I have buggered about with every imaginable combination of ref and out (the C# equivalent of ByVal and ByRef) for both Unicode and with byte/char arrays - all I ever get is the totally unhelpful "NotSupportedException". Is this a marshaling issue and if so how can I fix it?
Any help would be most welcome - I think Paul is planning on offering his DLL as a general purpose encapsulation of TAPI for application programmers who only need to quickly make a dial-up data connection for their PocketPC projects... once we have got it working!
Best regards,
Peter Beedell.
Re:
You can wrap library in this method:
//Function to Dial up a telephone number and get a Comm Handle
[DllImport("ez_tapi.dll", EntryPoint = "Ez_tapi_UDial")]
private static extern int TAPIUDial(string szPhoneNumber);
[DllImport("ez_tapi.dll", EntryPoint = "Ez_tapi_Dial")]
private static extern int TAPIDial(string szPhoneNumber);
//Function to Return the Current Tapi Status
[DllImport("ez_tapi.dll", EntryPoint = "Ez_tapi_Status")]
private static extern uint TAPIStatus();
// Function to Return the TAPI handle
[DllImport("ez_tapi.dll", EntryPoint = "Ez_tapi_Handle")]
private static extern uint TapiHandle();
//Function to close line and release all handles
[DllImport("ez_tapi.dll", EntryPoint = "Ez_tapi_Shutdown")]
private static extern bool TapiShutDown();
//Transmit a Unicode string
[DllImport("ez_tapi.dll", EntryPoint = "Ez_tapi_UTransmit")]
private static extern bool TapiUTransmit(string txData, uint size);
//Transmit a Transmit a char (Byte) string
[DllImport("ez_tapi.dll", EntryPoint = "Ez_tapi_Transmit")]
private static extern bool TapiTransmit(string txData, uint size);
//Receive a Unicode string
[DllImport("ez_tapi.dll", EntryPoint = "Ez_tapi_UReceive")]
private static extern uint TapiUReceive(string rxData, uint size);
//Receive a Receive a char (byte) string
[DllImport("ez_tapi.dll", EntryPoint = "Ez_tapi_Receive")]
private static extern uint TapiReceive(string rxData);
// Return how many characters are waiting in the buffer
[DllImport("ez_tapi.dll", EntryPoint = "Ez_tapi_Rx_Count")]
private static extern uint TapiRxCount();
//Wait for a Unicode Text String with timeout value
[DllImport("ez_tapi.dll", EntryPoint = "Ez_tapi_UWait")]
private static extern bool TapiUWait(string What, uint length, uint Timeout);
//Wait for a char (byte) Text String with timeout value
[DllImport("ez_tapi.dll", EntryPoint = "Ez_tapi_Wait")]
private static extern bool TapiWait(string What, uint length, uint Timeout);
bye

help proxy settings for android 2.0

hello ,
i am looking for a way to set the proxy settings in my nexus one , i found some interesting articles on the net on how to put proxy settings on 1.5 but none for 2.0 , also some one suggested that there is this code in the browser which make it ignores any proxy settings
Code:
//
// start MASF proxy service
//
//Intent proxyServiceIntent = new Intent();
//proxyServiceIntent.setComponent
// (new ComponentName(
// "com.android.masfproxyservice",
// "com.android.masfproxyservice.MasfProxyService"));
//startService(proxyServiceIntent, null);
is there away around it , or we do have to make another browser which doesnt ignore proxy settings?

PPC with Windows Mobile as Server

I have tried for some hours now to catch the problem, nowhere are good resources to read.
I have a server application running on my phone (Windows Mobile 6.1)
Binding the TCP Listener to 127.0.0.1ORT does work, if I type the URL from within the device.
Then I tried to connect via WIFI. At first: All WiFi Settings are correct, I know all IPs and pings are possible ... BUT: When I try to access the server from within the wifi network I don't get through. I've bound the listener for testing purposes to 127.0.0.1 and to the IP of my Wifi card. but nothing helped. Is there a kind of firewall or why can't I use a socket connection from PC to PPC?
This should work. I've create a remote-control program via TCP/IP and there were no issues.
Can you post the code for Bind / Listen?
radhoo said:
Can you post the code for Bind / Listen?
Click to expand...
Click to collapse
Code:
byte[] byteBuffer = new byte[1024];
string stringBuffer = null;
[COLOR="Red"] IPAddress localhost = IPAddress.Parse("0.0.0.0");
// I also tried 127.0.0.1 and the IP of my phone in WiFi
TcpListener httpDaemon = new TcpListener(localhost, 80);
httpDaemon.Start();
[/COLOR]
while (true)
{
TcpClient httpBrowser = httpDaemon.AcceptTcpClient();
NetworkStream commStream = httpBrowser.GetStream();
int i;
// Loop to receive all the data sent by the client.
while ((i = commStream.Read(byteBuffer, 0, byteBuffer.Length)) != 0)
{
stringBuffer = System.Text.Encoding.ASCII.GetString(byteBuffer, 0, i);
}
MessageBox.Show(stringBuffer);
httpBrowser.Close();
Provided your code is good, maybe check if the socket is actually listening, there's netstat tool in dotFred's task manager: http://www.dotfred.net/TaskMgr.htm
Furthermore, you can see if the traffic ever reaches your PPC with hSniffer:
http://winm-soft.atspace.com/
You don't seem to be checking any of the return values.
Have you done that?
You might be facing different conditions than when you bind to the loopback adapter.
theq86 said:
Code:
byte[] byteBuffer = new byte[1024];
string stringBuffer = null;
[COLOR="Red"] IPAddress localhost = IPAddress.Parse("0.0.0.0");
// I also tried 127.0.0.1 and the IP of my phone in WiFi
TcpListener httpDaemon = new TcpListener(localhost, 80);
httpDaemon.Start();
[/COLOR]
while (true)
{
TcpClient httpBrowser = httpDaemon.AcceptTcpClient();
NetworkStream commStream = httpBrowser.GetStream();
int i;
// Loop to receive all the data sent by the client.
while ((i = commStream.Read(byteBuffer, 0, byteBuffer.Length)) != 0)
{
stringBuffer = System.Text.Encoding.ASCII.GetString(byteBuffer, 0, i);
}
MessageBox.Show(stringBuffer);
httpBrowser.Close();
Click to expand...
Click to collapse
try other different port rather than http port = 80
mobile phone not design to be a web server.

[Q] Help Just getting the hour into a variable

I just need to get the current hour so right now its 2:07 i just want to get the 2 and set the text to a text view. heres my current code but it keeps force closing -_-
Code:
import java.util.Calendar;
import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;
public class main extends Activity {
Calendar dateAndTime = Calendar.getInstance();
private TextView timeHour;
private int hour;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
timeHour = (TextView) findViewById(R.id.textView1);
hour = dateAndTime.get(Calendar.HOUR);
timeHour.setText(hour);
}
}
SetText() requires a string. You're passing an int. Try:
Code:
timeHour.setText( String.valueOf(hour));
That worked!
Thank you that worked very well

Samsung devices not sending IPv6 Multicast datagrams

Hey, sorry if this is in the wrong forum, but I was not exactly sure where to post this.
I'm facing problems sending UDP packets over IPv6 multicast addresses on Galaxy devices.
Particularly, I want to send a Wake-on-LAN Magic Packet over IPv6 to wake up a PC in a different network. That PC is only reachable from outside via IPv6. Since it doesn't have an IP address when it's turned off, I can't send the Magic Packet directly to the computer and need to broadcast it over the network. I'm pretty new to IPv6, so I had to do some research on how to broadcast packets over IPv6 first and I'm not quite sure, if I'm doing everything correctly.
So, let's suppose the network the PC is connected to has the following network prefix:
2a02:123:4567:89ab::/64
According to RFC3306, I can use that prefix to derive a global multicast address, which would be the following:
ff3e:40:2a02:123:4567:89ab:0:0
Packets sent to this address should reach all devices on the network.
I wrote a small method to send a UDP packet to that multicast IP address and checked with Wireshark, if the packets were received or not.
When I run the method in a regular Java application, everything works fine and the packet is received by all devices on the network. When I use the same method in an Android app, I notice a strange behavior. If I send the packet from Non-Samsung devices (e.g. Blackview BV2000s) there are no problems. But from Samsung devices (Galaxy S3, S6 and Note 4 to be precise), the packet is not received by the PC. I think, the devices don't even send out the packet. Strange enough, if I address the PC directly with it's unicast address (e.g. 2a02:123:4567:89ab:cdef:fedc:ba98:7654), the packet is sent and received without any problems. So the problem only occurs on Samsung devices and only when sending to multicast addresses.
I'm using the following method to send the packet:
Java:
public void sendMagicPacket(String host, int port, String macAddress) {
try {
InetAddress address = InetAddress.getByName(host);
String[] macData = macAddress.split("\\:");
byte[] mac = new byte[6];
for (int i = 0; i < 6; i++) {
mac[i] = (byte)Short.parseShort(macData[i], 16);
}
byte[] magic = new byte [102];
for (int i = 0; i < 6; i++) {
magic[i] = (byte)0xff;
}
for (int i = 6; i < 102; i++) {
magic[i] = mac[i%6];
}
DatagramPacket packet = new DatagramPacket(magic, magic.length, address, port);
DatagramSocket socket = new DatagramSocket();
socket.send(packet);
socket.close();
} catch (final Exception e) {}
}
I'm pretty sure there is nothing wrong with the method itself, but am I missing something Android specific? Is sending to IPv6 multicast addresses not supported by Samsung devices or is it a bug? I'm pretty helpless and have no idea how to solve this problem. I hope someone can help me with this. :fingers-crossed:

Categories

Resources