Spider and WiFi_RS21 - Strange behaviour

Guys,

My new FEZ Spider dev kit arrived a couple of days ago. With it I also purchased the WiFi_RS21 module. Having connected it to the suggeted port on the spider and copied the code from the wiki (GHI Electronics – Where Hardware Meets Software) I have to report that nothing is really working as expected. The code compiles and will available wireless neworks but I see several exceptions raised that indicate failures of some kind. On more than one accasion the device (WiFI_RS21 or Spider) have hung so completely that I have had to reload the firmware before my USB wil talk to it again!! That can’t be right, can it?

I have read through several other posts with similar run-time errors and the main conclusion seems to be one of USB power. I am using a powered hub to drive the device but not an external PSU. Can anyone confirm if this is an essential part of the setup needed for successfully using the WiFI_RS21 with the Spider?

There is nothing about the power requirements needed anywhere in the wiki for this module.

SInce this is a very useful and I suspect highly used Gadgeteer module are there any other known issues or useful forum posts that could or should be referenced in the wiki to help newbie’s like me have a positive experience when using this module?

Many thanks,

Jason.

Hi Jason,

I’ve used the same combination but with external power supply and didn’t have any hangups at all. I did have some problems with repeated joining my wireless network. But after switching from access point that works well also.

Patrick

WiFi is one of the devices that the driver is still only Gadgeteer 4.1 so if you’re not running the 4.1 firmware and creating a 4.1 project you’ll get weird stuff…

Pretty sure that everything is 4.1 still. All compiles and deploys OK, but behaves oddly when running. I’m going to try a PSU later and will post back on my progress.

While USB specifications say ports should provide 500mA, we rarely see a port that can actually provide 500mA. We always recommend the use of powered hubs or a power pack instead of relying on the USB power. Use a powered hub from a known brand, not a cheap hub. If your device has the option of using a power pack (for example the USB Client DP Module) then you can use a power pack instead. 9V 1A is typically recommended but check the bottom of the circuit board for printed voltage range. All power connectors on GHI products are 2.1mm with positive on the inside and negative on the outer ring.

Not using a powered hub or power pack can cause:
[ul]Unexplained behavior
Device does not function
Device functions intermittently
Device functions but network fails
Device functions but SD card fails
Device functions but firmware update fails[/ul]
(Generated by QuickReply)

Guys, things are going from bad to worse here. I’m not getting very far and so I decided to use MFDeploy to see if I could get any sense from the Spider. Now it won’t connect at all. It’s simply saying:

Connecting to …Failure - Device is invalid or not responding

Anyone got any idea what’s happening?

J.

When doing the MFDeploy test, do you have any modules (besides the power) connected?

Have you tried different USB ports on your computer?

How about rebooting the computer?

Just the USB Client DP and nothing else. I’ve tried two other USB ports and rebooted a couple of times. Nothing seems to work. Starting to think that the Spider has died…

James, when things like this happen you should always step back and check what Windows thinks is connected. Open device manager with the Fez not connected, and confirm you don’t have COM ports for the Fez showing and that you don’t have the GHI debuggable device showing up. Then plug the Fez in and see what appears (and confirm Windows makes the device connected noise). Expected for a working device is the GHI debuggable device appears.

Then, once that appears, the debugger or MFDeploy needs to attach to the board to get a response. If you can’t get that once you connect the device and get the GHI debuggable netmf device appear, then your code is most likely at fault and not giving the system time to let the comms between the PC and the debugger occur (so the next thing you should do is add a sleep of 2 secs to the start of your code :slight_smile: ). If this is the case the most reliable way to address this is boot into bootloader mode and erase everything and re-load firmware.

let us know what you’ve seen and whether it’s helped

Brett,

thanks for your thoughts and ideas. Definately a few things to try out. Things have worked earlier this evening. I even got the WiFi_RS21 configured as a webserver and served a custom page. It’s just misbehaving now.

I’ll post more once I’ve tried your suggestions.

Thanks again, Jason.

Just plugging the Client DP into the USB port on my power hub does nothing. No USB connected sound. The Spider isn’t connected at all. Could the issue be with the Client DP? Could it be this reason why things won’t connect?

Is there any way to find out without getting another one to try?

Thanks, Jason.

I don’t have a DP module, but I understand plugging the DP in on it’s own will do nothing; it is not intelligent.

With the Spider attached to DP, plug in the USB cable, does Windows react then?

… and maybe I misread what you said, not sure…

anyway if you have DP connected to Spider and still nothing comes up, then yes there’s a chance the DP may be at fault. First I’d swap out the cable running from the DP to the Spider, and I’d triple check it’s plugged into the right socket :slight_smile:

Brett,

still nothing. I’ve plugged in my FEZ Cerbuino and I get a device added (see attached image) but nothing with the DP or DP and Spider. It really seems like something’s faulty and I probably need to get my hands on a spare DP to check that theory. Thanks for you help on this. I’ll post more when I have tried with a new DP.

J.

Do you the non-serial GHI camera?

If so, you can try this: Camera -> DP -> USB. Notice no Spider in there – so just gadgeteer cable between DP & Camera module.

Your computer should see this combination as a USB Camera.

I’ve just tried this and I do see a USB 2.0 PC Cam. Removing the camera and trying the Spider again still doesn’t show up. Do you think the it’s my Spider that’s faulty?

I ran into this issue in the past and was able to get through it ok, so hopefully your Spider is still ok.

My problem was that I was in the wrong socket – > Have you verified the DP is plugged into socket #1?

What about the the DIP switches underneath the reset button in the middle – how are the setup?
Are they all pointing the same way? Or are some towards the reset and some away?

yep, I agree you should check the socket and try again in bootloader mode (change switches to the appropriate settings). Then see if the serial port pops up. DP seems like it’s operable.

Guys, thanks for sticking with me on this. I checked the socket and I was #1. I then removed the seal on the DIP switches and change the right hand three to ON-ON-ON (Loader) and things started to happen again. I saw the device in Device Manger and could connect to it using MFDeploy. I flashed the CLR with V4.1 again and then rebooted the board and this is what was output when I clicked SHow Device Info.


DeviceInfo:
  HAL build info: 4.1.2821.0, Microsoft Copyright (C) Microsoft Corporation.  All rig
  OEM Product codes (vendor, model, SKU): 255, 0, 65535
  Serial Numbers (module, system):
    FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
    FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
  Solution Build Info: 4.1.8.0, GHI Electronics, LLC
  AppDomains:
    default, id=1
  Assemblies:
    mscorlib,4.1.2821.0
    Microsoft.SPOT.Native,4.1.2821.0

When I clicked Device Capablities I got


HalSystemInfo.halVersion:               4.1.2821.0
HalSystemInfo.halVendorInfo:            Microsoft Copyright (C) Microsoft Corporation.  All rig
HalSystemInfo.oemCode:                  255
HalSystemInfo.modelCode:                0
HalSystemInfo.skuCode:                  65535
HalSystemInfo.moduleSerialNumber:       FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
HalSystemInfo.systemSerialNumber:       FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
ClrInfo.clrVersion:                     4.1.2821.0
ClrInfo.clrVendorInfo:                  Microsoft Copyright (C) Microsoft Corporation.  All rig
ClrInfo.targetFrameworkVersion:         4.1.2821.0
SolutionReleaseInfo.solutionVersion:    4.1.8.0
SolutionReleaseInfo.solutionVendorInfo: GHI Electronics, LLC
SoftwareVersion.BuildDate:              Dec 22 2011
SoftwareVersion.CompilerVersion:        410561
FloatingPoint:                          True
SourceLevelDebugging:                   True
ThreadCreateEx:                         True
LCD.Width:                              320
LCD.Height:                             240
LCD.BitsPerPixel:                       16
AppDomains:                             True
ExceptionFilters:                       True
IncrementalDeployment:                  True
SoftReboot:                             True
Profiling:                              False
ProfilingAllocations:                   False
ProfilingCalls:                         False
IsUnknown:                              False

I then moved the DIP to their normal position and nothing shows up in Device Manager. I move them to ON-ON-ON and I see the Debuggable .Net Micro Framework Deivce in Device Manager again. WHen I click Connect in MFDeploy I get this response.

Connecting to EMX_EMX…Connected

If I click Reboot and Stop I get

Reboot and Stop Command
Reboot and Stop Complete

If I click Ping I get

Pinging… TinyBooter
Bootloader build info: GHI Electronics, LLC

I have flashed the CLR with the following by selected them and clicking Deploy

C:\Program Files (x86)\GHI Electronics\GHI NETMF v4.1 SDK\EMX\Firmware\CLR.HEX
C:\Program Files (x86)\GHI Electronics\GHI NETMF v4.1 SDK\EMX\Firmware\CLR2.HEX
C:\Program Files (x86)\GHI Electronics\GHI NETMF v4.1 SDK\EMX\Firmware\Config.HEX

This is the output

Connecting to EMX_EMX…Connected
DeviceInfo is not valid!
DeviceInfo is not valid!
Chk signature
Signature PASS
Chk signature
Signature PASS

Now when I click Device Info I get

ip address from interface info: 192.168.1.200
mac addrress from interface info: 0.1a.f1.0.42.d
EMX
Version: 4.1.8.0
Debug: USB1
LCD: 320x240
IP: 192.168.1.200
MAC: 00.1A.F1.00.42.0D
Managed heap size: 13041664
Custom heap size: 1048576
.NetMF v4.DeviceInfo is not valid!
1.2821.0
EMX, Build Date:
Dec 22 2011 16:27:20
ARM Compiler version 410561

TinyCLR (Build 4.1.2821.0)

Starting…
Created EE.
Started Hardware.
No debugger!
Create TS.
Loading start at a0200000, end a0209b4c
Attaching file.
Assembly: mscorlib (4.1.2821.0) (3880 RAM - 33236 ROM - 19134 METADATA)

AssemblyRef = 0 bytes ( 0 elements)
TypeRef = 0 bytes ( 0 elements)
FieldRef = 0 bytes ( 0 elements)
MethodRef = 0 bytes ( 0 elements)
TypeDef = 1112 bytes ( 139 elements)
FieldDef = 272 bytes ( 135 elements)
MethodDef = 1572 bytes ( 786 elements)

Attributes = 0 bytes ( 0 elements)
TypeSpec = 16 bytes ( 4 elements)
Resources = 232 bytes ( 29 elements)
Resources Files = 16 bytes ( 2 elements)
Resources Data = 437 bytes
Strings = 1551 bytes
Signatures = 2126 bytes
ByteCode = 11702 bytes

Attaching file.
Assembly: Microsoft.SPOT.Native (4.1.2821.0) (1144 RAM - 6516 ROM - 4479 METADATA)

AssemblyRef = 4 bytes ( 1 elements)
TypeRef = 80 bytes ( 20 elements)
FieldRef = 0 bytes ( 0 elements)
MethodRef = 60 bytes ( 15 elements)
TypeDef = 336 bytes ( 42 elements)
FieldDef = 192 bytes ( 95 elements)
MethodDef = 224 bytes ( 111 elements)

Attributes = 48 bytes ( 6 elements)
TypeSpec = 0 bytes ( 0 elements)
Resources = 72 bytes ( 9 elements)
Resources Files = 8 bytes ( 1 elements)
Resources Data = 747 bytes
Strings = 648 bytes
Signatures = 595 bytes
ByteCode = 418 bytes

Loading Deployment Assemblies.
Resolving.

Total: (4124 RAM - 39752 ROM - 23613 METADATA)

AssemblyRef = 4 bytes ( 1 elements)
TypeRef = 80 bytes ( 20 elements)
FieldRef = 0 bytes ( 0 elements)
MethodRef = 60 bytes ( 15 elements)
TypeDef = 1448 bytes ( 181 elements)
FieldDef = 464 bytes ( 230 elements)
MethodDef = 1796 bytes ( 897 elements)

DebuggingInfo = 900 bytes

Attributes = 48 bytes ( 6 elements)
TypeSpec = 16 bytes ( 4 elements)
Resources Files = 72 bytes ( 3 elements)
Resources = 304 bytes ( 38 elements)
Resources Data = 1184 bytes
Strings = 2199 bytes
Signatures = 2721 bytes
ByteCode = 12120 bytes

GC: 1msec 5136 bytes used, 13035912 bytes available
Type 0F (STRING ): 24 bytes
Type 15 (FREEBLOCK ): 13035912 bytes
Type 17 (ASSEMBLY ): 5040 bytes
Type 34 (APPDOMAIN_HEAD ): 72 bytes

Total: (4124 RAM - 39752 ROM - 23613 METADATA)

AssemblyRef = 4 bytes ( 1 elements)
TypeRef = 80 bytes ( 20 elements)
FieldRef = 0 bytes ( 0 elements)
MethodRef = 60 bytes ( 15 elements)
TypeDef = 1448 bytes ( 181 elements)
FieldDef = 464 bytes ( 230 elements)
MethodDef = 1796 bytes ( 897 elements)

DebuggingInfo = 900 bytes

Attributes = 48 bytes ( 6 elements)
TypeSpec = 16 bytes ( 4 elements)
Resources Files = 72 bytes ( 3 elements)
Resources = 304 bytes ( 38 elements)
Resources Data = 1184 bytes
Strings = 2199 bytes
Signatures = 2721 bytes
ByteCode = 12120 bytes

Ready.
Cannot find any entrypoint!
Done.
Waiting for debug commands…

I can disconnect the and reconnect and then ping. If I do this is the output I see

Connecting to EMX_EMX…Connected
User Cancel…
Connecting to EMX_EMX…Connected
Pinging… TinyCLR

If I move teh DIP switches back I get nothing again…

Any thing else you guys think I should try before sending this back??

Thanks, Jason.

Also, I tried teh GHI FEZ Spider Mainboard Updater and that failed too. It reports that it

Cannot connect to the device! Please follow steps 1 to 2.

Which I have several times.