Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

Webserver on NetduinoPlus + (wired or wireless) library


  • Please log in to reply
33 replies to this topic

#21 TriangleIL

TriangleIL

    New Member

  • Members
  • Pip
  • 7 posts

Posted 27 February 2011 - 05:29 AM

Hi,

trying to use the code with a regular Netduino. Getting "Failed to init SPI<->UART chip". Remember I had the WiFly bricked or mis-configured a few months ago. Is there a way to totally reset the WiFly or the chip, programmatically?

Cheers,
tamberg


I am having this exact problem. I have tried changing the baud rate, but no luck. The only changes I made were,

if (m_deviceType == DeviceType.crystal_12_288_MHz)
                    // value = (12.288*1024*1024) / (baudrate*16)
                    WriteRegister(WiflyRegister.DLL, 83);       // 4800=167, 9600=83, 19200=42, 38400=21
                else
                    // value = (14*1024*1024) / (baudrate*16)
                    WriteRegister(WiflyRegister.DLL, 96);     // 4800=191, 9600=96, 19200=48, 38400=24

and

webServer = new HttpWiflyImpl(processResponse, 80, HttpWiflyImpl.DeviceType.crystal_14_MHz, SPI.SPI_module.SPI1, Pins.GPIO_PIN_D10);
to call into the implementation.

Do I need to change this line?

WriteRegister(WiflyRegister.LCR, 0x80); // 0x80 to program baudrate

Thanks!

#22 TriangleIL

TriangleIL

    New Member

  • Members
  • Pip
  • 7 posts

Posted 27 February 2011 - 07:43 PM

So not sure how to troubleshoot this, but it looks like all calls to ReadRegister() return back 0xFF. It doesn't matter which register I am reading against either. Anyone have some insight or thoughts on how I can troubleshoot this issue? Thanks, Jason ETA: More information. The green light blinks approximately every 1.5 seconds. The yellow light every .5 seconds. This happens for a set of 5 green blinks and 15 yellow blinks, then resets. Is it possible my WiFly is messed up?

#23 jdsmith

jdsmith

    Member

  • Members
  • PipPip
  • 26 posts

Posted 28 February 2011 - 11:41 PM

I am having this exact problem. I have tried changing the baud rate, but no luck. The only changes I made were,


Thanks!


I experienced the SPI UART error when my WiFly board wasn't getting power, but it sounds like you're getting power to the board.

You don't need to change the LCR line...that's just telling the board which register you want to adjust. You do change the baud rate in two places: the hex value in the

WriteRegister(WiflyRegister.DLL, 96);

line and the "SendCommand" value in the Open function.

#24 James

James

    Advanced Member

  • Members
  • PipPipPip
  • 56 posts

Posted 28 April 2011 - 11:51 PM

Thanks to the huge amounts of help from JP and others I finally have this code working! The culprit for me was flow control. What I noticed is that after a hardware reset of the WiFly shield it would send back proper responses ("AOK" and others) to the Netduino. After running the config code to turn on flow control it would stop sending those responses. Now I have the WiFly running at 19200 baud, talking to the Netduino without issue and it serves up the "/time" page correctly. Is it bad to have the flow control turned off? Any ideas why that might cause an issue? The symptoms I see are exactly those described in the WiFly docs: NOTE: once flow control is enabled, it is important to properly Drive the CTS pin (active LOW enabled) If CTS is HIGH, data will NOT be sent out the UART, and further configuration in command mode will be problematic as no response will be received. Maybe I'm not working with the CTS pin properly? I'm not even sure which pin that would be. Thanks for this code JP, glad to finally start work on my mobile robot in earnest ;)

#25 James

James

    Advanced Member

  • Members
  • PipPipPip
  • 56 posts

Posted 01 May 2011 - 08:43 PM

Has anyone had luck setting the dns name for WiFly? I issued the command "set dns name wifly" and then expected to be able to ping the device using the name wifly instead of the IP, but that didn't seem to work.

#26 MattyZee

MattyZee

    New Member

  • Members
  • Pip
  • 4 posts

Posted 05 May 2011 - 03:50 AM

Does this Library support WPA2-PSK security? The Datasheet for the WiFly module says it supports WPA2-PSK. Is this something that the Module handles or is it something that needs to be incorporated in the Library?

#27 James

James

    Advanced Member

  • Members
  • PipPipPip
  • 56 posts

Posted 07 May 2011 - 07:46 AM

Does this Library support WPA2-PSK security?
The Datasheet for the WiFly module says it supports WPA2-PSK. Is this something that the Module handles or is it something that needs to be incorporated in the Library?


I've had success with WPA2/PSK using a WRT54G and Tomato.

#28 MattyZee

MattyZee

    New Member

  • Members
  • Pip
  • 4 posts

Posted 09 May 2011 - 07:50 AM

Great. Thanks for the reply. Now to order my WiFly :-)

#29 two schnauzers

two schnauzers

    Member

  • Members
  • PipPip
  • 10 posts

Posted 17 May 2011 - 08:34 PM

Has anyone verified if the drivers will work with LinkSprite CuHead WiFi Shield for Arduino http://www.cutedigi....6d911aa02c5caa0 Is is only $55 (cheaper than the other WiFi shields). I plan on using it with a regular NetDuino (not Plus). Thanks!

#30 Quiche31

Quiche31

    Advanced Member

  • Members
  • PipPipPip
  • 87 posts
  • LocationFrance

Posted 18 May 2011 - 06:49 AM

Has anyone verified if the drivers will work with LinkSprite CuHead WiFi Shield for Arduino http://www.cutedigi....6d911aa02c5caa0

Is is only $55 (cheaper than the other WiFi shields). I plan on using it with a regular NetDuino (not Plus).

Thanks!

It will not work with this shield, that uses a different chip. You will have to find an appropriate driver for it.

#31 Stefan

Stefan

    Moderator

  • Members
  • PipPipPip
  • 1965 posts
  • LocationBreda, the Netherlands

Posted 18 May 2011 - 08:29 AM

Lovely project! Makes me want to buy a wifi shield :D
"Fact that I'm a moderator doesn't make me an expert in things." Stefan, the eternal newb!
My .NETMF projects: .NETMF Toolbox / Gadgeteer Light / Some PCB designs

#32 Stefan

Stefan

    Moderator

  • Members
  • PipPipPip
  • 1965 posts
  • LocationBreda, the Netherlands

Posted 27 May 2011 - 07:17 PM

Okay, I did :P

When I have bool wifly = false; your code works superb on my Netduino, but when using the wifly shield, it doesn't. It gives an error in HttpLibrary\HttpWiflyImpl.cs on this line:
m_uart.Write(new byte[] { (byte)reg, b });

What I am missing is settings to actually join the wireless network. How should that be defined?
I am probably missing something obvious ;)
"Fact that I'm a moderator doesn't make me an expert in things." Stefan, the eternal newb!
My .NETMF projects: .NETMF Toolbox / Gadgeteer Light / Some PCB designs

#33 pxl357

pxl357

    Member

  • Members
  • PipPip
  • 18 posts

Posted 10 September 2011 - 03:02 AM

Okay, I did :P

When I have bool wifly = false; your code works superb on my Netduino, but when using the wifly shield, it doesn't. It gives an error in HttpLibrary\HttpWiflyImpl.cs on this line:

m_uart.Write(new byte[] { (byte)reg, b });

What I am missing is settings to actually join the wireless network. How should that be defined?
I am probably missing something obvious ;)



Hey stefan did you figure ? I have the same issue :(

#34 pxl357

pxl357

    Member

  • Members
  • PipPip
  • 18 posts

Posted 10 September 2011 - 04:29 AM

Hey stefan did you figure ? I have the same issue :(



If i used the Open(ssid,passphrase) it's fix the pb , at least the error dont appear anymore.
But the ip of the netduino stay at 0.0.0.0 i try to setup it manually but it throw an error.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.