I’ve got a problem with my wifirs21 module which doesn’t want to initialize on fez raptor.
I’m currently on firmware version 4.3.6.0 (both loader and firmware).
Whenever i try to debug my application in vs13 with WiFi connected to the board, vs13 isn’t able to find the board.
If i debug without WiFi connected, and reconnect it before initializing the board (during the reboot), it tries to initialize all modules but hangs at WiFi module.
It doesn’t even get to the “Program Started”, it just seems to do nothing.
There’s only the WiFi module connected, and i only made a new project without any code in it.
The problem also occurs on different gadgeteer sdk’s (I tested 2014 R5, and 2015 Beta 1-3).
Also, a few weeks back, the module worked partly, sometimes i was able to get it working somehow, and was able to communicate with the raptor over WiFi. But now, it doesn’t even initialize.
Any suggestions on things i could try to get it working again?
There are no Exceptions, the green LED does light up, but it still doesn’t get past initialization.
This is the code i’m currently using, the WiFi module is connected to Socket 1 on the Raptor board:
using GHI.Networking;
using Microsoft.SPOT;
using Microsoft.SPOT.Hardware;
using Microsoft.SPOT.Net.NetworkInformation;
using System;
using System.Net;
using System.Threading;
using Gadgeteer.Modules.GHIElectronics;
using GHI.Pins;
namespace GadgeteerApp2
{
public partial class Program
{
private static WiFiRS9110 netif;
// This method is run when the mainboard is powered up or reset.
void ProgramStarted()
{
// Use Debug.Print to show messages in Visual Studio's "Output" window during debugging.
Debug.Print("Program Started");
NetworkChange.NetworkAvailabilityChanged += NetworkChange_NetworkAvailabilityChanged;
NetworkChange.NetworkAddressChanged += NetworkChange_NetworkAddressChanged;
Debug.Print("Initializing WiFi...");
netif = new WiFiRS9110(SPI.SPI_module.SPI2, G400.PB5, G400.PB0, G400.PA7);
Debug.Print("Done");
netif.Open();
netif.EnableDhcp();
netif.EnableDynamicDns();
netif.Join("STROH", "************");
while (netif.IPAddress == "0.0.0.0")
{
Debug.Print("Waiting for DHCP");
Thread.Sleep(250);
}
}
private static void NetworkChange_NetworkAddressChanged(object sender, Microsoft.SPOT.EventArgs e)
{
Debug.Print("Network address changed");
}
private static void NetworkChange_NetworkAvailabilityChanged(object sender, NetworkAvailabilityEventArgs e)
{
Debug.Print("Network availability: " + e.IsAvailable.ToString());
}
}
}
But it never gets to the
below the initialization of the module.
There's also no exception in the visual studio debugger.
This is all i get:
[quote]Using mainboard GHI Electronics FEZ Raptor version 1.0
Program Started
Initializing WiFi...
[/quote]
Also, the used pins should be correct according to the images.
I first tried it with the module connected in designer without my initialization code, but that didn’t work.
Then John suggested i could try the initialization code here https://www.ghielectronics.com/docs/30/networking#3121 without the module connected, but that didn’t work either.
I also tried three different cables, but nothing changed.
@ rumkuhgel - Usually using a logic analyzer. In the code you posted in your second post, can you wrap everything in ProgramStarted in its own thread and pass 1000 as the clock to the other WiFiRS9110 constructor overload and see if that helps?
This is all i get in the debugger in visual studio:
[quote]Using mainboard GHI Electronics FEZ Raptor version 1.0
The module ‘wifiRS21’ was not connected in the designer and will be null.
Program Started
Initializing WiFi…
[/quote]To answer your question, no it does not.