Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Community Manager
1,633 Views

Connection issues

Hi I have two Galileo Gen 1s, one is connected up to a dev kit and working fine the other one is having some weird issues, I cannot connect to it via putty anymore. ( I haven't done any work on either of the boards since I lived in France about 6 or 7 months ago. ) The IoT dev kit board is fine I updated hardware put a new image on it and the sensors etc and everything works as expected I can connect via SSH etc and no issues with the nodejs server and sensors that are on it.

The second board was a board I was given by Microsoft but I no longer want the Windows image on there because they aren't doing anything on it anymore, surprisingly they have moved to Raspberry Pi So I started to set this up with the usual linux image. I could not see the board coming up in my router, I figured maybe it is allocated an static IP that was already in use, I used this code in Arduino IDE to see if it had an ip but it didn't:

void setup() {

// put your setup code here, to run once:

system("telnetd -l /bin/sh");

//system("ifconfig eth0 192.168.X.X netmask 255.255.0.0 up");

}

void loop() {

// put your main code here, to run repeatedly:

system("ifconfig eth0 > /dev/ttyGS0");

sleep(10);

}

There was no IP so I uncommented the commented line in void setup to give it a static IP, the loop then showed it had the IP I had assigned it but I still couldn't connect to it via SSH. I guessed maybe now you need a serial cable to connect as I have seen this mentioned although I thought I was strange as I have never need one before to connect to the board, either way, I swapped the serial cable over from my functioning board and rebooted, the static IP was gone but i could see in my ARP list that board was now showing. I started up the ETH0 script again and gave it the same IP, I have also assigned this IP in the router using address reservation. Still I cannot connect to the board via SSH.

After working on Raspberry Pis for months and then coming back to do some work on the Galileos I remember now why I switched to Pi lol. I am still wanting to try get this resolved purely to see what the issue and why it is happening and then may consider continuing projects on the Galileo or just writing them off totally. Any help would be appreciated in getting to the bottom of this, I am hoping to get Debian installed on it which will give me more incentive to work on the board, main reason because it is annoying me lol. Cheers in advance.

20 Replies
Highlighted
Employee
8 Views

Hello AdamMiltonBarker,

Are you connencting through Wi-Fi? If so, try to set with this sketch:

# include

char ssid[] = "YOUR_SSID"; // your network SSID (name)

char pass[] = "YOUR_PASSWORD"; // your network password

IPAddress staticip(192, 168, 10, 125);

int status = WL_IDLE_STATUS; // the Wifi radio's status

void setup() {

//Initialize serial and wait for port to open:

Serial.begin(9600);

while (!Serial) {

; // wait for serial port to connect. Needed for Leonardo only

}

// check for the presence of the shield:

if (WiFi.status() == WL_NO_SHIELD) {

Serial.println("WiFi shield not present");

// don't continue:

while(true);

}

// attempt to connect to Wifi network:

while ( status != WL_CONNECTED) {

Serial.print("Attempting to connect to WPA SSID: ");

Serial.println(ssid);

// Connect to WPA/WPA2 network:

status = WiFi.begin(ssid, pass);

// wait 10 seconds for connection:

delay(10000);

}

// you're connected now, so print out the data:

Serial.print("You're connected to the network");

WiFi.config(staticip);/////////////////////////////////////////////////////////////

printCurrentNet();

printWifiData();

}

void loop() {

// check the network connection once every 10 seconds:

delay(10000);

printCurrentNet();

}

void printWifiData() {

// print your WiFi shield's IP address:

IPAddress ip = WiFi.localIP();

Serial.print("IP Address: ");

Serial.println(ip);

Serial.println(ip);

// print your MAC address:

byte mac[6];

WiFi.macAddress(mac);

Serial.print("MAC address: ");

Serial.print(mac[5],HEX);

Serial.print(":");

Serial.print(mac[4],HEX);

Serial.print(":");

Serial.print(mac[3],HEX);

Serial.print(":");

Serial.print(mac[2],HEX);

Serial.print(":");

Serial.print(mac[1],HEX);

Serial.print(":");

Serial.println(mac[0],HEX);

}

void printCurrentNet() {

// print the SSID of the network you're attached to:

Serial.print("SSID: ");

Serial.println(WiFi.SSID());

// print the MAC address of the router you're attached to:

byte bssid[6];

WiFi.BSSID(bssid);

Serial.print("BSSID: ");

Serial.print(bssid[5],HEX);

Serial.print(":");

Serial.print(bssid[4],HEX);

Serial.print(":");

Serial.print(bssid[3],HEX);

Serial.print(":");

Serial.print(bssid[2],HEX);

Serial.print(":");

Serial.print(bssid[1],HEX);

Serial.print(":");

Serial.println(bssid[0],HEX);

// print the received signal strength:

long rssi = WiFi.RSSI();

Serial.print("signal strength (RSSI):");

Serial.println(rssi);

// print the encryption type:

byte encryption = WiFi.encryptionType();

Serial.print("Encryption Type:");

Serial.println(encryption,HEX);

Serial.println();

}

You can also try with this other sketch found on http://www.intel.com/support/edison/sb/CS-035766.htm Intel® Edison Boards — Setting Up a Static IP Address with Arduino* Sketch. Let us know if it helps.

Peter.

Highlighted
Community Manager
8 Views

Hi thanks for the reply no I am connecting via ethernet.

0 Kudos
Highlighted
Employee
8 Views

I see, are you using an SD card image? Or are you using the embedded image? Either way, you should first try to update the board's firmware with the On-board Flash Firmware Updater, which you will find alongside a guide on how to use it in https://software.intel.com/en-us/iot/hardware/galileo/downloads IoT - Intel® Galileo Board Download | Intel® Developer Zone.

Then you can try the following sketch to reset your board's Ethernet interface:

void setup()

{

Serial.begin(9600);

system("ifdown eth0");

delay(1000);

system("ifup eth0");

delay(1000);

}

void loop()

{

system("ifconfig eth0 > /dev/ttyGS0");

delay(1000);

}

You should see your IP address in the serial monitor, you can then use it to connect through SSH. Let us know if it works.

Peter.

0 Kudos
Highlighted
Community Manager
8 Views

Hi thanks. If have already done the the firmware update, this time when running the script you gave the ip comes up in my DHCP clients list but I am still unable to connect through SSH it says connection refused. At the moment just standard image on the board, I was attempting to get Debian on. After reboot still the same, connection refused and cannot ping. The com shows up fine as Galileo in device manager, I have installed all drivers and done firmware update a few times now, drivers are up to date, firmware is up to date as well.

With the sketch looping I can ping, but SSH still connection refused.

0 Kudos
Highlighted
Employee
8 Views

Is your PC connected to the same network as the Galileo? What's your PC's IP address and what's the Galileo's IP? Is it shown correctly on the serial monitor?

Peter.

0 Kudos
Highlighted
Community Manager
8 Views

Yes I have 2 Galileos and 2 Raspberry Pis all on the same network same IP range, same mask, same gateway etc, yes the ip is shown correctly.

0 Kudos
Highlighted
Community Manager
8 Views

Actually broadcast is incorrect on the serial monitor, it is showing 0.0.0.0,

0 Kudos
Highlighted
Employee
8 Views

Did you try using Telnet? Does it make a difference?

Peter.

0 Kudos
Highlighted
Community Manager
8 Views

Hi Peter, no the device is not showing up on the network have tried angry ip as well and still no joy, not sure what is going on.

0 Kudos
Highlighted
Employee
8 Views

That's weird, let me do some research, I'll try to get back to you as soon as possible.

Peter.

0 Kudos
Highlighted
Employee
8 Views

Hi AdamMiltonBarker,

Which version of the Arduino IDE are you using?

Peter.

0 Kudos
Highlighted
Community Manager
8 Views

Hi Peter,

I never use the Arduino IDE anymore I just program directly on the board I only used the Arduino script above to see if using the ethernet connect script would allow me to connect via shell again, the version I used for the above script was 1.6.4, also to just refresh I have upgraded the firmware, the board is seen by my computer, but it does not come up on network, unless using the script above but even then cannot connect via shell.

0 Kudos
Highlighted
Employee
8 Views

Are you using the uclibc image? If so, then try with the eglibc image, you can get it on: https://software.intel.com/en-us/iot/hardware/galileo/downloads IoT - Intel® Galileo Board Download | Intel® Developer Zone

Follow the instructions for preparing your microSD card for Windows*, OS X* and Linux* from https://software.intel.com/en-us/iot/hardware/galileo/downloads IoT - Intel® Galileo Board Download | Intel® Developer Zone

Connect your Galileo to your local network via Ethernet. Also a serial connection is needed to run the configuration steps.

Start connman:

root@galileo:~# systemctl start connman

Enable connman:

root@galileo:~# systemctl enable connman

Check service status to ensure is active:

root@galileo:~# systemctl status connman

Get the service information:

root@galileo:~# connmanctl services

*AR Wired ethernet_XXXXXXXXXXXX_cable

Gather the gateway information using the netstat command:

root@galileo:~# netstat –nr

Gather the netmask information from the enp0s20f6 device using the ifconfig command:

root@galileo:~# ifconfig

Now proceed to configure and set the static IP address using the service, gateway and netmask gathered:

root@galileo:~# connmanctl config ethernet_XXXXXXXXXXXX_cable --ipv4 manual

You should be able to SSH the Galileo board using the IP address previously set. Try these steps and let us know what happens.

Peter

0 Kudos
Highlighted
Community Manager
8 Views

Hi thanks, do you have suggestions for debian on this board please, this is my ultimate goal, also how come the need for serial cable, the projects I am building are to be standalone units that will eventually be powered by battery packs and connected to via wifi, is this not possible with Intel Galileo? If so there is no point me building on one as all of my devices need to have the above functionality.

0 Kudos
Highlighted
Community Manager
8 Views

Being able to connect to both of my galileo boards without the need for ethernet cable and serial cable is an absolute must for my projects, would be great to find out now if this is not possible to save me time.

0 Kudos
Highlighted
Employee
8 Views

Well, I have never used Debian since the officially supported image is Yocto, nevertheless you could try these suggestions on Debian and hopefully they may help.

Regarding your question, the reason why you need the serial cable is to determine the issue your Galileo is currently having. Once this issue is resolved, you should be able to connect to the Galileo using SSH. Right now we need the cable to try to resolve this behavior.

Peter.

0 Kudos
Highlighted
Community Manager
8 Views

Hi thanks I will try with the suggestions for yocto first then, what suggestions did you mean for debian ?

0 Kudos
Highlighted
Community Manager
8 Views

OK very strange, it has worked first time now with the latest image :S Thank you for the help through this, my next issue is getting debian on it could you point out best way to do this please, this board is going to be a standalone MQTT broker the rest I am not sure yet but the aim of this project was to get debian working on it and taking it from there

0 Kudos
Highlighted
Employee
8 Views

I'm glad to hear that somehow the issue got resolved. If you want a Debian port, I must warn you that it is not officially supported; nevertheless, the most popular port of Debian for Galileo is Ubilinux. You can find more information about it in http://www.emutexlabs.com/ubilinux EmutexLabs. They also have a http://www.emutexlabs.com/forum/ubilinux forum there, so if you are going to implement your project on Debian my best suggestion is that you post your question there. They may have a more accurate answer for this OS there.

Peter

0 Kudos