Sends data with zigbee

Bioloid robot kit from Korean company Robotis; CM5 controller block, AX12 servos..
10 postsPage 1 of 1
10 postsPage 1 of 1

Sends data with zigbee

Post by 4sk8ters » Fri Mar 22, 2013 5:03 pm

Post by 4sk8ters
Fri Mar 22, 2013 5:03 pm

How can I transmit data from controller to pc using zigbee modules?
I have noticed that in zigbee.h, the function zgb_tx_data send an int. I want to send a structure with some data (accelerometer info, gyroscope info, etc) from the controller (CM510) to the PC (I have zig100 and zig110 modules, zigserial, etc...). How can I send this information to the PC?
How can I transmit data from controller to pc using zigbee modules?
I have noticed that in zigbee.h, the function zgb_tx_data send an int. I want to send a structure with some data (accelerometer info, gyroscope info, etc) from the controller (CM510) to the PC (I have zig100 and zig110 modules, zigserial, etc...). How can I send this information to the PC?
4sk8ters offline
Robot Builder
Robot Builder
Posts: 13
Joined: Fri Feb 08, 2013 9:07 am

Post by planius » Thu Mar 28, 2013 9:05 am

Post by planius
Thu Mar 28, 2013 9:05 am

If you use zig2serial and zig100/zig110 you have a serial connection to the PC, so you simply write to the serial port. printf() or any of the other stdio.h functions will do. Have a look in serial.c in BioloidCControl if you are unsure about what I mean.
If you use zig2serial and zig100/zig110 you have a serial connection to the PC, so you simply write to the serial port. printf() or any of the other stdio.h functions will do. Have a look in serial.c in BioloidCControl if you are unsure about what I mean.
planius offline
Savvy Roboteer
Savvy Roboteer
Posts: 40
Joined: Wed Jul 20, 2011 5:33 am

Post by 4sk8ters » Tue Apr 02, 2013 3:12 pm

Post by 4sk8ters
Tue Apr 02, 2013 3:12 pm

planius wrote:If you use zig2serial and zig100/zig110 you have a serial connection to the PC, so you simply write to the serial port. printf() or any of the other stdio.h functions will do. Have a look in serial.c in BioloidCControl if you are unsure about what I mean.

Are you sure? If so, what is the meaning to have zigbee.h?
planius wrote:If you use zig2serial and zig100/zig110 you have a serial connection to the PC, so you simply write to the serial port. printf() or any of the other stdio.h functions will do. Have a look in serial.c in BioloidCControl if you are unsure about what I mean.

Are you sure? If so, what is the meaning to have zigbee.h?
4sk8ters offline
Robot Builder
Robot Builder
Posts: 13
Joined: Fri Feb 08, 2013 9:07 am

Post by planius » Tue Apr 02, 2013 10:43 pm

Post by planius
Tue Apr 02, 2013 10:43 pm

The zigbee.c/h and zgb_hal.c/h code from Bioloid implements the same packet protocol for send/receive, which is designed for RC-100 use only.

As I said, if you want to use zig2serial for 2-way communication with a PC, look at BioloidCControl in the code for serial.c/h. And yes, I am sure it works :D
The zigbee.c/h and zgb_hal.c/h code from Bioloid implements the same packet protocol for send/receive, which is designed for RC-100 use only.

As I said, if you want to use zig2serial for 2-way communication with a PC, look at BioloidCControl in the code for serial.c/h. And yes, I am sure it works :D
planius offline
Savvy Roboteer
Savvy Roboteer
Posts: 40
Joined: Wed Jul 20, 2011 5:33 am

Post by 4sk8ters » Wed Apr 03, 2013 2:30 pm

Post by 4sk8ters
Wed Apr 03, 2013 2:30 pm

planius wrote:The zigbee.c/h and zgb_hal.c/h code from Bioloid implements the same packet protocol for send/receive, which is designed for RC-100 use only.

As I said, if you want to use zig2serial for 2-way communication with a PC, look at BioloidCControl in the code for serial.c/h. And yes, I am sure it works :D

Can I use only serial.h, serial.c, rc100.h, rc100.c and global.h of the BioloidCControl? Can I copy these files in the embeded_c(cm510_v1.01) directory and compile them to make the libraries libserial.a?
planius wrote:The zigbee.c/h and zgb_hal.c/h code from Bioloid implements the same packet protocol for send/receive, which is designed for RC-100 use only.

As I said, if you want to use zig2serial for 2-way communication with a PC, look at BioloidCControl in the code for serial.c/h. And yes, I am sure it works :D

Can I use only serial.h, serial.c, rc100.h, rc100.c and global.h of the BioloidCControl? Can I copy these files in the embeded_c(cm510_v1.01) directory and compile them to make the libraries libserial.a?
4sk8ters offline
Robot Builder
Robot Builder
Posts: 13
Joined: Fri Feb 08, 2013 9:07 am

Post by planius » Thu Apr 04, 2013 2:13 am

Post by planius
Thu Apr 04, 2013 2:13 am

It would be much easier to copy the code from serial.h and serial.c that deals with #ifdef ZIG_2_SERIAL blocks into the serial.c file in the Robotis code...
It would be much easier to copy the code from serial.h and serial.c that deals with #ifdef ZIG_2_SERIAL blocks into the serial.c file in the Robotis code...
planius offline
Savvy Roboteer
Savvy Roboteer
Posts: 40
Joined: Wed Jul 20, 2011 5:33 am

Post by 4sk8ters » Fri Apr 05, 2013 8:49 am

Post by 4sk8ters
Fri Apr 05, 2013 8:49 am

planius wrote:It would be much easier to copy the code from serial.h and serial.c that deals with #ifdef ZIG_2_SERIAL blocks into the serial.c file in the Robotis code...
But must I compile it to obtain the library libserial.a?
planius wrote:It would be much easier to copy the code from serial.h and serial.c that deals with #ifdef ZIG_2_SERIAL blocks into the serial.c file in the Robotis code...
But must I compile it to obtain the library libserial.a?
4sk8ters offline
Robot Builder
Robot Builder
Posts: 13
Joined: Fri Feb 08, 2013 9:07 am

Post by planius » Fri Apr 05, 2013 10:34 am

Post by planius
Fri Apr 05, 2013 10:34 am

sure.
sure.
planius offline
Savvy Roboteer
Savvy Roboteer
Posts: 40
Joined: Wed Jul 20, 2011 5:33 am

Post by 4sk8ters » Mon Apr 08, 2013 3:45 pm

Post by 4sk8ters
Mon Apr 08, 2013 3:45 pm

planius wrote:If you use zig2serial and zig100/zig110 you have a serial connection to the PC, so you simply write to the serial port. printf() or any of the other stdio.h functions will do.

But to read commands send from the PC must I use serialReceiveCommand() function or can I use also scanf?
And what about serial_read and serial_write? Can I use them to write data to Pc and to read commands from PC?
planius wrote:If you use zig2serial and zig100/zig110 you have a serial connection to the PC, so you simply write to the serial port. printf() or any of the other stdio.h functions will do.

But to read commands send from the PC must I use serialReceiveCommand() function or can I use also scanf?
And what about serial_read and serial_write? Can I use them to write data to Pc and to read commands from PC?
4sk8ters offline
Robot Builder
Robot Builder
Posts: 13
Joined: Fri Feb 08, 2013 9:07 am

Post by siempre.aprendiendo » Mon Apr 08, 2013 8:38 pm

Post by siempre.aprendiendo
Mon Apr 08, 2013 8:38 pm

I usually use my own firmware (really is only an enhanced 'toss mode') and program the robots from an external controller (Raspberry, Pandaboard) in C++ and C#, communicating using several ways (usually USB to dynamixel) but also using the Zigbee with no change in code (all they use a virtual serial port, so only change wait times, baud rates and port names when needed)

You can find several examples at softwaresouls.com

Hop it helps :)
I usually use my own firmware (really is only an enhanced 'toss mode') and program the robots from an external controller (Raspberry, Pandaboard) in C++ and C#, communicating using several ways (usually USB to dynamixel) but also using the Zigbee with no change in code (all they use a virtual serial port, so only change wait times, baud rates and port names when needed)

You can find several examples at softwaresouls.com

Hop it helps :)
siempre.aprendiendo offline
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 559
Joined: Wed Aug 08, 2007 9:13 pm
Location: Barcelona


10 postsPage 1 of 1
10 postsPage 1 of 1
cron