Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

Programming Netduino Mini over Firefly Bluetooth


  • Please log in to reply
5 replies to this topic

#1 mrcity

mrcity

    New Member

  • Members
  • Pip
  • 3 posts

Posted 03 March 2012 - 10:30 PM

Hi folks, I'm having problems communicating with the Netduino Mini -- in particular, Visual Studio .NET doesn't want to talk to it. My computer is hooked up via Bluetooth to a Firefly serial bluetooth adapter over COM10, and I'm hooking the Netduino TX & RX pins on COM1 (ports 1 & 2) to the RX & TX pins on the Firefly. I've been able to communicate with the Firefly to program its settings (115200 baud, 8 bits, 1 stop bit, no parity, DTE). I've also seen the boot sequence of the Netduino itself over RealTerm, but it never responds to any commands (does the initial program listen for any commands?). After boot, it's constantly sending signals over the wire such that the TX/RX status light is going crazy and RealTerm complains of a buffer overrun even at 115K. Now here's the kicker: I can use RealTerm to communicate OK with my Firefly (and the Netduino, I'm guessing, based on seeing the boot messages), but when I hit "Build & Deploy" on Visual Studio, it doesn't ever sync up. Ok, well I've gotten it to "work" twice in maybe 8 hours, but it doesn't seem to load the program and the debugger crashes. If I don't follow a very specific sequence of events, VS won't connect, and RealTerm will give me an "Apro exception" until I either unplug or completely reset the Firefly. Any suggestions? Thanks, Stephen

#2 hanzibal

hanzibal

    Advanced Member

  • Members
  • PipPipPip
  • 1287 posts
  • LocationSweden

Posted 06 March 2012 - 09:30 PM

Does programming using a wired RS232 connection work? A stupid question: Why do you want a Bluetooth <-> RS232 link for programming?

#3 mrcity

mrcity

    New Member

  • Members
  • Pip
  • 3 posts

Posted 07 March 2012 - 06:32 AM

I haven't tried a wired RS232 connection because all my computers are a little too modern to have that as a direct capability. I'm also too cheap to go & buy a USB->RS232 or FTDI cable. I guess the second best alternative would be to find my Arduino Duemilanove & try to use its FTDI capability -- the key word there is "find" it... ;) Or if the regular Netduino has an FTDI chip I could use to program the Mini, that'd be better. If I do get it to work over BT, then I'll definitely make an instructable. I'm suspecting the primary problem is with .NET because the serial communication through RealTerm looks OK, aside from all the nonsense sent after Netduino boot-up. Thanks!

#4 Bendage

Bendage

    Advanced Member

  • Members
  • PipPipPip
  • 153 posts
  • LocationIrvine, CA

Posted 14 March 2012 - 05:01 PM

I have successfully used a BT adapter with no problems. Have you been able to ping it and read the firmware with MF Deploy successfully?

#5 mrcity

mrcity

    New Member

  • Members
  • Pip
  • 3 posts

Posted 20 March 2012 - 04:39 AM

Hi Bendage, thanks for the reply and your hint. I got into MF Deploy and it sees the device OK. Here is the output from "Device Capabilities." HalSystemInfo.halVersion: 4.1.2821.0 0 HalSystemInfo.halVendorInfo: Netduino Mini by Secret Labs LLC 61 HalSystemInfo.oemCode: 34 0 HalSystemInfo.modelCode: 177 61 HalSystemInfo.skuCode: 4098 0 HalSystemInfo.moduleSerialNumber: 00000000000000000000000000000000 0 HalSystemInfo.systemSerialNumber: 0000000000000000 0 0 ClrInfo.clrVersion: 4.1.2821.0 0 ClrInfo.clrVendorInfo: Netduino Mini by Secret Labs LLC 0 ClrInfo.targetFrameworkVersion: 4.1.2821.0 127 0 SolutionReleaseInfo.solutionVersion: 4.1.0.5 127 SolutionReleaseInfo.solutionVendorInfo: Netduino Mini by Secret Labs LLC 0 72 SoftwareVersion.BuildDate: Nov 7 2010 0 72 SoftwareVersion.CompilerVersion: 400771 0 FloatingPoint: True 72 SourceLevelDebugging: True 0 ThreadCreateEx: True 72 0 LCD.Width: 0 76 0 LCD.Height: 0 76 LCD.BitsPerPixel: 0 0 AppDomains: True 51 ExceptionFilters: True 0 IncrementalDeployment: True 51 SoftReboot: True 0 Profiling: False 0 0 ProfilingAllocations: False 0 ProfilingCalls: False 50 IsUnknown: False At times when I'm not interacting with the Mini, it spits out a bunch of extraneous output as such: Buffer OVFLW Buffer OVFLW Buffer OVFLW 61 61 0 0 MSdbgV1<nul><c6><c1><vt><f0>QA6y<soh><nul><nul><nul>L% Buffer OVFLW Buffer OVFLW I've verified that all my devices are communicating over 115200 bps, 8 data bits, no parity, 1 stop bit, and no flow control. Based on how I'm actually seeing legible text, the communication channels seem to be set correctly. Perhaps I'll just update or completely reflash the firmware. Thanks, Stephen

#6 Bendage

Bendage

    Advanced Member

  • Members
  • PipPipPip
  • 153 posts
  • LocationIrvine, CA

Posted 20 March 2012 - 07:49 PM

Based on your symptoms it has always been the case in the past that a locked up app running on the board does not allow VS to respond to it. Have you erased the current app on the mini and replaced it with a simple non thread locking app just to test a simple deployment? When all else fails I just kill the board and reinstall from the bootloader.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.