All your FreeWave HTplus transceivers are belong(ed) to us
FreeWave Technologies Inc. sales some 900 MHz wireless data transceivers which are specified to work in a distance of up to 40 miles with a clear line of sight.
By following the installation guide, you only need to perform some basic configuration (IP address, radio channels, encryption ...), attach an antenna, connect a computer each site - and everything should work.
Three month ago, one of my new HTplus/HT devices just did not accept its IP configuration made via the serial port setup connection. No matter which IP had been set up, the box did not answer to HTTP request to its web front end over Ethernet.
After some useless calls of the FreeWave support I took a look at their firmware image which is provided for updating from older firmware releases. (You will find it in the customer support section of their homepage. Just ask FreeWave for a login.)
The firmware contains all partitions for the radio transceiver. To access the root partition, simply rename the file to firmware.gz and gunzip it. Afterwards, use your favored editor to open the file. Search for "-rom1" and remove everything before this text.
Now you can mount romfs image by mount -t romfs -o loop firmware /mnt
Now, apart from finding a BusyBox Linux in your local /mnt, it has been discovered that the serial configuration interface of the HTplus is performed through the program bin/fwSETUP. In this program you could see some interesting lines:
Enter Password: ^@J0rdan,Fu3rst1!^@r^@/mnt/webpassword^@
HELLO MASTER JORDAN^M ^@^M 1) Enter Radio Setup^@^M 2) Switch Images^@^M 3) System Console^@^M Esc) Exit^@^MFirst, this leads to the correct assumption, that a guy (probably Jordan) implemented the secret master password "J0rdan,Fu3rst1!". Second, there seems to be a hidden setup menu which offers a terminal to the Linux system (key 'B' by manual trying).
Finally, the reason for the HTplus device to not properly configuring its Ethernet interface was caused by a broken config.xml somewhere in /var. By copying the default file from /etc/config.xml to this location the problem was solved.
Unfortunately, FreeWave removed the master password and the hidden setup menu in firmware version 2.11. Now you have either to get an older firmware or you have to patch the most recent one in order to get access to the running Linux system.
Note to self: Contact FreeWave asking for the source code since BusyBox is GPL.
link (0 Kommentare) ... comment
Thema: whack
How to create several instances of one message driven bean with different configurations
Starting with EJB 3.0 you can write Message Driven Beans using Java 1.5 annotations without having to write an XML deployment descriptor file, e.g.:
@MessageDriven(activationConfig = {
@ActivationConfigProperty(propertyName = "destinationType",
propertyValue = "javax.jms.Topic"),
@ActivationConfigProperty(propertyName = "destination",
propertyValue = "JMS/Topic"),
@ActivationConfigProperty(propertyName = "messageSelector",
propertyValue = "example = 'TestValue'"),
@ActivationConfigProperty(propertyName = "acknowledgeMode",
propertyValue = "Auto-acknowledge"),
@ActivationConfigProperty(propertyName = "subscriptionDurability",
propertyValue = "Durable"),
@ActivationConfigProperty(propertyName = "clientId",
propertyValue = "ExampleBean"),
@ActivationConfigProperty(propertyName = "subscriptionName",
propertyValue = "ExampleBean")
})
public class ExampleBean implements MessageListener {
// ...
}
You can create several instances of the same Bean class, e.g. to have several instances for different message selectors or to listen on more than one Topic. To achieve this, move the properties out of the annotations and put them into an XML deployment descriptor.
The class file reduces to:
@MessageDriven
public class ExampleBean implements MessageListener {
// ...
}
Now create a file ejb-jar.xml (“New ► Standard Deployment Descriptor” in Netbeans). It has to end up in the META-INF/ directory in the deployment .jar file (Netbeans automatically creates ant rules for this).
The outer frame is:
<?xml version="1.0" encoding="UTF-8"?>
<ejb-jar xmlns = "http://java.sun.com/xml/ns/javaee"
version = "3.0"
xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation = "http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd">
<enterprise-beans>
</enterprise-beans>
</ejb-jar>
Inside the <enterprise-beans> tag, for each Bean instance create one <message-driven> section:
<message-driven>
<ejb-name>AnotherExampleBean</ejb-name>
<ejb-class>package.path.to.ExampleBean</ejb-class>
<transaction-type>Container</transaction-type>
<activation-config>
</activation-config>
</message-driven>
Gotcha
You can choose the <ejb-name> for the instances freely, but one of the instances must be called exactly like the Bean class (ExampleBean in the example).
Inside <activation-config>, for each of the properties in the annotations above (destinationType etc.) create an <activation-config-property>:
<activation-config-property>
<activation-config-property-name>destinationType</activation-config-property-name>
<activation-config-property-value>JMS/Topic</activation-config-property-value>
</activation-config-property>
link (0 Kommentare) ... comment
Thema: EJB3