Go Down

Topic: Arduino Uno + Wireless proto shield + Wifly module (Read 15 times) previous topic - next topic

mc63

Heey guys...i was able to send messages to arduino but now I ran into another problem....I am using the adhoc connection between wifly and my PC but after successful connection the wifly just goes off completely(no LED blinkng)...strange isnt it?......I tried to reset to default factory setting to cancel any unnnecessary commands that i may have passed to the wifly accidentally but the problem still persists...but after leaving it without power for a while it goess on again...what could be the problem?...

MaxDamage

I have been playing with exactly the same config.    I got a bit sick of the wifly lib as it didn't seem to work.    So I went native and just talked to it direct.   Here is some code I am playing with.  Might help?

#include <SoftwareSerial.h>
SoftwareSerial mySerial(2, 3);   // got a display on this....
 
void setup() {
  //setup ports
  Serial.begin(9600);
  mySerial.begin(9600);
 
  delay(2000); // 2 second delay to let the screen initalise if it has only just been powered up
  mySerial.write("Hello Max");

  //exit CMD mode if not already done
  Serial.println("");
  Serial.println("exit");
  delay(1000);
 
  //set into CMD mode
  Serial.print("$$$");
  delay(1000);

  //set authorization level
  Serial.println("set wlan ssid AccessPonteID");
  delay(1000);

  //set passphrase
  Serial.println("set wlan phrase SillyPassword");
  delay(1000);

  //set DHCP
  Serial.println("set ip dhcp 1");
  delay(1000);

  //set join
  Serial.println("set wlan join 1");
  delay(1000);

  //set Auth
  Serial.println("set wlan auth 4");
  delay(1000);

  //set passphrase
  Serial.println("set wlan tx 0");
  delay(1000);
 
  //set localport
  Serial.println("set i l 80");
  delay(1000);
 
  //disable *HELLO* default message on connect
  Serial.println("set comm remote 0");
  delay(1000);

  //save config
  Serial.println("save"); 
  delay(5000);
 
  //exit
  Serial.println("reboot"); 
  delay(1000);
}


void loop() {
   if (mySerial.available()){
       Serial.write(mySerial.read());
   }

   if (Serial.available()){
     Serial.write(":");
     int sl = Serial.read();
     mySerial.write(sl);
     Serial.write(sl);
  }

}

mc63

HI guys,

Thanks Max for the share. I am currently past the connection stage and am dealing with reading data from the wifly to the arduino to be displayed on an LCD. When I open tera term terminal that I used to configure the wifly device, it displays the message that i send from a windows app ( I didn't do anything to let this happen). However, instead of getting the message on the terminal I want it be displayed on the LCD. As shown below is the output on the terminal. The message sent to the wifly is "Testing 1...2...3".
Code: [Select]

WiFly Shield Terminal Routine
Bridge initialized successfully!
Rebooting
Entering command mode.
Set wlan join level to 4
Set wlan ssid to wifly-GSX
Set wlan channel to 1
Set ip address to 169.254.1.1
Set ip netmask to 255.255.0.0
Set ip dhcp to 0
Joining 'wifly-GSX'

Associated!
*OPEN*Testing 1...2...3*CLOS*


I tried using SPI_Uart_ReadByte(char address) but couldn't figure out which address to read from SC16IS750 register and also wasn't sure if this is the correct way. I hoped to do something lcd.print(spi_uart.ReadByte(arbitrary value));

Any help?..

dhunt


I tried using SPI_Uart_ReadByte(char address) but couldn't figure out which address to read from SC16IS750 register and also wasn't sure if this is the correct way. I hoped to do something lcd.print(spi_uart.ReadByte(arbitrary value));


I'm a bit confused as to what WiFly hardware you have as I thought you had a serial interface module. Do you have a WiFly module with SPI support?

mc63

I am also a bit confused as I read before that the wifly shield uses spi_uart bridge to communicate with the arduino so i thought I should be dealing with this kind of communication model.

This is my understanding on how the data I am sending would go through, pardon me if I am wrong. When the data is received by the wifly it gets through its uart, spi_uart bridge, arduino's spi then LCD's parallel interface pins.

If the data is already displayed on the terminal, does it mean it has already been passed to arduino and all i should care is finding a way to display it on the LCD?.

I am also trying something similar to the Wifly_Webserver example but the arduino 1.0 doesn't support the LCD library that I am using (LCD4Bit_mod).

Thanks.

Go Up