Beaglebone black : Using Systemd service to make wireless stable is not working as expected

Hello,
I followed every steps in adafruit setting wifi page to obtain stable wireless on BBB (rev C, kernel version 3.8.13-bone71). And read from google group that most got stable wiereless by disabling HDMI. Since I need hdmi for now I followed second solution by running script at boot time. So I created a systemd service that will run script, basically it gets network interface number from the command iwconfig and replaces previous wlanNO in interface file and ifup --force wlanCurrent. Service that I wrote is as follows
`

[Unit]
Description=Ifup wlan automatically
after=wpa_supplicant.service
Requires=wpa_supplicant.service

[Service]
Type=oneshot
RemainAfterExit=true
ExecStart=/usr/testifup/ifupscript.sh

[Install]
WantedBy=multi-user.target

`

Enabled this service. Rebooted bbb. But no use. Sometimes it successes but sometimes it fails. I observed service status. It nevoler exits with fail error but wpa_supplicant service sometimes messages giving network problem and does not set static IP I assigned in the interface file. So it gives random IP. I guess if my created service runs before some unkown service it fails to ifup wlanNo if other way around it success and assigns static IP. How can I arrange this? Which service is causing this issue? Could you please help me?
Regards,
Upol

PS: sorry for mistake. google group link is here.

Upol,
I’m not sure what is wrong with your approach but what we’re doing is executing “systemctl restart connman” in a periodic service when we think something’s wrong with the wifi.

I posted this link in another thread a few days ago. This solution worked great for me on an image from a few months back. I highly suggest taking this route:

http://madscientistlabs.blogspot.ca/2015/01/wifi-on-beaglebone-black-with-systemd.html

Hello Neabex,
thak you for your reply. As far as I know connman is for angstrom
distribution, but mine is debian. I was able to overcome this problem by
sleep'ng 30sec in the script that service will execute.
Dekay currently I am ok with my solution if something goes wrong I will try
your approach. Thank you.

Connman is installed in the latest Debian Jessie full testing images. It works fine for me for managing WiFi. I can't say whether Connman is installed in the console images as I have not used them. I posted some additional information in this thread: https://groups.google.com/forum/m/#!category-topic/beagleboard/rRHUR8mltmg

Hello Brian, sorry for not giving full information about BBB, mine is debian wheezy latest stable image (3.8.13-bone70). How can I get stable wireless in this wheezy? For one week wireless was stable but now it is not. hdmi is not disabled.

Now, oddly it got its’ static IP address after the boot. When I ping, it hangs there. Also I cannot connect to BBB using its static IP address.
I removed all services that enables wireless except service that I created for ifup and ifdown currently available wlan interface.