Smart, Scriptable Bluetooth RN4020 almost ready

Smart, Scriptable Bluetooth RN4020 almost ready

Postby Tom Maier » Thu Jul 03, 2014 7:12 pm

The microchip RN4020 bluetooth module is still not released, and the latest news is that it will be available Sept. 25th.

The module has an embedded bluetooth stack and can be controlled either from an external micro with rs232 serial, or by internal scripting.

Here's the only document I could find that shows anything about the scripting. The setup commands are well documented, but only brief mention of the scripting. I'm sure more app notes are being written now.
http://ww1.microchip.com/downloads/en/D ... 05191A.pdf

And the datasheet, that doesn't mention scripting at all.
http://ww1.microchip.com/downloads/en/D ... 02279A.pdf

Digikey has created a slot for the product ($10.60), but no stock till september...
http://www.digikey.com/product-search/e ... rds=rn4020

The module has scriptable i/o pins and adc inputs, and can be programmed through the loading of scripts via the rs232 port. Sounds interesting.
User avatar
Tom Maier
Verified identity
 
Posts: 179
Joined: Mon May 26, 2014 2:37 pm
PIC experience: Professional 5+ years with MCHP products

Re: Smart, Scriptable Bluetooth RN4020 almost ready

Postby jtemples » Thu Jul 03, 2014 7:26 pm

I wouldn't even consider anything from their Roving Networks line after my experience with their Wi-Fi module.

And while it might be appealing for hobbyists, $10 will get you five 256KB ARMs with on-board BLE radios and no restrictions on what you can do imposed by a scripting language. Granted, it doesn't have an internal antenna.
jtemples
Verified identity
 
Posts: 168
Joined: Sun May 25, 2014 2:23 am
Location: The 805
PIC experience: Professional 5+ years with MCHP products

Re: Smart, Scriptable Bluetooth RN4020 almost ready

Postby Tom Maier » Thu Jul 03, 2014 7:36 pm

An arm module with bluetooth?

I have limited experience with RF data transmission. Show me what you are talking about?

Also, what tools are available for the arm? I tried to do arm with free tooltchains and it was a nightmare (but that was a few years ago).

I designed an RF keyboard with very simple transmitters and recievers about 15 years ago, and I used my own, home-made packet protocol. That's about it... my total experience. I was thinking I should try something new.
User avatar
Tom Maier
Verified identity
 
Posts: 179
Joined: Mon May 26, 2014 2:37 pm
PIC experience: Professional 5+ years with MCHP products

Re: Smart, Scriptable Bluetooth RN4020 almost ready

Postby jtemples » Thu Jul 03, 2014 7:47 pm

A processor, not a module:

http://www.nordicsemi.com/eng/Products/ ... y/nRF51822

It's an incredibly feature-rich chip for the price.

They have various dev boards available in the US$100 range.

It supports a free version of the Keil tools if you like IDEs (it has a 32KB code limit, which doesn't sound like much, but real applications are typically half that size). That's the easiest way to get started. And there is support for GCC optionally with Eclipse if you prefer the open source route. Note there's no Linux support for Keil.
jtemples
Verified identity
 
Posts: 168
Joined: Sun May 25, 2014 2:23 am
Location: The 805
PIC experience: Professional 5+ years with MCHP products

Re: Smart, Scriptable Bluetooth RN4020 almost ready

Postby HallMark » Thu Jul 24, 2014 7:18 am

jtemples wrote:I wouldn't even consider anything from their Roving Networks line after my experience with their Wi-Fi module.

And while it might be appealing for hobbyists, $10 will get you five 256KB ARMs with on-board BLE radios and no restrictions on what you can do imposed by a scripting language. Granted, it doesn't have an internal antenna.

I second you jtemples,
If you want to use Microchip bluetooth then use their own not from roving line. And if you are a roving fan then you may like to visit this http://www.ack.me/ :)
HallMark
 
Posts: 19
Joined: Mon Jun 30, 2014 12:11 pm

Re: Smart, Scriptable Bluetooth RN4020 almost ready

Postby Tom Maier » Thu Jul 24, 2014 1:42 pm

For a quick-turn-around, low volume project it looks like an easy way to go. The stack is in the bluetooth device, so you can use a pic10 if you want to. Hard to get the bluetooth stack in a pic10.

I'm hearing some disparaging tones about "Roving Networks". Does anybody have any war stories about them?
User avatar
Tom Maier
Verified identity
 
Posts: 179
Joined: Mon May 26, 2014 2:37 pm
PIC experience: Professional 5+ years with MCHP products

Re: Smart, Scriptable Bluetooth RN4020 almost ready

Postby jtemples » Thu Jul 24, 2014 7:42 pm

We recently did a project that required talkig to a PIC via Wi-Fi. The RN171 fit the bill nicely, and acted as a serial pass-through access point "out of the box", without having to write a bunch of code on the PIC to configure it. The price of the RN171 is high, but it was a low-volume product.

I fired it up and it worked great -- for about 20 minutes. It would then just stop talking to the connected Wi-Fi client. This behavior was repeatable.

I found out there was a firmware update available (the module was running V2.XX, so you would have thought that was reasonably mature) and went to install that. It turns out the only way to install a firmware update is by connecting the module to a Wi-Fi network that's on the Internet, and issuing commands to the module over its serial port to have it download the firwmare image from a Microchip FTP server.

Since the module was on a board and its serial lines were connected to the PIC, it required tacking wires on the module and connecting it to an RS-232 converter. The upgrading itself went easily enough, but the module no longer worked as an access point after the upgrade. It turns out that the factory defaults are bad after an upgrade, so I had to go through and manually restore a bunch of settings. This was something like a two hour process.

On a positive note, the module seems to be working correctly after the firmware upgrade. But it hasn't been out in the real world yet.
jtemples
Verified identity
 
Posts: 168
Joined: Sun May 25, 2014 2:23 am
Location: The 805
PIC experience: Professional 5+ years with MCHP products

Re: Smart, Scriptable Bluetooth RN4020 almost ready

Postby jtemples » Sat Aug 16, 2014 5:12 am

I had to upgrade the firmware of another one of these modules today, and it didn't go so smoothly. The upgrade kept failing with watchdog timer errors. I had seen these before, but retrying a couple of times would get past them. But after six or seven tries, I started getting

ERR-2Big

That error was not in the manual, and only gave a handful of Google hits that weren't relevant. It turned out that each upgrade that failed due to a watchdog timeout left temporary files in the onboard flash that filled the flash after enough retries.

It required going through the flash and deleting temporary files, and repeating the process after each failed upgrade to finally get there.
jtemples
Verified identity
 
Posts: 168
Joined: Sun May 25, 2014 2:23 am
Location: The 805
PIC experience: Professional 5+ years with MCHP products

Re: Smart, Scriptable Bluetooth RN4020 almost ready

Postby jtemples » Sat Aug 30, 2014 4:44 am

Today's fun was figuring out why a TCP connection was disconnecting on its own. The manual had conflicting documentation: in a few places, it said the idle timer defaulted to 0 (off), and in a few other places it said it defaulted to 5 minutes. It turned out they were both right. With the idle timer set to 0, the connection was dropped after 5 minutes of idle time.
jtemples
Verified identity
 
Posts: 168
Joined: Sun May 25, 2014 2:23 am
Location: The 805
PIC experience: Professional 5+ years with MCHP products


Return to Zigbee and wireless topics

Who is online

Users browsing this forum: No registered users and 0 guests