problem reading mac

38 views
Skip to first unread message

campi

unread,
Oct 30, 2012, 5:58:33 PM10/30/12
to nanode...@googlegroups.com
hi guys,

i tried this for some weeks and really dont know, if I'm doing somethink wrong.
I have a nanode classic and im using the arduino ide 1.0.1 on ubuntu 12.04, my first test with the nanode were successfull (trying to get the led flashing, test another output)

but if i try to read the mac adress (with nanodeMAC and nanodeUNIO_test) and got:
Reading MAC address... failure MAC address is 02:7B:08:EF:01:73 

can anyone help me to figure out what is wrong?

Jan

SomeRandomBloke

unread,
Oct 31, 2012, 5:14:54 PM10/31/12
to nanode...@googlegroups.com
looks like you got a mac address there. If it had failed you'd probably see 00:00:00:00:00:00

SRB

campi

unread,
Nov 2, 2012, 4:27:48 PM11/2/12
to nanode...@googlegroups.com
yeah, it looks like a MAC, but it seems to be random:

some tests from today:
MAC address is 97:87:95:0F:10:01
MAC address is A0:27:95:0F:10:01
MAC address is 42:41:95:0F:10:01

Jan

elyob

unread,
Nov 3, 2012, 5:18:33 AM11/3/12
to nanode...@googlegroups.com, nanode...@googlegroups.com
I seem to remember there was a default mac, do you have the mac chip soldered on? Is it soldered on properly?

Ken Boak

unread,
Nov 3, 2012, 6:28:32 AM11/3/12
to nanode...@googlegroups.com
As I recall,  there was a timing issue/interaction  between the serial comms and the reading of the MAC IC.

I believe that the original MAC reading routine worked correctly when the baudrate was set to 9600, but was less reliable at other frequencies.

The MAC IC is accessed by digital 7 - so make sure there is nothing else connected to this I/O pin.

You might also wish to look through Ian Chilton's superb compilation of Nanode information.


There  is a link to some of SRB's code on github for reading the MAC - you could try that.




Ken






Stephen Early

unread,
Nov 3, 2012, 7:03:12 AM11/3/12
to nanode...@googlegroups.com
On Saturday, November 3, 2012 10:28:34 AM UTC, monsonite wrote:
As I recall,  there was a timing issue/interaction  between the serial comms and the reading of the MAC IC.

I believe that the original MAC reading routine worked correctly when the baudrate was set to 9600, but was less reliable at other frequencies.


The NanodeUNIO code isn't sensitive to the serial bit rate.  If it's reporting failure (and you're getting a different address back each time), it's probably a hardware issue.
 
The MAC IC is accessed by digital 7 - so make sure there is nothing else connected to this I/O pin.

There  is a link to some of SRB's code on github for reading the MAC - you could try that.


 
He said he already tried both that and NanodeUNIO.

Steve

Stephen Early

unread,
Nov 3, 2012, 7:12:57 AM11/3/12
to nanode...@googlegroups.com
On Saturday, November 3, 2012 11:03:12 AM UTC, Stephen Early wrote:
On Saturday, November 3, 2012 10:28:34 AM UTC, monsonite wrote:There  is a link to some of SRB's code on github for reading the MAC - you could try that.


 
He said he already tried both that and NanodeUNIO.


*reads again*  Um.  Actually perhaps he didn't.  I would be very surprised if it worked, though (not that it checks for errors at all).
 
The NanodeUNIO code bails out as soon as it detects an error - that's probably why the reported addresses in campi's second message all have the same last four bytes: they will have been in RAM before the read routine was called. The error is occurring while reading the first couple of bytes.

As Ken says, it's worth checking that there's nothing else on digital 7, and that it isn't shorted to ground or power.  Check the soldering on the MAC chip, too.

Steve

Ken Boak

unread,
Nov 3, 2012, 7:23:55 AM11/3/12
to nanode...@googlegroups.com
Stephen,

I was referring to your comment of 1/8/2011 - when you found that the MAC code was only successful at 9600 and 38400 baud.

Did we ever get to the bottom of this, or was the UNIO routine re-written to fix this?  

Was it a specific version of the Arduino IDE that caused problems.  I remember a post saying that 0022 was OK whilst 0021 made a mess of it.

See below

01/08/2011
to nanode-users
Has anybody else noticed the MAC chip reading code only working when the serial bit rate is set to 9600 or 38400, and not when it's set to anything else?  I've tried 4800, 19200, 57600 and 115200 unsuccessfully (and other rates don't appear to be supported).

I've reproduced this problem on two separate nanodes - I don't think it's a hardware problem with just one.

Steve


Stephen Early

unread,
Nov 3, 2012, 7:38:07 AM11/3/12
to nanode...@googlegroups.com

On Saturday, November 3, 2012 11:23:56 AM UTC, monsonite wrote:
Stephen,

I was referring to your comment of 1/8/2011 - when you found that the MAC code was only successful at 9600 and 38400 baud.

Did we ever get to the bottom of this, or was the UNIO routine re-written to fix this?

That was with thiseldo's NanodeMAC code - I wrote NanodeUNIO because I found that code was unreliable.  I suspect it was a combination of things: different code paths for reading and writing 0s and 1s (so dodgy timing generating the signal for the chip) and probably also running with interrupts enabled at the wrong time.  The interrupt issue got fixed eventually; the multiple code paths issue didn't.

Was it a specific version of the Arduino IDE that caused problems.  I remember a post saying that 0022 was OK whilst 0021 made a mess of it.


The NanodeMAC code is likely to be sensitive to the particular compiler version.  With luck, the NanodeUNIO code shouldn't be - it uses the same code path for reading and writing, whatever the data is.

Steve

Stephen Early

unread,
Nov 3, 2012, 7:46:35 AM11/3/12
to nanode...@googlegroups.com
On Saturday, November 3, 2012 11:38:07 AM UTC, Stephen Early wrote:

That was with thiseldo's NanodeMAC code - I wrote NanodeUNIO because I found that code was unreliable.  I suspect it was a combination of things: different code paths for reading and writing 0s and 1s (so dodgy timing generating the signal for the chip) and probably also running with interrupts enabled at the wrong time.  The interrupt issue got fixed eventually; the multiple code paths issue didn't.


There's an interesting blog post about it by @ThreeBytesFull at http://blog.threebytesfull.com/post/6475041619/arduino-avr-assembly-language

I sidestepped the issue in the UNIO code by making sure the code generating the signal to the MAC chip never branched in a data-dependent way.

Steve

campi

unread,
Nov 14, 2012, 12:21:14 PM11/14/12
to nanode...@googlegroups.com
Sorry for my delayed answer:

I also tried nanodeMAC as suggested by Ken.
I tried 9600 baud, same behaviour.

One post pointed to the IDE Version: I'm using Arduino IDE 1.0.1.

i can't see a short.

do you have some advise what i should messure at which pins to see if all connections on the 11aa02e48 are correct?


Jan

Stephen Early

unread,
Nov 18, 2012, 10:22:36 AM11/18/12
to nanode...@googlegroups.com
You should definitely do some continuity tests and voltage measurements.

The 11AA02E48 is on the underside of the board.  It has three pins - two at the bottom and one at the top.  The pins are numbered 1 (bottom left), 2 (bottom right) and 3 (top).

With the board powered off you should check that pin 1 is connected to DIG7, and that pin 3 is connected to ground.

With the board powered on you should check that pin 2 is at 5v, pin 3 is at 0v, and pin 1 is at 5v when the chip is not being read (i.e. after the "NanodeMAC" example sketch from NanodeUNIO has finished and reported failure).

Steve


On Tuesday, October 30, 2012 9:58:33 PM UTC, campi wrote:
Reply all
Reply to author
Forward
0 new messages