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

RedBearLab Bluetooth BLE Mini

netduino bluetooth

Best Answer tomasmcguinness, 20 September 2013 - 11:03 AM

Mark, I updated the firmware on the BLE mini and it's working okay now! Might have been an iOS 7 related issue. Thx. Go to the full post


  • Please log in to reply
3 replies to this topic

#1 tomasmcguinness

tomasmcguinness

    New Member

  • Members
  • Pip
  • 3 posts

Posted 18 September 2013 - 03:34 PM

Hello, I recently purchased a Bluetooth module from RedBearLabs and hooked it up to COM2 on my Netduino. I can successfully send data from the Netduino to an iOS app, but I cannot receive any data. I've set up a SerialPort, set the baud to 57600 as recommended and subscribed to the DataReceived event on the SerialPort. It opens successfully and as I've mentioned, I can send data. SerialPort sp = new SerialPort("COM1"); sp.BaudRate = 57600; sp.Handshake = Handshake.None; sp.DataReceived += new SerialDataReceivedEventHandler(sp_DataReceived); sp.Open(); Thread.Sleep(Timeout.Infinite); Is there anything else I need to think about on the receiving side? Thanks, Tom

#2 Nevyn

Nevyn

    Advanced Member

  • Members
  • PipPipPip
  • 1072 posts
  • LocationNorth Yorkshire, UK

Posted 19 September 2013 - 05:42 AM

Not sure which version of the firmware you have on the Netduino but there was a bug in older versions where the event handler would not fire if the handler was wired up before the port was opened.  So first thing I'd try is to swap the order of the sp.DataReceived and sp.Open statements.

 

Do you have access to a logic analyser or a scope?  If you do then can you check if there is any data going out on to the serial bus.

 

If no data is going over the bus then it suggests the problem is with the iOS app although I found RedBear's library really simple to use.

 

Regards,

Mark


To be or not to be = 0xFF

 

Blogging about Netduino, .NET, STM8S and STM32 and generally waffling on about life

Follow @nevynuk on Twitter


#3 tomasmcguinness

tomasmcguinness

    New Member

  • Members
  • Pip
  • 3 posts

Posted 20 September 2013 - 08:33 AM

Mark, Thanks for the reply. I tried the reversing the code, but that hasn't had any effect. I updated my Netduino to version 4.2, to be sure it wasn't firmware related, but still no luck. The Netduino can send a byte to iOS, but not the other way around. I don't have a scope, so I'm unable to test the output on the pins themselves. I'll have another look through my iOS code. Thanks, Tom

#4 tomasmcguinness

tomasmcguinness

    New Member

  • Members
  • Pip
  • 3 posts

Posted 20 September 2013 - 11:03 AM   Best Answer

Mark, I updated the firmware on the BLE mini and it's working okay now! Might have been an iOS 7 related issue. Thx.





Also tagged with one or more of these keywords: netduino, bluetooth

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.