Strategy for using both WiShield and NewSoftSerial?

Questions specifically regarding the WiShield 1.0 family driver.

Re: Strategy for using both WiShield and NewSoftSerial?

Postby davo » Sun Aug 08, 2010 6:38 pm

hiya,

Software Serial library that works?

I have a yellowtail and using the 1.3 library, the plan is to use the yellow tail as a wireless coms module transceiving for a seeeduino mega, which is driving my robot.

ide arduino 17

got udp working not from the included example but the simplified sketch posted on the forum. The sockets ddi not work they way I wanted at the moment.
I have modified this and happy, until I run out od\f resources....

I have this working as a single serial port, but that has been alot of hassle I am disabled and it's taken me alot of time to manage the bootoader, debug and getting the serial to serial comms to work reliably.

I tried the newsoftserial, and as the prvious post states, it works with wifi, it works with newsoftserial, but not together. The initial Wifi.Run(); never gets there.

I tried to edit the line(s) in newsoftserial.c to comment out line 315 and or 316 and then the whole block.

The first 2 lines either singley or togther you get a hard compile error!

If you comment out the whole block down to end if the compiler does not finish and you get red lines up pointing to uip.h

from newseoftserial.cpp

line 315
#if defined(PCINT0_vect)
ISR(PCINT0_vect)
{
NewSoftSerial::handle_interrupt();
}
#endif
line320

from C:\Documents and Settings\davo.GECKO-1\My Documents\Arduino\libraries\WiShield/uip-conf.h:141,

from C:\Documents and Settings\davo.GECKO-1\My Documents\Arduino\libraries\WiShield/uipopt.h:104,

from C:\Documents and Settings\davo.GECKO-1\My Documents\Arduino\libraries\WiShield/uip.h:89,

Is there another software serial library known to work, or is there a fix ? I had some issues with getting the hardware serial to hardwares serial to work reliably. Newsoft just seemed to work better anyway.

Another issue is when the yellowtail is starting up, do not send anything to the serial line until it has started or it hanges. With WPA a 40 seconds inhinit on the Mega link works fine.


My skill lelvels are low.......but I have enjoyed this project. C/CPP String manipulation ......????

On another topic could n't find too much on this when I was researching, indoors I am getting 20M easy, and thats in a difficult environment, the worst area my sons laptop wireless and all the clss 2 bluetooth devices fail or suffer, the yellowtail seems to be fine.

and Get a boost regulator, a big one!

thanks

Dave
davo
 
Posts: 3
Joined: Wed Aug 04, 2010 6:38 am

Re: Strategy for using both WiShield and NewSoftSerial?

Postby spidermonkey04 » Sun Aug 08, 2010 8:20 pm

I just went back and looked at the sources, and apparently I didn't just comment it out. I threw a NOT in there.
Code: Select all
#if not defined(PCINT0_vect)
ISR(PCINT0_vect)
{
  NewSoftSerial::handle_interrupt();
}
#endif

What baud rate are you trying to use? It won't go too fast. I tested up to 38400. 57600 MIGHT be doable, but I read 115200 was only achievable after an upgrade to a 20Mhz crystal.

I thought the MEGA's had 4 hardware serial ports? Are they all used up or just being too difficult?

The delay at startup is normal. The wifi init function is blocking, in that it waits in a while{} loop until connected or timed out. If you want that changed, there is some new WiServer code posted around here that deals with re-connection issues. Good luck.

---Jared
spidermonkey04
 
Posts: 66
Joined: Thu Oct 29, 2009 6:45 pm

Re: Strategy for using both WiShield and NewSoftSerial?

Postby GregEigsti » Mon Aug 09, 2010 2:46 am

The wifi init function is blocking

The user contrib WiShield libs have an overloaded version of init() that will timeout after n seconds - n being a param passed to init().

Greg
Check out the wiki!
uIP Stack Docs
Compatible Access Point List
WiShield user contrib branch - DNS, DHCP, AP Scanning, bug fixes, etc.
SlackLab.org - My geek projects blog.
User avatar
GregEigsti
 
Posts: 1067
Joined: Sun Aug 02, 2009 5:23 pm
Location: Sammamish WA USA (near Seattle)
  • Website

Re: Strategy for using both WiShield and NewSoftSerial?

Postby davo » Mon Aug 09, 2010 4:34 am

Greg,

thanks for the quick reply, I'll try that shortly when I get a c# udp data logger knocked up......I got lazy with processing, but had some trouble with the blocking stuff....now parsing stuff for file saving etc...

The MEGA is fine....nicely resourced, but I got the yellowtail as a comms hub.....and it's the yellowtail I want the softserial port on, makes life a lot easier for me, I'm quite disabled so it really slows me down and then I push it I usually short something out.

I noticed with the softserial without the download/debug etc I noticed how much better the serial comms were when you were n't hammering the serial port with debug stuff. So this will help me alot.

I did n't want to put anymore strain on my code on the mega, so why I did n't go wishield, and the black widow was out of stock everywhere, but so far quite impressed! Once I got over the C stuff.....The size is a big bonus.

I'll have a look at the contributed libraries, but at the moment have things working the timer inhibit on the mega serial port it's fine to live with for now.

thanks

Dave
davo
 
Posts: 3
Joined: Wed Aug 04, 2010 6:38 am

Re: Strategy for using both WiShield and NewSoftSerial?

Postby GregEigsti » Mon Aug 09, 2010 12:39 pm

By "Yellowtail" do you mean "YellowJacket"?
I have never played with any of the Arduino soft serial libs so I'm afraid I cannot be of much help.

Glad things are working out!
Greg
Check out the wiki!
uIP Stack Docs
Compatible Access Point List
WiShield user contrib branch - DNS, DHCP, AP Scanning, bug fixes, etc.
SlackLab.org - My geek projects blog.
User avatar
GregEigsti
 
Posts: 1067
Joined: Sun Aug 02, 2009 5:23 pm
Location: Sammamish WA USA (near Seattle)
  • Website

Previous

Return to WiShield 1.0 Driver

Who is online

Users browsing this forum: No registered users and 1 guest