Community
cancel
Showing results for 
Search instead for 
Did you mean: 
AAmar2
New Contributor I
2,062 Views

Unable to connect intel centrino n135 wifi card to Intel galileo gen2

Hi friends!

FGT

Today I got all the accessories for setting up wifi card on my intel galileo gen 2.I have fixed everything on intel galileo as explained in sergey malinov's blog. I even got as far as setting SSID and password in supplicant.conf file of intel galileo gen2.However I am stuck in the stage wherein I have to modify the /etc/network/interfaces file to let galileo gen 2 to connect to my wifi router automatically as soon as I power it up.

Here are the pics.Kindly help me step by step so that I can

 

1)Run the wlan0 by using ifup wlan0

2)Set galileo gen 2 to connect to my wifi router automatically everytime it boots up.

errors that it is showing:

and when I do- vim /etc/network/interfaces it starts creating a directory in vim! I am baffled!

Also I could see the driver for n135 in list of firmware.

25 Replies
FTinetti
Honored Contributor I
207 Views

Hi mishra007,

Sorry, I can't help, I don't have such an adapter. I've always used the much more cheaper ESP8266 for wifi.

Fernando.

idata
Community Manager
207 Views

Hello mishra007,

Thanks for reaching out!

The N135 is actually the wireless card that I use with my Galileo. I used to set up the wireless interface by following Sergey's guide when I used the uclibc image but with the latest eglibc image (which can be downloaded from https://software.intel.com/en-us/iot/hardware/galileo/downloads https://software.intel.com/en-us/iot/hardware/galileo/downloads) this is not necessary. I use connman to set the interface up. These are the steps I take from a fresh flash of the image:

systemctl start connman

 

connmanctl

 

enable wifi

 

agent on

 

scan wifi

 

services

 

# Check for the service name of your network and copy it

 

connect SERVICE_NAME_XXXXXXXXX

 

# Enter the network's password

 

quit

You can check the screenshot below of my Galileo's output during this process.

I hope this information helps you,

 

Pedro M.
AAmar2
New Contributor I
207 Views

Intel Corporation wrote:

Hello mishra007,

Thanks for reaching out!

The N135 is actually the wireless card that I use with my Galileo. I used to set up the wireless interface by following Sergey's guide when I used the uclibc image but with the latest eglibc image (which can be downloaded from https://software.intel.com/en-us/iot/hardware/galileo/downloads https://software.intel.com/en-us/iot/hardware/galileo/downloads) this is not necessary. I use connman to set the interface up. These are the steps I take from a fresh flash of the image:

systemctl start connman

 

connmanctl

 

enable wifi

 

agent on

 

scan wifi

 

services

 

# Check for the service name of your network and copy it

 

connect SERVICE_NAME_XXXXXXXXX

 

# Enter the network's password

 

quit

You can check the screenshot below of my Galileo's output during this process.

I hope this information helps you,

 

Pedro M.

Hi pedro!

THanks for replying but,when I run- systemctl start connman -- it just takes forever to run it! Here is the snapshot-

Currently I have connected intel galileo gen 2 with my router using an ethernet cable.And when I run that above command it shows multiple IPs assigned.For instance I have set static IP to my galileo using the arduino sketch prescribed by FGT long time back.And it was working perfectly fine.However when I run systemctl start connman,firstly it just keeps running forever,I mean it doesnt return any prompt(# symbol) and secondly,another IP gets assigned to my galileo(192.168.0.104). It is just strage,any idea what might be wrong?It has already taken 3-4 days!

Also when I ssh to 192.168.0.104,it results in a succesful connection.Now when I run connmanctl,it gets run. However scan wifi commands results in failure.I am attaching the pics below-

 

idata
Community Manager
207 Views

That is unexpected. I believe, this might be related to the image, therefore, I'd suggest you to download the image from https://software.intel.com/en-us/iot/hardware/galileo/downloads and set up your SD card as explained in https://software.intel.com/en-us/get-started-galileo-linux-step1 then try the steps above again.

 

 

Let me know.

 

Pedro M.
AAmar2
New Contributor I
207 Views

Intel Corporation wrote:

That is unexpected. I believe, this might be related to the image, therefore, I'd suggest you to download the image from https://software.intel.com/en-us/iot/hardware/galileo/downloads https://software.intel.com/en-us/iot/hardware/galileo/downloads and set up your SD card as explained in https://software.intel.com/en-us/get-started-galileo-linux-step1 https://software.intel.com/en-us/get-started-galileo-linux-step1 then try the steps above again.

 

 

Let me know.

 

Pedro M.

You want me to download latest yocto pocky image right?210MB one?

FTinetti
Honored Contributor I
207 Views

Hi ,

mishra007 wrote:

Intel Corporation wrote:

That is unexpected. I believe, this might be related to the image, therefore, I'd suggest you to download the image from https://software.intel.com/en-us/iot/hardware/galileo/downloads https://software.intel.com/en-us/iot/hardware/galileo/downloads and set up your SD card as explained in https://software.intel.com/en-us/get-started-galileo-linux-step1 https://software.intel.com/en-us/get-started-galileo-linux-step1 then try the steps above again.

 

 

Let me know.

 

Pedro M.

You want me to download latest yocto pocky image right?210MB one?

I'd try with that one too, and I'd avoid using or downloading anything else, i.e. use the last image "as is" (without downloading any sketch to the Intel Galileo, in particular), which I think is exactly what Pedro M. suggested/did/exemplified above.

HTH,

Fernando.

AAmar2
New Contributor I
207 Views

FGT wrote:

Hi mishra007,

mishra007 wrote:

Intel Corporation wrote:

That is unexpected. I believe, this might be related to the image, therefore, I'd suggest you to download the image from https://software.intel.com/en-us/iot/hardware/galileo/downloads https://software.intel.com/en-us/iot/hardware/galileo/downloads and set up your SD card as explained in https://software.intel.com/en-us/get-started-galileo-linux-step1 https://software.intel.com/en-us/get-started-galileo-linux-step1 then try the steps above again.

 

 

Let me know.

 

Pedro M.

You want me to download latest yocto pocky image right?210MB one?

I'd try with that one too, and I'd avoid using or downloading anything else, i.e. use the last image "as is" (without downloading any sketch to the Intel Galileo, in particular), which I think is exactly what Pedro M. suggested/did/exemplified above.

HTH,

Fernando.

Hi Fernando!

Thanks for replying! I download the fresh image as suggested by Mr Pedro and flashed it onto another sd card.Now when I run systemctl start connman,it results in success. I am able to follow all his steps until -- connect SERVICE_NAME_name_of_my_network. It throws this error-

PS:GotOurOwnWifi is the name of my network

idata
Community Manager
207 Views

Hi mishra007,

 

 

You are almost there, now, instead of entering the command connect SERVICE_NAME_GotOurOwnWifi, look for GotOurOwnWifi after entering the command services and check the ID next to it, it should look like this:

 

 

GotOurOwnWifi wifi_0cd229205aa3c_XXXXXXXXXXXXXXXXXXXXXX

 

 

Copy that ID and enter the command connect wifi_0cd229205aa3c_XXXXXXXXXXXXXXXXXXXXXX, now this should work for you.

 

 

Pedro M.
AAmar2
New Contributor I
207 Views

Intel Corporation wrote:

Hi mishra007,

 

 

You are almost there, now, instead of entering the command connect SERVICE_NAME_GotOurOwnWifi, look for GotOurOwnWifi after entering the command services and check the ID next to it, it should look like this:

 

 

GotOurOwnWifi wifi_0cd229205aa3c_XXXXXXXXXXXXXXXXXXXXXX

 

 

Copy that ID and enter the command connect wifi_0cd229205aa3c_XXXXXXXXXXXXXXXXXXXXXX, now this should work for you.

 

 

Pedro M.

Thanks for help I will try it once again. And FGT,can you kindly send me that arduino code once again,I mean the one that you sent me for setting static ip to intel galileo long time back.Actually my arduino IDE for intel wasnt working when I moved the folder containing intel arduino IDE to one of the window partitions(as my linux partition is almost full now)-- so I deleted it and installed a fresh and now I dont have your code!Damn should have saved it!. Sorry for the trouble!

 

But now it shows some error +111 or something in relocate_script.sh .I mean wtf!
FTinetti
Honored Contributor I
207 Views

Hi mishra007,

mishra007 wrote:

Intel Corporation wrote:

Hi mishra007,

 

 

You are almost there, now, instead of entering the command connect SERVICE_NAME_GotOurOwnWifi, look for GotOurOwnWifi after entering the command services and check the ID next to it, it should look like this:

 

 

GotOurOwnWifi wifi_0cd229205aa3c_XXXXXXXXXXXXXXXXXXXXXX

 

 

Copy that ID and enter the command connect wifi_0cd229205aa3c_XXXXXXXXXXXXXXXXXXXXXX, now this should work for you.

 

 

Pedro M.

Thanks for help I will try it once again. And FGT,can you kindly send me that arduino code once again

...

Sure,

I suggest you try first to solve your wifi related issues first, because I think fixed IP set by the sketch may be in conflict with connman operation. Hopefully, it is not the case, but just to avoid possible "noise" I suggest you follow all the suggestions Pedro M. and maybe other Intel people provides before you use a sketch for modifying ethernet interface settings.

For setting a fixed IP in the latest yocto image you should have only one line in your setup function:

system("ifconfig enp0s20f6 netmask 255.255.255.0");

Please tell me in case you have issues with this setting.

HTH,

Fernando.

idata
Community Manager
207 Views

I agree with Fernando, we should finish with the Wi-Fi issue before proceeding further. Just to clarify, you can also use the command suggested by Fernando directly on Linux, you would only need to remove the system(""), so the command would look like this:

 

 

ifconfig enp0s20f6 netmask 255.255.255.0

 

 

If the reason why you were using a sketch is because you need to run the command every time on boot, perhaps you'd be interested in reading this document: https://communities.intel.com/docs/DOC-111103 https://communities.intel.com/docs/DOC-111103.

 

 

I hope this helps.

 

Pedro M.
AAmar2
New Contributor I
207 Views

Intel Corporation wrote:

I agree with Fernando, we should finish with the Wi-Fi issue before proceeding further. Just to clarify, you can also use the command suggested by Fernando directly on Linux, you would only need to remove the system(""), so the command would look like this:

 

 

ifconfig enp0s20f6 netmask 255.255.255.0

 

 

If the reason why you were using a sketch is because you need to run the command every time on boot, perhaps you'd be interested in reading this document: /docs/DOC-111103 https://communities.intel.com/docs/DOC-111103.

 

 

I hope this helps.

 

Pedro M.

Hi pedro!

Ok,I installed the latest arduino IDE from arduino website and went on to further install add-on files for i586(i.e galileo). But now when I connect my galileo gen and try to flash the scannetwork code,I get the following error.In fact I get this error regardless of the code. I even checked if the file exists or now,but amazingly it does exist.I am simply baffled as to why it is throwing such an error.

Btw,this is the kind of error that I got when I tried installing the i586 package in arduino IDE for my gen 2.

I tried following your steps,to create a service routine in systemd/system directory. I named it staticip.service. But it still isnt able to set the static ip(192.168.0.110) to my galileo upon start. /home/root/static_ip.sh script works flawlessly though when I execute it! So I guess there is some problem with the way I have defined my service routine.

I am attaching the pics below.Also I have already made the /home/root/static_ip.sh executable.

 

I will summarize what I did,so that it become easy for you to follow-

 

1)Created a executable shell script in /home/root by the name static_ip.sh that has command to set static ip.

 

2)Then created a .service file in /lib/systemd/system directory by the name staticip.service

3) Issued the command systemctl enable staticip.service

4) Reboot

idata
Community Manager
207 Views

Try with the following:

 

 

static_ip.sh:

 

 

# !/bin/sh

 

ifconfig wlp1s0 192.168.10.12 netmask 255.255.255.0

 

 

static_ip.service

 

 

# !/bin/sh

 

[Unit]

 

Description=Sets static ip on boot

 

Requires=wpa_supplicant.service

 

After=wpa_supplicant.service

 

[Service]

 

ExecStart=/home/root/static_ip.sh

 

Type=idle

 

[Install]

 

WantedBy=basic.target

 

 

I tried this and it worked for me. Let me know how it goes for you.

 

Pedro M.
AAmar2
New Contributor I
207 Views

Intel Corporation wrote:

Try with the following:

 

 

static_ip.sh:

 

 

# !/bin/sh

 

ifconfig wlp1s0 192.168.10.12 netmask 255.255.255.0

 

 

static_ip.service

 

 

# !/bin/sh

 

[Unit]

 

Description=Sets static ip on boot

 

Requires=wpa_supplicant.service

 

After=wpa_supplicant.service

 

[Service]

 

ExecStart=/home/root/static_ip.sh

 

Type=idle

 

[Install]

 

WantedBy=basic.target

 

 

I tried this and it worked for me. Let me know how it goes for you.

 

Pedro M.

Hi Pedro!

Thanks a lot for replying.I got it working after some trial and error.I changed the location of my executable bash script from /home/root to /usr/bin and then changed the ExecStart=/usr/bin/static_ip.sh and now it is working flawlessly! THanks a lot!

AAmar2
New Contributor I
207 Views

Intel Corporation wrote:

Try with the following:

 

 

static_ip.sh:

 

 

# !/bin/sh

 

ifconfig wlp1s0 192.168.10.12 netmask 255.255.255.0

 

 

static_ip.service

 

 

# !/bin/sh

 

[Unit]

 

Description=Sets static ip on boot

 

Requires=wpa_supplicant.service

 

After=wpa_supplicant.service

 

[Service]

 

ExecStart=/home/root/static_ip.sh

 

Type=idle

 

[Install]

 

WantedBy=basic.target

 

 

I tried this and it worked for me. Let me know how it goes for you.

 

Pedro M.

Hi @Pedro

THanks for repying! Unfortunately I am back to square one! I am able to set static ip to 192.168.0.110 to my ethernet port of galileo gen2. However when I run systemctl start connman it seems to take infinite time to run--I think it just gets stuck and is not returning the prompt symbol. What shall I do now? Shall I try to run your commands--I mean those pertaining to running wifi from ftdi-usb converter? Or is there another way?Kindly help!

Here is the screenshot when I ran systemctl enable connmanctl-

Edit: Ok,I flashed the same iot image once again to my sd card and ran the steps prescribed by you regarding setting up wifi.I could finally get a successful connection with centrino n135,however now my problem is how do I execute the same everytime the intel galileo gen2 boots up?Can you help me with that?I mean is it possible to place all the commands sequentially one by one in a bash script and make it executable ?But my concern is,it(systemd) needs to know the id of my wifi i mean that huge number starting with wifi_0cd29.. along with password. So how can I supply these two parameters?Kindly help me!

Or do you have any other method that lets intel galileo gen2 to connect to your wifi network automatically upon startup or boot?

idata
Community Manager
207 Views

Hi mishra007,

 

 

I'm confused. What do you mean? After setting up the Wi-Fi connection, your Galileo should be able to connect automatically the following times. Is this not happening to you?

 

 

Also, you mention both an Ethernet and a Wi-Fi connection, are you trying to use both at the same time? If so, I believe this is not possible. If I'm not mistaken, if you have both connections, Linux will choose the Ethernet connection unless it's told otherwise.

 

 

I'm not sure what you main goal is, could you please clarify it to me?

 

Let me know.

 

Pedro M.
AAmar2
New Contributor I
207 Views

Intel Corporation wrote:

Hi mishra007,

 

 

I'm confused. What do you mean? After setting up the Wi-Fi connection, your Galileo should be able to connect automatically the following times. Is this not happening to you?

 

 

Also, you mention both an Ethernet and a Wi-Fi connection, are you trying to use both at the same time? If so, I believe this is not possible. If I'm not mistaken, if you have both connections, Linux will choose the Ethernet connection unless it's told otherwise.

 

 

I'm not sure what you main goal is, could you please clarify it to me?

 

Let me know.

 

Pedro M.

Hi pedro!

Thanks for replying.After a lot of trial and error I finally found the place where I was going wrong.I will explain how I got intel galileo to connect to my wifi upon boot-

 

I created a file by the name GotOurOwnWifi-psk.config in /var/lib/connman and populated it with:

[service_id of my wifi network]

 

Type = wifi

 

Name = GotOurOwnWifi

 

Passphrase = MyPassPhrase EOF

Now the problem I was facing earlier was--the name of this .config file should be same as that of my wifi network--so the file name should be "GotOurOwnWifi-psk.config"! Previously I was using some random names.config but it wasnt working(I dont know why!). And then I tried with name_of_my_wifi_network-psk.config and it worked flawlessly only till I upgraded my yocto....:(

Now my problem is,when I do opkg update && opkg upgrade,I am not able to get intel galileo to connect to my wifi network on startup or boot. Have you faced similar issue?Kindly reply?This is like 5th time I have re-flashed the standard yocto image onto my sd card!

idata
Community Manager
207 Views

I would not recommend you to do opkg upgrade, as this would make the Galileo download every package on the repo and install it on the board, this would definitely fill up the board's memory and when that happens it can make the board behave unexpectedly, which could be exactly what's going on with your board. I mean, you probably don't need all the packages anyway, so, I would recommend you to only install those package that you require in your project.

 

 

Flash your board one more time and let us know how it goes when not running opkg upgrade.

 

Pedro M.
AAmar2
New Contributor I
207 Views

Intel Corporation wrote:

I would not recommend you to do opkg upgrade, as this would make the Galileo download every package on the repo and install it on the board, this would definitely fill up the board's memory and when that happens it can make the board behave unexpectedly, which could be exactly what's going on with your board. I mean, you probably don't need all the packages anyway, so, I would recommend you to only install those package that you require in your project.

 

 

Flash your board one more time and let us know how it goes when not running opkg upgrade.

 

Pedro M.

Yep you're absolutely correct,because when I do just "opkg update" i.e updating the list of repos,it works fine and it gets connected to my wifi automatically,however when I do opkg upgrade--all hell break loose and it starts throwing old errors! And no connection results! So,After 6 attemps--I finally found the culprit--opkg upgrade!

 

By the way thanks for help!
FTinetti
Honored Contributor I
103 Views

mishra007 wrote:

Yep you're absolutely correct,because when I do just "opkg update" i.e updating the list of repos,it works fine and it gets connected to my wifi automatically,however when I do opkg upgrade--all hell break loose and it starts throwing old errors! And no connection results! So,After 6 attemps--I finally found the culprit--opkg upgrade!

 

 

Maybe upgrade before setting your wifi? Are the upgraded packages the problem or the memory?

Fernando.

Reply