Setting up DI Wifi Sensor --Problems

Discussion specific to projects ideas and support.
abcde13
Posts: 10
Joined: 29 Sep 2010, 03:22

Setting up DI Wifi Sensor --Problems

Post by abcde13 » 31 Dec 2011, 22:51

Hi guys. So, I am starting on a swarm robotics project utilizing the DI Wifi Sensor. I can't type up all the specifics; visit my blog,http://robosavvy.blogspot.com/, for the details. The background of the problem, however, I must explain.

I started using http://www.mastincrosbie.com/Marks_LEGO ... e_NXT.html as a tutorial, because I am doing this in NXC. Now, I don't quite understand the full code from the logging.nxc, diwifidriver.nxc, and listener.nxc, but I know which text should show up on the NXT when certain conditions are met.
So, when I first loaded and ran the listner.nxc, I though everything was going according to plan. It said:

Webserver
Sensor OK

WPAPSK OK
Associated

Then it stopped, and apparently, was FROZEN. I had to remove the battery and put it back in for the NXT to restart.

I did a little more testing, and apparently, it says Sensor OK even when it is not plugged in.

I have not tried using another NXT yet, but I will tonight. In the meanwhile, any thoughts or help would be very nice.

mightor
Site Admin
Posts: 1079
Joined: 25 Sep 2010, 15:02
Location: Rotterdam, Netherlands
Contact:

Re: Setting up DI Wifi Sensor --Problems

Post by mightor » 01 Jan 2012, 09:05

You are using the latest enhanced firmware?

- Xander
| My Blog: I'd Rather Be Building Robots (http://botbench.com)
| RobotC 3rd Party Driver Suite: (http://rdpartyrobotcdr.sourceforge.net)
| Some people, when confronted with a problem, think, "I know, I'll use threads,"
| and then two they hav erpoblesms. (@nedbat)

abcde13
Posts: 10
Joined: 29 Sep 2010, 03:22

Re: Setting up DI Wifi Sensor --Problems

Post by abcde13 » 01 Jan 2012, 15:49

Yes, Xander. My NXT is uploaded with 1.31 enhanced library provided by Mark Crosbie on his website.

However, I also went ahead and used BricxCC with the 1.2.1r5 version. Do you think using the latest version instead of the 1.2.1r4 Crosbie used is creating the problem?

UPDATE: I tried it with another NXT, crash and burn as well.

mattallen37
Posts: 1818
Joined: 02 Oct 2010, 02:19
Location: Michigan USA
Contact:

Re: Setting up DI Wifi Sensor --Problems

Post by mattallen37 » 01 Jan 2012, 16:52

Yeah, I've been seeing the same things. I can't get my NXC programs, or Mark's programs to work. I am in contact with John from Dexter Industries in regard to the issue.

Even issuing the +++ command doesn't get a response when an NXC NXT sends it.
Matt
http://mattallen37.wordpress.com/

I'm all for gun control... that's why I use both hands when shooting ;)

abcde13
Posts: 10
Joined: 29 Sep 2010, 03:22

Re: Setting up DI Wifi Sensor --Problems

Post by abcde13 » 02 Jan 2012, 04:52

Good to hear it is not just me.

Do you know about when this problem will be fixed?

Oh, and are you still using 1.2.1r4 for the NXC version? Because if you are, then my using 1.2.1r5 shouldn't be making a difference.

mattallen37
Posts: 1818
Joined: 02 Oct 2010, 02:19
Location: Michigan USA
Contact:

Re: Setting up DI Wifi Sensor --Problems

Post by mattallen37 » 02 Jan 2012, 16:20

As of a week ago, I am running the latest test release version. However, I don't remember hearing about any recent changes to RS485 related stuff, and the included EFW hasn't been changed real recently either.

It's really hard to say when it will be "fixed". At this point, I think it seems to be a FW thing. Two NXTs can talk properly between themselves at "9600" baud, but the DIWIFI doesn't. It seems to point to the NXTs using a slightly different speed than 9600, or else using some type of header on all messages. If it is an EFW issue, John Hansen is pretty good about fixing things before the next release (could be later this week, or it could be a couple months; there is no way to know).
Matt
http://mattallen37.wordpress.com/

I'm all for gun control... that's why I use both hands when shooting ;)

abcde13
Posts: 10
Joined: 29 Sep 2010, 03:22

Re: Setting up DI Wifi Sensor --Problems

Post by abcde13 » 02 Jan 2012, 16:35

Interesting.

Well then, I'll cross my fingers and hope for this week, while counting my lucky stars, of course.

But for in the meanwhile, I'll continue with different aspects of my swarm project.

Thanks for the help and info, Xander and mattallen37.

BTW mattallen37, I've added your blog to my list of blogs. Good work.

afanofosc
Site Admin
Posts: 1256
Joined: 26 Sep 2010, 19:36
Location: Nashville, TN
Contact:

Re: Setting up DI Wifi Sensor --Problems

Post by afanofosc » 03 Jan 2012, 14:02

I am not convinced that the problems you both are encountering are not user-error. For one thing, trying to execute listener.nxc when you don't understand what it is supposed to do or how it works is a recipe for disaster. For another thing, if the latest compiler and firmware work just fine to talk to an NXTBee at baud rates ranging from 1200 to 115200 then can you give me a reason for it not working with another RS485 device at 9600 baud?

I looked at Mark's code last night and it has many issues that could cause it to fail. I would never try to figure out what was going wrong without first getting rid of all his logging code - to rule that out as a problem causer - and simplify the test harness as much as possible. Xander's RobotC code leaves off all LF characters while Mark's code follows the DIWIFI docs by always ending a command with CRLF. Which one works? Which one is right?

After sending +++ did you wait a full second?

Did Matt put the NXT into DATA_MODE_NXT or leave it in its default DATA_MODE_RAW configuration?

In my experience, if you give me some working RobotC code it will be a trivial port to NXC and the resulting code will function just as well as the RobotC code functions.

John Hansen
Multi-platform LEGO MINDSTORMS programming
http://bricxcc.sourceforge.net/

jdc2106
Posts: 12
Joined: 13 Oct 2010, 12:41

Re: Setting up DI Wifi Sensor --Problems

Post by jdc2106 » 03 Jan 2012, 15:24

Thanks Matt and John for hopping in here. John did a fantastic job with the NXTBee a few months ago and we really hope the Wifi code can be brought up to speed! :D
Last edited by jdc2106 on 04 Jan 2012, 01:16, edited 1 time in total.
John Cole

Dexter Industries
http://www.dexterindustries.com

markcrosbie
Posts: 34
Joined: 30 Sep 2010, 09:56
Location: Ireland
Contact:

Re: Setting up DI Wifi Sensor --Problems

Post by markcrosbie » 03 Jan 2012, 20:41

mattallen37 wrote:Yeah, I've been seeing the same things. I can't get my NXC programs, or Mark's programs to work. I am in contact with John from Dexter Industries in regard to the issue.

Even issuing the +++ command doesn't get a response when an NXC NXT sends it.
Hi Matt!

Could you post your NXC code for me to compare to the code I wrote? I was ultimately unable to get a reliable Wifi driver working in NXC and moved over to coding in RobotC. I could never figure out why exactly the NXC code would wedge or how the same program would produce different results. My suspicion is a timing error somewhere, which are the worst type of bugs to hunt down because adding debug code perturbs the very system you are trying to test.

I'm happy to work jointly with you to resolve this as I'd really like to see the NXC code work reliably.

Best regards,
Mark

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests