Re: [riot-devel] Ubuntu to Riot Communication

2015-12-08 Thread Cenk Gündogan

Hello Sugang,

Can you try the pins PA23(RX pin) and PA22(TX pin)?
PA04 and PA05 share the same UART with the shell.

I hope this helps.

Best,
Cenk

On 08.12.2015 17:29, Sugang Li wrote:

Hi Oleg,

Sorry that I come back to this question so late.  After a few trials, 
I still have the following concerns:
1. I am using SAM R21 board for the border_router examples, and I can 
shell into the RIOT from both USB debug port and UART port (PIN: PA04 
and PA05). When I connect two cable at the same time, and use tunslip 
tool to setup a IPV6 slip interface over UART port, the shell (USB 
debug port )dose not reply to any command, such as ps and ifconfig, if 
I unplug the UART port, the shell works fine. Is this the multiplexing 
concerns that you mentioned? If yes, how can I add a second 
USB-to-UART adapter since there is only one interface on board(PA04 
and PA05)?
2. If I only use one port (either USB or UART) for slip, from Linux 
side, I got no ping6 reponse from the address of the RIOT node. I 
followed the steps in gnrc_border_router example  to configure the 
RIOT node, and made sure the state maintained.


Thanks,

Sugang


Hi!

On Mon, Nov 23, 2015 at 11:25:19PM -0500, Sugang Li wrote:
> 1. Is there a way I can send packet from Ubuntu to RIOT via USB port? Any
> related library and example will be appreciated.

In general, yes, you can use SLIP [1]. In order to do so, please take 
a look

at the border router example [2]. In particular, you need to copy the
slip_params.h file into your application folder and add something like 
this to

your Makefile:

ifeq (,$(SLIP_UART))
# set default (first available UART)
SLIP_UART="UART_DEV(0)"
endif
ifeq (,$(SLIP_BAUDRATE))
# set default
   SLIP_BAUDRATE=115200
endif

GNRC_NETIF_NUMOF := 2
INCLUDES += -I$(CURDIR)
CFLAGS += -DSLIP_UART=$(SLIP_UART)
CFLAGS += -DSLIP_BAUDRATE=$(SLIP_BAUDRATE)

USEMODULE += gnrc_slip


This will add a SLIP interface that uses the primary UART as a serial 
port.


However, you might run into problems since this UART is also used for the
shell and I don't know how well multiplexing works on both ends. A common
solution that is, for example, used for our the before mentioned 
border router
is to add a second USB-to-UART by using an external adapter that can 
be found

for a low price on ebay [3].

> 2. For receiving a packet at Ubuntu,  currently I understand I can write a
> script to extract the information in the debug message. Is there a more
> standard way to do that?

Not that I'm aware of.

> Also I have some issue with pyterm the node. After successfully "make flash"
>
> I can not access the node via pyterm:
> sudo pyterm -p "/dev/ttyACM0"

> Any idea? The debug light flash as the same frequency as the warning
> information.

That seems strange to me. Is there anything else that tries to access 
the ACM

device? Maybe some Ubuntu magic? Maybe some of the other Ubuntu (derivate)
users here can help (Hauke, Martine...)?

Cheers,
Oleg

[1] https://tools.ietf.org/html/rfc1055
[2] 
https://github.com/RIOT-OS/RIOT/tree/master/examples/gnrc_border_router 
[3] 
http://www.ebay.com/itm/6Pin-USB-2-0-to-TTL-UART-Module-Serial-Converter-CP2102-STC-Replace-Ft232-Module-


--

*/WINLAB, Department of Electrical and Computer Engineering/*
*/Rutgers,the State University of New Jersey
/*


___
devel mailing list
devel@riot-os.org
https://lists.riot-os.org/mailman/listinfo/devel


___
devel mailing list
devel@riot-os.org
https://lists.riot-os.org/mailman/listinfo/devel


Re: [riot-devel] Ubuntu to Riot Communication

2015-12-08 Thread Kaspar Schleiser
Hey,

On 12/08/15 17:29, Sugang Li wrote:
> 1. I am using SAM R21 board for the border_router examples, and I can
> shell into the RIOT from both USB debug port and UART port (PIN: PA04
> and PA05).

I just opened a pull request [1] that allows multiplexing network and
shell over just one UART. You might want to check it out.

Kaspar

[1] https://github.com/RIOT-OS/RIOT/pull/4438
___
devel mailing list
devel@riot-os.org
https://lists.riot-os.org/mailman/listinfo/devel


Re: [riot-devel] Ubuntu to Riot Communication

2015-11-24 Thread Martine Lenders
Hi,

2015-11-24 17:49 GMT+01:00 Oleg Hahm :

> […]
> > Also I have some issue with pyterm the node. After successfully "make
> flash"
> >
> > I can not access the node via pyterm:
> > sudo pyterm -p "/dev/ttyACM0"
> 
> > Any idea? The debug light flash as the same frequency as the warning
> > information.
>
> That seems strange to me. Is there anything else that tries to access the
> ACM
> device? Maybe some Ubuntu magic? Maybe some of the other Ubuntu (derivate)
> users here can help (Hauke, Martine...)
>

Sometimes the udev rules need to be adapted. Maybe this is it?

Cheers,
Martine
___
devel mailing list
devel@riot-os.org
https://lists.riot-os.org/mailman/listinfo/devel


Re: [riot-devel] Ubuntu to Riot Communication

2015-11-24 Thread Oleg Hahm
Hi!

On Mon, Nov 23, 2015 at 11:25:19PM -0500, Sugang Li wrote:
> 1. Is there a way I can send packet from Ubuntu to RIOT via USB port? Any
> related library and example will be appreciated.

In general, yes, you can use SLIP [1]. In order to do so, please take a look
at the border router example [2]. In particular, you need to copy the
slip_params.h file into your application folder and add something like this to
your Makefile:

ifeq (,$(SLIP_UART))
# set default (first available UART)
SLIP_UART="UART_DEV(0)"
endif
ifeq (,$(SLIP_BAUDRATE))
# set default
   SLIP_BAUDRATE=115200
endif

GNRC_NETIF_NUMOF := 2
INCLUDES += -I$(CURDIR)
CFLAGS += -DSLIP_UART=$(SLIP_UART)
CFLAGS += -DSLIP_BAUDRATE=$(SLIP_BAUDRATE)

USEMODULE += gnrc_slip


This will add a SLIP interface that uses the primary UART as a serial port.

However, you might run into problems since this UART is also used for the
shell and I don't know how well multiplexing works on both ends. A common
solution that is, for example, used for our the before mentioned border router
is to add a second USB-to-UART by using an external adapter that can be found
for a low price on ebay [3].

> 2. For receiving a packet at Ubuntu,  currently I understand I can write a
> script to extract the information in the debug message. Is there a more
> standard way to do that?

Not that I'm aware of.

> Also I have some issue with pyterm the node. After successfully "make flash"
> 
> I can not access the node via pyterm:
> sudo pyterm -p "/dev/ttyACM0"
 
> Any idea? The debug light flash as the same frequency as the warning
> information.

That seems strange to me. Is there anything else that tries to access the ACM
device? Maybe some Ubuntu magic? Maybe some of the other Ubuntu (derivate)
users here can help (Hauke, Martine...)?

Cheers,
Oleg

[1] https://tools.ietf.org/html/rfc1055
[2] https://github.com/RIOT-OS/RIOT/tree/master/examples/gnrc_border_router
[3] 
http://www.ebay.com/itm/6Pin-USB-2-0-to-TTL-UART-Module-Serial-Converter-CP2102-STC-Replace-Ft232-Module-
-- 
panic("smp_callin() a\n");
linux-2.6.6/arch/parisc/kernel/smp.c


signature.asc
Description: PGP signature
___
devel mailing list
devel@riot-os.org
https://lists.riot-os.org/mailman/listinfo/devel


[riot-devel] Ubuntu to Riot Communication

2015-11-23 Thread Sugang Li
Dear all,

I am currently working on a proxy program on ubuntu, which do both
receiving packet from and sending packet to Riot OS  (Riot Mote is a
samr21-xpro board connected to the Ubuntu pc via USB port). I run into the
following problems:

1. Is there a way I can send packet from Ubuntu to RIOT via USB port? Any
related library and example will be appreciated.
2. For receiving a packet at Ubuntu,  currently I understand I can write a
script to extract the information in the debug message. Is there a more
standard way to do that?

Also I have some issue with pyterm the node. After successfully "make flash"



I can not access the node via pyterm:
sudo pyterm -p "/dev/ttyACM0"

2015-11-23 23:13:14,061 - INFO # Connect to serial port /dev/ttyACM0
Welcome to pyterm!
Type '/exit' to exit.
2015-11-23 23:13:15,064 - WARNING # Serial port disconnected, waiting to
get reconnected...
2015-11-23 23:13:16,065 - WARNING # Try to reconnect to /dev/ttyACM0
again...
2015-11-23 23:13:16,066 - WARNING # Serial port disconnected, waiting to
get reconnected...
2015-11-23 23:13:17,067 - WARNING # Try to reconnect to /dev/ttyACM0
again...
2015-11-23 23:13:17,068 - WARNING # Serial port disconnected, waiting to
get reconnected...
2015-11-23 23:13:18,069 - WARNING # Try to reconnect to /dev/ttyACM0
again...
2015-11-23 23:13:18,070 - WARNING # Serial port disconnected, waiting to
get reconnected...


Any idea? The debug light flash as the same frequency as the warning
information.

Thanks

-- 

*WINLAB, Department of Electrical and Computer Engineering*

*Rutgers,the State University of New Jersey*
___
devel mailing list
devel@riot-os.org
https://lists.riot-os.org/mailman/listinfo/devel