Hello all
Does anyone have experience with downloading applications to zx in the field via a remote connection?
I have a zx hooked up to ublox g100 gsm and have established 2way data connection. Is it possible to update the firmware on the zx via this connection if needed?
Cheers
Ben
Field firmware update via GSM
As Tom suggests, it should be the same as any other wireless communication channel. Almost certainly, you'll have to use the "ATN character" method of getting the ZBasic device into command mode (or use ZXCmdMode() as Tom suggested). Once the device is in command mode, the rest of the downloading procedure is the same as if DTR were used. One issue that might arise is if there are long delays in the command/response interaction between the downloader (IDE or otherwise) and the device.
- Don Kinzer
Here's how I do it...
Field device sends heartbeat via Internet to server. Server must respond. Hearbeat is an application IP packet sent via TCP or UDP.
To do an update, the server intentionally stops responding to heartbeats. After a while, the field device says - no heartbeats, so I'll reboot myself. During the reboot, it asks the server if there's a new version of firmware available. If so, that gets downloaded and installed.
This is to avoid having the field device accept an inward TCP connection or port-forwarded UDP, due to firewall rules at field sites. No inward connections permitted. And in LTE, some carriers (like Verizon) are double-NATing now so you can't run a server accepting connections in the field - field device must initiate all connections (and I use passive mode FTP to cope with that). The double-NAt winds up with a net 10 address on the client side. No public IP. Unless you pay $$$ for a static public IP.
Though I do this via a field device with an Ethernet NIC (WizNet 812), one could do the same idea using a serial-to-ethernet black box and go into the microprocessor via serial. But the serial to ethernet box has the same firewall issues - and cellular double-NAT issue.
Too much to detail here, I also devised a way to do the firmware download and update even though the device's RAM is not large enough to store the new version of firmware. I did an update in place scheme, writing the flash on the fly, using a variation on a bootloader. Includes error recovery scheme in case firmware update aborted early.
Been running this for most of a year at about 100 sites. Some use cellular data (EV-DO and IP), and some use a wired connection.
Field device sends heartbeat via Internet to server. Server must respond. Hearbeat is an application IP packet sent via TCP or UDP.
To do an update, the server intentionally stops responding to heartbeats. After a while, the field device says - no heartbeats, so I'll reboot myself. During the reboot, it asks the server if there's a new version of firmware available. If so, that gets downloaded and installed.
This is to avoid having the field device accept an inward TCP connection or port-forwarded UDP, due to firewall rules at field sites. No inward connections permitted. And in LTE, some carriers (like Verizon) are double-NATing now so you can't run a server accepting connections in the field - field device must initiate all connections (and I use passive mode FTP to cope with that). The double-NAt winds up with a net 10 address on the client side. No public IP. Unless you pay $$$ for a static public IP.
Though I do this via a field device with an Ethernet NIC (WizNet 812), one could do the same idea using a serial-to-ethernet black box and go into the microprocessor via serial. But the serial to ethernet box has the same firewall issues - and cellular double-NAT issue.
Too much to detail here, I also devised a way to do the firmware download and update even though the device's RAM is not large enough to store the new version of firmware. I did an update in place scheme, writing the flash on the fly, using a variation on a bootloader. Includes error recovery scheme in case firmware update aborted early.
Been running this for most of a year at about 100 sites. Some use cellular data (EV-DO and IP), and some use a wired connection.