Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: Using USB to interact with host

75 views
Skip to first unread message

Jan Kučera

unread,
Dec 9, 2009, 4:59:13 AM12/9/09
to
There were no changes regarding USB in 4.0, only USB device is officially
supported, which means you can talk to a host.
However, no all device classes can be realized with current setup. Are you
implementing both sides, or do you know what class do you need to talk to?

Jan


"Bleary Eye" <Blea...@discussions.microsoft.com> wrote in message
news:28A8539F-65A5-4BEC...@microsoft.com...
> In 4.0, can I use USB to interact with the host? For example, I'd like to
> be
> able to send the mote a request for status information, and to have that
> returned, via USB.

Bleary Eye

unread,
Dec 11, 2009, 6:07:01 PM12/11/09
to
I'm not sure what you mean. I'm using the Imote2. I'd like to be able to have
two way communication via the usb port with the PC host that's running a C#
program. If this is possible, are there any examples?

--Bill

GHI Team

unread,
Dec 12, 2009, 6:10:36 AM12/12/09
to
1. Does your system have USB?
2. Does your system have 3.0 or 4.0? (if you are using VS2005 then you have
NETMF 2.5)
If you answer no to any of the above then you can't use USB to communicate
with a PC. You need to upgrade to a newer system.

By the way, GHI adds a "USB Device Builder" to its NETMF implementation.
Through this feature you can build a USB device is seconds, with no need for
USB knowledge! An example on creating CDC device (virtual serial port using
USB) is included in our SDK. Once you have this "virtual serial port" then
you can communicate between your PC C# application and the NETMF device
(embedded master) using a simple serial port API

GHI Team
www.ghielectronics.com

"Bleary Eye" <Blea...@discussions.microsoft.com> wrote in message

news:F7BA574E-FE68-4267...@microsoft.com...

Bleary Eye

unread,
Dec 12, 2009, 1:50:01 PM12/12/09
to
We're working with the Imote2, which has USB. The PC of course also has USB.

We've just completed the Imote2 port to 4.0, so we're up to date (and using
VS2008, of course).

Would your USB Device Builder apply to our mote?

GHI Team

unread,
Dec 13, 2009, 1:24:44 AM12/13/09
to
With USB and 4.0 you should be able to communicate with a PC using USB. You
will need some knowledge of USB classes and windows USB drivers....and need
a USB VID/PID
Our device builder is exclusive to our products only.

GHI Team
www.ghielectronics.com

"Bleary Eye" <Blea...@discussions.microsoft.com> wrote in message

news:2C0E751E-2BD5-41EF...@microsoft.com...

Jan Kučera

unread,
Dec 13, 2009, 3:14:02 PM12/13/09
to
Devices over USB can implement several classes. CDC (virtual serial port),
suggested by GHI, is one of them, and likely the right one for your
application.

I don't know how much of knowledge do you have about the drivers part on
Windows, but they exist some general drivers and layers. Just search for C#
USB or something like this, if you are running managed code on the PC.

You will need to create a device descriptor compatible with the driver, and
either set it from MF code or upload using MFDeploy. Unfortunately I don't
have any particular example on generic data transfer between PC and MF
device, this usually comes with the driver/wrapper.

Jan

"Bleary Eye" <Blea...@discussions.microsoft.com> wrote in message

news:F7BA574E-FE68-4267...@microsoft.com...

Martin Welford

unread,
Dec 16, 2009, 2:11:02 PM12/16/09
to
GuruCE have a blog post that may help:

http://guruce.com/blogpost/communicating-with-your-microframework-application-over-usb


"Jan Kučera" <kuc...@lupacovka.cz> wrote in message
news:O1fPUDDf...@TK2MSFTNGP04.phx.gbl...

edgarsantos

unread,
May 10, 2010, 1:09:41 PM5/10/10
to
I'm also trying to port .Net Micro Framework 4.0 to Imote2 cause i need some of the security features such as the crypto library. Right now i'm using the "template" found in the micro framework porting kit and Code Sourcery G++.

Could you please give me some guidelines on how to compile the framework to Imote2?

Thanks in advance...

Bleary Eye wrote:

We're working with the Imote2, which has USB. The PC of course also has USB.

12-Dec-09

We're working with the Imote2, which has USB. The PC of course also has USB.

We've just completed the Imote2 port to 4.0, so we are up to date (and using
VS2008, of course).

Would your USB Device Builder apply to our mote?

"GHI Team" wrote:

Previous Posts In This Thread:

On Tuesday, December 08, 2009 8:50 PM
Bleary Eye wrote:

Using USB to interact with host


In 4.0, can I use USB to interact with the host? For example, I'd like to be
able to send the mote a request for status information, and to have that
returned, via USB.

On Wednesday, December 09, 2009 4:59 AM
Jan_Kucera wrote:

There were no changes regarding USB in 4.
There were no changes regarding USB in 4.0, only USB device is officially
supported, which means you can talk to a host.
However, no all device classes can be realized with current setup. Are you
implementing both sides, or do you know what class do you need to talk to?

Jan

On Friday, December 11, 2009 6:07 PM
Bleary Eye wrote:

I am not sure what you mean. I am using the Imote2.
I am not sure what you mean. I am using the Imote2. I'd like to be able to have
two way communication via the usb port with the PC host that is running a C#


program. If this is possible, are there any examples?

--Bill

"Jan Ku??era" wrote:

On Saturday, December 12, 2009 6:10 AM
GHI Team wrote:

1. Does your system have USB?2. Does your system have 3.0 or 4.0?


1. Does your system have USB?
2. Does your system have 3.0 or 4.0? (if you are using VS2005 then you have
NETMF 2.5)

If you answer no to any of the above then you cannot use USB to communicate


with a PC. You need to upgrade to a newer system.

By the way, GHI adds a "USB Device Builder" to its NETMF implementation.
Through this feature you can build a USB device is seconds, with no need for
USB knowledge! An example on creating CDC device (virtual serial port using
USB) is included in our SDK. Once you have this "virtual serial port" then
you can communicate between your PC C# application and the NETMF device
(embedded master) using a simple serial port API

GHI Team
www.ghielectronics.com

On Saturday, December 12, 2009 1:50 PM
Bleary Eye wrote:

We're working with the Imote2, which has USB. The PC of course also has USB.
We're working with the Imote2, which has USB. The PC of course also has USB.

We've just completed the Imote2 port to 4.0, so we are up to date (and using
VS2008, of course).

Would your USB Device Builder apply to our mote?

"GHI Team" wrote:

On Sunday, December 13, 2009 1:24 AM
GHI Team wrote:

With USB and 4.0 you should be able to communicate with a PC using USB.
With USB and 4.0 you should be able to communicate with a PC using USB. You
will need some knowledge of USB classes and windows USB drivers....and need
a USB VID/PID
Our device builder is exclusive to our products only.

GHI Team
www.ghielectronics.com

On Sunday, December 13, 2009 3:14 PM
Jan_Kucera wrote:

Devices over USB can implement several classes.
Devices over USB can implement several classes. CDC (virtual serial port),
suggested by GHI, is one of them, and likely the right one for your
application.

I do not know how much of knowledge do you have about the drivers part on


Windows, but they exist some general drivers and layers. Just search for C#
USB or something like this, if you are running managed code on the PC.

You will need to create a device descriptor compatible with the driver, and

either set it from MF code or upload using MFDeploy. Unfortunately I do not


have any particular example on generic data transfer between PC and MF
device, this usually comes with the driver/wrapper.

Jan

On Wednesday, December 16, 2009 2:11 PM
Martin Welford wrote:

GuruCE have a blog post that may help:http://guruce.
GuruCE have a blog post that may help:

http://guruce.com/blogpost/communicating-with-your-microframework-application-over-usb


Submitted via EggHeadCafe - Software Developer Portal of Choice
Server Side Processing in ADO.NET/WCF Data Services
http://www.eggheadcafe.com/tutorials/aspnet/db179aed-47fa-4f86-a4bf-4f6f92a76585/server-side-processing-in.aspx

Lorenzo Tessiore

unread,
May 10, 2010, 7:16:01 PM5/10/10
to
Hello,

the crypto library is available on all ARM processors.
Anyway, compilation for teh iMOTE2 works as for any other platform.
After setting the environment with setenv_xxx.cmd, one can use the command
"msbuild solutions\MOTE2\dotnetmf.proj"

Thanks
Lorenzo

"Edgar Santos" wrote:

> .
>

Santos@discussions.microsoft.com Edgar Santos

unread,
May 13, 2010, 11:31:01 AM5/13/10
to
Your answer was really helpful!

Now that i have a built solution how do i flash it in iMOTE2?
The build process created to folders inside
"MicroFrameworkPK_v4_0\BuildOutput\ARM\GCC4.2\le\FLASH\debug\MOTE2", one
called "tinyclr.bin" and other called "tinyclr.hex". I suppose that the files
needed for deployment are the ones stored in "tinyclr.hex": ER_CONFIG
ER_CONFIG.sig ER_DAT ER_DAT.sig ER_FLASH ER_FLASH.sig and ER_IFLASH. However
how do i actually deploy the files to make the mote work with .Net Micro
Framework 4.0?

Edgar Santos

Lorenzo Tessiore

unread,
May 18, 2010, 7:26:01 PM5/18/10
to
You will need to read the PK documenation for that, but I can tell you that
teh HEX files are the S-records format of the bin file. The debugger file is
the AXF instead. If you have a debugger you can deploy a RAM build (built
with /p:memory=ram). If you have a flash tool of your own you can deploy a
flash build . If you deploy one of our booters onto the board first
(portbooterloader or better tinybooterdecompressor), then you can use
MFDeploy.

Most likely you will have to first use whatever natve debugger you have and
a RAM build or your current booter to deploy ours.


Regards
Lorenzo

khadijahshtayat

unread,
May 29, 2010, 5:16:37 AM5/29/10
to
I am using the Imote2 with .netMF 3.0.

I'd like to be able to have
two way communication via the USB port with the PC host that is running a C#

program. If this is possible, are there any examples?


Bleary Eye wrote:

I am not sure what you mean. I am using the Imote2.
11-Dec-09

I am not sure what you mean. I am using the Imote2. I'd like to be able to have
two way communication via the usb port with the PC host that is running a C#


program. If this is possible, are there any examples?

--Bill

"Jan Ku??era" wrote:

Previous Posts In This Thread:

On Tuesday, December 08, 2009 8:50 PM
Bleary Eye wrote:

Using USB to interact with host
In 4.0, can I use USB to interact with the host? For example, I'd like to be
able to send the mote a request for status information, and to have that
returned, via USB.

On Wednesday, December 09, 2009 4:59 AM

Jan_Kucera wrote:

There were no changes regarding USB in 4.
There were no changes regarding USB in 4.0, only USB device is officially
supported, which means you can talk to a host.
However, no all device classes can be realized with current setup. Are you
implementing both sides, or do you know what class do you need to talk to?

Jan

On Friday, December 11, 2009 6:07 PM
Bleary Eye wrote:

I am not sure what you mean. I am using the Imote2.

I am not sure what you mean. I am using the Imote2. I'd like to be able to have
two way communication via the usb port with the PC host that is running a C#


program. If this is possible, are there any examples?

--Bill

"Jan Ku??era" wrote:

GHI Team
www.ghielectronics.com

"GHI Team" wrote:

GHI Team
www.ghielectronics.com

Jan

http://guruce.com/blogpost/communicating-with-your-microframework-application-over-usb

On Monday, May 10, 2010 1:09 PM
Edgar Santos wrote:

Problems Porting Micro Framework 4.0


I'm also trying to port .Net Micro Framework 4.0 to Imote2 cause i need some of the security features such as the crypto library. Right now i'm using the "template" found in the micro framework porting kit and Code Sourcery G++.

Could you please give me some guidelines on how to compile the framework to Imote2?

Thanks in advance...


Submitted via EggHeadCafe - Software Developer Portal of Choice

Producer/Consumer Queue and BlockingCollection in C# 4.0
http://www.eggheadcafe.com/tutorials/aspnet/7d10d73c-321c-446e-8b6d-b81ee8d9b314/producerconsumer-queue-a.aspx

0 new messages