Wixel as Wireless Programmer for BS2 or Propeller

Support and community forum for the Wixel Programmable USB Wireless Module.

Wixel as Wireless Programmer for BS2 or Propeller

Postby Martin_H » Sat Apr 07, 2012 7:50 am

Hi, I searched the forum but didn't see an answer to this. Has anyone tried using a Wixel pair as wireless programmer for the BS2 OEM or Propeller? In reading the forum it looks like Wixels work as a serial programmer for the Arduino which uses Tx, Rx, and RTS just like the Parallax chips. BlueWolf sells something called the FlashFly which can do this for the BS2, so I know it is possible. But I use the BS2e OEM which uses TTL serial communication and the FlashFly assumes an RS232 port, so it's much more than I need.

A quick about me. I'm a user of Pololu gear (servos, sensors, stepper controllers, wheels, etc) since 2010 and a lurker in this form since that time. I'm usually over in the Parallax forum because I tend to use the BS2e or Propeller chip as controllers rather than an Orangutan or Arduino. My interests are mostly home brewed robots, but I occasionally branch out into things like LED marquees or a Pinewood Derby race timer. The Pinewood Derby race timer used the Arduino, so I'm familiar with that controller too.
Martin_H
 
Posts: 24
Joined: Sat Apr 07, 2012 7:17 am

Re: Wixel as Wireless Programmer for BS2 or Propeller

Postby DavidEGrayson » Tue Apr 10, 2012 11:45 am

Hello, Martin.

A while we ago we looked into programming a basic stamp wirelessly but unfortunately were unable to get it working. The main problem was that there was a bug in the Windows USB-to-serial driver usbser.sys and the Parallax software didn't implement a workaround for it. Specifically, if the software changes the value of the RTS control line for the virtual COM port, the driver doesn't actually send that new value to the Wixel right away. Instead it waits until the next time DTR is changed by the software. This causes the "loopback" detection feature of the BASIC Stamp Editor program to fail. I know there is some workaround to this because the problem doesn't happen if you control the COM port's RTS line using the .NET SerialPort class, but to implement that workaround would require changing the Parallax software.

There might have been some other issue with the Send Break command, but we don't remember.

--David
DavidEGrayson
Pololu Employee
 
Posts: 2717
Joined: Thu Apr 03, 2008 12:30 pm
Location: Las Vegas, NV

Re: Wixel as Wireless Programmer for BS2 or Propeller

Postby Martin_H » Tue Apr 10, 2012 6:56 pm

Thanks for taking the time to answer.

Given that Wixels are a TI microcontroller with 29kb flash, 4kb ram, usb, and radio on a single chip it might be possible to write an app for them that buffers the whole download while pretending to be the stamp, sends it over the air, and then uploads it onto the stamp while pretending to be the IDE. The problem is that Pololu and Parallax likely have bigger fish to fry.
Martin_H
 
Posts: 24
Joined: Sat Apr 07, 2012 7:17 am

Re: Wixel as Wireless Programmer for BS2 or Propeller

Postby paul » Tue Apr 10, 2012 8:40 pm

Hello Martin,

As David said, the problem is not with the Wixel App, and it has nothing to do with wireless - there is a bug in the Microsoft driver. Either that needs to get fixed or Parallax needs to implement the workaround in their software. As far as I can tell, there is really nothing we can do short of writing our own serial port driver to replace the Microsoft one.

-Paul
User avatar
paul
Pololu Employee
 
Posts: 1490
Joined: Sun Nov 30, 2003 12:06 am
Location: Las Vegas, NV

Re: Wixel as Wireless Programmer for BS2 or Propeller

Postby Martin_H » Wed Apr 11, 2012 6:08 am

I understand what you are saying and I posted this information over at the Parallax forum. What doesn't quite add up is that the FTDI USB to serial cable works with the Stamp IDE. So that driver must work around the usbser.sys DTR problem while the native MS binary coupled with the Wixel does not.

My last post was an idle speculation that you probably cobble something together using an FTDI and a Wixel with a custom app that might work. Something like this:

FTDI USB Serial Port->Wixel via its TTL interface->Radio link->Wixel->MAX232->BS2

The FTDI driver would solve the Stamp IDE to to virtual COM port, so on the PC side you essentially bypass the Wixel's built in USB and use its TTL interface. But I imagine your serial port driver isn't set up for this which is why I figure custom coding would be required.

Update: If I used UART-to-Radio mode on both Wixels then this might work.
Martin_H
 
Posts: 24
Joined: Sat Apr 07, 2012 7:17 am

Re: Wixel as Wireless Programmer for BS2 or Propeller

Postby DavidEGrayson » Wed Apr 11, 2012 10:31 am

The FTDI chips have their own driver, ftdibus.sys, so they don't use usbser.sys and are not subject to its bugs.

Martin_H wrote:FTDI USB Serial Port->Wixel via its TTL interface->Radio link->Wixel->MAX232->BS2


Yes, this might work. You might be able to do it with the standard Wireless Serial app, configured to be in UART-to-Radio mode. If the Send Break command is needed then that feature would need to be added to the app.

--David
DavidEGrayson
Pololu Employee
 
Posts: 2717
Joined: Thu Apr 03, 2008 12:30 pm
Location: Las Vegas, NV

Re: Wixel as Wireless Programmer for BS2 or Propeller

Postby Martin_H » Wed Apr 11, 2012 11:02 am

Great, I'll order a pair and give it a try. If it doesn't work I can always find a use for them.
Martin_H
 
Posts: 24
Joined: Sat Apr 07, 2012 7:17 am

Re: Wixel as Wireless Programmer for BS2 or Propeller

Postby Martin_H » Tue Apr 17, 2012 6:57 pm

I have the Wixels and installed wireless-serial-v1.3-shield.wxl on both of them, and I've been able to wirelessly program an Arduino using the shield. So they've already filled a niche and I'm happy with them.

My next step is to try them with a Propeller chip since that is a 3.3v device and likely the simplest next step. When I only have Tx and Rx connected from the Wixel to the Propeller chip I'm able to send and receive data at 115,200. Great this is pretty useful .

However I hit a snag once I connect P0_0 (the Arduino is held reset while this pin is high). However the Propeller chip is exactly the other way around. Its reset is active low, so connecting this line holds the Propeller in reset.

So my question is if I use wireless-serial-v1.3.wxl can I configure the app so the sense of P0_0 is inverted or will that require custom coding for the serial app? I suppose I could stick an inverter in the circuit for testing, but that's a kludge.
Martin_H
 
Posts: 24
Joined: Sat Apr 07, 2012 7:17 am

Re: Wixel as Wireless Programmer for BS2 or Propeller

Postby DavidEGrayson » Tue Apr 17, 2012 8:28 pm

You could try using the plain Wireless Serial App instead of the shield version. This has more configuration parameters that you can set in the Wixel Configuration Utility. You could map inverted DTR or non-inverted DTR to one of the Wixel's pins and this might work for you, depending on what your software does with that control signal.

If not, you should be able to easily modify the wireless serial app to do what you want.

--David
DavidEGrayson
Pololu Employee
 
Posts: 2717
Joined: Thu Apr 03, 2008 12:30 pm
Location: Las Vegas, NV

Re: Wixel as Wireless Programmer for BS2 or Propeller

Postby Martin_H » Wed Apr 18, 2012 5:56 pm

Thanks for your help. I was able to get the Wixel programming the Propeller chip with the addition of a 0.1 uF capacitor on the arduino dtr line. That caused the line to pulse low which works with the propeller chip. In case anyone wants to see here's a video of it in action

http://www.youtube.com/watch?feature=pl ... Jv5J-tOfNU

I'm going to try the BS2 next as I think I have some ideas on how to get that working.
Martin_H
 
Posts: 24
Joined: Sat Apr 07, 2012 7:17 am

Re: Wixel as Wireless Programmer for BS2 or Propeller

Postby DavidEGrayson » Thu Apr 19, 2012 11:33 am

Great! I'm glad you got that working, and thanks for sharing it with us. --David
DavidEGrayson
Pololu Employee
 
Posts: 2717
Joined: Thu Apr 03, 2008 12:30 pm
Location: Las Vegas, NV

Re: Wixel as Wireless Programmer for BS2 or Propeller

Postby NeXT-Generation » Fri Apr 20, 2012 7:59 pm

Martin_H wrote:Thanks for your help. I was able to get the Wixel programming the Propeller chip with the addition of a 0.1 uF capacitor on the arduino dtr line. That caused the line to pulse low which works with the propeller chip. In case anyone wants to see here's a video of it in action

http://www.youtube.com/watch?feature=pl ... Jv5J-tOfNU

I'm going to try the BS2 next as I think I have some ideas on how to get that working.


Great! Can't wait to see it!
NeXT-Generation
 
Posts: 18
Joined: Sun Feb 19, 2012 6:41 pm


Return to Wixel

Who is online

Users browsing this forum: No registered users and 1 guest