baxter's Content - Netduino Forums - Page 3
   
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.

baxter's Content

There have been 63 items by baxter (Search limited from 30-March 23)


By content type

See this member's


Sort by                Order  

#58961 Spark Core (TI CC3000) Porting for Super WiFI Mini?

Posted by baxter on 30 June 2014 - 05:34 PM in Netduino Mini

Yes, piwi ...




#58954 How do I connect Netduino+ to a pc wireless?

Posted by baxter on 30 June 2014 - 05:44 AM in Netduino Plus 2 (and Netduino Plus 1)

rickggaribay, sorry for the problems. Networking can be frustrating at times. I googled for the Vonets and it seems that there are problems in setting it up. The fact that it needs software for setup and is using WinPCap means that this is totally different from the Edimax approach which requires no installation software.

 

I just hooked up an Edimax that is established on my network with an IP address of 192.168.0.4 to a Netduino Plus 2 that is not running any network related code. I then went to MFdeploy and set the Plus 2 network parameters:
Static IP address: 192.168.0.50
Subnet Mask: 255.255.255.0
Default Gateway: 192.168.0.1
MAC Address: 5c-86-4a-00-50-0f
DNS Primary Address: 8.8.8.8
DNS Primary Address: 8.8.4.4
DHCP: unchecked

The router has a DHCP range of 100-200. I then opened a command prompt and pinged 192.168.0.50 followed by arp -a with the result:

Pinging 192.168.0.50 with 32 bytes of data:
Reply from 192.168.0.50: bytes=32 time=45ms TTL=255
Reply from 192.168.0.50: bytes=32 time=2ms TTL=255
Reply from 192.168.0.50: bytes=32 time=2ms TTL=255
Reply from 192.168.0.50: bytes=32 time=2ms TTL=255

Ping statistics for 192.168.0.50:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss)
Approximate round trip times in milli-seconds:
    Minimum = 2ms, Maximum = 45ms, Average = 12ms

C:\Users\beb\Desktop>arp -a

Interface: 192.168.0.175 --- 0xb <--- desktop PC hardwired ethernet
  Internet Address      Physical Address      Type
  192.168.0.1           98-fc-11-6e-6a-40     dynamic
  192.168.0.4           80-1f-02-19-25-98     dynamic <--- Edimax
  192.168.0.50          80-1f-02-19-25-98     dynamic <--- Netduino Plus 2
  192.168.0.104         98-4b-e1-55-78-d6     dynamic
  192.168.0.113         80-1f-02-9d-b4-ec     dynamic
  192.168.0.117         f4-ce-46-4d-22-bc     dynamic

Notice the physical (MAC) address of the Netduino; it has now taken the MAC of the Edimax. I have no idea how this happens. But I think that the effect is that when you address the Netduino by its IP, it is actually being resolved to the Edimax which passes the traffic through to the Netduino. Although not certain, I believe that all of these ethernet to wireless adapters work the same way. I would suggest that you re-setup your Netduino network parameters with MFdeploy and make certain you are on the same subnet of your network. When I was searching for Vonets, I did notice that the latest software was important to get the adapter working.




#58948 Spark Core (TI CC3000) Porting for Super WiFI Mini?

Posted by baxter on 29 June 2014 - 06:11 AM in Netduino Mini

Are you still working on your CC3000 Managed Driver? I noticed Jan 9 was the last commit on CodePlex. The 2nd generation CC3100 looks intersting. Maybe they have some of the CC3000 kinks worked out. I was going to buy a CC3200, but then changed my mind after recalling my experiences with the CC3000 Boost module and LaunchPad.

 

I purchased a Spark Core and it works pretty much as intended. It's easy to establish a local network connection, serve webpages and so on, but curiously, it won't respond to a ping. However, it will send pings and get responses. They blame this on firmware 1.29 which removed ping responses to fix an an ARP problem. Earlier firmware versions supposedly did have ping  response. In any event, I am reasonably happy with the Spark Core; I just wish it ran MF managed code.




#58926 NetDuino Plus 2 + Spark.io ?

Posted by baxter on 27 June 2014 - 06:53 AM in Netduino Plus 2 (and Netduino Plus 1)

I bought a Spark Core and it looks to be a nice companion to provide WiFi capability for a Mini or a Netduino 1 or 2 by talking over the serial port as EnergySmithe noted. There are two serial ports, serial and serial1. The former is the regular Arduino debug port to be used with a serial terminal and the latter would be used to talk to a Netduino. The IDE is cloud based with the same buttons as the Arduino IDE, verify, flash ... They also have an Android App to work with the pins and configure the core for your network. I found the following sample code for a webserver and it works like a charm. The only problem I see with it vs Netduino is shifting gears to program an Arduino.

TCPClient webClient;
TCPServer webServer = TCPServer(80);
char myIpAddress[24];
int LED = D7;

void setup() {
    pinMode(D7,OUTPUT);         // Turn on the D7 led so we know it's time
    digitalWrite(D7,HIGH);      // to open the Serial Terminal.
    
    Serial.begin(9600);

  // Now it's ok to open your serial terminal software, and connect to the
  // available COM port.  The following line effectively pauses your
  // application waiting for a character to be received from the serial
  // terminal.  While it's waiting it processes the background tasks to
  // keep your Core connected to the Cloud.  Press ENTER in your 
  // serial terminal to start your application.
  while(!Serial.available()) SPARK_WLAN_Loop();
  
    Spark.variable("ipAddress", myIpAddress, STRING);
    IPAddress myIp = Network.localIP();
    sprintf(myIpAddress, "%d.%d.%d.%d", myIp[0], myIp[1], myIp[2], myIp[3]);
    
    Serial.print("Spark Core connected to IP: ");
    Serial.println(myIp);
    digitalWrite(D7,LOW); // Turn off the D7 led ... your serial is serializing!
    
    webServer.begin();
}

void loop() {
    if (webClient.connected() && webClient.available()) {
        serveWebpage();
    }
    else {
        webClient = webServer.available();
    }
}

void serveWebpage() {
    //TODO: read in the request to see what page they want:
    //TODO: retrieve larger content from flash?

    webClient.println("<html>Hello I'm serving a webpage!</html>\n\n");
    webClient.flush();
    webClient.stop();
    delay(100);
}




#58925 convert data types to byte[] and back for streaming

Posted by baxter on 27 June 2014 - 05:47 AM in General Discussion

I previously confronted this issue and found a couple of references,
https://www.ghielect...3/serialization
http://bytes.com/top...ture-byte-array

I copied the structure serialize code (near the bottom of the page) from the second reference and it compiles
just fine on the Mini using firmware 4.2.0.1.

Imports Microsoft.SPOT
Imports Microsoft.SPOT.Hardware
Imports SecretLabs.NETMF.Hardware
Imports SecretLabs.NETMF.Hardware.NetduinoMini
Imports System.Reflection
Imports System.Runtime.InteropServices
Imports Microsoft.VisualBasic.Constants
Imports System.Text
Imports System.Threading
Imports System.Collections

Module Module1
    Sub Main()
        Dim s As Struct = New Struct
        Dim ms As MyStruct = New MyStruct With {.el1 = 1, .el2 = 2, .el3 = 3}
        Dim sb() As Byte = Struct.Convert(ms)
    End Sub

    <StructLayout(LayoutKind.Sequential, Pack:=1, Size:=12)>
    Private Structure MyStruct
        Dim el1 As Byte
        Dim el2 As Int16
        Dim el3 As Byte
    End Structure

    Public Class Struct
    'Charles Law 
    'http://bytes.com/topic/visual-basic-net/answers/357098-convert-structure-byte-array

        Public Shared Function Convert(ByVal MyStruct As Object) As Byte()
            Dim al As ArrayList
            Dim Fields As FieldInfo() = MyStruct.GetType.GetFields
            al = New ArrayList

            For Each fld As FieldInfo In Fields
                If fld.FieldType.Equals(GetType(Byte)) Then
                    ' Add byte to array list
                    al.Add(CByte(fld.GetValue(MyStruct)))

                ElseIf fld.FieldType.Equals(GetType(Int16)) Then
                    ' Add 16-bit value to array list
                    Dim i16 As Int16

                    i16 = CType(fld.GetValue(MyStruct), Int16)
                    al.Add(CByte(i16 >> 8))
                    al.Add(CByte(i16 And &HFF))
                Else
                    Throw New Exception("Cannot convert type.")
                End If
            Next fld

            Return DirectCast(al.ToArray(GetType(Byte)), Byte())

        End Function
    End Class

    Public Function PrintArray(title As String, ByVal Arr() As Byte) As String
        Dim s As String = title & vbCrLf
        For i = 0 To Arr.Length - 1
            s &= "i = " & i.ToString & "  " & "Byte = " & Arr(i).ToString("X2") & vbCrLf
        Next
        Return s.Trim
    End Function


End Module

I didn't run it for this post because my Mini is in storage. I lost interest in this because I found for my purposes it was easier to just convert the data type to a string and then convert the string to bytes and then reverse this to go back to the data type (not too efficient, but it works)




#58882 Windows on Devices? When?

Posted by baxter on 25 June 2014 - 01:07 AM in General Discussion

Hi All,

 

just registered on the windowsondevices web site, replied to their confirming email and some seconds later they replied again:

 

Quote: "Thank you for signing up for the Windows Developer Program for IoT.  We’ll let you know when your kit has shipped."

 

So appearantly something has changed ....

 

Cheers,

 

Me.

Got the same message ...

Interesting that they ask if using Spark IO (Spark Core) as a development board. I bought one and it does WiFi quite well. It has the  same footprint as the Mini; just a bit longer.




#58819 De-Icing, Chickens, and Artificial Sunrise

Posted by baxter on 21 June 2014 - 04:58 AM in General Discussion

Here is a nice automatic chicken door project from the UK,

http://www.picaxefor...ic-Chicken-Door




#58787 Sound Sensor, Wifi Shield and BreadBoard

Posted by baxter on 19 June 2014 - 06:51 PM in Netduino Plus 2 (and Netduino Plus 1)

I don't think there any Netduino specific WiFi shields. Look for an Arduino shield. Here is one,
https://www.sparkfun.com/products/9954
The problem with these shields is that the drivers are Arduino specific. This is a Netduino project using an Arduino shield with Netduino drivers,
http://forums.netdui...rary/#entry7870
But, expect to be frustrated with these shields because you need to talk to them over SPI. However, You don't need a WiFi shield. The Edimax simply turns your Netduino ethernet port transparently into a wireless connection; thereby avoiding all driver complications. After you configure the Edimax for your network, connect its ethernet port into the Netduino ethernet port, provide power to the Edimax and the Netduino will be connected to your wireless network. Also, another advantage is that you do not tie up any SPI pins.

 

If you want a stack arrangement,, just get a protoshield and affix the Edimax to it. The Edimax will fit exactly between the headers without any modification.




#58765 Sound Sensor, Wifi Shield and BreadBoard

Posted by baxter on 18 June 2014 - 05:55 PM in Netduino Plus 2 (and Netduino Plus 1)

Google is your friend,
http://www.newegg.co...N82E16833315095
http://www.ebay.com/...cat=0&_from=R40

You can buy breadboards anywhere; Mouser, Adafruit ...




#58711 How to 3D print your project a custom case!

Posted by baxter on 13 June 2014 - 11:36 PM in General Discussion

Yes, there is a reason. When the light shines just right you can see the surface roughness. The Da Vinci business model has also received a lot of criticism for the chipped, proprietary filament cartridge. I wish I could afford a Form1 printer. The Da Vinci is cheap enough to play with, but I think I would be disappointed with its results. Thanks for the information about your service.

 

 




#58704 How to 3D print your project a custom case!

Posted by baxter on 13 June 2014 - 04:58 PM in General Discussion

As someone obviously familiar with 3D printing, what do you think of the Da Vinci 1.0 3D Printer?

http://www.amazon.co...bs_6066127011_1




#58657 NetDuino Plus 2 + Spark.io ?

Posted by baxter on 10 June 2014 - 03:50 AM in Netduino Plus 2 (and Netduino Plus 1)

I don't think the Spark Core is Micro Framework compatible. You may have a bit of trouble connecting the hardware to a Netduino Plus 2. Maybe you could talk to it over the serial interface. Or perhaps, give your Netduino a wireless interface with an ethernet to wireless adapter ,

http://forums.netdui...-a-pc-wireless/




#58584 Starts in boot mode always after flash

Posted by baxter on 06 June 2014 - 03:48 AM in Netduino Mini

I resorted to 4.1 firmware and do not encounter this issue. Both TinyCLR and RESET are working.

 

After looking through the posts here, I see that the 4.2.0.0 firmware is not available. Does anyone have a copy of it that I can test?

Here is the link for Mini firmware 4.2.0.1, both RS232 and TTL

http://forums.netdui...-v420-update-1/





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.