Raven and GPIO pins

Go To Last Post
78 posts / 0 new

Pages

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Torby wrote:
I'm hoping this thread progresses into how you do that and how you make the bitcloud code do it's work.

Just setting APP_DEVICE_TYPE to COORDINATOR in Configuration file of application is enough.

NOTE: I no longer actively read this forum. Please ask your question on www.eevblog.com/forum if you want my answer.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hmm. I see 3 applications,

AVRRAVEN_3290P.aps
AVRRAVEN_1284p.aps
RZUSBSTICK.aps

I've looked through all the .c and .h but don't find APP_DEVICE_TYPE. I even turned EditPlus loose looking in any files for APP_DEVICE_TYPE ...

Lost in lots of interesting source.

The largest known prime number: 282589933-1

It's easy to stop breaking the 10th commandment! Break the 8th instead. 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

It is in file named "Configuration" (without extension). This file should be in project hierarchy for AVRRAVEN_1284p.aps and RZUSBSTICK.aps.

All configurable parameters are stored there.

NOTE: I no longer actively read this forum. Please ask your question on www.eevblog.com/forum if you want my answer.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Ok, I must be

a) Dense
b) ADD
c) Distracted
d) All of the above

I find "Configuration" files in the BitCloud folder, but no .aps. Those are in the Raven_Firmware folder.

I tried building AVRRaven_1284p.aps that built AVRRAVEN_1284p.hex with no errors and one warning (an unused variable called tmp). When I flashed that hex into my 1284, it went back to "Waiting for 1284 bootloaded" till I flashed the 1284 with the one a90 file from the bin folder.

I think I'm looking the wrong place... I find aps's in the Bitcloud folder:

blink.aps
throughputTest.aps
Lowpower.aps
WSNDemoApp.aps

And these have a configuration file. Should I be playing with one of these? I see WSNDemoApp targets an ATMega 1281.

Continued confusion

The largest known prime number: 282589933-1

It's easy to stop breaking the 10th commandment! Break the 8th instead. 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Sorry, my advices regarding ravens may be misleading sometimes. I personally like to avoid them as much as possible.

I am on vacation now and have no access to anything and for some reason I can not download ZDKs from atmel's site.

Additionally hard drive of my computer died today.

I'll try to answer you ASAP but in worst case it will require a week (until my vacation finishes).

NOTE: I no longer actively read this forum. Please ask your question on www.eevblog.com/forum if you want my answer.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Ok, I've managed to download BitCloud_ATAVRRZRAVEN_1_6_0.zip from Atmel's website.

After extracting I see following structure:

[dir] BitCloud
[dir] Documentation
[dir] Evaluation Tools
[dir] Sample Applications
[dir] Third Party Software
[file] LICENSE.txt
[file] ReadMe.html
[file] Release Notes.txt

What we need now is Sample Applications (and WSNDemo as example).

[dir] WSNDemo/iar
[dir] WSNDemo/include
[dir] WSNDemo/linkerScr
[dir] WSNDemo/list
[dir] WSNDemo/objs
[dir] WSNDemo/src
[file] WSNDemo/Configuration
[file] WSNDemo/Makefile
[file] WSNDemo/WSNDemoApp.aps

Here are:
WSNDemoApp.aps - project file for AVR Studio.
Configuration - that file I was talking about (it also should be included in project, so you may just edit it in AVR Studio).

Part of configuration file we are interested in:

#--------------------------------------------------
# Settings for the platforms without dip switches
#--------------------------------------------------
APP_DEVICE_TYPE = COORDINATOR
#APP_DEVICE_TYPE = ROUTER
#APP_DEVICE_TYPE = ENDDEVICE

PS: I just realized that you probably talking not about BitCloud but about some other Raven firmware Atmel supplies with them. In this case I can't help you, just don't know anything about it.

NOTE: I no longer actively read this forum. Please ask your question on www.eevblog.com/forum if you want my answer.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hmm. Redownloaded, unzipped, I find the app and the config file. Without editing, a build gives me some missing files:

Makefile:22: Documents/BitCloud_ATAVRRZRAVEN_1_6_0/BitCloud/lib/MakerulesBc_All_Raven_Atmega1284_Rf230B_4Mhz_Gcc: No such file or directory

But I DO find that file in that folder..

My studio is v4.17 build 666

Funny how whenever I have a few hours to play, the first step stops everything

The largest known prime number: 282589933-1

It's easy to stop breaking the 10th commandment! Break the 8th instead. 

Last Edited: Mon. Sep 7, 2009 - 03:57 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Torby wrote:
Makefile:22: Documents/BitCloud_ATAVRRZRAVEN_1_6_0/BitCloud/lib/MakerulesBc_All_Raven_Atmega1284_Rf230B_4Mhz_Gcc: No such file or directory

"Documents" is correct location or part of "Documents and Settings"?

Move it to path without spaces.

NOTE: I no longer actively read this forum. Please ask your question on www.eevblog.com/forum if you want my answer.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Found that! Now making... (MS's love of spaces in file names seems to confuse lots of software.)

No build errors... Flashed into my 1284 and now I'm waiting for 1284 boot loader... Maybe I need to find the matching 3290 program?

The largest known prime number: 282589933-1

It's easy to stop breaking the 10th commandment! Break the 8th instead. 

Last Edited: Mon. Sep 7, 2009 - 04:29 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Torby wrote:
Found that! Now making... (MS's love of spaces in file names seems to confuse lots of software.)

Good. Now play around with configuration file :)

NOTE: I no longer actively read this forum. Please ask your question on www.eevblog.com/forum if you want my answer.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Trying to find some combination that makes a working program. Any time I flash my 1284p with this, my 3290 goes into "waiting for 1284 bootloader..." Perhaps I need to find the matching 3290 program?

The largest known prime number: 282589933-1

It's easy to stop breaking the 10th commandment! Break the 8th instead. 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

In 'Evaluation Tools/WSNDemo (embedded)' thete is file named WSNDemoApp_Raven_3290P_LCD.hex.

Sources for this .hex can be found in BSP/RAVEN.

NOTE: I no longer actively read this forum. Please ask your question on www.eevblog.com/forum if you want my answer.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hmm. Now I have a raven that starts "Joining Network," then jumps to "Coord." The other doesn't find it coordinating...

Can we get to basic raven functions from source, then go about tinkering?

The largest known prime number: 282589933-1

It's easy to stop breaking the 10th commandment! Break the 8th instead. 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

What other devices are doing?

Have you changed APP_DEVICE_TYPE for others?

Have you tried precompiled images that are in the package?

NOTE: I no longer actively read this forum. Please ask your question on www.eevblog.com/forum if you want my answer.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Let's see. I put WSNDemoApp_Raven_3290P_LCD.hex in the 3290.

I have WSNDemoApp_Raven_E_4.hex and _E_3.hex.

4.hex doesn't seem to do anything...
3.hex also. They both sit forever saying "Joining" but never get joined. Only the images out of the other .zip file seem to run.

The largest known prime number: 282589933-1

It's easy to stop breaking the 10th commandment! Break the 8th instead. 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I just noticed myself that half of images are for USB stick. Thats strange. End-devices (precompiled images) are working correctly. They are expecting someone to join to. So in order to use precompiled images you need to flash USB-stick (must come with raven) with WSNDemoApp_USB_C_1.hex.

If you don't have USB-stick than just compile WSNDemo sample application without changing anything in Configuration.

I've sent you PM with my skype ID. May be we could move this conversation there.

NOTE: I no longer actively read this forum. Please ask your question on www.eevblog.com/forum if you want my answer.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Oh! I found a document that explains lots of this, like what the images are for...

I'll try all this again.

I thought it was building the busybox program that lets you send messages, read temperatures and whatnot. Now I have the wsndemo program drawing the network of the usb and 2 ravens.

The largest known prime number: 282589933-1

It's easy to stop breaking the 10th commandment! Break the 8th instead. 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hmm. Does the source in Bitcloud_ATAVRRZRAVEN...\sample applications/wsndemo match the precompiled images? I can load the precompiled images into my ravens and usb thingy and see my network on the wsndemo program.

So I built the wsndemo program with some lines in my config:

#------------------------
# Boards selection:
#-----------------------
BOARD = BOARD_RAVEN
#BOARD = BOARD_USB_DONGLE

#-------------------------
# Stack type to use
#------------------------
STACK_TYPE = ALL_DEVICES_TYPES
#STACK_TYPE = COORDINATOR
#STACK_TYPE = ROUTER
#STACK_TYPE = ENDDEVICE

#-------------------------
# Settings for the platforms without dip switches
#-----------------------------
#APP_DEVICE_TYPE = COORDINATOR
#APP_DEVICE_TYPE = ROUTER
APP_DEVICE_TYPE = ENDDEVICE

The resulting program says "enddev" in the raven, but doesn't show up in the network or blink the led and change the icons. I an reload the prebuilt image and it works again.

So I tried setting it for the usb coordinator, thinking the compiled raven program needed to talk to the compiled usb coordinator. That results in a usb stick that doesn't talk to the wsndemo program or turn on the pretty leds.

The largest known prime number: 282589933-1

It's easy to stop breaking the 10th commandment! Break the 8th instead. 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Torby wrote:
Hmm. Does the source in Bitcloud_ATAVRRZRAVEN...\sample applications/wsndemo match the precompiled images?

Yes, they are.

Torby wrote:

The resulting program says "enddev" in the raven, but doesn't show up in the network or blink the led and change the icons. I an reload the prebuilt image and it works again.

Try changing CS_UID to someting else. Raven have no UID chip. So you must set different ones for every device in the network.

Torby wrote:

So I tried setting it for the usb coordinator, thinking the compiled raven program needed to talk to the compiled usb coordinator. That results in a usb stick that doesn't talk to the wsndemo program or turn on the pretty leds.

Let's do is sequentially. First of all let's get Raven working as EndDevice.

PS: which version of WinAVR do you use? Try compiling WSNDemo with default settings and compare .hex files. They should be mostly the same (except maybe for couple lines (for different CS_UID value)).

NOTE: I no longer actively read this forum. Please ask your question on www.eevblog.com/forum if you want my answer.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Oh. I thought they got it from the flash chip.

Putting back precompiled images...

The largest known prime number: 282589933-1

It's easy to stop breaking the 10th commandment! Break the 8th instead. 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Torby wrote:
Oh. I thought they got it from the flash chip.

There is nothing unique in Raven (well, external eeprom must contain unique ID at offset 0). But you should read it and write to CS_UID by yourself.
Just change CS_UID parameter every time you build application and you'll be good :)

Torby wrote:

Putting back precompiled images...

Start with precompiled coordinator at stick and self-build image at Raven (set CS_UID to something like 0x123456).

NOTE: I no longer actively read this forum. Please ask your question on www.eevblog.com/forum if you want my answer.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I tried 42, for philosophical reasons, but that didn't work, so I tried setting the PanID to what the other raven claims it's panid to be...

The raven says ENDDEV, turns the LED, Sun icon and Zigbee icons on. The wsnmonitor never sees it, though it does see the other raven.

Now that's interesting FC finds many differences between this .hex and the WSNDemoApp_Raven_E_4.hex file.

#-------------------------
# Settings for the platforms without UID
#--------------------------
CS_UID = 0x42LL
#CS_EXT_PANID = 0xAAAAAAAAAAAAAAAALL
CS_EXT_PANID = 0x4D8BLL

(It won't let me attach my configuration file)
Try http://www.outsidetrains.com/mls/Configuration.txt

Good grief. it's taken me 1/2 an hour just to show you my configuration file.

The largest known prime number: 282589933-1

It's easy to stop breaking the 10th commandment! Break the 8th instead. 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Reflashing the precompiled image into the raven restores it to function. Both ravens now show in the monitor program with different addresses.

The largest known prime number: 282589933-1

It's easy to stop breaking the 10th commandment! Break the 8th instead. 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Torby wrote:

Now that's interesting FC finds many differences between this .hex and the WSNDemoApp_Raven_E_4.hex file.

1. I am mistaken. For Ravens and USB Sticks UID is read from EEPROM. Changing it in Configuration does not affect anything.

2. Check that you are using WinAVR-20081205. Only this version is officially supported and tested.

3. I've just tried to change only APP_DEVICE_TYPE to ENDDEVICE and rebuild. Resulting .hex exactly matches the one in prebuild images.

NOTE: I no longer actively read this forum. Please ask your question on www.eevblog.com/forum if you want my answer.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Just got a pile of make errors. All sorts of weird stuff like code I'd have typed, so I downloaded the bitcloud raven stuff again and unzipped it fresh.

Guess what? I built it with:

#APP_DEVICE_TYPE = COORDINATOR
#APP_DEVICE_TYPE = ROUTER
APP_DEVICE_TYPE = ENDDEVICE

#STACK_TYPE = ALL_DEVICES_TYPES
#STACK_TYPE = COORDINATOR
#STACK_TYPE = ROUTER
STACK_TYPE = ENDDEVICE

BOARD = BOARD_RAVEN
#BOARD = BOARD_USB_DONGLE

COMPILER_TYPE = GCC
#COMPILER_TYPE = IAR

And now I've programmed one of these ravens, it's blinking its light and it shows in the wsnmonitor program

The largest known prime number: 282589933-1

It's easy to stop breaking the 10th commandment! Break the 8th instead. 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Congrats :)

Torby wrote:

#STACK_TYPE = ALL_DEVICES_TYPES
#STACK_TYPE = COORDINATOR
#STACK_TYPE = ROUTER
STACK_TYPE = ENDDEVICE

This change was not necessary. ALL_DEVICES_TYPES should be ok too.

NOTE: I no longer actively read this forum. Please ask your question on www.eevblog.com/forum if you want my answer.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'm moving this weekend, so you get the week off. Beware next weekend

The largest known prime number: 282589933-1

It's easy to stop breaking the 10th commandment! Break the 8th instead. 

Pages