RE: pppd integration into ConnMan
Denis, Thanks for the reply. Initially we wanted to use Ofono for our Ublox driver. The Hardware has only one UART port Connected to the Intel Edison. Ofono's ublox driver is USB based it seems and we cannot use it. Solution was to either write new ublox driver based on serial or modify existing. For which we do Not have much time. We had PPP earlier working, hence we thought of working on it integrating it. Our main intention is to perform network management using ConnMan on WiFi and cellular. Regards, Ram. -Original Message- From: connman [mailto:connman-boun...@connman.net] On Behalf Of Denis Kenzior Sent: Tuesday, August 04, 2015 1:31 AM To: connman@connman.net Subject: Re: pppd integration into ConnMan Hi Ram, On 08/03/2015 06:05 AM, Kallumari Nagaraja Rao, RammohanX wrote: Hello All, Has anybody has tried integrating PPPD with ConnMan ? Can we use PPPD instead of Ofono along with ConnMan ? Nobody has ever tried. Integrating pppd is actually quite complex. oFono has a PPP stack, integrating that into ConnMan would be far easier, though not sure why you would want to? Regards, -Denis ___ connman mailing list connman@connman.net https://lists.connman.net/mailman/listinfo/connman ___ connman mailing list connman@connman.net https://lists.connman.net/mailman/listinfo/connman
RE: cellular technology is not getting listed
Hello Jukka, I found out the issue. ConnMan was registering the cellular driver. During the ConnMan init process it calls up the plugins/ofono/ ofono_init function and registers the cellular driver. That is not happening in the earlier daemon where cellular technology not getting listed. Issue: I have 2 copies of the connmand one with size around 770kb and other around 2400kb. With the small size daemon, ofono plugin does not seem to work. However, with the daemon of size 2400kb, connman is able to register the cellular driver and Cellular technology is visible in connmanctl. Please let me know if I am missing again something. Regards, Ram. -Original Message- From: Jukka Rissanen [mailto:jukka.rissa...@linux.intel.com] Sent: Thursday, July 16, 2015 3:25 PM To: connman@connman.net Cc: Kallumari Nagaraja Rao, RammohanX Subject: Re: cellular technology is not getting listed Hi Ram, On to, 2015-07-16 at 08:24 +, Kallumari Nagaraja Rao, RammohanX wrote: All, Following things are done, 1./var/lib/connman cellular added What do you mean by this? 2./etc/connman/main.conf has wifi and cellular as preferred technologies PreferredTechnologies only affects how ConnMan does autoconnect. 3.connmand is running I assume you have ofono plugin compiled and used by ConnMan? Are you using Yocto based distro or have you compiled ConnMan yourself? 4.ofonod running 5.cellular context was created after enabling the he910 modem So ofono shows the cellular context correctly if you invoke list-contexts script from ofono, is it so? Do you have APN and PIN correctly setup? 6.ifconfig list ppp0 What does the above command show? however, connmanctl does not list the cellular technology. So the cellular technology is not shown which indicates that ConnMan does not know anything about the modem. If the cellular service is not shown (but technology is), then the cellular context is not properly setup. What ConnMan version are you using? After doing ifconfig, ppp0 does not have inet addr listed. Please let me know if there is something missing. Regards, Ram. Cheers, Jukka ___ connman mailing list connman@connman.net https://lists.connman.net/mailman/listinfo/connman
cellular technology is not getting listed
All, Following things are done, 1./var/lib/connman cellular added 2./etc/connman/main.conf has wifi and cellular as preferred technologies 3.connmand is running 4.ofonod running 5.cellular context was created after enabling the he910 modem 6.ifconfig list ppp0 however, connmanctl does not list the cellular technology. After doing ifconfig, ppp0 does not have inet addr listed. Please let me know if there is something missing. Regards, Ram. ___ connman mailing list connman@connman.net https://lists.connman.net/mailman/listinfo/connman
RE: connman connection policy
Hello All, Thank you for the support. I am able to set it running by supplying required passphrase. Great feeling :) Regards, Ram -Original Message- From: Jukka Rissanen [mailto:jukka.rissa...@linux.intel.com] Sent: Wednesday, March 18, 2015 6:54 PM To: connman@connman.net Cc: Kallumari Nagaraja Rao, RammohanX Subject: Re: connman connection policy Hi Ram, On ke, 2015-03-18 at 13:12 +, Kallumari Nagaraja Rao, RammohanX wrote: Hello Jukka, Is the Agent request input happens via a dictionary ? Yes, the passphrase is sent as a dictionary element. See doc/agent-api.txt document for details (there are some examples at the end of the document). I was able to register a agent handler getting RequestInput from the ConnMan. However I am unable to send out the passphrase out. static DBusHandlerResult request_passkey_message(DBusConnection *conn, DBusMessage *msg) { DBusMessage *reply; DBusError derr, error; const char *device; char passkey[17] = micromax; const char *psk = micromax; reply = dbus_message_new_method_return(msg); if (!reply) return DBUS_HANDLER_RESULT_NEED_MEMORY; dbus_error_init(derr); if (!dbus_message_get_args(msg, derr, DBUS_TYPE_OBJECT_PATH, device, DBUS_TYPE_INVALID)) { fprintf(stderr, %s, derr.message); dbus_error_free(derr); return error_message(conn, msg, net.connman.Error.Rejected, Wrong signature); } if (device) printf(Device: %s\n, device); //memset(passkey, 0, sizeof(passkey)); printf(Passkey sent over: %s\n, psk); dbus_message_append_args(reply, DBUS_TYPE_STRING, psk, DBUS_TYPE_INVALID); dbus_connection_send(conn, reply, NULL); printf(reply success\n); dbus_message_unref(reply); return DBUS_HANDLER_RESULT_HANDLED; } I guess the passkey is currently sent out as a string the ConnMan may not be able to accept it. Not sure how to convert the input into a dictionary append my passphrase into it. I am sure you can search the web for examples how to send a dictionary in dbus from C-program. I am able to print the service properly. Please help me on this. Thanks. Regards, Ram Jukka ___ connman mailing list connman@connman.net https://lists.connman.net/mailman/listinfo/connman
RE: connman connection policy
Hello Jukka, Is the Agent request input happens via a dictionary ? I was able to register a agent handler getting RequestInput from the ConnMan. However I am unable to send out the passphrase out. static DBusHandlerResult request_passkey_message(DBusConnection *conn, DBusMessage *msg) { DBusMessage *reply; DBusError derr, error; const char *device; char passkey[17] = micromax; const char *psk = micromax; reply = dbus_message_new_method_return(msg); if (!reply) return DBUS_HANDLER_RESULT_NEED_MEMORY; dbus_error_init(derr); if (!dbus_message_get_args(msg, derr, DBUS_TYPE_OBJECT_PATH, device, DBUS_TYPE_INVALID)) { fprintf(stderr, %s, derr.message); dbus_error_free(derr); return error_message(conn, msg, net.connman.Error.Rejected, Wrong signature); } if (device) printf(Device: %s\n, device); //memset(passkey, 0, sizeof(passkey)); printf(Passkey sent over: %s\n, psk); dbus_message_append_args(reply, DBUS_TYPE_STRING, psk, DBUS_TYPE_INVALID); dbus_connection_send(conn, reply, NULL); printf(reply success\n); dbus_message_unref(reply); return DBUS_HANDLER_RESULT_HANDLED; } I guess the passkey is currently sent out as a string the ConnMan may not be able to accept it. Not sure how to convert the input into a dictionary append my passphrase into it. I am able to print the service properly. Please help me on this. Thanks. Regards, Ram -Original Message- From: connman [mailto:connman-boun...@connman.net] On Behalf Of Jukka Rissanen Sent: Tuesday, March 17, 2015 7:53 PM To: connman@connman.net Subject: Re: connman connection policy On ti, 2015-03-17 at 10:25 +, Kallumari Nagaraja Rao, RammohanX wrote: This is what I tried doing it, I am very new to these stuffs :( DBusMessage * agent_update_passphrase(DBusConnection *connection, char * serv_str, char * pass) { DBusMessage *message, *reply; DBusError error; DBusMessageIter iter; DBusMessageIter args; static char *path = NULL; char *property = Passphrase; int type = DBUS_TYPE_STRING; char *param = AGENT_PATH; path = g_strdup_printf(/net/connman/service/%s, serv_str); message = dbus_message_new_method_call( CONNMAN_SERVICE, path, CONNMAN_AGENT_INTERFACE, RequestInput ); This is wrong. ConnMan will call RequestInput method so you will need to create a listener in your application for that. You are not suppose to call RequestInput in ConnMan as there will not be such method there. Jukka ___ connman mailing list connman@connman.net https://lists.connman.net/mailman/listinfo/connman ___ connman mailing list connman@connman.net https://lists.connman.net/mailman/listinfo/connman
RE: connman connection policy
Patrik, Is there a simple way to update a service with the passphrase we receive as a parameter ? Regards, Ram -Original Message- From: connman [mailto:connman-boun...@connman.net] On Behalf Of Patrik Flykt Sent: Tuesday, March 17, 2015 2:23 PM To: connman@connman.net Subject: Re: connman connection policy On Tue, 2015-03-17 at 07:40 +, Kallumari Nagaraja Rao, RammohanX wrote: We basically want to handle dynamic update of the passphrase, instead of updating in the settings file. Is Agent mandate ? Yes. Patrik ___ connman mailing list connman@connman.net https://lists.connman.net/mailman/listinfo/connman ___ connman mailing list connman@connman.net https://lists.connman.net/mailman/listinfo/connman
RE: connman connection policy
Yes I knew about the settings under the respective service. We basically want to handle dynamic update of the passphrase, instead of updating in the settings file. Is Agent mandate ? Regards, Ram -Original Message- From: connman [mailto:connman-boun...@connman.net] On Behalf Of Patrik Flykt Sent: Tuesday, March 17, 2015 12:14 PM To: connman@connman.net Subject: Re: connman connection policy On Tue, 2015-03-17 at 04:25 +, Kallumari Nagaraja Rao, RammohanX wrote: Is it possible to implement in a way to pass passphrase as a string via a C parameter activate ? Without having to request any input from the user ? Of course. It's all up to your C program how it wants to handle the situation. ConnMan only expects to use the Agent API in doc/agent-api.txt when querying for the passphrase. But if you're about to supply a pre-configured passphrase, doc/config-format.txt already exists to solve the problem. Cheers, Patrik ___ connman mailing list connman@connman.net https://lists.connman.net/mailman/listinfo/connman ___ connman mailing list connman@connman.net https://lists.connman.net/mailman/listinfo/connman
RE: connman connection policy
This is what I tried doing it, I am very new to these stuffs :( DBusMessage * agent_update_passphrase(DBusConnection *connection, char * serv_str, char * pass) { DBusMessage *message, *reply; DBusError error; DBusMessageIter iter; DBusMessageIter args; static char *path = NULL; char *property = Passphrase; int type = DBUS_TYPE_STRING; char *param = AGENT_PATH; path = g_strdup_printf(/net/connman/service/%s, serv_str); message = dbus_message_new_method_call( CONNMAN_SERVICE, path, CONNMAN_AGENT_INTERFACE, RequestInput ); if (message == NULL) return NULL; dbus_error_init(error); dbus_message_iter_init_append(message, iter); if (append_variant(iter, property, type, pass) 0) { dbus_message_unref(message); return -EINVAL; } reply = dbus_connection_send_with_reply_and_block(connection, message, -1, error); if (reply == NULL) { if (dbus_error_is_set(error) == TRUE) { printf(%s, error.message); dbus_error_free(error); } else { printf(%s, error.message); } dbus_message_unref(message); return NULL; } dbus_message_unref(message); dbus_message_unref(reply); return reply; } Regards, Ram -Original Message- From: connman [mailto:connman-boun...@connman.net] On Behalf Of Patrik Flykt Sent: Tuesday, March 17, 2015 3:31 PM To: connman@connman.net Subject: Re: connman connection policy On Tue, 2015-03-17 at 08:54 +, Kallumari Nagaraja Rao, RammohanX wrote: Is there a simple way to update a service with the passphrase we receive as a parameter ? Yes, by replying to the Agent API RequestInput D-Bus method call. HTH, Patrik ___ connman mailing list connman@connman.net https://lists.connman.net/mailman/listinfo/connman ___ connman mailing list connman@connman.net https://lists.connman.net/mailman/listinfo/connman
RE: connman connection policy
Patrik, Can you please help me out on this ? Regards, Ram -Original Message- From: connman [mailto:connman-boun...@connman.net] On Behalf Of Patrik Flykt Sent: Tuesday, March 17, 2015 3:31 PM To: connman@connman.net Subject: Re: connman connection policy On Tue, 2015-03-17 at 08:54 +, Kallumari Nagaraja Rao, RammohanX wrote: Is there a simple way to update a service with the passphrase we receive as a parameter ? Yes, by replying to the Agent API RequestInput D-Bus method call. HTH, Patrik ___ connman mailing list connman@connman.net https://lists.connman.net/mailman/listinfo/connman ___ connman mailing list connman@connman.net https://lists.connman.net/mailman/listinfo/connman
RE: connman connection policy
Hi Patrik, I am trying to write a sample C application to connect to a specific wifi access point. I am able to do it for an unprotected access point, however is there a way I can pass the required passphrase ? Do we have a different procedure to it ? [may be something like as below] 1. assign passphrase to a service 2. connect to the service Or something like above. Please help me. Waiting for your response. Regards, Ram -Original Message- From: connman [mailto:connman-boun...@connman.net] On Behalf Of Patrik Flykt Sent: Wednesday, March 11, 2015 8:05 PM To: connman@connman.net Subject: Re: connman connection policy On Wed, 2015-03-11 at 10:56 +, Kallumari Nagaraja Rao, RammohanX wrote: Following stuffs are happening, 1. I am initially connected to wifi - out of wifi connection - switches back to cellular 2. otherway round when I come inside the purview of a wifi access, it does not disconnect from cellular and connect to wifi service. Please provide the relevant output from 'connmanctl monitor services' so that there is a complete high level picture of what is going on. If you have manually manually connected some of these networks use connmanctl in interactive mode so that the monitoring output and the commands you use are nicely pretty-printed in sequence. As you may have hit a bug of some sort, please also provide the log output with 'connmand -d' for the above case. Cheers, Patrik ___ connman mailing list connman@connman.net https://lists.connman.net/mailman/listinfo/connman ___ connman mailing list connman@connman.net https://lists.connman.net/mailman/listinfo/connman
RE: connman connection policy
Hello Patrik, Thanks for your inputs. Is it possible to implement in a way to pass passphrase as a string via a C parameter activate ? Without having to request any input from the user ? Regards, Ram -Original Message- From: connman [mailto:connman-boun...@connman.net] On Behalf Of Patrik Flykt Sent: Monday, March 16, 2015 7:04 PM To: connman@connman.net Subject: Re: connman connection policy Hi, On Mon, 2015-03-16 at 11:43 +, Kallumari Nagaraja Rao, RammohanX wrote: I am trying to write a sample C application to connect to a specific wifi access point. I am able to do it for an unprotected access point, however is there a way I can pass the required passphrase ? Do we have a different procedure to it ? [may be something like as below] 1. assign passphrase to a service 2. connect to the service Or something like above. Implement Agent API in your C application, see doc/agent-api.txt for the documentation and client/agent.c or test/simple-agent for general directions on what to implement. But do notice that both parts are covered by GPLv2 before reusing any code. Cheers, Patrik ___ connman mailing list connman@connman.net https://lists.connman.net/mailman/listinfo/connman ___ connman mailing list connman@connman.net https://lists.connman.net/mailman/listinfo/connman
RE: connman connection policy
Following stuffs are happening, 1. I am initially connected to wifi - out of wifi connection - switches back to cellular 2. otherway round when I come inside the purview of a wifi access, it does not disconnect from cellular and connect to wifi service. Regards, Ram -Original Message- From: connman [mailto:connman-boun...@connman.net] On Behalf Of Patrik Flykt Sent: Wednesday, March 11, 2015 2:38 PM To: connman@connman.net Subject: Re: connman connection policy On Wed, 2015-03-11 at 08:53 +, Kallumari Nagaraja Rao, RammohanX wrote: I do not see this happening. Can you please let me know if I need any other config or some something else required ? Exactly what is not happening? Please describe the steps done, using e.g. the relevant output from connmanctl (connmanctl monitor is helpful here) and provide log output from connmand -d for the same attempt. Cheers, Patrik ___ connman mailing list connman@connman.net https://lists.connman.net/mailman/listinfo/connman ___ connman mailing list connman@connman.net https://lists.connman.net/mailman/listinfo/connman
RE: connman connection policy
Dear Patrik, I do not see this happening. Can you please let me know if I need any other config or some something else required ? Regards, Ram -Original Message- From: connman [mailto:connman-boun...@connman.net] On Behalf Of Patrik Flykt Sent: Wednesday, March 11, 2015 2:21 PM To: connman@connman.net Subject: Re: connman connection policy On Mon, 2015-03-09 at 12:29 +, Kallumari Nagaraja Rao, RammohanX wrote: I am currently using connmanctl application to connect to wifi/cellular network. Individually yes I can connect to each, however, I am looking out to policy which says something like below, If we are in the vicinity of wifi network, connect to it otherwise get connected to cellular network. I tried creating mani.conf @ /etc/connman added the following, PreferredTechnologies = wifi,cellular SingleConnectedTechnology = true Quicky looking at this setup makes me think it should work. Does it? Cheers, Patrik ___ connman mailing list connman@connman.net https://lists.connman.net/mailman/listinfo/connman ___ connman mailing list connman@connman.net https://lists.connman.net/mailman/listinfo/connman
connman connection policy
I am currently using connmanctl application to connect to wifi/cellular network. Individually yes I can connect to each, however, I am looking out to policy which says something like below, If we are in the vicinity of wifi network, connect to it otherwise get connected to cellular network. I tried creating mani.conf @ /etc/connman added the following, PreferredTechnologies = wifi,cellular SingleConnectedTechnology = true Is there anything else needs to be done or this entire thing needs to be handled in another proprietary application ? Regards, Ram ___ connman mailing list connman@connman.net https://lists.connman.net/mailman/listinfo/connman